Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Connecting Stream Reasoners on the Web
1. Connecting Stream Reasoners
on the Web
Jean-Paul Calbimonte
Institute of Information Systems
University of Applied Sciences and Arts Western Switzerland (HES-SO Valais-Wallis)
Stream Reasoning Workshop
Berlin, 08.12.2016
@jpcik
3. 6
Streams with Linked Data?
e.g. publish data streams as RDF/Linked Data?
URIs as names of things
HTTP URIs
useful information when URI
is dereferenced
Link to other URIs
users
applicationsWEB
static vs. streams
one-off vs. continuous
4. 7
RDF Streams before RDF Streams
http://richard.cyganiak.de/2007/10/lod/
2011
Linked Sensor Data
MetOffice
AEMET
5. 8
RDF Streams before RDF Streams
i.e. just use RDF
:observation1 rdf:type om-owl:Observation .
:observation1 om-owl:observedProperty weather:_AirTemperature .
:observation1 om-owl:procedure :sensor1 .
:observation1 om-owl:result :obsresult1 .
:observation1 om-owl:resultTime "2015-01-01T10:00:01"
:obsresult1 om-owl:floatValue 35.4 .
Plain triples
Where is the
timestamp?
:observation2 rdf:type om-owl:Observation .
:observation2 om-owl:observedProperty weather:_AirTemperature .
:observation2 om-owl:procedure :sensor1 .
:observation2 om-owl:result :obsresult2 .
:observation2 om-owl:resultTime "2015-01-01T10:00:02"
:obsresult2 om-owl:floatValue 36.4 .
What is the order
in the RDF graph?
Appended to a file?
Or to some RDF dataset?
How to store it?
6. 9
The RSP Community
Research work
Many Papers
PhD Thesis
Datasets
Prototypes
Benchmarks
RDF Streams
Stream Reasoning
Complex Event Processing
Stream Query Processing
Stream Compression
Semantic Sensor Web
Manytopics
Tonsofwork
http://www.w3.org/community/rsp
W3C RSP Community Group
Effort to our work on RDF stream processing
discuss
standardize
combine
formalize
evangelize
8. 11
Connecting RSPs on the Web
Morph
Streams
CSPARQL
s
Etalis
TrOWL
s
s SPARQL
CQELS
s
Minimal agreements: standards, serialization, interfaces
Formal models for RSPs and reasoning
Working prototypes/systems! Reactive RSPs
9. 12
Connecting RSPs and Stream Reasoners
Stream Data Model
Stream Query Languages
Producing Streams
Consuming Streams
14. 17
Similar (not equals!) query languagesSELECT ?sensor
FROM NAMED STREAM <http://www.cwi.nl/SRBench/observations> [NOW-3 HOURS SLIDE 10 MINUTES]
WHERE {
?observation om-owl:procedure ?sensor ;
om-owl:observedProperty weather:WindSpeed ;
om-owl:result [ om-owl:floatValue ?value ] . }
GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float )
SELECT ?sensor
WHERE {
STREAM <http://www.cwi.nl/SRBench/observations> [RANGE 10800s SLIDE 600s] {
?observation om-owl:procedure ?sensor ;
om-owl:observedProperty weather:WindSpeed ;
om-owl:result [ om-owl:floatValue ?value ] .} }
GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float )
SELECT ?sensor
FROM STREAM <http://www.cwi.nl/SRBench/observations> [RANGE 1h STEP 10m]
WHERE {
?observation om-owl:procedure ?sensor ;
om-owl:observedProperty weather:WindSpeed ;
om-owl:result [ om-owl:floatValue ?value ] . }
GROUP BY ?sensor HAVING ( AVG(?value) >= "74"^^xsd:float )
SPARQLStream
CQELS
C-SPARQL
15. 18
RSP-QL
FROM NAMED WINDOW :win1 ON ex:social [RANGE PT10M]
FROM NAMED WINDOW :win2 ON ex:social [RANGE PT1M]
FROM NAMED WINDOW :win3 ON ex:sensors [RANGE PT1M]
SELECT ?room ?person
FROM NAMED WINDOW :win ON ex:social
WHERE {
WINDOW :win {?person :isIn ?room}
}
SELECT ?room
FROM NAMED WINDOW :win ON ex:social [RANGE PT10M SLIDE PT01M]
WHERE {
WINDOW :win { :axel :isIn ?room }
}
RSP-QL Semantics: a Unifying Query Model to Explain Heterogeneity
of RDF Stream Processing Systems. D. Dell’Aglio, E. Della Valle, J.-P.
Calbimonte, O. Corcho. International Journal on Semantic Web and
Information Systems IJSWIS, Volume 10(4). IGI Global, 2015.
Multiple windows
Extend SPARQL
Time based Windows
16. 19
RSEP-QL
SELECT ?x ?v
FROM NAMED :s1 WIN [RANGE 9] AS :w1
FROM NAMED :s2 WIN [RANGE 2] AS :w2
EVENT ON :w1 { ?x :p ?y. } AS E1
EVENT ON :w1 { ?y :q ?z. } AS E2
EVENT ON :w1 { ?z :r ?v. } AS E3
WHERE {
WINDOW :w2 { ?x :r ?v. }
MATCH { (E1 SEQ E2) SEQ E3 }
}
A Query Model to Capture Event Pattern Matching in RDF Stream Processing
Query Languages. [pdf]
D. Dell’Aglio, M. Dao-Tran, J.-P. Calbimonte, D. Le Phuoc and E. Della Valle. In Proc. of
the 20th International Conference on Knowledge Engineering and Knowledge
ManagementEKAW 2016. Bologna, Italy, November 2016
Combine time
windows and CEP
Sequencing events
as in CEP
18. 21
Feed an RDF Stream to a RSP engine
Ad-hoc
Conversi
on to
RDF
Live Non-RDF Streams
RDF
RDF datasets
RSP
Add (internal)
timestamp
on insertion
What is currently done in most RSPs
Continuous
additions
RDF +
timestamps
19. 22
R2RML Mappings
2
:ObsValueMap
rr:subjectMap [
rr:template "http://opensense.epfl.ch/data/ObsResult_NO2_{sensor}_{time}"];
rr:predicateObjectMap [
rr:predicate qu:numericalValue;
rr:objectMap [ rr:column "no2"; rr:datatype xsd:float; ]];
rr:predicateObjectMap [
rr:predicate obs:uom;
rr:objectMap [ rr:parentTriplesMap :UnitMap; ]].
:ObservationMap
rr:subjectMap [
rr:template "http://opensense.epfl.ch/data/Obs_NO2_{sensor}_{time}"];
rr:predicateObjectMap [
rr:predicate ssn:observedProperty;
rr:objectMap [ rr:constant opensense:NO2]];
URI of subject
URI of predicate
Object: colum name
Column names in a template
Can be used for mapping both databases, CSVs, JSON, etc
20. 23
Feed an RDF Stream to a RSP engine
Conversio
n to
RDF
Live Non-RDF Streams
RDF
RDF datasets
RSP
Add (internal)
timestamp
on insertion
Adding mappings to the data flow
Continuous
additions
RDF +
timestamps
21. 24
An example: TripleWave
Running modes
Sources
TripleWave: Spreading RDF Streams on the Web. [pdf]
A. Mauri, J.-P. Calbimonte, D. Dell’Aglio, M. Balduini, M. Brambilla, E. Della Valle and K. Aberer. In Proc.
of the International Semantic Web Conference ISWC 2016. Kobe, Japan, October 2016.
23. 26
Data stream characteristics
2
Data regularity
• Raw data typically collected as time series
• Very regular structure.
• Patterns can be exploited
E.g. mobile NO2 sensor readings
29-02-2016T16:41:24,47,369,46.52104,6.63579
29-02-2016T16:41:34,47,358,46.52344,6.63595
29-02-2016T16:41:44,47,354,46.52632,6.63634
29-02-2016T16:41:54,47,355,46.52684,6.63729
...
Data order
• Order of data is crucial
• Time is the key attribute for establishing an order among the data items.
• Important for indexing
• Enables efficient time-based selection, filtering and windowing
Timestamp Sensor Observed
Value
Coordinates
26. 29
An example: TripleWave
Running modes
Sources
TripleWave: Spreading RDF Streams on the Web. [pdf]
A. Mauri, J.-P. Calbimonte, D. Dell’Aglio, M. Balduini, M. Brambilla, E. Della Valle and K. Aberer. In Proc.
of the International Semantic Web Conference ISWC 2016. Kobe, Japan, October 2016.