Ontology-Based Support for Complex Events

With increasing demands for agility and reactivity of industrial and manufacturing processes, scientific circles and leading ICT (information and communications technology) companies have paid a lot of attention to EDA (event-driven architecture) and CEP (complex event processing). EDA and CEP enable event-driven systems systems in which actions result from business events 3. Despite the recognized need for support of events to improve factory automation, signal processing, data acquisition, manufacturing, and other applications of industrial electronics, the use of EDA and CEP approaches in real-world solutions remains limited. One of the reasons for this is insufficient support for semantics in capturing and defining of complex events (CE) 20. Existing EDA and CEP approaches do not take into consideration different expressivity requirements that are needed in definition of a large number of diverse CE. We observe that semantic descriptions providing effective and expressive models for understanding of CE structures and their processing can be very helpful. In this paper, we show how achievements in the field of semantic technologies can contribute to the field of CEs and their support in information systems, especially from the point of view of their definition and processing. We present a framework that enables highly expressive event models and is based on ontologies and the Web Ontology language (OWL). We see ontologies and ontology representation languages as an opportunity to effectively deal with CEs in EDAs. Ontologies intrinsically provide a means for highly expressive semantic descriptions. In our framework, they are used to semantically describe CEs through conceptualizations of member events they are composed of. An important characteristic of our approach is that existing information that is captured in ontology can be reused in event detection and thus a wider scope of information can be taken into consideration when determining whether a CE should be triggered. Furthermore, ontologies enable hierarchical definitions of CEs and event taxonomies, which facilitates working with events on different levels of abstraction. If not all information for determining the exact subclass of event is available at a certain point of time, their generalizations can be used in order to increase the level of proactive behaviour of the overall system. When the information is added to the ontology their specializations are derived and used automatically. We use the OWL as the ontology representation language, because it provides a very appropriate foundation for CE definitions and has a wide support for reasoning. We propose a service that makes part of an EDA and enables translation of event data to OWL, detection of CEs and their triggering. It can act as an event source and as an event sink, which makes our approach complementary to existing approaches to support CEs that require higher expressivity and semantic descriptions. Our framework has been used in a case study project for electrical distribution domain, where it has been shown to be very useful and has improved the overall system flexibility and reactivity.


Introduction
With increasing demands for agility and reactivity of industrial and manufacturing processes, scientific circles and leading ICT (information and communications technology) companies have paid a lot of attention to EDA (event-driven architecture) and CEP (complex event processing).EDA and CEP enable event-driven systemssystems in which actions result from business events 3. Despite the recognized need for support of events to improve factory automation, signal processing, data acquisition, manufacturing, and other applications of industrial electronics, the use of EDA and CEP approaches in real-world solutions remains limited.One of the reasons for this is insufficient support for semantics in capturing and defining of complex events (CE) 20.Existing EDA and CEP approaches do not take into consideration different expressivity requirements that are needed in definition of a large number of diverse CE.We observe that semantic descriptions providing effective and expressive models for understanding of CE structures and their processing can be very helpful.In this paper, we show how achievements in the field of semantic technologies can contribute to the field of CEs and their support in information systems, especially from the point of view of their definition and processing.We present a framework that enables highly expressive event models and is based on ontologies and the Web Ontology language (OWL).We see ontologies and ontology representation languages as an opportunity to effectively deal with CEs in EDAs.Ontologies intrinsically provide a means for highly expressive semantic descriptions.In our framework, they are used to semantically describe CEs through conceptualizations of member events they are composed of.An important characteristic of our approach is that existing information that is captured in ontology can be reused in event detection and thus a wider scope of information can be taken into consideration when determining whether a CE should be triggered.Furthermore, ontologies enable hierarchical definitions of CEs and event taxonomies, which facilitates working with events on different levels of abstraction.If not all information for determining the exact subclass of event is available at a certain point of time, their generalizations can be used in order to increase the level of proactive behaviour of the overall system.When the information is added to the ontology their specializations are derived and used automatically.We use the OWL as the ontology representation language, because it provides a very appropriate foundation for CE definitions and has a wide support for reasoning.We propose a service that makes part of an EDA and enables translation of event data to OWL, detection of CEs and their triggering.It can act as an event source and as an event sink, which makes our approach complementary to existing approaches to support CEs that require higher expressivity and semantic descriptions.Our framework has been used in a case study project for electrical distribution domain, where it has been shown to be very useful and has improved the overall system flexibility and reactivity.

Background and related work
Events, event-driven architecture and complex event processing.Some of the biggest improvements in business processes and information systems in the current era are esteemed to be achieved through the discipline of event processing 4.An entity is considered event-driven when it acts in response to an event.EDA is a paradigm that describes an approach to information systems development with a focus on developing an architecture that has the ability to detect events and react intelligently to them 19.EDA represents a complement to the service-oriented architecture (SOA), which has become one of the most recognized paradigms in information systems development in the recent years 17.By enhancing the paradigm of SOA, enterprises can gain improve their ability for business transformation 21 by implementing event-driven architectures that automatically detect and react to significant business events 419.An important part of every EDA that enables and predetermines to what level a system is able to detect and respond to CEs is complex event processing (CEP).CEP is computing that performs http://dx.doi.org/10.5755/j01.eee.113.7.618 operations on CEs, including reading, creating, transforming, or abstracting them 10.CEP systems can be classified as advanced decision support systems 15.In comparison with other types of decision support systems, such as data mining based decision support systems that are not event driven 16, CEP systems focus on and on increasing system reactivity and proactivity based on information carried by member events.An event pattern is a template that matches certain sets of events 11.Events can be simple or complex 10:  A simple event is as an event that is not an abstraction or composition of other events;  A complex event is an event that is an abstraction of other events called its members.Ontologies.An ontology represents an explicit specification of a conceptualization 7.There are several languages available for ontology representation, such as DAML, CGs, OIL, DAML+OIL, OWL (OWL 1, OWL 2).To support definition and processing of events, our work is based on OWL 2 extended with SWRL (Semantic Web Rule Language.The reason for this is that OWL represents a rich and useful group of ontology features for defining and describing relations and concepts 9, a high level of support, and its XML foundations, which make it appropriate to be used in conjunction with other Web technologies.The main concepts of OWL are Classes, Properties, and Individuals.This means that besides an the ontology that provides a conceptual representation, an OWL document can also comprise instance level descriptions of an enterprise.SWRL enables definition and processing of rules -implications between antecedents and consequents.
EDA and CEP approaches based on semantic technologies.The use of ontologies in the field of EDA and CEP has been identified as a suitable approach for the semantic definition of events by many researchers.Cheng et al. 5 have proposed a framework for context-aware processing of business rules in event-driven architectures.They have developed a context ontology in order to resolve a problem of inconsistent dictionaries at knowledge sharing and merging of rules.A key difference between their approach and ours is that they focus on achieving semantic interoperability, whereas our goal is to use ontology to define and detect CEs.Sen and Ma 18 have proposed an approach for combining reactive rules with ontologies.They have used ontologies to capture the context in which certain behaviour is appropriate, together with techniques for finding similarities with the primary objective to enable detection of similar CE patterns.Their research is related to our approach with the key difference that they do not talk about how CE types can be defined by the ontology, and how they can be used for detection in the context of EDA.Moser et al. 12 have proposed semantic correlation of events by using ontologies.Their work is based on the observation that the event correlation is necessary for CEP to relate events obtained from various sources in order to detect patterns and situations of the business context.Paschke 13 has proposed a language for semantic design of CEP patterns.The purpose of the language is to provide a description of successful CEP designs and to build libraries of best practice CEP descriptions and patterns.Adaikkalavan and Chakravarthy 1 propose an interval-based event specification language developed by expressing simple and composite events that are part of active rules.By contrast with these two approaches, we propose an EDA framework using an existing ontology language, which allows for usage of reasoners and other available tools that support the standard OWL language.Several authors propose definition and detection of events by using ontologies in the field of video multimedia data; examples are 2 and 6.On the other hand, our work is generic and not domain specific.

Architectural framework
In order to enable CE definitions, detection and triggering based on ontologies and the OWL language, we have developed an event-driven architectural framework.It defines a Complex Event Service (CES) that makes part of the overall event-driven service oriented architecture.The CES is strictly event driven: it is an event sink and an event source, and its interface does not define operations such as is the case with Web services.It catches events and triggers CEs when it detects them based on their definition and member events occurrences.The CES is responsible for detection of CEs based on their complex event definitions and member event occurrences:  The CES acts as an event sink for member events of the CEs it is responsible for;  The CES acts as an event source for the detected CEs.Thus, necessary and sufficient membership conditions represent the join between the domain and the event concepts.Domain ontology, member event types and their relevant properties may not always be enough to define a CE.CEs may not only depend on occurrences of other events, but also on the current state of some entity or a general state of the system (not directly related to any other concept in the ontology).For example, two events may occur that represent a CE in some state of the overall system, even though this may not be the case in some other state of the system.For such cases, the class State is defined with an individual currentState, representing the state of the overall system and its environment.An example property of this class is currentDate: State → date.
The data property trigger: ComplexEvent → boolean is used to determine when a CE should be triggered.When a member of the ComplexEvent class has the positive value of this property, the Complex event service manager triggers the event.
In the electrical distribution domain, we demonstrate a semantic definition of an increased electricity consumption prediction event.An increased consumption prediction event is a CE that occurs when certain conditions apply that indicate that the consumption of electricity will be increased compared to planned or expected consumption.There are many conditions that can apply.In this paper, we take an example of weather conditions.Due to unexpected fall in temperature or snow before winter, electric heating is the only source of energy or the most used source of energy in certain areas, because charcoal and biomass are mostly saved for winter and have different terms of payment.Therefore, it is highly probable that the electricity consumption in the household sector will increase in such cases.An example SWRL statement indicating when an increased consumption prediction event for the household sector should be triggered is IncreasedConsumptionPredictionEvent(?e) ∧ hasCurrentDate(?s, ?cd) ∧ WeatherConditionsForecast(?nwf) ∧ hasDate(?nwf,?cd) ∧ ExtremelyColdWeather(?nwf) → trigger(?e,true) ∧ inSector(?e,householdSector).
The ontology concepts used in CE definitions can be defined recursively.For example, ExtremelyColdWeather can be defined as weather conditions where:  The temperature difference between the average weather temperatures expected for the given time and the given temperatures is negative and less than the border value;  The given temperatures is below the temperature limit indicating when the heating is required.

Translator
When a relevant member event is passed to the CES, the information that this event carries is translated to the OWL knowledge base (KB) containing OWL ontology and existing OWL instance level data.In the most basic form, event data carries information about the occurrence of the event and its temporal information, such as when it occurred or when it started or ended, if the event has a duration.However, in most cases the event data also carries other event-related information.Relevant event data may need to be merged with the existing data contained in OWL.To accomplish this, translations need to be specified between the event payload that carries the new data and between the OWL ontology concepts.Based on the translations, the data is translated into OWL.What part of data should be translated depends on the required information that has to be known in order to be able to determine if and when the CE occurs or does not occur.The translation of event data to OWL affects the instance level of the OWL document and not its ontology (conceptual level).

Reasoner
Reasoner is the component that infers upon the OWL KB in order to derive new information.In our framework, the main purpose of this is to determine whether a CE has occurred or not.If all the CE definitions have been appropriately defined and if member event data is correctly translated into OWL, a new CE is detected when an individual is inferred to be a member of a CE class and has the value of its trigger property "true".This is an indicator for the event ontology handler that a CE should be announced by the CES.There are several available reasoners that can be used and support OWL, SWRL or both; examples are HermIT, Fact++, Pellet, and RacerPro.

Event ontology handler
Event ontology handler is responsible for actions upon event ontologies that are required in order to maintain it in a consistent state and up-to-date.It is also responsible for other activities, such as optimized reasoner invocations and merging existing OWL ontologies with translated OWL document.When an event is passed to the CES, the Event ontology handler activates those event ontologies in which the event that was caught is a member event of an event defined in the ontology.Every event ontology can be active or inactive.A trigger that defines when an event ontology should become active and processed has to be defined.Such triggers are represented by an occurrence of an event of a certain type.When such event occurs the corresponding event ontologies become active.An active OWL ontology is used as a part of the OWL KB.When it becomes active, individuals of every CE subclass are added to the KB.A CE type definition may address one or more member events of the same event type.For every occurrence of an event that the event ontology is subscribed to, an individual is added to the corresponding event OWL class.When inference by the Reasoner results in the trigger property value "true" for an individual that is a member of the ComplexEvent class, then the Complex event service manager triggers the complex event(s) and the Event ontology handler removes the complex event individual and member event individuals from the OWL KB.If there are no remaining individuals of the member event classes in the active OWL ontology, then the Event ontology handler returns the event ontology into the inactive state.Thus the event ontology handler handles OWL instances and does not act upon OWL's conceptual level.It maintains the basic CE instances and the trigger property values based on the actions it takes in response to event instances with the trigger property values true.

Conclusions and further work
In this paper we have presented a novel approach to defining and detecting complex events, which provides highly expressive complex event definitions using OWL ontologies extended with the SWRL.We have developed an EDA framework of the Complex Event Service that extends the service-oriented system architecture.This is especially important in environments with frequently changing business requirements.Our ontology-based framework for complex events comprises the design and run-time aspects of complex events.Complex event types are defined in design time with the ontology representation language OWL.At run-time, our CES reacts on incoming member events, infers and triggers complex events.The case study from the domain of electrical distribution has shown several important advantages of our framework.Firstly, it supports definition of complex event types with semantic expressivity requirements of various complexities.Secondly, the framework supports hierarchical definitions of complex event types.A complex event type can have several specializations, for example each with specific additional conditions.This allows for greater flexibility and allows for working with different levels of detail.Based on the information that is available, more or less specific event can be triggered.Furthermore, our framework integrates event and domain information, thus enabling to perform more complete and accurate inferences about complex event occurrences.In our case study, before our framework was applied, most of the member events had to be monitored manually to determine if a complex event has occurred.The reason for this was that most of the required complex events were not supported by other available systems.Our framework contributed to this situation and provided automatic support for complex events.The human resources that previously supported complex events could be reassigned.Ontologies have served as a very appropriate mechanism to support complex event types where semantics plays an important role and where domain information has to be taken into consideration.If numerical calculations are required to determine if a complex event has occurred, our framework can be used as a complement to other existing EDA and CEP approaches.Our framework is defined in a way, that supports such integration on the EDA level through event enabled ESB.
In our further work, we intend to extend the framework into a methodology that integrates the complex event development support with the business process modeling and execution.

Fig. 1 .
Fig. 1.Overall event-driven system architecture 8 and the Complex Event Service

Fig. 1
Fig. 1 illustrates the structure of the CES and places it into the overall scope of EDA.The proposed architecture extends the architectural model of an enterprise service bus (ESB) based service-oriented system architecture proposed by Juric et al. in 8. ESB has become an important integration technology 22; in the scope of our work, it plays a central role in event detection, triggering and distribution.The CES is responsible for detection of CEs based on their complex event definitions and member event occurrences: The CES acts as an event sink for member events of the CEs it is responsible for;  The CES acts as an event source for the detected CEs.