morph streams sparqlstream obda in action
play

Morph-streams: SPARQLStream OBDA in action Jean-Paul Calbimonte - PowerPoint PPT Presentation

Stream Reasoning for Linked Data M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio, E. Della Valle http://streamreasoning.org/events/sr4ld2014 Morph-streams: SPARQLStream OBDA in action Jean-Paul Calbimonte Jean-paul.calbimonte@epfl.ch


  1. Stream Reasoning for Linked Data M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio, E. Della Valle http://streamreasoning.org/events/sr4ld2014 Morph-streams: SPARQLStream OBDA in action Jean-Paul Calbimonte Jean-paul.calbimonte@epfl.ch Lsir.epfl.ch

  2. Share, Remix, Reuse — Legally § This work is licensed under the Creative Commons Attribution 3.0 Unported License. § You are free: • to Share — to copy, distribute and transmit the work • to Remix — to adapt the work § Under the following conditions • Attribution — You must attribute the work by inserting – “ [source http://streamreasoning.org/events/sr4ld2014] ” at the end of each reused slide – a credits slide stating - These slides are partially based on “ Streaming Reasoning for Linked Data 2014 ” by M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio, and E. Della Valle, http://streamreasoning.org/events/sr4ld2014 § To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ 2 http://streamreasoning.org/events/sr4ld2014

  3. Querying RDF Streams users, applications +streams RDF Stream Processor query processing +streams RDF Stream Wrap Where is the data coming from? Import Load Continously Existing streaming Sensor … data sources DSMS CEP middleware Streams already exist in non-RDF form 3 http://streamreasoning.org/events/sr4ld2014

  4. Feed the RDF Stream: Scenarios :bob rsp:where :room1 [t1] :carl rsp:where :room1 [t2] :carl rsp:where :room2 [t3] bob,room1,t1 carl,room1,t2 :/person/bob rsp:where :room1 [t1] carl,room2,t3 … … RDF Stream Processor … :person/bob rsp:where :room1 [t1] Stream :person/bob rsp:observedBy :sensor1 [t1] generated by a Sensor :obst1 a ssn:Observation [t1] :obst1 ssn:observedBy :sensor1 [t1] :obst1 ssn:featureOfInterest :bob [t1] :obst1 ssn:observedValue :room1 [t1] Different RDF representations … Dynamic structural changes Multiple RDF views over the same stream 4 http://streamreasoning.org/events/sr4ld2014

  5. Virtual RDF views over data streams SPARQLStream users, applications +streams Morph-streams RDF Stream Processor query processing Virtual RDF Stream rewritten queries Sensor … data layer DSMS CEP middleware 5 http://streamreasoning.org/events/sr4ld2014

  6. Already seen somewhere…? RDF SPARQL Query Processor R2RML Load, Mappings Similar to RDB2RDF import Stream DBMS? Stream SQL? DBMS 6 http://streamreasoning.org/events/sr4ld2014

  7. Stream Processor Implementations CQL/Stream Borealis Data Stream Management Systems (DSMS) StreamMill NiagaraCQ TelegraphCQ Esper GEM Rapide Complex Event Processors (CEP) Oracle CEP Cayuga CEDR IBM InfoSphere Microsoft StreamInsight Hourglass Cosm Stream Data Middleware SStreamWare GSN Sybase CEP StreamBase Diverse query languages Different query capabilities Different query models 7 http://streamreasoning.org/events/sr4ld2014

  8. Morph-streams: Overview SELECT ?proximity π FROM STREAM <http://streamreasoning.org/ timed,prox SensorReadings.srdf> [NOW–5 S] σ prox>10 WHERE { ?obs a ssn:ObservationValue; ω qudt:numericalValue ?proximity; 5 Seconds FILTER (?proximity>10) } sens SELECT prox FROM sens.win:time(5 sec) Query WHERE prox >10 Algebra rewriting expression SPARQL Stream SNEE Client Esper Query R2RML Processing Mappings GSN Cosm pull/push Data [tuples] translation [triples/ Other bindings] Morph-streams procesing SPARQL Stream queries https://github.com/jpcik/morph-streams 8 http://streamreasoning.org/events/sr4ld2014

  9. What do I need for Morph-streams § Main ingredients: 1. Data streams Link both 2. Ontology models 3. R2RML mappings 9 http://streamreasoning.org/events/sr4ld2014

  10. 1st: the data streams . . . . . . (bob,room2) τ i (alice,room3) τ i+1 (luke,room1) τ i+1 . . . stream (alice,room1) τ i-­‑1 (carl,room1) τ i stream tuples (person,room,…) τ i Stream Schema DSMS, CEP, middleware can evaluate queries over this model 10 http://streamreasoning.org/events/sr4ld2014

  11. 2 nd : An Ontology! W3C SSN Ontology modeling our streaming data combine with domain ontologies 11 http://streamreasoning.org/events/sr4ld2014

  12. Or our simpler ontology… subClassOf where Observation Room observes subPropOf who Post Sensor discusses subClassOf authorOf Person We can use different ontologies for the same data 12 http://streamreasoning.org/events/sr4ld2014

  13. 3rd: Mapping the two models where Observation Room observes detec4ons (person, ¡ ¡room,…) Sensor who subClassOf Define mappings Person 13 http://streamreasoning.org/events/sr4ld2014

  14. R2RML – There is a recommendation! We can use the W3C recommendation 14 http://streamreasoning.org/events/sr4ld2014

  15. R2RML - Overview 15 http://streamreasoning.org/events/sr4ld2014

  16. Encoding in R2RML the stream Mapping definition name stream :triplesMap a rr:TriplesMap; attributes rr:logicalTable [ rr:tableName ” sensors "; ] subject URI rr:subjectMap [ rr:template "http://streamreasoning.org/data/Observation/{ person }{ timed }"; rr:class sr4ld:Observation ; rr:graph sr4ld:socialstream.srdf ]; triple predicate + object rr:predicateObjectMap [ rr:predicate sr4ld:who ; rr:objectMap [ rr:template “http://streamreasoning.org/data/Person/{ person }” ]];. the object (a URI in this case) 16 http://streamreasoning.org/events/sr4ld2014

  17. Morph-streams: Overview SELECT ?proximity π FROM STREAM <http://streamreasoning.org/ timed,prox SensorReadings.srdf> [NOW–5 S] σ prox>10 WHERE { ?obs a ssn:ObservationValue; ω qudt:numericalValue ?proximity; 5 Seconds FILTER (?proximity>10) } sens SELECT prox FROM sens.win:time(5 sec) Query WHERE prox >10 Algebra rewriting expression SPARQL Stream SNEE Client Esper Query R2RML Processing Mappings GSN Cosm pull/push Data [tuples] translation [triples/ Other bindings] Morph-streams procesing SPARQL Stream queries https://github.com/jpcik/morph-streams 17 http://streamreasoning.org/events/sr4ld2014

  18. SPARQLStream Language ISTREAM DSTREAM RSTREAM WINDOW FROM NAMED STREAM Underlying data source restrictions 18 http://streamreasoning.org/events/sr4ld2014

  19. SPARQLStream Language NamedStream à ‘FROM’ [‘NAMED’] ‘STREAM’ StreamIRI ‘[’ Window ‘]’ § Window à ‘NOW-’ Integer TimeUnit [ UpperBound ] [ Slide ] § à ‘TO NOW-’ Integer TimeUnit UpperBound § à ‘SLIDE’ Integer TimeUnit Slide § à ‘MS’ | ‘S’ | ‘MINUTES’| ‘HOURS’ | ‘DAY’ TimeUnit § SELECT ISTREAM ?room FROM NAMED STREAM <http://www.streamreasoning.org/streams/socialsensor.srdf> [NOW-10 S] WHERE {… Select à ‘SELECT’ [ Xstream ] [ Distinct | Reduced ] … § à ‘RSTREAM’ | ‘ISTREAM’ | ‘DSTREAM’ Xstream § 19 http://streamreasoning.org/events/sr4ld2014

  20. SPARQLStream: examples SPARQL Stream PREFIX sr4ld: <http://www.streamreasoning.org/ontologies/socialsensor,owl#> SELECT ?room FROM NAMED STREAM <http://www.streamreasoning.org/streams/socialsensor.srdf> [NOW-10 S] WHERE { ?obs sr4ld:observedBy ?sensor. ?obs sr4ld:where ?room. } All rooms where something was observed in the last 10s PREFIX sr4ld: <http://www.streamreasoning.org/ontologies/socialsensor,owl#> SELECT (COUNT(?person) AS ?nmb) ?room FROM NAMED STREAM <http://www.streamreasoning.org/streams/socialsensor.srdf> [NOW-10 S] WHERE { ?obs sr4ld:who ?pers. ?obs sr4ld:where ?room. } GROUP BY ?room Number of persons observed in each room in the last 10s 20 http://streamreasoning.org/events/sr4ld2014

  21. Morph-streams: Overview SELECT ?proximity π FROM STREAM <http://streamreasoning.org/ timed,prox SensorReadings.srdf> [NOW–5 S] σ prox>10 WHERE { ?obs a ssn:ObservationValue; ω qudt:numericalValue ?proximity; 5 Seconds FILTER (?proximity>10) } sens SELECT prox FROM sens.win:time(5 sec) Query WHERE prox >10 Algebra rewriting expression SPARQL Stream SNEE Client Esper Query R2RML Processing Mappings GSN Cosm pull/push Data [tuples] translation [triples/ Other bindings] Morph-streams procesing SPARQL Stream queries https://github.com/jpcik/morph-streams 21 http://streamreasoning.org/events/sr4ld2014

  22. Underlying Query Processors Esper SNEE • CEP/DSMS • DSMS/Sensor Network Query Evaluator • EPL language • Compile queries to sensor code SELECT prox FROM sensors.win:time(5 SELECT prox FROM sensors [FROM NOW-5 minute) MINUTES TO NOW] WHERE prox >10 WHERE prox >10 GSN Cosm/Xively • Sensor middleware • Sensor middleware • REST API • Open platform • REST API http://montblanc.slf.ch:22001/ multidata?vs[0]=sensors& http://api.cosm.com/v2/feeds/14321/ field[0]=proximity_field&c_min[0]=10& datastreams/4? from=15/05/2012+05:00:00&to=15/05/2012 start=2012-05-15T05:00:00Z&end=2012- +10:00:00 05-15T10:00:00Z 22 http://streamreasoning.org/events/sr4ld2014

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend