Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
DIR workshop ontology stream data access
1. Data Intensive Research Workshop
Edinburgh, UK
Ontology-based Access to Streaming
Data Sources
Jean-Paul Calbimonte
Ontology Engineering Group
Facultad de Informática, Universidad Politécnica de Madrid.
jp.calbimonte@upm.es
Date: 16/02/2011
2. Introduction & Scope
• Sensor technologies
• Ubiquitous data capture
• Data processing
• Cheap
• Noisy, Unreliable
• Low computational, power resources, storage
• Streaming Data
• Continuously appended data (t9, a1, a2, ... , an)
• Potentially infinite (t8, a1, a2, ... , an)
• Time-stamped tuples Streaming (t7, a1, a2, ... , an)
...
• Continuous queries Data
...
• Changes of values over time (t1, a1, a2, ... , an)
• Latest used in queries ...
...
• Applications in security surveillance, healthcare provision, environmental
monitoring, you name it.
Enabling Ontology-based Access to Streaming Data Sources 2
3. Motivation
Flood risk alert:
South East England
Wave,
Real-time Wind,
data Tide
Emergency
planner
Meteorological
forecasts
Flood defences
data
...
... Other sources
...
• Detect conditions likely to cause a flood
• Present data model in terms of the user domain: e.g. Flood risk assessment
Example:
• “provide me with the wind speed observations average over the last minute in
the Solent region, if it is higher than the average of the last 2 to 3 hours”
Enabling Ontology-based Access to Streaming Data Sources 3
4. Motivation
• Ontologies can be used as such a common model
• Achieve logical transparency in access to data.
• Hide to the user where and how data are stored.
• Present to the user a conceptual view of the data.
• Use a semantically rich formalism for the conceptual
view.
[Calvanese2007]
• Need to provide solution for:
• Establish mappings between ontological models and
streaming data source schemas
• Access streaming data sources through queries over
ontology models
Enabling Ontology-based Access to Streaming Data Sources 4
5. Background – Ontology-based Data Access
Generate Semantic Web content from existing relational data sources
Linked Data
RDF
Ontological
Models
R2O + ODEMapster
e.g. SPARQL D2RQ
SquirrelRDF
RDBToOnto
Ontology-based Relational.OWL
Data Access Query/Data SPASQL
Transformation Mapping
Document Virtuoso
MASTRO
e.g. SQL
Relational
Schemas
Enabling Ontology-based Access to Streaming Data Sources 5
7. Background – Querying Relational Data Streams
Streaming Data
Event Streams/Acquisitional Streams
STREAM
Aurora/Borealis
Cougar Query engines
e1 WINDOW [tnow TO tnow-2] SLIDE 1 TinyDB
SNEE
e1 e2 CQL
SNEEql Query languages
TinyQL
e1 e2 e3
Transform infinite sequence
e1 e2 e3 e4
of tuples to bounded bag
t t+1 t+2 t+3 t+4 t+5
Window-to-Stream operators:
...
convert stream of windows to
stream of tuples
...
Enabling Ontology-based Access to Streaming Data Sources 7
8. Ontology-based Streaming Data Access
SPARQLStream algebra(S1 S2 Sm)
q Query
translation SNEEql Sensor
SPARQLStream (Og) Network (S1)
Relational
Client
Stream-to-Ontology DB (S2)
Query Evaluator
mappings Stream
Engine (S3)
RDF Store
[tuples] (Sm)
Data
[triples] translation
Ontology-based Streaming Data Access Service
Enabling Ontology-based Access to Streaming Data Sources 8
9. Ontology-based Streaming Data Access
• Mappings from relational streams to ontological concepts
• Extend stored data schema mappings
• Study translation semantics
• Provide with a stream query language at ontological level
• Use notion of RDF stream
• Extend SPARQL
• Window operator, window-to-stream operators
Enabling Ontology-based Access to Streaming Data Sources 9
10. SPARQLStream
• RDF-Stream ...
...
( <si-1,pi-1, oi-1>, ti-1 ),
( <si, pi, oi>, ti ),
( <si+1,pi+1, oi+1>, ti+1 ),
...
...
Example:
• “provide me with the wind speed observations over the last minute in the Solent Region ”
STREAM
cd:Observation
<http://www.semsorgrid4env.eu/ccometeo.srdf>
...
cd:observationResult ...
( <ssg4e:Obs1,rdf:type, cd:Observation>, ti ),
xsd:double ( <ssg4e:Obs1,cd:observationResult,”34.5”>, ti ),
( <ssg4e:Obs2,rdf:type, cd:Observation>, ti+1 ),
( <ssg4e:Obs2,cd:observationResult,”20.3”>, ti+1 ),
...
...
Enabling Ontology-based Access to Streaming Data Sources 10
11. SPARQLStream
Example:
• “provide me with the wind speed observations over the last minute in the Solent Region ”
PREFIX cd:
<http://www.semsorgrid4env.eu/ontologies/CoastalDefences.owl#>
PREFIX sb: <http://www.w3.org/2009/SSN-
cd:Observation
XG/Ontologies/SensorBasis.owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
cd:observationResult SELECT ?windspeed ?windts
cd:observedProperty FROM STREAM <http://www.semsorgrid4env.eu/ccometeo.srdf>
[ NOW – 1 MINUTE TO NOW MINUTES ]
xsd:double WHERE
cd:Property {
?WindObs a cd:Observation;
cd:featureOfInterest cd:observationResult ?windspeed;
cd:observationResultTime ?windts;
cd:observedProperty ?windProperty;
cd:Feature cd:featureOfInterest ?windFeature.
?windFeature a cd:Feature;
cd:locatedInRegion cd:SolentCCO.
?windProperty a cd:WindSpeed.
cd:locatedInRegion
}
cd:Region
Enabling Ontology-based Access to Streaming Data Sources 11
12. Ontology-based Streaming Data Access
SPARQLSream algebra(S1 S2 Sm)
q Query
translation SNEEql Sensor
SPARQLSream (Og) Network (S1)
Relational
Client
Stream-to-Ontology DB (S2)
Query Evaluator
mappings Stream
Engine (S3)
RDF Store
[tuples] (Sm)
Data
[triples] translation
Ontology-based Streaming Data Access Service
Enabling Ontology-based Access to Streaming Data Sources 12
14. S2O Mappings
• Union of extents-streams
envdata_rhylflats
Datetime: long
Hs : float
Lon: float
Lat: float
U
envdata_milford
<union name="meteostream">
Datetime: long
cd:Observation Hs : float <map value="http://www.semsorgrid4env.eu/ontologies/
Lon: float CoastalDefences.owl#SolentCCO">
Lat: float
U <extent name="envdata_hornsea"></extent>
cd:observationResult envdata_hornsea <extent name="envdata_rhylflats"></extent>
Datetime: long <extent name="envdata_milford"></extent>
Hs : float <extent name="envdata_westbay"></extent>
Lon: float
xsd:double Lat: float </map>
U </union>
envdata_westbay
Datetime: long
Hs : float
Lon: float
Lat: float
Enabling Ontology-based Access to Streaming Data Sources 14
15. Ontology-based Streaming Data Access
SPARQLSream algebra
q Query
translation SNEEql Sensor
SPARQLSream (Og) Network (S1)
Relational
Client
Stream-to-Ontology DB (S2)
Query Evaluator
mappings Stream
Engine (S3)
RDF Store
[tuples] (Sm)
Data
[triples] translation
Ontology-based Streaming Data Access Service
Enabling Ontology-based Access to Streaming Data Sources 15
16. Query Translation
• Queries:
SELECT ?y
WHERE
{ ?x a cd:Observation;
cd:observationResult ?y. }
SELECT ?y
FROM STREAM < STREAM <http://www.semsorgrid4env.eu/ccometeo.srdf>
[ NOW – 1 MINUTE TO NOW MINUTES ] >
WHERE
{ ?x a cd:Observation;
cd:observationResult ?y. }
Enabling Ontology-based Access to Streaming Data Sources 16
17. Query Translation
• Mappings:
query algebra expression
over sources
cd:Observation
envdata_milford
Datetime: long
cd:observationResult Hs : float
Lon: float
Lat: float
xsd:double
Datetime
Hs
envdata_milford
Enabling Ontology-based Access to Streaming Data Sources 17
18. Query Translation
envdata_rhylflats
Datetime: long
Hs : float
Lon: float
Lat: float
cd:Observation
U
envdata_milford
Datetime: long
Hs : float
cd:observationResult Lon: float
Lat: float
U
envdata_hornsea
xsd:double Datetime: long
Hs : float
Lon: float DateTime
Lat: float Hs
U
envdata_westbay
Datetime: long
Hs : float
Lon: float
Lat: float
DateTime DateTime DateTime DateTime
Hs Hs Hs Hs
envdata envdata envdata envdata
_rhylflats _milford _hornsea _westbay
Enabling Ontology-based Access to Streaming Data Sources 18
19. Ontology-based Streaming Data Access
SPARQLSream algebra
q Query
translation SNEEql Sensor
SPARQLSream (Og) Network (S1)
Relational
Client
Stream-to-Ontology DB (S2)
Query Evaluator
mappings Stream
Engine (S3)
RDF Store
[tuples] (Sm)
Data
[triples] translation
Ontology-based Streaming Data Access Service
Enabling Ontology-based Access to Streaming Data Sources 19
20. Query Execution
envdata_westbay
Ontologies Feature
envdata_chesil
Streams
Observation
locatedIn
Region
v
envdata_milford
hasObservation
Result
S2O v
Mapping envdata_hornsea
observed
Property Region v
xsd:float envdata_rhylflats
v
Timestamp: long
WaveHeight
Hs : float
Property
Lon: float
Lat: float
PREFIX cd: <http://www.semsorgrid4env.eu/ontologies/CoastalDefences.owl#>
PREFIX sb: <http://www.w3.org/2009/SSN-XG/Ontologies/SensorBasis.owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?waveheight ?wavets ?lat ?lon
FROM STREAM <http://www.semsorgrid4env/ccometeo.srdf>
WHERE
{ (SELECT Lon,timestamp,Hs,Lat FROM envdata_rhylflats) UNION
?WaveObs a cd:Observation; (SELECT Lon,timestamp,Hs,Lat FROM envdata_hornsea) UNION
cd:observationResult ?waveheight; (SELECT Lon,timestamp,Hs,Lat FROM envdata_milford) UNION
cd:observationResultTime ?wavets; (SELECT Lon,timestamp,Hs,Lat FROM envdata_chesil) UNION
cd:observationResultLatitude ?lat; (SELECT Lon,timestamp,Hs,Lat FROM envdata_perranporth) UNION
cd:observationResultLongitude ?lon; (SELECT Lon,timestamp,Hs,Lat FROM envdata_westbay) UNION
cd:observedProperty ?waveProperty; (SELECT Lon,timestamp,Hs,Lat FROM envdata_pevenseybay)
cd:featureOfInterest ?waveFeature.
?waveFeature a cd:Feature;
cd:locatedInRegion cd:SouthEastEnglandCCO.
?waveProperty a cd:WaveHeight.
}
SPARQLStream SNEEql
Enabling Ontology-based Access to Streaming Data Sources 20
21. Ontology-based Streaming Data Access
SPARQLSream algebra
q Query
translation SNEEql Sensor
SPARQLSream (Og) Network (S1)
Relational
Client
Stream-to-Ontology DB (S2)
Query Evaluator
mappings Stream
Engine (S3)
RDF Store
[tuples] (Sm)
Data
[triples] translation
Ontology-based Streaming Data Access Service
Enabling Ontology-based Access to Streaming Data Sources 21
24. SemSorGrid4Env EU Project
1. Universidad Politécnica de Madrid, (UPM,
Spain)
3 2. University of Manchester (UNIMAN, UK)
3. National and Kapodistrian University of
Athens (NKUA, Greece)
3
1
4. University of Southampton (SOTON, UK)
5. Deimos Space SLU (DMS, Spain)
6. EMU Ltd. (EMU, UK)
7. TechIdeas (TI, Spain)
24
Enabling Ontology-based Access to Streaming Data Sources 24
25. Project Challenges
• Integrated information space • Rapid development
• Discovery new sensor networks • flexible and user-centric decision
• Integrate with existing ones support systems
• Integrate possibly other data sources • Use data from multiple
(e.g., historical databases) autonomous independently
deployed sensor networks and
other applications.
100
80 th in a p p lic a tio n s ( m a s h u p s )
m id d le w a re
60 Este
40
s e m a n tic d a ta in te g ra tio n a n d q u e ry in g
Oeste
20
0 Norte
1er 3er le g a c y
d a ta s o u rc e s
trim. re gtrim.
s e n s o r n e tw o rk s
is trie s
Enabling Ontology-based Access to Streaming Data Sources 25
26. Implementation
• Design, implement
and deploy a
Semantic Integration
Service
• Extend existing ontology-
based data integration
models to take into
account sensor networks
streaming data, semantic
heterogeneity and quality
of service
Enabling Ontology-based Access to Streaming Data Sources 26
28. Implementation
• Flood Warning Application
- Wave Height updated every 10 min
- Live data from sensor in buoys
- Over 30 deployments
Enabling Ontology-based Access to Streaming Data Sources 28
29. Conclusions
Ontology-base data access
• Define stream extensions for R2O
• Define SPARQLStream language syntax and semantics
• Define S2O mappings-based translation semantics
Implementation
• Enable engine support for « S2O » documents,
SPARQLStream queries
• Enabled engine support for SNEEql translation and
connection
• Limited to non-distributed scenario initially
Enabling Ontology-based Access to Streaming Data Sources 29
30. Future Work
• Ontology-based data access
• SPARQL construct expressions, aggregates, projected
operators
• Implement adapters for other streaming sources
• Add query rewriting algorithms
• Ontology-based streaming data integration
• Horizontal & vertical integration
• Integrate streaming + stored data
• RDF data sources integration
• Streaming query optimization
• Analyze cost models
• Streaming sources statistics and metadata
• Quantitative evaluation
Enabling Ontology-based Access to Streaming Data Sources 30
31. Planet Data
• EU FP7 Network of
Excellence
• Working with EPFL Global
Sensor Network
• SwissExperiment Data
Enabling Ontology-based Access to Streaming Data Sources 31
32. Co-authors of this work
• Oscar Corcho – Universidad Politécnica de Madrid
• Alasdair Gray – The University of Manchester
• Supported by the SemSorGrid4Env FP7-223913
Enabling Ontology-based Access to Streaming Data Sources 32
33. Thanks!
Ontology-based Access to
Streaming Data Sources
Jean-Paul Calbimonte
jp.calbimonte@upm.es
Enabling Ontology-based Access to Streaming Data Sources 33