Ontology-based Stream/Sensor Data Modeling Presented by: Ashraf Heydari Supervisor: Dr. Kahani.
Transcript of Ontology-based Stream/Sensor Data Modeling Presented by: Ashraf Heydari Supervisor: Dr. Kahani.
Ontology-based Stream/Sensor Data
Modeling
Presented by:Ashraf Heydari
Supervisor:Dr. Kahani
2
Outline
•Introduction & Motivation•Approach
▫Ontology Model ▫URI Definition▫SPARQL Extensions ▫Example
•Conclusions•References
3
Introduction & Motivation
4
Sensor Networks• Increasing availability of cheap, robust, deployable
sensors as ubiquitous information sources• Dynamic and reactive, but noisy, and unstructured
data streams
5
Different Kinds of Sensors
Camera Sensors
Satellite Sensors
GPS Sensors
Sensor Dataset
Weather Sensors
6
The Sensor Web
• Universal, web-based access to sensor data
7
Streaming Data
• Continuously appended data• Potentially infinite• Time-stamped tuples• Continuous queries• Changes of values over time• Latest used in queries
(t9, a1, a2, ... , an)(t8, a1, a2, ... , an)(t7, a1, a2, ... , an)......(t1, a1, a2, ... , an)......
Streaming Data
8
A Set of Challenges in Sensor Data Management•Provisioning
▫Complexity of acquisition: distributed sources, data volumes
▫Pre-processing incoming data▫Tools for data ingestion needed
•Spatial/temporal•Analysis, modeling
▫Discovery: identify sources, metadata▫Data quality: faulty data, loss, estimates▫Analysis models ▫Republish analytic results▫Workflows for data stream processing
9
A Set of Challenges in Sensor Data Management• Interoperability
▫Data aggregation/integration•Uncertainty, data quality
▫Noise, failures, measurement errors, confidence, trust
• Distributed processing ▫High volume, time critical▫Fault-tolerance▫Load management ▫Stream processing features▫Continuous queries▫Live & historical data
10
A Set of Challenges in Sensor Data Management• Interoperability
▫Data aggregation/integration•Uncertainty, data quality
▫Noise, failures, measurement errors, confidence, trust
• Distributed processing ▫High volume, time critical▫Fault-tolerance▫Load management ▫Stream processing features▫Continuous queries▫Live & historical data
11
A Semantic Perspective on These Challenges•Sensor data model representation and
management▫For data publication, integration and discovery▫Bridging between sensor data and ontological
representations for data integration▫Ontologies: Observations and measurements, time
series, etc.▫Event models
•Sensor data querying and (pre-)processing▫Data heterogeneity▫Data quality▫New inference capabilities required to deal with
sensor information•User interaction with sensor data
12
Semantic Sensor Web/ Linked Stream-Sensor Data (LSD)
•A representation of sensor/stream data following the standards of Linked Data▫Adding semantics allows the search and
exploration of sensor data without any prior knowledge of the data source
▫Using the principles of Linked Data facilitates the integration of stream data to the increasing number of Linked Data collections
13
Semantic Sensor Web/ Linked Stream-Sensor Data (LSD)
14
Some Examples• Meteorological data in
Spain: automatic weather stations▫http://aemet.linkeddata.
es/
• Live sensors in Slovenia▫http://sensors.ijs.si/
• Channel Coastal Observatory in Southern UK▫http://webgis1.geodata.s
oton.ac.uk/flood.html
15
Approach
16
How to Deal with Linked Stream/Sensor Data•An ontology model•URI definition•SPARQL extensions
▫To handle time and tuple windows
17
SSN Ontologies. History
Several efforts since approx. 2005In 2009, a W3C incubator group was
started, which has just finishedOntology: http://purl.oclc.org/NET/ssnx/ssnA good number of internal and external
references to SSN OntologySSN Ontology paper submitted to Journal of
Web Semantics
18
Overview of The SSN Ontology Modules
Skeleton
Device
Deployment
PlatformSite
System
Process
ConstraintBlockMeasuringCapability
OperatingRestriction
Data
19
Overview of The SSN Ontologies
Skeleton
Device
Deployment
PlatformSite
System
System
onPlatform only
hasSubsystem only, someSurvivalRang
e
hasSurvivalRange only
OperatingRangehasOperatingRange only
hasDeployment only
DeploymentRelatedProcess
Deployment
deploymentProcesPart only
deployedSystem only
Platform
deployedOnPlatform only
attachedSystem only
Device
Sensor
SensingDevice
Sensing
implements some
observes only
hasMeasurementCapability only
inDeployment only
SensorInput
detects only
isProxyFor onlyObservationValu
e
SensorOutput
hasValue some
isProducedBy some
Process
Process
hasInput only
hasOutput only, some
Input
Output
Observation
observedBy only
featureOfInterest only
observationResult only
Property
observedProperty onlyhasProperty only, some
isPropertyOf some
sensingMethodUsed only
includesEvent some
FeatureOfInterest
ConstraintBlock
Condition
inCondition only
MeasuringCapability
MeasurementCapability
forProperty only
OperatingRestriction
inCondition only
Data
20
SSN Ontology. Sensor and Environmental Properties
CommunicationMeasuringCapability
MeasurementCapability
MeasurementProperty
hasMeasurementProperty only
Accuracy
DetectionLimit
Drift
Frequency
MeasurementRange
Precision
Resolution
ResponseTime
Selectivity
Sensitivity
Latency
Skeleton
EnergyRestrictionOperatingRestriction
OperatingRange
OperatingProperty
hasOperatingProperty only
EnvironmentalOperatingProperty
MaintenanceSchedule
SurvivalRange
SurvivalProperty
hasSurvivalProperty only
EnvironmentalSurvivalProperty
SystemLifetime
BatteryLifetime
OperatingPowerRange
Property
21
A Usage Example
SWEET
Service
Coastal Defences
Ordnance Survey
Additional
Regions
Role
DOLCE UltraLite
Schema
FOAF
Upper
External
SSG4Env infrastructure
Flood domain
SSN
22
How to Deal with Linked Stream/Sensor Data•An ontology model•URI definition•SPARQL extensions
▫To handle time and tuple windows
23
URI Definition
•No clear practices yet•We have to identify…
▫Sensors▫Features of interest▫Properties▫Observations
•Debate between being observation or sensor-centric▫Observation-centric seems to be the winner
24
How to Deal with Linked Stream/Sensor Data•An ontology model•URI definition•SPARQL extensions
▫To handle time and tuple windows
25
SPARQLStream
Example:“provide me with the wind speed observations over the last
minute in the Solent Region ”
...
...( <si-1,pi-1, oi-1>, ti-1 ),( <si, pi, oi>, ti ),( <si+1,pi+1, oi+1>, ti+1 ),......
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>
RDF-Stream
26
SPARQLStream
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
27
Queries to Sensor/Stream DataSNEEqlRSTREAM SELECT id, speed, direction FROM wind[NOW];
Streaming SPARQLPREFIX fire: <http://www.semsorgrid4env.eu/ontologies/fireDetection#>SELECT ?sensor ?speed ?directionFROM STREAM <http://…/SensorReadings.rdf> WINDOW RANGE 1 MS SLIDE 1 MSWHERE { ?sensor a fire:WindSensor; fire:hasMeasurements ?WindSpeed, ?WindDirection. ?WindSpeed a fire:WindSpeedMeasurement; fire:hasSpeedValue ?speed; fire:hasTimestampValue ?wsTime. ?WindDirection a fire:WindDirectionMeasurement; fire:hasDirectionValue ?direction; fire:hasTimestampValue ?dirTime. FILTER (?wsTime == ?dirTime)}
C-SPARQLREGISTER QUERY WindSpeedAndDirection ASPREFIX fire: <http://www.semsorgrid4env.eu/ontologies/fireDetection#>SELECT ?sensor ?speed ?directionFROM STREAM <http://…/SensorReadings.rdf> [RANGE 1 MSEC SLIDE 1 MSEC]WHERE { …
SPARQL-STR v1SELECT ?waveheightFROM STREAM <www.ssg4env.eu/SensorReadings.srdf> [FROM NOW -10 MINUTES TO NOW STEP 1 MINUTE]WHERE { ?WaveObs a sea:WaveHeightObservation; sea:hasValue ?waveheight; }
Query translation
Query ProcessingC
lient
Stream-to-Ontology mappings
SPARQLStream
[tuples]
Sensor Network
Data translation[triples]
SNEEql
conceptmap-def WaveHeightMeasurement virtualStream <http://ssg4env.eu/Readings.srdf> uri-as concat('ssg4env:WaveSM_', wavesamples.sensorid,wavesamples.ts) attributemap-def hasValue operation constant has-column wavesamples.measured dbrelationmap-def isProducedBy toConcept Sensor joins-via condition equals has-column sensors.sensorid has-column wavesamples.sensorid
conceptmap-def Sensor uri-as concat('ssg4env:Sensor_',sensors.sensorid) attributemap-def hasSensorid operation constant has-column sensors.sensorid
S2O Mappings
SELECT measured FROM wavesamples [NOW -10 MIN]
28
SPARQL-STR v2
29
Query translation
Query Evaluator
Cli
en
t
Stream-to-Ontology Mappings (R2RML)
SPARQLStream
[tuples]
Stream Engine (S3)
Ontology-based Streaming Data Access Service
Relational DB (S2)
Sensor Network (S1)
RDF Store (Sm)Data
translation[triples]
SNEEql, GSN API
GSN
SwissEx
30
•Global Sensor Networks, deployment for SwissEx.
•Distributed environment: GSN Davos, GSN Zurich, etc.▫In each site, a number of sensors available▫Each one with different schema
•Metadata stored in wiki▫Federated metadata management
Getting things done
31
•Transformed wiki metadata to SSN instances in RDF
•Generated R2RML mappings for all sensors•Implementation of Ontology-based querying
over GSN•Fronting GSN with SPARQL-Stream queries•Numbers:
▫28 Deployments▫Aprox. 50 sensors in each deployment▫More than 1500 sensors▫Live updates. Low frequency▫Access to all metadata/not all data
Sensor Metadata
32
station
location
model
sensors
properties
Sensor Data: Observations
33
• GSN (Global Sensor Networks) is a database software middleware designed to facilitate the deployment and programming of sensor networks.
• The software takes data (either directly from a sensor or from a CSV file), enters it into a database and provides a web-based query interface.
• It is completely generalised and able to handle sensors of all types.
SPARQL-STR + GSN
34
35
Conclusions
36
Conclusions
• Sensor data is yet another good source of data with some special properties
• Everything that we do with our relational datasets or other data sources can be done with sensor data
• Adding semantics allows the search and exploration of sensor data without any prior knowledge of the data source
• Using the principles of Linked Data facilitates the integration of stream data to the increasing number of Linked Data collections
37
References
38
References• Semantic Sensor Network XG Final Report, W3C Incubator Group Report 28 June 2011,
http://www.w3.org/2005/Incubator/ssn/XGR-ssn-20110628/• K. Janowicz and M. Compton
The Stimulus-Sensor-Observation Ontology Design Pattern and its Integration into the Semantic Sensor Network Ontology. In The 3rd International workshop on Semantic Sensor Networks 2010 (SSN10) in conjunction with the 9th International Semantic Web Conference (ISWC 2010), 2010.
• P. Barnaghi, S. Meissner and M. Presser Sense and sensability: Semantic data modelling for sensor networks. In Proceedings of the ICT Mobile Summit 2009, pp. 1-9, 2009.
• M. Compton, C. Henson, H. Neuhaus, L. Lefort and A. Sheth A Survey of the Semantic Specification of Sensors. In Proceedings of the 2nd International Workshop on Semantic Sensor Networks (SSN09) at ISWC 2009, pp. 17-32, 2009.
• M. Compton, H. Neuhaus, K. Taylor and K. Tran Reasoning about Sensors and Compositions. In Proceedings of the 2nd International Workshop on Semantic Sensor Networks (SSN09) at ISWC 2009, pp. 33-48, 2009.
• P. Barnaghi and M. Presser Publishing Linked Sensor Data. In The 3rd International workshop on Semantic Sensor Networks 2010 (SSN10) in conjunction with the 9th International Semantic Web Conference (ISWC 2010), 2010.
• A. Gray, J. Sadler, O. Kit, K. Kyzirakos, M. Karpathiotakis, J. Calbimonte, K. Page, R. Garc´ıa-Castro, A. Frazer, I. Galpin, A. Fernandes, N. Paton, M. Koubarakis, D. De Roure, K. Martinez, A. G´omez-P´erez. A Semantic Sensor Web for Environmental Decision Support Applications. In Sensors 11, no. 9, 2011.
• R. Garcà a Castro, C. Hill and O. Corcho Sensor network ontology suite v2. Deliverable D4.3v2, SemSorGrid4Env SemSorGrid4Env: Semantic Sensor Grids for Rapid Application Development for Environmental Management, 2011.
• H. Neuhaus , M. Compton The Semantic Sensor Network Ontology: A Generic Language to Describe Sensor Assets . In AGILE Workshop Challenges in Geospatial Data Harmonisation, 2009.
• D.F.Barbieri, D.Braga, S.Ceri, E.Della Valle, M.Grossniklaus Querying RDF Streams with C-SPARQL . In SIGMOD Record, 2010.
• D.F.Barbieri, D.Braga, S.Ceri, E.Della Valle, M.Grossniklaus C-SPARQL: SPARQL for continuous querying. In: WWW '09, 2009.
• A. Salehi, M. Riahi, S. Michel, and K. Aberer. GSN, Middleware for Streaming World (Best Demo Award). NCCR-MICS, NCCR-MICS/CL4, 2009.
39