An Ontology Design Pattern for Activity Reasoning Amin Abdalla1 , Yingjie Hu2 , David Carral3 , Naicong Li4 , Krzysztof Janowicz2 1 Institute for Geoinformatics,Vienna University of Technology, Austria 2 Department of Geography, University of California Santa Barbara, USA 3 Kno.e.sis Center, Wright State University, USA 4 University of Redlands, USA Abstract. Activity is an important concept in many fields, and a number of activity-related ontologies have been developed. While suitable for their desig- nated use cases, these ontologies cannot be easily generalized to other applica- tions. This paper aims at providing a generic ontology design pattern to model the common core of activities in different domains. Such a pattern can be used as a building block to construct more specific activity ontologies. 1 Introduction Activity is an important research topic in many fields, such as artificial intelligence, hu- man geography, transportation research, psychology, and human-computer interaction. As a result, there are a number of conceptual models that attempt to capture the se- mantics of activities. Existing activity ontologies (e.g.,[5] and [3]), however, are often designed for specific use cases and cannot be easily generalized to applications in other domains. This makes reuse difficult and raises the question whether there is a common, domain-independent core. Two main perspectives on activity modeling can be identified from the literature: a spatiotemporal-centric and a workflow-centric perspective. The first one treats activities as a set of temporally-ordered entities in space and time. This perspective has often been found in the literature on time geography [8], which attempts to capture human activities in the form of spatiotemporal constraints. This perspective has been translated into software systems capable of computing and analyzing spatial and temporal activity properties. However, this perspective does not consider the logical relations between activities, such as dependency or component relations. The second perspective treats activities as a workflow. This view is often found in planning-related applications, in which preconditions and effects of activities are important. Representative examples include the Planning Domain Definition Language (PDDL), or the Process Specification Language (PSL-core) [7]. Some patterns (e.g., Action ODP, Planning ODP, and Event ODP) accessible via the ODP portal5 , as well as the TOVE (Toronto Virtual Enterprise) ontology [5], also share this workflow-centric perspective, with an emphasis on activities that consume or occupy limited resources. This work aims at developing a more generic ontology design pattern (ODP) that incorporates parts of both perspectives. Such a generic ODP can be employed as a building block or strategy for designing more specific activity ontologies. While the PROV ontology6 also models activities and the associated entities, it focuses on record- ing the changes of entities and the representation of provenance information. Given the 5 http://ontologydesignpatterns.org 6 http://www.w3.org/TR/prov-o/ 2 fast development of ubiquitous sensor networks and the Internet of Things, more data about human activities are becoming available. These rich amount of data enable new applications, such as activity-based personal information management [1] and human trajectory modeling [9]. Thus, a generic activity ODP can help semantically annotate human activity data, thereby facilitating information retrieval as well as automatic rea- soning. Deriving an ontology design pattern requires a generic use case which can capture the recurring problems in different application domains [6]. Competency questions have been recognized as a good approach to detect and generalize the modeling requirements from multiple domains. They are queries that a domain expert would be expected to run against a knowledge base. For the proposed activity ODP, such competency questions include: – Question 1: "What are the requirements (or outcomes) of an activity?" – Question 2: "What is the place (or deadline) of an activity?" – Question 3: "What activities need to be completed first in order to start this activity?" – Question 4: "What are the other activities which can be started after this activity?" – Question 5: "What are the activities supported by this place?" – Question 6: "What activities happen before (or in parallel, or after) this activity?" 2 Pattern Description and Formalization This section presents the activity pattern by discussing the more interesting classes, properties, and axioms. Description Logics (DL) notation has been used to present the axioms. To encode the pattern, we use the logic fragment DLP9 as defined in [2], which allows for polynomial time reasoning. The proposed activity ODP has also been formally encoded using the Web Ontology Language (OWL). It is available at http://descartes-core.org/ontologies/activities/1.0/Activi tyPattern.owl . A schematic view of the pattern is shown in Figure 1 . Fig. 1. A schematic view of the Activity ODP. Activity: In accordance with PSL, our pattern allows activities to potentially con- sist of several component activities (which can yet again be associated with further component activities). In this way, aggregation over a set of activities into higher level activities is possible. We make use of the properties hasPart and isPartOf to formally denote this relation. These two roles, which are inverse roles with respect to each other, are declared both transitive and reflexive. Also, the Activity class is declared as disjoint with the classes of Requirement and Outcome. 3 We make use of the following axioms to enforce these characteristics 7 hasPart ⌘ isPartOf (1) hasPart hasPart v hasPart (2) > v 9hasPart.Self (3) Requirements and Outcomes: Dependency relations are important to model mul- tiple activities. To capture these relations, we make use of Requirements and Out- comes, i.e., the required inputs and resulting outputs of any given activity. In some cases, the outcome of one activity might be a requirement of another. If this is the case, we say the former activity precedes the latter, assuming that an outcome is only pro- duced after an activity was finished. Thus precedes does depict a logical relation that requires temporal precedence. We define the properties precedes and isPrecededBy as inverse roles, and declare them as transitive and irreflexive. hasOutcome isRequirement v precedes (4) Agent: The class of foaf:Agent from the FOAF ontology8 has been employed to represent an actor or an autonomous agent whose behavior is intentional. The foaf:Agent class can also be substituted by its sub classes, such as foaf:Group or foaf:Person, and therefore allows ontology engineers to further specify what type of participant is involved in the activity. The hasParticipant property depicts the involve- ment of an foaf:Agent in an activity. Spatiotemporal Relations: The spatiotemporal information associated to activities is captured through the following properties. – takesPlaceAt. This property indicates the place where an activity takes place. It can be used as a hook to align to other ODPs, e.g., the POI pattern. – hasStart. This property indicates the time an activity starts. – hasEnd. This property indicates the time an activity ends. – hasDuration. This property indicates the time period that an activity lasts. The value of duration should be equal to the difference between the start and end time of an activity. It is worth to note that the above spatiotemporal properties can be used to repre- sent not only past activities (i.e., activities that have already happened) but also future activities (i.e., activities scheduled in the future). The proposed activity ODP also distinguish two types of activities, namely Fixed Activity and Flexible Activity, as defined in the time geography literature [8,4]. These two types of activities can often be found in our daily life. Fixed activities refer to the activities that must be completed at a particular point in space and time (e.g., attending a meeting at the conference room at 3:30 pm). Flexible activities are activities which can be completed at a time and space range. For example, buying grocery after work is a flexible activity since it can be completed at any time after work and in different 7 The full axiomatization is not presented here due to lack of space. However, a complete OWL version is available online at Descartes-Core. 8 http://xmlns.com/foaf/0.1/ 4 stores. We define the following axioms to formally encode and automatically classify these two types of activities. 9hasStart.> u 9hasEnd.> v FixedActivity (5) 9hasStart.> u 9hasDuration.> v FixedActivity (6) 9hasEnd.> u 9hasDuration.> v FixedActivity (7) FlexibleActivity u 9hasStart.> u 9hasEnd.> v ? (8) FlexibleActivity u 9hasStart.> u 9hasDuration.> v ? (9) FlexibleActivity u 9hasEnd.> u 9hasDuration.> v ? (10) 3 Conclusions This paper proposed a generic ODP to capture the common core of activities in differ- ent domains. Specifically, it incorporates two perspectives towards activity modeling, namely the spatiotemporal perspective and the workflow perspective, which can often be found in existing work. Such a pattern can be used as a building block to design more domain specific ontologies. Acknowledgement This work is supported by the NSF under award 1017255 and "La Caixa" Foundation. References 1. Abdalla, A., Weiser, P., Frank, A.U.: Design principles for spatio-temporally enabled pim tools: A qualitative analysis of trip planning. In: Geographic Information Science at the Heart of Europe, pp. 323–336. Springer (2013) 2. Carral, D., Scheider, S., Janowicz, K., Vardeman, C., Krisnadhi, A.A., Hitzler, P.: An ontology design pattern for cartographic map scaling. In: The Semantic Web: Semantics and Big Data, pp. 76–93. Springer (2013) 3. Catarci, T., Habegger, B., Poggi, A., Dix, A., Ioannidis, Y., Katifori, A., Lepouras, G.: Intelli- gent user task oriented systems. In: Proceedings of the Second SIGIR Workshop on Personal Information Management (PIM) (2006) 4. Chen, X., Kwan, M.P.: Choice set formation with multiple flexible activities under space–time constraints. International Journal of Geographical Information Science 26(5), 941–961 (2012) 5. Fox, M.S., Chionglo, J.F., Fadel, F.G.: A common-sense model of the enterprise. In: Proceed- ings of the 2nd Industrial Engineering Research Conference. vol. 1, pp. 425–429 (1993) 6. Gangemi, A.: Ontology design patterns for semantic web content. In: The Semantic Web– ISWC 2005, pp. 262–276. Springer (2005) 7. Gruninger, M., Menzel, C.: The process specification language (psl) theory and applications. AI magazine 24(3), 63 (2003) 8. Hägerstraand, T.: What about people in regional science? Papers in regional science 24(1), 7–24 (1970) 9. Hu, Y., Janowicz, K., Carral, D., Scheider, S., Kuhn, W., Berg-Cross, G., Hitzler, P., Dean, M., Kolas, D.: A geo-ontology design pattern for semantic trajectories. In: Spatial Information Theory, pp. 438–456. Springer (2013)