<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Framework for Feeding Linked Data to Complex Event Processing Engines</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dong Liu</string-name>
          <email>d.liu@open.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Carlos Pedrinaci</string-name>
          <email>c.pedrinaci@open.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>John Domingue</string-name>
          <email>j.b.domingue@open.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Knowledge Media Institute, The Open University Walton Hall</institution>
          ,
          <addr-line>Milton Keynes, MK7 6AA</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>A huge volume of Linked Data has been published on the Web, yet is not processable by Complex Event Processing (CEP) or Event Stream Processing (ESP) engines. This paper presents a framework to bridge this gap, under which Linked Data are rst translated into events conforming to a lightweight ontology, and then fed to CEP engines. The event processing results will also be published back onto the Web of Data. In this way, CEP engines are connected to the Web of Data, and the ontological reasoning is integrated with event processing. Finally, the implementation method and a case study of the framework are presented.</p>
      </abstract>
      <kwd-group>
        <kwd>Linked Data</kwd>
        <kwd>Complex Event Processing</kwd>
        <kwd>ontology mapping</kwd>
        <kwd>rule-based reasoning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        With the development of the Semantic Web, a huge volume of Linked Data has
been published on the Web. On the other hand, with the rise of Complex Event
Processing (CEP) and Event Stream Processing (ESP) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], steps have been made
towards their integration with semantic technologies, i.e. Semantic CEP [
        <xref ref-type="bibr" rid="ref15 ref5">5, 15</xref>
        ].
However, Linked Data is not processable by CEP or ESP engines for several
reasons: i) the existing engines, such as Drools Fusion1 and Esper2 are
objectoriented and lack the capability of accessing the Web of Linked Data; ii) although
there are a set of tools for generating Java objects from RDF statements3, it
is still di cult for CEP engines to manipulate Linked Data, because of the
heterogeneity of schemas or ontologies de ned by independent data providers;
iii) semantic repositories cannot perform temporal reasoning over RDF triples.
Extensions to RDF and SPARQL have been made to address these issues [
        <xref ref-type="bibr" rid="ref14 ref3">14, 3</xref>
        ],
but they are not realizable because of the requirement of modifying the semantic
repositories or query execution engines.
      </p>
    </sec>
    <sec id="sec-2">
      <title>1 http://www.jboss.org/drools/drools-fusion.html</title>
    </sec>
    <sec id="sec-3">
      <title>2 http://esper.codehaus.org</title>
    </sec>
    <sec id="sec-4">
      <title>3 http://semanticweb.org/wiki/Tripresso</title>
      <p>This paper presents a more practical approach: Linked Data are imported
from external sources by being transformed into events conforming to
EVOCore, a lightweight but generic ontology. CEP engines process such events with
the support of a Java API generated for manipulating the EVO-Core ontology.
The results of event processing will be RDF-i ed again and published on the Web
of Data. Under this framework, the integration of ontological reasoning and CEP
is achieved without any modi cations to the RDF and SPARQL standards.</p>
      <p>
        To demonstrate the work ow of the proposed framework, the development
of a simple analytical system for user logs in iServe is used as a running example
in this paper. iServe [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] is a platform for publishing Semantic Web Service
(SWS) descriptions as Linked Data. It is notable that all the data in iServe,
including logs of the creation and removal of services, are pure RDF. Therefore,
the underlying repository of iServe can be regarded as an external data source
having its own schema. In addition, Drools Fusion is used as the example event
processing engine, due to its ability to deal with both event streams and clouds.
      </p>
      <p>The rest of this paper is organized as follows: Section 2 reviews the recent
work on Semantic CEP. Section 3 summarizes the work ow of the proposed
framework at both design time and runtime. Section 4 and Section 5 respectively
discuss two critical issues regarding the framework: the event modelling and
generation. Section 6 sketches the architecture of the implemented prototype.
Section 7 demonstrates the use of the framework. Finally, Section 8 concludes
the paper and introduces our future research objectives.
2</p>
      <sec id="sec-4-1">
        <title>Related Work</title>
        <p>
          Earlier research on semantic event modelling is presented in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], which proposes
an approach to reveal the semantics of events by means of classi cation,
aggregation, generalization and association. As a result, a knowledge representation
scheme for events is developed to describe complex events, especially the
relationships between them. However, the paper only presents theoretical work, and
does not touch upon the processing of semantic events.
        </p>
        <p>
          SQL-like and algebra-based event languages are designed to specify the
semantics of events [
          <xref ref-type="bibr" rid="ref4 ref6">4, 6</xref>
          ]. Nevertheless, they also lack solid support from event
processing engines. With advances in Semantic Web technologies, more
practical solutions to Semantic CEP are proposed [
          <xref ref-type="bibr" rid="ref14 ref3">14, 3</xref>
          ]. In [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], the authors present
a formal extension to the RDF data model, which is called Time-Annotated
RDF (TA-RDF). The main idea is to attach a timestamp to each group of
RDF triples. The authors of [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] to extend the standard SPARQL query
language by adding four binary temporal operators: SEQ, EQUALS, OPTIONAL-SEQ,
and EQUALS-OPTIONAL, so that Semantic CEP can be done by executing Event
Processing SPARQL (EP-SPARQL) queries. Obviously, both these two solutions
require modi cations to and optimizations of SPARQL query engines and RDF
repositories. In contrast, the framework proposed in this paper is based on
standard semantic modelling and query language, i.e. RDFS and SPARQL, as well
as a mature and well-used CEP engine.
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Work ow</title>
        <p>At design time, the work to build up an event processor consuming Linked Data
includes three stages listed below. Additionally, it also involves some trivial tasks
such as con guring the connectors to RDF repositories, setting the options of
the CEP engine, etc.</p>
        <p>{ Event (Stream) Modelling: De ne domain speci c events and split them
into di erent streams. Write SPARQL CONSTRUCT queries, which are
executed at runtime to produce event streams.
{ Code Generation: Automatically generate Java API for manipulating
events and the event processing results, using the code generator provided
by RDFReactor. It may also require auxiliary coding work to be done
manually, e.g. translating instances of Java Calendar into time in the format of
milliseconds.
{ Rule De nition: De ne rules for event processing. If needed, develop some
helping functions of, for instance, accessing external SPARQL endpoints on
the Web of Data, publishing rule-base reasoning results as Linked Data, etc.</p>
        <p>In brief, the results of work done at design time contain: i) an application
oriented event model, ii) Java libraries for manipulating event model and
processing results, iii) the speci cation of rules for event processing. All of these
are inputs to the runtime modules, which work following the ow illustrated
by Fig. 1. Event streams are formed by executing SPARQL CONSTRUCT queries</p>
        <p>RDFReactor
against certain sets of Linked Data on a regular basis, and, when necessary,
SPARQL DESCRIBE queries may also be executed to make a snapshot of the
concerned entities. If a RDF triple store like BigOWLim4 o ers a noti cation
mechanism, the data transformation will be performed when being noti ed by
the triple store. With the runtime supports of RDFReactor5 and RDF2Go6, the
generated event streams are sent to Drools Fusion in the form of Java objects.
Drools Fusion performs rule-based reasoning, as well as temporal reasoning over
the received Java objects, then RDF-i es the results and saves into the assigned
semantic repository by invoking the Java APIs generated at design time.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4 http://www.ontotext.com/owlim/big</title>
    </sec>
    <sec id="sec-6">
      <title>5 http://semanticweb.org/wiki/RDFReactor</title>
    </sec>
    <sec id="sec-7">
      <title>6 http://semanticweb.org/wiki/RDF2Go</title>
      <p>The proposed framework aims at bringing together Linked Data and rule-based
CEP engines, so the following requirements and issues are taken into account
when building the conceptual model of events.</p>
      <p>{ Usability: This is made up of two aspects: i) following the Linked Data
principles, especially the ability to be interlinked to RDF triples on the Web
of Data; ii) ease of being fed into CEP engines such as Drools Fusion.
{ Extendibility: The event model should be in the form of a generic ontology,
rather than a domain speci c one, and must be easy to apply to di erent
application areas.
{ Expressiveness: The model may be able to describe complex events and
event streams, as well as the timing, causality, aggregation and hierarchy of
events.
{ Simplicity: Some applications powered by CEP engines, e.g. Business
Activity Monitoring (BAM), are real-time or quasi real-time systems. Thus,
light-weight semantics of the event model should minimize the impact of
ontological reasoning on performance.</p>
      <p>owl:Thing
ec:Event
ec:EventStream
xsd:dateTime
ec:AtomicEvent
ec:ComplexEvent</p>
      <p>sp:Construct</p>
      <p>Namespaces
xoswdl:: hhttttpp::////wwwwww..ww33..oorrgg//22000021//0X7M/oLwSlc#hema# escp:: hhttttpp::////ksmpiin.ordpfe.onr.ga/cs.pu#k/ontologies/evo-core#</p>
      <p>As visualized by Figure 2, EVent Ontology Core (EVO-Core) is de ned in
RDF Schema to ful ll the presented demands. It contains four key concepts:
{ Event, is a concept on the highest level of abstraction and the common
ancestor of AtomicEvent and ComplexEvent. A particular property
timestamp is used to specify the time when the event happens, and subEventOf
is for modelling the hierarchy of events. The values of property concerns are
external links to instances of owl:Thing.
{ AtomicEvent, refers to an instantaneous occurrence of interest.
{ ComplexEvent, may be built up from a set of other events that hold certain
temporal relationships or satisfy constraint conditions on their attributes.
The property causedBy captures causality among events.
{ EventStream, is a timely sequence of individual events that come from
a data source. The property inStream associates events to streams that
come into being by repeatedly executing SPARQL CONSTRUCT queries. Here,
the queries are expressed using SPARQL Inferencing Notation (SPIN7),
and stored as instances of sp:Construct associated with event streams via
generatedBy. SPIN is essentially a set of vocabularies for writing SPARQL
queries in RDF. This way, machines can carry out further reasoning over
queries, such as checking their correctness. Similar to subEventOf, the
property subStreamOf models the hierarchy of event streams.</p>
      <p>
        E orts have already been made to build the conceptual model of events,
and relevant ontologies are found in [
        <xref ref-type="bibr" rid="ref11 ref13">13, 11</xref>
        ]. However, they are neither general
purpose, nor suitable for being processed by CEP engines. The Event ontology
originates from research in the digital music area, where an event \is regarded
as an arbitrary classi cation of a space/time region, by a cognitive agent" [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        From an arti cial intelligent perspective, it is believed that an event may
have ve key features: a location, a time, active agents, factors and products.
Thus, the Event ontology de nes one property for each of the ve features.
However, at least in some cases like the iServe logging analysis, location might
not be applicable. Because the range of the time property is arbitrary temporal
entities, i.e. either Instant or Interval de ned in the OWL Time Ontology [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ],
events cannot be sent directly to CEP engines like Drools Fusion, which only
can handle timestamps in milliseconds. As for the other three properties, i.e.
agent, factor and product, if necessary, they can be de ned as sub-properties
of concerns in EVO-Core. In general, everything that induces or relates to the
occurrence of an event will be a value of concerns, even the instances of Instant
and Interval mentioned above. Another weakness of Event ontology is the lack
of a facility for expressing complex events and event streams. It only provides
one property, called sub event, to capture the hierarchy of events, and nothing
for causal relationships among events.
      </p>
      <p>
        EVent Ontology (EVO) is another representative event model [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. It is the
outcome of our previous work, but also the cornerstone of EVO-Core. The di
erence between these two ontologies is that the target application area of the EVO
ontology is Semantic Business Process Management (SBMP), especially
Business Process Analysis (BPA). EVO just extends the Core Ontology for Business
pRocess Analysis (COBRA) with several concepts related to states and
transitions of process or activity instances, i.e. seven Process Monitoring Events and
twelve Activity Monitoring Events, so as to track the running status of business
activities. In short, EVO-Core is a generalized version of EVO, further enhanced
by the ability to describe complex events and event streams.
5
      </p>
      <sec id="sec-7-1">
        <title>Event Generation</title>
        <p>As highlighted earlier, Linked Data are published by independent providers,
following di erent schemas that are not designed for being processed by CEP</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>7 http://spinrdf.org/spin.html</title>
      <p>
        engines. Therefore, it requires ontological mappings [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] between the schema of
Linked Data and the event model. This section explains the process of mapping
and translating Linked Data into events through an example of iServe logging
system [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Listing 1 shows part of the schema de nition of iServe user logs.
log : LogEntry a rdfs : Class ; log : hasDateTime time : Instant ;
      </p>
      <p>log : hasAction log : Action ; log : hasAgent foaf : Agent .
time : Instant a rdfs : Class .
time : inXSDDateTime rdfs : domain time : Instant ; rdfs : range xsd : dateTime .
log : Action a rdfs : Class .
log : ServiceRepositoryLogEntry a log : LogEntry .
log : ItemCreation rdfs : subClassOf log : Action ; log : createdItem log : Item .
log : ItemDeleting rdfs : subClassOf log : Action ; log : deletedItem log : Item .</p>
      <sec id="sec-8-1">
        <title>Listing 1. RDF schema of iServe log entries.</title>
        <p>Extensions are made to the EVO-Core ontology to describe the iServe user
behaviours. Two new concepts ServiceCreated and ServiceDeleted are
dened as sub-classes of AtomicEvent. Moreover, two sub-properties of concerns,
concernsAgent and concernsService are also added to the ontology. The
ServiceCreated event happens when a new service is uploaded to iServe, whereas
ServiceDeleted occurs when it is removed by an iServe user. As the name
implies, concernsAgent and concernsService respectively keep the user's FOAF
ID and the URI of the service. Finally, LoggingSystemError is de ned as a
ComplexEvent, which can be caused by not only a wrong temporal relationship,
i.e. a ServiceDeleted event occurred before a ServiceCreated event, but also
by the absence of the corresponding ServiceCreated event of a ServiceDeleted
event.</p>
        <p>Formulae (1) and (2) formalize the morphism from the RDF schema of iServe
logs to the extended EVO-Core ontology:</p>
        <p>ServiceRepositoyLogEntry(l) ^ hasAction(l; a) ^ hasAgent(l; g) ^ hasDateT ime(l; i)^
inXSDDateT ime(i; t) ^ ItemCreation(a) ^ createdItem(a; s) ServiceCreated(e)^
concernsAgent(e; a) ^ concernsService(e; s) ^ timestamp(e; t)
ServiceRepositoyLogEntry(l) ^ hasAction(l; a) ^ hasAgent(l; g) ^ hasDateT ime(l; i)^
inXSDDateT ime(i; t) ^ ItemDeleting(a) ^ deletedItem(a; s) ServiceDeleted(e)^
concernsAgent(e; a) ^ concernsService(e; s) ^ timestamp(e; t)
(1)
(2)</p>
        <p>Listing 2 elaborates the SPARQL query written according to formula (1).
It is not hard to come up with a similar one from the other mapping formula,
which is left out from this paper due to space limitations.</p>
        <p>CONSTRUCT {
_:v rdf : type ec : ServiceCreated ; ec : timestamp ? time ;
ec : concernsAgent ? agent ; ec : concernsService ? service ;
ec : inStream ec : iServeStream .
} WHERE {
? entry rdf : type log : ServiceRepositoyLogEntry ; ? entry log : hasAgent ? agent ;
log : hasAction ? action .
? action rdf : type log : ItemCreation ; ? action log : createdItem ? service .
? entry log : hasDateTime ? instant .
? instant time : inXSDDateTime ? time .}</p>
      </sec>
      <sec id="sec-8-2">
        <title>Listing 2. An example of SPARQL query for event generation. Feeding Linked Data to CEP Engines 7</title>
        <p>To enable reasoning on the SPARQL queries for ontology translation, the SPARQL
query above is converted into the syntax of SPIN (shown in Listing 3), before
being stored in an RDF repository. There have been the tool8 and online
bidirectional converter9 between SPARQL and SPIN.
_: b1 sp : varName " action "^^ xsd : string .
_: b2 sp : varName " service "^^ xsd : string .
_: b3 sp : varName " instant "^^ xsd : string .
_: b4 sp : varName " agent "^^ xsd : string .
_: b5 sp : varName " time "^^ xsd : string .
_: b7 sp : varName " entry "^^ xsd : string .
[] a sp : Construct ;
sp : templates (
[ sp : object ec : ServiceCreated ; sp : predicate rdf : type ; sp : subject _: b6 ]
[ sp : object _: b5 ; sp : predicate ec : timestamp ; sp : subject _: b6 ]
[ sp : object _: b4 ; sp : predicate ec : concernsAgent ; sp : subject _: b6 ]
[ sp : object _: b2 ; sp : predicate ec : concernsService ; sp : subject _: b6 ]
[ sp : object ec : iServeStream ; sp : predicate ec : inStream ; sp : subject _: b6 ]) ;
sp : where (
[ sp : object log : ServiceRepositoyLogEntry ;</p>
        <p>sp : predicate rdf : type ; sp : subject _: b7 ]
[ sp : object _: b4 ; sp : predicate log : hasAgent ; sp : subject _: b7 ]
[ sp : object _: b1 ; sp : predicate log : hasAction ; sp : subject _: b7 ]
[ sp : object log : ItemCreation ; sp : predicate rdf : type ; sp : subject _: b1 ]
[ sp : object _: b2 ; sp : predicate log : createdItem ; sp : subject _: b1 ]
[ sp : object _: b3 ; sp : predicate log : hasDateTime ; sp : subject _: b7 ]
[ sp : object _: b5 ; sp : predicate time : inXSDDateTime ; sp : subject _: b3 ]) .</p>
      </sec>
      <sec id="sec-8-3">
        <title>Listing 3. SPARQL query in SPIN syntax.</title>
        <p>Listing 4 outlines a log entry in iServe, against which executing the SPARQL
query shown in Listing 2, we can get the rst event in Listing 5.
log : logEntry1271364976707 a log : ServiceRepositoyLogEntry ;
log : hasAction log : action1271364976707 ;
log : hasAgent &lt;http :// revyu . com / people / dong &gt; ;
log : hasDateTime time : instant1271364976707 .
log : action1271364976707 a log : ItemCreation ;</p>
        <p>log : createdItem service : VEHICLE_PRICE_SERVICE .
time : instant1271364976707 a time : Instant ;
time : inXSDDateTime "2010 -05 -15 T20 :56:16.707 Z "^^ xsd :</p>
        <p>dateTime .</p>
      </sec>
      <sec id="sec-8-4">
        <title>Listing 4. A log entry in iServe.</title>
        <p>The other two events in Listing 5 are also generated from the iServe system logs,
and serve as the examples of ServiceDeleted and LoggingSystemError.
: event101307 a ec : ServiceCreated ;
ec : timestamp "2010 -05 -15 T20 :56:16.707 Z "^^ xsd : dateTime ;
ec : concernsAgent &lt;http :// revyu . com / people / dong &gt; ;
ec : concernsService service : VEHICLE_PRICE_SERVICE ;
ec : inStream ec : iServeStream .
: event107470 a ec : ServiceDeleted ;
ec : timestamp "2010 -04 -15 T20 :56:38.377 Z "^^ xsd : dateTime ;
ec : concernsAgent &lt;http :// revyu . com / people / dong &gt; ;
ec : concernsService service : VEHICLE_PRICE_SERVICE ;
ec : inStream ec : iServeStream .</p>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>8 http://www.topquadrant.com/products/SPIN.html</title>
    </sec>
    <sec id="sec-10">
      <title>9 http://sparqlpedia.org/spinrdfconverter.html</title>
      <p>: event108946 a ec : LoggingSystemError ;
ec : timestamp "2010 -04 -15 T20 :56:41.546 Z "^^ xsd : dateTime ;
ec : causedBy event101307 ; ec : causedBy event107470 ;
ec : inStream ec : iServeStream .</p>
      <sec id="sec-10-1">
        <title>Listing 5. Some events in the iServe logging system.</title>
        <p>With the helps of RDFReactor on code generation and the Drools' capability
of manipulating Java objects, what we need to do to empower Drools Fusion to
deal with the ServiceCreated and ServiceDeleted events is just adding the
following declarations to the DRL le:
declare ServiceCreated
@role ( event )
@timestamp ( timestampInMills )
end
declare ServiceDeleted
@role ( event )
@timestamp ( timestampInMills )
end
Here, @role tells the CEP engine the type of the declaring entity, and @timestamp
tells which attribute will be used as the source of occurrence time of events.
6</p>
        <sec id="sec-10-1-1">
          <title>Implementation</title>
          <p>This section concentrates on a case study on applying the proposed framework
to the analysis of iServe logs. First, we are going to answer the question: who
are the top ten active users of iServe so far? Here, active users refer to those
who own the most services in iServe. To this end, two rules (shown in Listing 6)
are de ned respectively for processing ServiceCreated and ServiceDeleted
events. Upon submission of a new service, the event generator will put an instance
of ServiceCreated into the iServe Stream. As the reaction to this event, the
event processor nds the user identi ed by the value of concernsAgent, increases
HTML Linked Data</p>
          <p>SPARQL EndPoint
Linked Data Provider</p>
          <p>Event Processor
Content RDF
Negotiator Generator</p>
          <p>Page
Generator</p>
          <p>Event
Generator</p>
          <p>Drools
Fusion</p>
          <p>Timer</p>
          <p>Web of Data
Generated Java API</p>
          <p>RDFReactor</p>
          <p>RDF2Go</p>
          <p>Event
Repository
(BigOWLim)
the number of services he/she uploaded by one, and updates the time of his/her
last action on iServe. Correspondingly, when ServiceDeleted event happens,
the number of uploaded service will decrease by one, and the last action time
will update in the same way.
rule " Service Created in iServe "
when $e : ServiceCreated ( ) from entry - point " iServe Stream "
then String agent = $e . getAllConcernsAgent () . next () . toString () ;
LepHelper . get () . increaseUploadedServiceNumber ( agent );
LepHelper . get () . updateLastActionTime ( agent ,
$e . getAllTimestamp () . next () );
end
rule " Service Deleted in iServe "
when $e : ServiceDeleted ( ) from entry - point " iServe Stream "
then String agent = $e . getAllConcernsAgent () . next () . toString () ;
LepHelper . get () . decreaseUploadedServiceNumber ( agent );</p>
          <p>LepHelper . get () . updateLastActionTime ( agent , $e . getAllTimestamp () . next () );
end
rule " Logging System Error Detecting "
when $e : ServiceDeleted ( ) from entry - point " iServe Stream "
and ( $e1 : ServiceCreated ( this after $e &amp;&amp;
concernsService == $e . concernsService ) from entry - point " iServe stream "
or not ( $e1 : ServiceCreated ( concernsService == $e . concernsService )
from entry - point " iServe Stream " ))
then</p>
          <p>LepHelper . get () . createLoggingSystemErrorEvent ($e , $e1 );
end</p>
        </sec>
      </sec>
      <sec id="sec-10-2">
        <title>Listing 6. Event processing rules de nition. 10 Dong Liu et al.</title>
        <p>Secondly, in order to guarantee the accuracy of analysis results and to detect
errors in logging system, we de ne the third rule of Listing 6. It detects the
complex event LoggingSystemError, which occurs when a ServiceDeleted has
a missing ServiceCreated, or when a ServiceDeleted event happens before
the ServiceCreated of the same service. Note that, for the ease of
understanding, Drools rule attributes, e.g. no-loop, salience, lock-on-active, etc., are
omitted from Listing 6. In addition, LepHelper is a Java class wrapping
various methods for accessing SPARQL endpoints, invoking EVO-Core API, and
persisting the analysis results as RDF triples.</p>
        <p>The schema below is a simple vocabulary for describing the analysis results:
: Agent rdf : type rdfs : Class .
: uploadedServiceNumber a rdf : Property ; rdfs : domain : Agent ;</p>
        <p>rdfs : range xsd : nonNegativeInteger .
: lastActionTime a rdf : Property ; rdfs : domain : Agent ;</p>
        <p>rdfs : range xsd : dateTime .</p>
        <p>According to the schema, it is not hard to come up with a SPARQL SELECT
query retrieving ten users ordered by the number of services they have uploaded
to iServe:
SELECT ? agent ? number ? time WHERE {
? agent a ia : Agent ; ia : uploadedServiceNumber ? number ;</p>
        <p>ia : lastActionTime ? time .
} ORDER BY DESC (? number ) DESC (? time ) LIMIT 10
Especially, when the numbers are the same, they will be ordered by the last
time they accessed iServe. The query results are displayed in Fig. 4. For privacy
reason, some of the FOAF IDs have been concealed.</p>
        <sec id="sec-10-2-1">
          <title>Conclusions and Future Work</title>
          <p>In this paper, we present a practical way in which Linked Data can be fed into
CEP engines. EVO-Core, a lightweight but generic ontology, is built to describe
events in RDF, and SPARQL-based ontological mapping technique is adopted to
transform Linked Data into events conforming to EVO-Core. We also introduce
the work ow of developing an application equipped with the event processor.
The development of a simple analytical system of iServe logs shows that the
proposed framework is feasible.</p>
          <p>
            Our future work will focus on the publication of analysis results according
to SDMX-RDF [
            <xref ref-type="bibr" rid="ref7">7</xref>
            ]. We will also try to run a public registry for Linked Data
sources, which can be used as the origin of events, together with the
corresponding SPARQL queries for ontological translation.
          </p>
          <p>Acknowledgements This work was funded by the EU project SOA4All
(FP7215219).</p>
        </sec>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Adi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Botzer</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Etzion</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Semantic Event Model and Its Implication on Situation Detection</article-title>
          .
          <source>In: Proceedings of the 2000 European Conference on Information Systems (ECIS)</source>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Alvaro</given-names>
            <surname>Rey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Cerizza</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Di</given-names>
            <surname>Matteo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Ripa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Turati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Villa</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <source>SOA4ll Project Deliverable: D.2.7</source>
          .1 -
          <string-name>
            <given-names>Recommender</given-names>
            <surname>System First Prototype</surname>
          </string-name>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Anicic</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fodor</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rudolph</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stojanovic</surname>
          </string-name>
          , N.:
          <article-title>Stream Reasoning and Complex Event Processing in ETALIS. Semantic Web { Interoperability, Usability, Applicability (Under Review)</article-title>
          , http://www.semantic
          <article-title>-web-journal</article-title>
          .net/sites/default/ files/swj90.pdf
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Brenna</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Demers</surname>
            ,
            <given-names>A.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gehrke</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hong</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ossher</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Panda</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riedewald</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thatte</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>White</surname>
            ,
            <given-names>W.M.:</given-names>
          </string-name>
          <article-title>Cayuga: a high-performance event processing engine</article-title>
          .
          <source>In: Proceedings of the 2007 ACM SIGMOD International Conference on Management of Data</source>
          . pp.
          <volume>1100</volume>
          {
          <fpage>1102</fpage>
          .
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Etzion</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Semantic Approach to Event Processing</article-title>
          .
          <source>In: Proceedings of the 2007 inaugural international conference on Distributed event-based systems (DEBS)</source>
          . pp.
          <volume>139</volume>
          {
          <fpage>139</fpage>
          .
          <string-name>
            <surname>ACM</surname>
          </string-name>
          , New York, NY, USA (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Gyllstrom</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chae</surname>
            ,
            <given-names>H.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Diao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stahlberg</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anderson</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>SASE: Complex Event Processing over Streams</article-title>
          .
          <source>In: Proceeding of the 3rd Biennial Conference on Innovative Data Systems Research (CIDR)</source>
          . pp.
          <volume>407</volume>
          {
          <issue>411</issue>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Hausenblas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Halb</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Raimond</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Feigenbaum</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ayers</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          : SCOVO:
          <article-title>Using Statistics on the Web of Data</article-title>
          .
          <source>In: Proceedings of the 6th European Semantic Web Conference (ESWC). Lecture Notes in Computer Science</source>
          , vol.
          <volume>5554</volume>
          , pp.
          <volume>708</volume>
          {
          <fpage>722</fpage>
          . Springer (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Kalfoglou</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schorlemmer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Ontology mapping: the state of the art</article-title>
          .
          <source>The Knowledge Engineering Review</source>
          <volume>18</volume>
          (
          <issue>1</issue>
          ),
          <volume>1</volume>
          {
          <fpage>31</fpage>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Luckham</surname>
            ,
            <given-names>D.C.</given-names>
          </string-name>
          :
          <article-title>The Power of Events: An Introduction to Complex Event Processing in Distributed Enterprise Systems</article-title>
          . Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hobbs</surname>
            ,
            <given-names>J.R.</given-names>
          </string-name>
          :
          <article-title>Temporal Aggregates in OWL-Time</article-title>
          . In: Russell,
          <string-name>
            <given-names>I.</given-names>
            ,
            <surname>Markov</surname>
          </string-name>
          ,
          <string-name>
            <surname>Z</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the 18th International Florida Arti cial Intelligence Research Society Conference (FLAIRS)</source>
          . pp.
          <volume>560</volume>
          {
          <fpage>565</fpage>
          . AAAI Press (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Pedrinaci</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Domingue</surname>
          </string-name>
          , J.,
          <string-name>
            <surname>de Medeiros</surname>
            ,
            <given-names>A.K.A.</given-names>
          </string-name>
          :
          <article-title>A Core Ontology for Business Process Analysis</article-title>
          . In: Hauswirth,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Koubarakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Bechhofer</surname>
          </string-name>
          , S. (eds.)
          <source>Proceedings of the 5th European Semantic Web Conference (ESWC). Lecture Notes in Computer Science</source>
          , Springer Verlag, Berlin, Heidelberg (
          <year>June 2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Pedrinaci</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maleshkova</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lambert</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kopecky</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Domingue</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>iServe: a Linked Services Publishing Platform</article-title>
          .
          <source>In: Proceedings of Ontology Repositories and Editors for the Semantic Web at the 7th Extended Semantic Web Conference (ESWC)</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Raimond</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Abdallah</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>The Event Ontology (</article-title>
          <year>2007</year>
          ), http://purl.org/NET/ c4dm/event.owl
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Rodriguez</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGrath</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Liu,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Myers</surname>
          </string-name>
          , J.:
          <article-title>Semantic Management of Streaming Data</article-title>
          .
          <source>In: Proceedings of the 2nd International Workshop on Semantic Sensor Networks (SSN) at the 8th International Semantic Web Conference (ISWC)</source>
          . pp.
          <volume>80</volume>
          {
          <issue>95</issue>
          (Oct
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Teymourian</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paschke</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Enabling Knowledge-based Complex Event Processing</article-title>
          .
          <source>In: Proceedings of the 2010 EDBT/ICDT Workshops</source>
          . pp.
          <volume>1</volume>
          {
          <issue>7</issue>
          . ACM, New York, NY, USA (Mar
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>