This document proposes an approach to enable ontology-based access to streaming data sources. It discusses mapping streaming data schemas to ontological concepts and extending SPARQL to support querying streaming RDF data. This would allow expressing continuous queries over streaming data using ontological terms. The approach includes translating such SPARQL queries to queries over streaming data sources using mappings between the ontology and streaming schemas. An implementation of a semantic integration service is proposed to deploy this ontology-based access to streaming data.
Enabling ontology based streaming data access final
1. Date: 9/11/2010
Enabling Ontology-based Access to
Streaming Data Sources
Jean-Paul Calbimonte1, Oscar Corcho1, Alasdair J G Gray2
1Ontology Engineering Group. Departamento de Inteligencia Artificial.
Facultad de InformĂĄtica, Universidad PolitĂŠcnica de Madrid.
Campus de Montegancedo s/n. 28660 Boadilla del Monte. Madrid. Spain
jp.calbimonte@upm.es;ocorcho@fi.upm.es
2School of Computer Science, The University of Manchester,
Oxford Road, Manchester M13 9PL, United Kingdom
a.gray@cs.man.ac.uk
9th International Semantic Web Conference ISWC 2010
Shanghai, China
2. Outline
⢠Introduction & Motivation
⢠Background
⢠Approach
⢠Mapping Streams to Ontologies
⢠SPARQL Stream
⢠Query Translation
⢠Example
⢠Future work
⢠Conclusions
2Enabling Ontology-based Access to Streaming Data Sources
3. Introduction & Scope
3
⢠Streaming Data
(t9, a1, a2, ... , an)
(t8, a1, a2, ... , an)
(t7, a1, a2, ... , an)
...
...
(t1, a1, a2, ... , an)
...
...
Streaming
Data
⢠Continuously appended data
⢠Potentially infinite
⢠Time-stamped tuples
⢠Continuous queries
⢠Changes of values over time
⢠Latest used in queries
⢠Ubiquitous data capture
⢠Data processing
⢠Cheap
⢠Noisy, Unreliable
⢠Low computational, power resources, storage
⢠Sensor technologies
Enabling Ontology-based Access to Streaming Data Sources
⢠Applications in security surveillance, healthcare provision, environmental
monitoring, you name it.
4. Motivation
4Enabling Ontology-based Access to Streaming Data Sources
Emergency
planner
Flood risk alert:
South East England
...
...
...
Real-time
data
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â
Wave,
Wind,
Tide
5. Motivation
5Enabling Ontology-based Access to Streaming Data Sources
⢠Ontologies can be used as such a common model
⢠Need to provide solution for:
⢠Establish mappings between ontological models and
streaming data source schemas
⢠Access streaming data sources through queries over
ontology models
6. Background â Ontology-based Data Access
6Enabling Ontology-based Access to Streaming Data Sources
Ontology-based
Data Access
R2O + ODEMapster
D2RQ
SquirrelRDF
RDBToOnto
Relational.OWL
SPASQL
Virtuoso
MASTRO
Query/Data
Transformation
Ontological
Models
Relational
Schemas
Mapping
Document
Generate Semantic Web content from existing relational data sources
e.g. SPARQL
e.g. SQL
7. Background â Querying Relational Data Streams
7Enabling Ontology-based Access to Streaming Data Sources
Streaming Data
STREAM
Aurora/Borealis
Cougar
TinyDB
SNEE
e1
e2e1
e2 e3
e2e1 e3
e1
e4
t t+1 t+2 t+3 t+4 t+5
WINDOW [tnow TO tnow-2] SLIDE 1
Transform infinite sequence
of tuples to bounded bag
Window-to-Stream operators:
convert stream of windows to
stream of tuples
...
...
CQL
SNEEql
TinyQL
Query engines
Query languages
Event Streams
Acquisitional Streams
8. Ontology-based Streaming Data Access
8Enabling Ontology-based Access to Streaming Data Sources
Query
translation
Query Evaluator
Client
Stream-to-Ontology
mappings
SPARQLSream (Og)
[tuples]
Stream
Engine (S3)
Ontology-based Streaming Data Access Service
Relational
DB (S2)
Sensor
Network (S1)
RDF Store
(Sm)
SPARQLSream algebra(S1 S2 Sm)
Data
translation
q
[triples]
SNEEql
9. Ontology-based Streaming Data Access
9Enabling Ontology-based Access to Streaming Data Sources
⢠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
10. SPARQLStream
10Enabling Ontology-based Access to Streaming Data Sources
⢠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 â
cd:Observation
xsd:double
cd:observationResult
...
...
( <ssg4e:Obs1,rdf:type, cd:Observation>, ti ),
( <ssg4e:Obs1,cd:observationResult,â34.5â>, ti ),
( <ssg4e:Obs2,rdf:type, cd:Observation>, ti+1 ),
( <ssg4e:Obs2,cd:observationResult,â20.3â>, ti+1 ),
...
...
STREAM
<http://www.semsorgrid4env.eu/ccometeo.srdf>
11. SPARQLStream
11Enabling Ontology-based Access to Streaming Data Sources
Example:
⢠âprovide me with the wind speed observations over the last minute in the Solent Region â
cd:Observation
xsd:double
cd:observationResult
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 ?windspeed ?windts
FROM STREAM <http://www.semsorgrid4env.eu/ccometeo.srdf>
[ NOW â 1 MINUTE TO NOW â 0 MINUTES ]
WHERE
{
?WindObs a cd:Observation;
cd:observationResult ?windspeed;
cd:observationResultTime ?windts;
cd:observedProperty ?windProperty;
cd:featureOfInterest ?windFeature.
?windFeature a cd:Feature;
cd:locatedInRegion cd:SolentCCO.
?windProperty a cd:WindSpeed.
}
cd:Feature
cd:featureOfInterest
cd:Property
cd:observedProperty
cd:locatedInRegion
cd:Region
12. Ontology-based Streaming Data Access
12Enabling Ontology-based Access to Streaming Data Sources
Query
translation
Query Evaluator
Client
Stream-to-Ontology
mappings
SPARQLSream (Og)
[tuples]
Stream
Engine (S3)
Ontology-based Streaming Data Access Service
Relational
DB (S2)
Sensor
Network (S1)
RDF Store
(Sm)
SPARQLSream algebra(S1 S2 Sm)
Data
translation
q
[triples]
SNEEql
15. S2O Mappings
15Enabling Ontology-based Access to Streaming Data Sources
cd:Observation
xsd:double
cd:observationResult envdata_hornsea
Datetime: long
Hs : float
Lon: float
Lat: float
envdata_westbay
Datetime: long
Hs : float
Lon: float
Lat: float
envdata_milford
Datetime: long
Hs : float
Lon: float
Lat: float
envdata_rhylflats
Datetime: long
Hs : float
Lon: float
Lat: float
U
U
U
<union name="meteostream">
<map value="http://www.semsorgrid4env.eu/ontologies/
CoastalDefences.owl#SolentCCO">
<extent name="envdata_hornsea"></extent>
<extent name="envdata_rhylflats"></extent>
<extent name="envdata_milford"></extent>
<extent name="envdata_westbay"></extent>
</map>
</union>
⢠Union of extents-streams
16. Ontology-based Streaming Data Access
16Enabling Ontology-based Access to Streaming Data Sources
Query
translation
Query Evaluator
Client
Stream-to-Ontology
mappings
SPARQLSream (Og)
[tuples]
Stream
Engine (S3)
Ontology-based Streaming Data Access Service
Relational
DB (S2)
Sensor
Network (S1)
RDF Store
(Sm)
SPARQLSream algebra
Data
translation
q
[triples]
SNEEql
17. Query Translation
17Enabling Ontology-based Access to Streaming Data Sources
⢠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 â 0 MINUTES ] >
WHERE
{ ?x a cd:Observation;
cd:observationResult ?y. }
18. Query Translation
18Enabling Ontology-based Access to Streaming Data Sources
⢠Mappings:
query algebra expression
over sources
cd:Observation
xsd:double
cd:observationResult
envdata_milford
Datetime: long
Hs : float
Lon: float
Lat: float
envdata_milford
Datetime
Hs
19. Query Translation
19Enabling Ontology-based Access to Streaming Data Sources
envdata
_rhylflats
DateTime
Hs
cd:Observation
xsd:double
cd:observationResult
envdata_hornsea
Datetime: long
Hs : float
Lon: float
Lat: float
envdata_westbay
Datetime: long
Hs : float
Lon: float
Lat: float
envdata_milford
Datetime: long
Hs : float
Lon: float
Lat: float
envdata_rhylflats
Datetime: long
Hs : float
Lon: float
Lat: float
U
U
U
envdata
_milford
DateTime
Hs
envdata
_hornsea
DateTime
Hs
envdata
_westbay
DateTime
Hs
DateTime
Hs
20. Ontology-based Streaming Data Access
20Enabling Ontology-based Access to Streaming Data Sources
Query
translation
Query Evaluator
Client
Stream-to-Ontology
mappings
SPARQLSream (Og)
[tuples]
Stream
Engine (S3)
Ontology-based Streaming Data Access Service
Relational
DB (S2)
Sensor
Network (S1)
RDF Store
(Sm)
SPARQLSream algebra
Data
translation
q
[triples]
SNEEql
21. v
v
v
v
Query Execution
21
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
{
?WaveObs a cd:Observation;
cd:observationResult ?waveheight;
cd:observationResultTime ?wavets;
cd:observationResultLatitude ?lat;
cd:observationResultLongitude ?lon;
cd:observedProperty ?waveProperty;
cd:featureOfInterest ?waveFeature.
?waveFeature a cd:Feature;
cd:locatedInRegion cd:SouthEastEnglandCCO.
?waveProperty a cd:WaveHeight.
}
(SELECT Lon,timestamp,Hs,Lat FROM envdata_rhylflats) UNION
(SELECT Lon,timestamp,Hs,Lat FROM envdata_hornsea) UNION
(SELECT Lon,timestamp,Hs,Lat FROM envdata_milford) UNION
(SELECT Lon,timestamp,Hs,Lat FROM envdata_chesil) UNION
(SELECT Lon,timestamp,Hs,Lat FROM envdata_perranporth) UNION
(SELECT Lon,timestamp,Hs,Lat FROM envdata_westbay) UNION
(SELECT Lon,timestamp,Hs,Lat FROM envdata_pevenseybay)
envdata_rhylflats
Timestamp: long
Hs : float
Lon: float
Lat: float
envdata_hornsea
Observation
WaveHeight
Property
observed
Property
hasObservation
Result
xsd:float
locatedIn
Region
Ontologies Streams
S2O
Mapping
envdata_milford
envdata_chesil
envdata_westbay
Region
Feature
SPARQLStream
SNEEql
Enabling Ontology-based Access to Streaming Data Sources
22. Ontology-based Streaming Data Access
22Enabling Ontology-based Access to Streaming Data Sources
Query
translation
Query Evaluator
Client
Stream-to-Ontology
mappings
SPARQLSream (Og)
[tuples]
Stream
Engine (S3)
Ontology-based Streaming Data Access Service
Relational
DB (S2)
Sensor
Network (S1)
RDF Store
(Sm)
SPARQLSream algebra
Data
translation
q
[triples]
SNEEql
24. Implementation
24Enabling Ontology-based Access to Streaming Data Sources
⢠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
26. Implementation
⢠Flood Warning Application
26Enabling Ontology-based Access to Streaming Data Sources
- Wave Height updated every 10 min
- Live data from sensor in buoys
- Over 30 deployments
27. 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
27Enabling Ontology-based Access to Streaming Data Sources
28. 28
Future Works
⢠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
28Enabling Ontology-based Access to Streaming Data Sources
29. Thanks!
29
Enabling Ontology-based Access to
Streaming Data Sources
Jean-Paul Calbimonte
jp.calbimonte@upm.es
Enabling Ontology-based Access to Streaming Data Sources