Semantic-based Complex Event Processing in the AAL Domain Yongchun Xu, Peter Wolf, Nenad Stojanovic and Hans-Jörg Happel FZI, Research Center for Information Technology, Haid-und-Neu-Str. 10-14, 76131 Karlsruhe, Germany {xu, wolf, nstojano, happel}@fzi.de Abstract. Ambient assisted living (AAL) is a new research area focusing on services that support people in their daily life with a particular focus on elderly people. In the AAL domain sensor technologies are used to identify situations that pose a risk to the assisted person (AP) or that indicate the need of proactive assistance. These situations of interest are detected by analyzing sensor data coming from a whole variety of sensors. Considering the need for immediate assistance especially in the case of safety- and health-critical situations, the detection of situations must be achieved in real-time. In this paper we propose to use Complex Event Processing (CEP) based on semantic technologies to detect typical AAL-like situations. In particular, we present how the ETALIS CEP engine can be used to detect situations in real-time and how this can lead to immediate and proper assistance even in critical situations in conjunction with the semantic AAL service platform openAAL. Keywords: Complex Event Processing, Ambient assisted living, Real-time, Semantic Technologies, Context-aware, ETALIS, openAAL 1 Introduction Ambient assisted living (AAL) is a newly research area focusing on services that support people in their daily life and particular focus on elderly people. The services include reminding and alerting the assisted person (AP), giving feedback, advice, and impulses for physical or social activities, among others. [1] In AAL, sensor technologies monitor devices, environmental conditions, health parameters and location information. This information is used to build a knowledge base capturing the current situation of the AP. This situational knowledge is used by context-aware services to provide personalized assistance, i.e. services can adapt to the current situation of the user. Semantic technologies that enable modeling of complex situations, easy integration of sensor data and automatic service discovery are considered to be a perfect fit for enabling context-aware services in the AAL domain. However, considering the need for immediate assistance especially in the case of safety- and health-critical situations, the detection of situations must be achieved in real-time. 2 Yongchun Xu, Peter Wolf, Nenad Stojanovic and Hans-Jörg Happel Complex event processing (CEP), a software technology for the dynamic processing of high volume events, can be considered a perfect match for detecting critical situations. With CEP, it is possible to express causal, temporal, spatial and other relations between events. These relationships specify patterns in which the event stream is searched in real-time. [2] In this paper, we combine the AAL service platform openAAL, that acts as central gateway to sensor events and AAL services, with the ETALIS [3] engine for complex event processing based on semantic technologies to detect critical situations based on sensor events in real-time. 2 Semantic-based Event Processing in AAL Figure 1 shows the architecture of semantic-based event processing in the AAL domain. The system is based on the OSGi service middleware and consists of two main sub systems the service platform openAAL and the ETALIS CEP system, which are combined by the linkage component. Fig. 1. The Architecture of Semantic-based Event Processing in the AAL domain 2.1 OpenAAL OpenAAL1 [1] represents a flexible and powerful middleware for AAL scenarios. The openAAL platform enables easy implementation, configuration and situation- dependent provision of flexible, context-aware and personalized IT services. It consists of three components: procedural manager, composer and context manager. The context manager provides a sensor-level interface to connect with sensor- bundles. Sensor bundles provide sensors events which are saved in a context store. Both context store and sensor-level interface are derived from a sensor ontology. Situations of the assisted person (AP) are modeled by complex event patterns and are detected through CEP based on sensor events and background knowledge. The procedural manager manages and executes workflows, which are triggered as reaction 1 OpenAAL is available as open source implementation at http://openaal.org Semantic-based Complex Event Processing in the AAL Domain 3 to certain situations. The composer selects and combines services from the set of currently available services to achieve service goals defined in the workflow. 2.2 ETALIS CEP System We use CEP to detect critical situation based on sensor events in real-time. The ETALIS CEP system consists of three components: Event Pattern Editor, ETALIS CEP engine and Event visualization. The core component is the ETALIS engine2, which is based on a declarative semantics, grounded in Logic Programming. Complex events are derived from simpler events by means of deductive rules. Due to its root in logic, ETALIS engine also supports reasoning about events, context, and real-time complex situations (i.e., Knowledge-based Event Processing), which is a very important feature for the event processing in the AAL domain. In addition to reasoning about sensor-events, ETALIS can also incorporate useful background knowledge into its reasoning. Moreover, ETALIS supports work with out-of-order events3, which might occur often in a sensor network. ETALIS detects safety- and health-critical situations of APs from sensor events according to the complex event patterns that can be defined by users through the event pattern editor. The event pattern editor provides a user friendly user interface enabling easy definition of patterns. The event visualization displays the event activities in the CEP system. Visualization enables a contextual analysis of emerging complex events and supports the decision making process (e.g. how to react on a particular situation). 2.3 Linkage We combine both sub systems (openAAL and ETALIS) by creating a linkage component. The linkage component transforms sensor events and useful background knowledge (both represented in openAAL in a RDFS-like ontology) into the corresponding ETALIS formats and transmits the information. The linkage component also implements an adapter for ETALIS CEP engine to enable running ETALIS in a JAVA environment while ETALIS is implemented in Prolog. 3 Use Case and Validation The benefits of CEP lie in the efficient real-time detection of complex events. In the AAL domain these aspects are needed when it comes to situations where assistance needs to be provided immediately. Our use case is based on the problem area of forgetfulness which has been identified as one of the main problems among the elderly. [4] Due to forgetfulness a critical situation can emerge when devices like iron, stove and oven are forgotten 2 ETALIS engine is open source and can be downloaded from http://code.google.com/p/etalis/. 3 An out-of-order event is the event which has been registered with a delay 4 Yongchun Xu, Peter Wolf, Nenad Stojanovic and Hans-Jörg Happel when leaving the home. Our idea is to identify such a safety-critical situation by means of CEP and then immediately remind the AP when he/she is still at home; thus allowing the person to intervene. In more severe cases of forgetfulness critical devices can be automatically turned off. This use case can be accomplished by the interaction between openAAL and ETALIS. openAAL with its attached sensors is able to provide sensor information that can be used to detect such a critical situation. Sensors used in this scenario include electricity consumption sensors, door sensors, identification sensors (e.g. RFID), location sensors to distinguish leaving from entering the home and a sensor detecting the ringing of a door bell (the latter to enhance detection reliability). All those sensor events are sent to the ETALIS event engine which is identifying the critical situation by means of complex event patterns. Note that for a reliable detection of a person leaving the right order of events is especially important; also background knowledge can be integrated for further increasing detection reliability. In addition to the real-time properties, the ETALIS system is also supporting design and maintenance of complex event patterns which can help to reduce the creation of wrong or bad patterns. Once this situation has been detected, services running locally on the openAAL platform can be executed to immediately remind the AP of the potentially critical situation using a touch screen display right next to the front door. 4 Conclusion In this paper we introduced intelligent semantic-based complex event processing in AAL using the ETALIS event engine to detect critical situations in real-time. In this approach sensor data coming from a variety of sensors is processed by ETALIS to detect situations modeled as complex event patterns. Based on this real-time situation detection, services, running on a local service platform, can provide proper and immediate assistance. As a next step we will evaluate the implemented system in a real world setting and improve the system according to the results of the evaluation. Furthermore, we would like to apply the system in other domains that require real- time processing especially in high-load environments. Reference [1] Wolf, P., Schmidt, A., Klein, M. Applying Semantic Technologies for Context-Aware AAL Services: What we can learn from SOPRANO In: Workshop on Applications of Semantic Technologies 09, Informatik 2009, Lecture Notes in Informatics vol. , GI, 2009 [2] Luckham, D. The Power of Events: An Introduction to Complex Event Processing in Distributed Enterprise Systems. Addison-Wesley, 2002 [3] Anicic, D., Fodor, P., Rudolph, S., Stühmer, R., Stojanovic, N., Studer, R. A Rule-Based Language for Complex Event Processing and Reasoning, RR 2010 [4] Larrabee, G. J., Crook III, T. H. Estimated Prevalence of Age-Associated Memory Impairment Derived From Standardized Tests of Memory Function. International Psychogeriatrics (1994), 6:1:95-104 Cambridge University Press