Stream Reasoning For Linked Data
- M. Balduini, J-P Calbimonte, O. Corcho,
- D. Dell'Aglio, E. Della Valle, and J.Z. Pan
C-SPARQL: A Continuous Extension of SPARQL Marco Balduini - - PowerPoint PPT Presentation
Stream Reasoning For Linked Data M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio, E. Della Valle, and J.Z. Pan http://streamreasoning.org/sr4ld2013 C-SPARQL: A Continuous Extension of SPARQL Marco Balduini marco.balduini@polimi.it
http://streamreasoning.org/sr4ld2013
– “[source http://streamreasoning.org/sr4ld2013]” at the end of each reused slide – a credits slide stating
Data 2013” by M. Balduini, J-P Calbimonte, O. Corcho, D. Dell'Aglio,
2
http://streamreasoning.org/sr4ld2013
3
http://streamreasoning.org/sr4ld2013
4
http://streamreasoning.org/sr4ld2013
5
http://streamreasoning.org/sr4ld2013
6
http://streamreasoning.org/sr4ld2013
7
Observation Sensor Person Post Room where discusses who
subClassOf subClassOf posts subPropOf
isWith isIn isConnectedTo
http://streamreasoning.org/sr4ld2013
Running Example
8
http://streamreasoning.org/sr4ld2013
9
R
f 4 f
R
4
f
http://streamreasoning.org/sr4ld2013
Running Example
10 Sensor Room Person Time-stamp RedSensor RedRoom Alice T1 … … … … Person ChecksIn Time-stamp Bob BlueRoom T2 … … … Person IsIn With Time-stamp Carl null Bob T2 David RedRoom Elena T3 … … … …
http://streamreasoning.org/sr4ld2013
Running Example
– Timestamps are not required to be unique, they must be non- decreasing
11
RDF graph Time- stamp Stream :RedSensor :observes [ :who :Alice; :where :RedRoom ] . T1 rfid :Bob :posts [ :who :Bob ; :where :BlueRoom ] . T2 fs :Carl :posts [ :who :Carl , :Bob ] . T2 fb :David :posts [ :who :David , :Elena ; :where :RedRoom] T3 fb
http://streamreasoning.org/sr4ld2013
– QUERY form – STREAM form
12
http://streamreasoning.org/sr4ld2013
13
C-SPARQL Language
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
14
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
15
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
16
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
17
http://streamreasoning.org/sr4ld2013
18
C-SPARQL Language
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
19
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
20
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
21
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
22
http://streamreasoning.org/sr4ld2013
23
C-SPARQL Language
d1 d1 d1 d1 d1 d2 d2 d2 d2 d3 d3
t+40
t+50 t+60 t+70 t+80
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
24
http://streamreasoning.org/sr4ld2013
25
C-SPARQL Language
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
26
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
REGISTER QUERY FindOpinionMakers AS PREFIX f: <http://larkc.eu/csparql/sparql/jena/ext#> PREFIX : <http://…/sr4ld2013-onto#> SELECT ?someOne ?room (COUNT(?someOneElse) AS ?n) FROM STREAM <http://…/fb> [RANGE 1m STEP 10s] WHERE { ?someOne :posts ?p1 . ?p1 :where ?room . ?someOneElse :posts ?p2 . ?p2 :where ?room . FILTER(?someOne!=?someOneElse ) FILTER (f:timestamp(?p1 :where ?room) > f:timestamp(?p2 :where ?room)) } GROUP BY ?someOne ?room HAVING (?n>3)
27
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
28 Is with on f query
Stream
Stream Is in on 4 query Is In across
query Stream Stream
:Bob :posts [ :who :Bob ; :where :BlueRoom ] . :Carl :posts [ :who :Carl , :Bob ] . :Bob :isIn :BlueRoom . :Carl :isWith :Bob . :Carl :isIn :BlueRoom .
http://streamreasoning.org/sr4ld2013
29
IRI identifying the dataset containing the background information
http://streamreasoning.org/sr4ld2013
30
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
– This is to be intended as a term of comparison for stream reasoning research
– RDFS entailment regime – RDFS++ entailment regime
31
http://streamreasoning.org/sr4ld2013
C-SPARQL Language
REGISTER QUERY QueryUnderRDFSEntailmentRegime AS PREFIX : <http://…/sr4ld2013-onto#> SELECT ?x ?room ?person FROM STREAM <http://…/fs> [RANGE 1m STEP 10s] FROM STREAM <http://…/rfid> [RANGE 1m STEP 10s] WHERE { ?x :observes [ :who ?person ; :where ?room ] .}
32 RDF graph Time-stamp Stream :RedSensor :observes [ :who :Alice; :where :RedRoom ] . T1 rfid :Bob :posts [ :who :Bob ; :where :BlueRoom ] . T2 fs ?x ?room ?person :RedSensor :RedRoom :Alice :Bob :RedRoom :Bob
http://streamreasoning.org/sr4ld2013
33
http://streamreasoning.org/sr4ld2013
Introduction
34
http://streamreasoning.org/sr4ld2013
Introduction
– RDF streams – C-SPARQL query – Result listerners
– http://streamreasoning.org/download/csparqlreadytogopack
– http://streamreasoning.org/download/rsp-service4csparql
35
http://streamreasoning.org/sr4ld2013
Introduction
– https://github.com/streamreasoning/CSPARQL-engine – https://github.com/streamreasoning/CSPARQL-ReadyToGoPack
– https://github.com/streamreasoning/rsp-services-csparql – https://github.com/streamreasoning/rsp-services-api – https://github.com/streamreasoning/rsp-services-client-example
36
http://streamreasoning.org/sr4ld2013
– Davide Francesco Barbieri, Daniele Braga, Stefano Ceri, Emanuele Della Valle, Michael Grossniklaus: C-SPARQL: a Continuous Query Language for RDF Data Streams. Int. J. Semantic Computing 4(1): 3-25 (2010)
–
Querying RDF streams with C-SPARQL, SIGMOD Record 39 (1) (2010) 20–26.
37