ontology http://www.roland-stuehmer.de/tags/ontology en An RDF Model for Events http://www.roland-stuehmer.de/content/rdf-model-events <span property="schema:name" class="field field-node--title field-name-title field-type-string field-label-hidden">An RDF Model for Events</span> <span rel="schema:author" class="field field-node--uid field-name-uid field-type-entity-reference field-label-hidden"><a title="View user profile." href="/users/rolandstuehmer" lang="" about="/users/rolandstuehmer" typeof="schema:Person" property="schema:name" datatype="" class="username">roland.stuehmer</a></span> <span property="schema:dateCreated" content="2014-12-12T12:22:34+00:00" class="field field-node--created field-name-created field-type-created field-label-hidden">Fri, 12/12/2014 - 13:22</span> <div property="schema:text" class="clearfix field field-node--body field-name-body field-type-text-with-summary field-label-hidden"> <div class="field-items"> <div property="schema:text" class="field-item"><p>Why do we need an event model? Many <abbr title="Resource Description Format">RDF</abbr> streaming systems discussed have little or no model for the real-time data they ingest. These systems make the lowest common assumptions about the structure of the data, i.e. that the data consist of a stream of <abbr title="Resource Description Format">RDF</abbr> triples. Thus, each piece of real-time data (event) is one triple. One triple, however, cannot hold a lot of information. For example: flexibility in timstamping (one vs. two timestamps or application time vs. system time) is only possible if timstamps can be attached to event structure. Flat triples cannot do that. Another example is when typing data, the triple <code>&lt;myInstance&gt; rdf:type &lt;MyClass&gt;</code> can introduce a type, but the event (one triple) is "full". This means that any structure in the data must be inferred from more than one event. However, consumers cannot make assumptions about events which are not yet received: Events occur spontaneously and event consumers are often decoupled from the senders (cf. publish/subscribe systems). Therefore, structure is needed in individual events.</p> <p>Events should be self-describing. A common understanding of data is crucial for consumers and producers <sup id="fnref:Rozsnyai et al. 2007b"><a href="#fn:Rozsnyai et al. 2007b" class="footnote-ref">1</a></sup>, especially in a distributed and heterogeneous system such as the Web. Therefore, a consumer must find a way to understand received events which entails the need for a universal event model <sup id="fnref2:Rozsnyai et al. 2007b"><a href="#fn:Rozsnyai et al. 2007b" class="footnote-ref">1</a></sup>.</p> <h2>Model</h2> <p>The figure shows the event model in a class diagram <sup id="fnref:Stühmer 2014"><a href="#fn:Stühmer 2014" class="footnote-ref">2</a></sup>. The class "Event" at bottom left of the figure is the superclass for any event to conform to our model. This class makes use of related work by inheriting from the class "<abbr title="DOLCE+DnS Ultralite">DUL</abbr>:Event" from Dolce Ultralight based on DOLCE <sup id="fnref:Gangemi et al. 2002"><a href="#fn:Gangemi et al. 2002" class="footnote-ref">3</a></sup>. That class provides a notion of time and helps distinguish events (things that happen) from facts (which are always valid).</p> <p><img src="http://www.roland-stuehmer.de/sites/default/files/eventclassdiagram.png" alt="Event Model" title="Event Model (Class Diagram)" /></p> <p>In accordance with our requirements <sup id="fnref2:Stühmer 2014"><a href="#fn:Stühmer 2014" class="footnote-ref">2</a></sup> some properties are mandatory while the rest are optional. An instance of class Event MUST have (i) a type, (ii) at least one timestamp and (iii) a relevant stream. We describe the event properties in detail as follows.</p> <p>The type of an event must be specified using <strong><code>rdf:type</code></strong>. The type must be the class Event or any subclass.</p> <p>The event model supports interval-based events as well as point-based events by either using just the property <strong><code>:endTime</code></strong> for a point or both <strong><code>:startTime</code></strong> and <code>:endTime</code> for an interval. The property <code>:endTime</code> thus has a cardinality of <code>[1..1]</code> whereas <code>:startTime</code> has a cardinality of <code>[0..1]</code>. Both temporal properties are subproperties of <abbr title="DOLCE+DnS Ultralite">DUL</abbr>:hasEventDate from the super class. We improve the semantics by distinguishing start from end whereas the superclass has an alternative, more difficult way of formulating intervals using subobjects reifying the interval.</p> <p>The property <strong><code>:stream</code></strong> associates an event with a stream. Streams are used in our system as a unit of organisation for events governing publish/subscribe and access control. Streams themselves are modelled using title, description and a topic needed for topic-based publish/subscribe.</p> <p>The first optional property is <strong><code>:location</code></strong>. For for geo-referencing of events (where necessary) we re-use the basic geo vocabulary from the <abbr title="World Wide Web Consortium">W3C</abbr> <sup id="fnref:Brickley 2003"><a href="#fn:Brickley 2003" class="footnote-ref">4</a></sup>. The property may be used to locate events in physical locations on the globe. The property is subproperty of <code>DUL:hasLocation</code> and <code>geo:location</code> to inherit the semantics from those schemas.</p> <p>Inter-event relationships may be supported by linking a complex event to the simple events which caused it. Thus, <abbr title="Resource Description Format">RDF</abbr> Lists may be used in <strong><code>:members</code></strong> to maintain an ordered and complete account of member events. The linked events are identified by their URI. These linked events could have further member events themselves. This facilitates modelling of <em>composite</em> events <sup id="fnref:Luckham and Schulte 2011"><a href="#fn:Luckham and Schulte 2011" class="footnote-ref">5</a></sup>. The <code>:members</code> property is a subproperty of <code>DUL:hasConstituent</code> from the superclass.</p> <p>The property <strong><code>:eventPattern</code></strong> may be used to link a complex event to the pattern which caused the event to be detected. Direct links to event patterns may be provided by RESTful services. Using such links can help in recording provenance of derived events.</p> <p>The source of an event may be specified using the <strong><code>:source</code></strong> property. This is an optional property to record the creator of an event where needed. The property is a subproperty of <code>DUL:involvesAgent</code>. Agents may be human or non-human.</p> <p>A human readable synopsis of an event may be added using the <strong><code>:message</code></strong> property. This proves useful in scenarios where events are received by human end users. The <code>:message</code> property is a subproperty of <code>dc:title</code>, a popular way of describing things using natural language. Multilingualism is provided by the feature of language tags for string literals in <abbr title="Resource Description Format">RDF</abbr> <sup id="fnref:Klyne and Carroll 2004"><a href="#fn:Klyne and Carroll 2004" class="footnote-ref">6</a></sup>.</p> <p>N-ary predicates <sup id="fnref:Noy and Rector 2006"><a href="#fn:Noy and Rector 2006" class="footnote-ref">7</a></sup> may be used to maintain event properties which are valid only for a specific event, e.g. a volatile sensor reading such as the temperature measurement belonging to a specific event. For example, instead of plainly stating the disputable fact that "the city of Nice has a temperature in Celsius of 23 degrees" which looks like this:</p> <p>[geshifilter-code langauge="ttl"]&#10;dbpedia:Nice :curTemp &quot;23&quot; .&#10;[/geshifilter-code]</p> <p>We can instead state that the city of Nice has said temperature but qualified by the conjunction with a given event "e2" in the following n-ary predicate:</p> <p>[geshifilter-code langauge="ttl"]&#10;dbpedia:Nice :curTemp [&#10; rdf:value &quot;23&quot; ;&#10; :event &lt;http://events...org/ids/e2#event&gt;&#10;] .&#10;[/geshifilter-code]</p> <p>Endowment of further structure for events is left to domain-specific schemas. For example the <abbr title="World Wide Web Consortium">W3C</abbr> Semantic Sensor Network (<abbr title="Semantic Sensor Network">SSN</abbr>) Ontology may be added if fine-grained modelling of sensors and pertaining sensor readings is needed.</p> <h2>Example</h2> <p>The listing below shows several facts about our event model along an example. The listing uses the example of a Facebook event generated by our event adapter described in <sup id="fnref3:Stühmer 2014"><a href="#fn:Stühmer 2014" class="footnote-ref">2</a></sup>.</p> <p>[geshifilter-code langauge="ttl"]&#10;@prefix : &lt;http://events.event-processing.org/types/&gt; .&#10;@prefix e: &lt;http://events.event-processing.org/ids/&gt; .&#10;@prefix user: &lt;http://graph.facebook.com/schema/user#&gt; .&#10;@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .&#10;&#10;e:5534987067802526 {&#10; &lt;http://events.event-processing.org/ids/5534987067802526#event&gt;&#10; a :FacebookStatusFeedEvent ;&#10; :endTime &quot;2012-03-28T06:04:26.522Z&quot;^^xsd:dateTime ;&#10; :status &quot;I bought some JEANS this morning&quot; ;&#10; :stream &lt;http://streams...org/ids/FacebookStatusFeed#stream&gt; ;&#10; user:id &quot;100000058455726&quot; ;&#10; user:link &lt;http://graph.facebook.com/roland.stuehmer#&gt; ;&#10; user:location &quot;Karlsruhe, Germany&quot; ;&#10; user:name &quot;Roland Stühmer&quot; .&#10;}&#10;[/geshifilter-code]</p> <ol> <li>The example shows an event <strong>using quadruples</strong> in TriG syntax <sup id="fnref:Bizer and Cyganiak 2014"><a href="#fn:Bizer and Cyganiak 2014" class="footnote-ref">8</a></sup>. The graph name (a.k.a context) before the curly braces is used as a unique identifier, e.g. to enable efficient indexing of contiguous triples in the storage backend for historic events.</li> <li>The event in this example has the ID <code>5534987067802526</code> as part of its URI. There is a distinction made between <strong>URIs for things</strong> and URIs for their information resources, i.e. the event object <code>5534987067802526#event</code> and the Web document <code>5534987067802526</code> describing the event. The two URIs might carry, e.g. a different creation date, which is why it can be important to separate them. The fragment identifier <code>#event</code> is used to differentiate them. See <sup id="fnref:Berners-Lee 2005"><a href="#fn:Berners-Lee 2005" class="footnote-ref">9</a></sup> for an in-depth discussion of the matter of disambiguation (also known as the <em>httpRange-14</em> issue).</li> <li>There is an <strong>event type hierarchy</strong> from which the type Facebook-StatusFeedEvent is inherited. This hierarchy can be extended by any user by referencing the <abbr title="Resource Description Format">RDF</abbr> type <code>:Event</code> as a super class.</li> <li>The event may link to entities from static <strong>Linked Data</strong> where further context for the event can be retrieved. In this example the event uses <code>user:link</code> where further context for the event can be retrieved, in this case from the Facebook Graph <abbr title="application programming interface">API</abbr>. Facebook started publishing Linked Data as <abbr title="Resource Description Format">RDF</abbr> <sup id="fnref:Weaver and Tarjan 2012"><a href="#fn:Weaver and Tarjan 2012" class="footnote-ref">10</a></sup>.</li> <li>The event links to a <strong>stream</strong> which is a URI where current events can be obtained in real-time by dereferencing the link.</li> <li>The namespace <code>event-processing.org</code> is chosen as a generic home for this schema.</li> </ol> <h2>Conclusion</h2> <p>We are re-using and creating domain vocabularies to subclass the class Event. For example in the Facebook case we use the schema from the <abbr title="Resource Description Format">RDF</abbr>/Turtle <abbr title="application programming interface">API</abbr> provided by Facebook <sup id="fnref2:Weaver and Tarjan 2012"><a href="#fn:Weaver and Tarjan 2012" class="footnote-ref">10</a></sup>.</p> <p>We developed this event model to satisfy requirements of an open platform where data from the Web can be re-used and which is extensible for open participation. Future updates to the event schema can be tracked on-line at <sup id="fnref:Harth and Stühmer 2011"><a href="#fn:Harth and Stühmer 2011" class="footnote-ref">11</a></sup>.</p> <div class="footnotes"> <hr /> <ol> <li id="fn:Rozsnyai et al. 2007b"> <p>Rozsnyai, S.; Schiefer, J. &amp; Schatten, A. Concepts and models for typing events for event-based systems Proceedings of the 1st ACM International Conference on Distributed Event-Based Systems, ACM, 2007, 62-70&#160;<a href="#fnref:Rozsnyai et al. 2007b" class="footnote-backref">&#8617;&#xFE0E;</a> <a href="#fnref2:Rozsnyai et al. 2007b" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Stühmer 2014"> <p>Stühmer, R. <a href="http://dx.doi.org/10.5445/KSP/1000043122">Web-oriented Event Processing Karlsruhe Institute of Technology, KIT Scientific Publishing, Karlsruhe, 2014</a>&#160;<a href="#fnref:Stühmer 2014" class="footnote-backref">&#8617;&#xFE0E;</a> <a href="#fnref2:Stühmer 2014" class="footnote-backref">&#8617;&#xFE0E;</a> <a href="#fnref3:Stühmer 2014" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Gangemi et al. 2002"> <p>Gangemi, A.; Guarino, N.; Masolo, C.; Oltramari, A. &amp; Schneider, L. Sweetening Ontologies with DOLCE Proceedings of the 13th International Conference on Knowledge Engineering and Knowledge Management. Ontologies and the Semantic Web, Springer-Verlag, 2002, 166-181&#160;<a href="#fnref:Gangemi et al. 2002" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Brickley 2003"> <p>Brickley, D. <a href="http://www.w3.org/2003/01/geo/">Basic Geo (WGS84 lat/long) Vocabulary, 2003</a>&#160;<a href="#fnref:Brickley 2003" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Luckham and Schulte 2011"> <p>Luckham, D. C. &amp; Schulte, R. <a href="http://www.complexevents.com/2011/08/23/event-processing-glossary-version-2-0/">Event Processing Glossary - Version 2.0, 2011</a>&#160;<a href="#fnref:Luckham and Schulte 2011" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Klyne and Carroll 2004"> <p>Klyne, G. &amp; Carroll, J. J. <a href="http://www.w3.org/TR/rdf-concepts/">Resource Description Framework (<abbr title="Resource Description Format">RDF</abbr>): Concepts and Abstract Syntax 2004</a>&#160;<a href="#fnref:Klyne and Carroll 2004" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Noy and Rector 2006"> <p>Noy, N. &amp; Rector, A. <a href="http://www.w3.org/TR/swbp-n-aryRelations/">Defining N-ary Relations on the Semantic Web World Wide Web Consortium, 2006</a>&#160;<a href="#fnref:Noy and Rector 2006" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Bizer and Cyganiak 2014"> <p>Bizer, C. &amp; Cyganiak, R. <a href="http://www.w3.org/TR/trig/"><abbr title="Resource Description Format">RDF</abbr> 1.1 TriG, 2014</a>&#160;<a href="#fnref:Bizer and Cyganiak 2014" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Berners-Lee 2005"> <p>Berners-Lee, T. <a href="http://www.w3.org/DesignIssues/HTTP-URI2.html">What HTTP URIs Identify? -- Design Issues, 2005</a>&#160;<a href="#fnref:Berners-Lee 2005" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Weaver and Tarjan 2012"> <p>Weaver, J. &amp; Tarjan, P. <a href="http://dx.doi.org/10.3233/SW-2012-0078">Facebook Linked Data via the Graph <abbr title="application programming interface">API</abbr> Semantic Web Journal, IOS Press, 2012</a>&#160;<a href="#fnref:Weaver and Tarjan 2012" class="footnote-backref">&#8617;&#xFE0E;</a> <a href="#fnref2:Weaver and Tarjan 2012" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> <li id="fn:Harth and Stühmer 2011"> <p>Harth, A. &amp; Stühmer, R. <a href="http://km.aifb.kit.edu/sites/lodstream/">Publishing Event Streams as Linked Data Karlsruhe Institute of Technology, FZI Forschungszentrum Informatik, 2011</a>&#160;<a href="#fnref:Harth and Stühmer 2011" class="footnote-backref">&#8617;&#xFE0E;</a></p> </li> </ol> </div> </div> </div> </div> <section class="field field-node--comment-node-article field-name-comment-node-article field-type-comment field-label-hidden comment-wrapper"> </section> <div class="field field-node--field-tags field-name-field-tags field-type-entity-reference field-label-inline clearfix"> <div class="field-label">Tags</div> <div class="field-items"> <div class="field-item"><a href="/tags/rdf" property="schema:about" hreflang="en">RDF</a></div> <div class="field-item"><a href="/tags/rsp" property="schema:about" hreflang="en">RSP</a></div> <div class="field-item"><a href="/tags/schema" property="schema:about" hreflang="en">schema</a></div> <div class="field-item"><a href="/tags/ontology" property="schema:about" hreflang="en">ontology</a></div> <div class="field-item"><a href="/tags/semantic-web" property="schema:about" hreflang="en">Semantic Web</a></div> <div class="field-item"><a href="/tags/event-processing" property="schema:about" hreflang="en">Event Processing</a></div> </div> </div> Fri, 12 Dec 2014 12:22:34 +0000 roland.stuehmer 45 at http://www.roland-stuehmer.de/drupal-8