SSN11: Semantic Sensor Data Search in a Federated Sensor Network
-
Upload
jean-paul-calbimonte -
Category
Education
-
view
1.022 -
download
6
description
Transcript of SSN11: Semantic Sensor Data Search in a Federated Sensor Network
Date: 23/10/2011
Semantic Sensor Data Search in a Federated Sensor Network
Jean-Paul Calbimonte1, Hoyoung Jeung2,
Oscar Corcho1 and Karl Aberer2
1Ontology Engineering Group.
Facultad de Informática, Universidad Politécnica de Madrid. 2Distributed Information Systems Laboratory
School of Computer Science & Communication Systems, EPFL.
4th International Workshop on Semantic Sensor Networks ISWC 2011
Outline
2
• Introduction• Sensor data• Sensor metadata
• Ontological representation• Mapping sensor streams• Sensor data search• Query translation
• GSN URL API
• Conclusions
3
Swiss-Experiment
• FP7 Network of Excellence
GeoResearcher
Environmental and GeoScience researchSwiss Alps
...
...
...
Real-time data
Snow,Wind,Radiation.Lots of stuff
• How much snow is lost to evaporation?
• Snow redistribution by wind• Wind erosion of sand• ...
I want data to create my
models and compare
Swiss-Experiment Infrastructure
4
• 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:• Jeung H., Sarni, S., Paparrizos, I., Sathe, S., Aberer, K., Dawes, N., Papaioannus, T.,
Lehning, M.Effective Metadata Management in federated Sensor Networks. in SUTC, 2010
Sensor observations
Sensor metadata
Sensor Metadata
5
station
location
model
sensors
properties
Sensor Metadata
• What properties are measured
• Which sensors available
• Where are they located
• How are they configured
• Who is responsible
6
Sensor Data: Observations
7
Heterogeneity
Integration
W3C SSN-XG Ontology
• SSN Ontology
8
ssn:FeatureOfInterest
ssn:Observation
ssn:isProducedByssn:SensorOutput
ssn:Sensor
ssn:featureOfInterest
ssn:ObservationValue
ssn:Property
ssn:observedByssn:observationResult ssn:hasValue
ssn:hasProperty
ssn:observedProperty
ssn:observes
xsd:datatype
quantityValue
W3C SSN-XG Ontology
9
ssn:OperatingRange
ssn:SensingDevice
ssn:hasOperatingRange
ssn:Device
ssn:Sensor
ssn:MeasurementCapability
ssn:Sensing
ssn:System
ssn:Deployment
ssn:Platform
ssn:hasDeployment
ssn:deployedOnPlatformssn:implements
ssn:hasMeasurementCapability
ssn:onPlatform
Example
swissex:Sensor1
rdf:type ssn:Sensor;
ssn:onPlatform swissex:Station1;
ssn:observes [rdf:type sweetSpeed:WindSpeed].
swissex:Sensor2
rdf:type ssn:Sensor;
ssn:onPlatform swissex:Station1;
ssn:observes [rdf:type sweetTemp:Temperature].
swissex:Station1
:hasGeometry [ rdf:type wgs84:Point;
wgs84:lat "46.8037166";
wgs84:long "9.7780305"].
10
station
senso
r1
senso
r2
Example
swissex:WindSpeedObservation1
rdf:type ssn:Observation;
ssn:featureOfInterest [rdf:type sweetAtmoWind:Wind];
ssn:observedProperty [rdf:type sweetSpeed:WindSpeed];
ssn:observationResult [rdf:type ssn:SensorOutput;
ssn:hasValue [qudt:numericValue "6.245"^^xsd:double]];
ssn:observationResultTime [time:inXSDDatatime "2011-10-26T21:32:52"];
ssn:observedBy swissex:Sensor1 ;
11
WindSpeed : 6.245
At: 2011-10-26T21:32:52
Where is the Data?
12
GSN
GSN server instance
wan7
timed: datetime PKsp_wind: float
..sensor1sensor2sensor3…
Virtual
senso
rs
ssn:Observation
Mappings
Creating Mappings
13
wan7
timed: datetime PKsp_wind: float
ssn:ObservationValue
qudt:numericValue
xsd:decimal
http://swissex.ch/data#Wan7/WindSpeed/ObsValue{timed}
sp_wind
ssn:SensorOutput
ssn:Observation
ssn:hasValue
ssn:observationResulthttp://swissex.ch/data#
Wan7/WindSpeed/Observation{timed}
http://swissex.ch/data#Wan7/ WindSpeed/ ObsOutput{timed}
ssn:Property
ssn:observedProperty
sweetSpeed:WindSpeed
R2RML
• RDB2RDF W3C Group, R2RML Mapping language:• http://www.w3.org/2001/sw/rdb2rdf/r2rml/
14
:Wan4WindSpeed a rr:TriplesMapClass; rr:tableName "wan7"; rr:subjectMap [ rr:template "http://swissex.ch/ns#WindSpeed/Wan7/{timed}"; rr:class ssn:ObservationValue; rr:graph ssg:swissexsnow.srdf ]; rr:predicateObjectMap [ rr:predicateMap [ rr:predicate ssn:hasQuantityValue ]; rr:objectMap[ rr:column "sp_wind" ] ]; .
<http://swissex.ch/ns#/WindSpeed/Wan7/2011-05-20:20:00 > a ssn:ObservationValue<http://swissex.ch/ns#/WindSpeed/Wan7/2011-05-20:20:00 > ssn:hasQuantityValue " 4.5"
Searching for Sensors
• Transformed wiki metadata to SSN instances in RDF• Generated R2RML mappings for all sensors• Numbers: 28 Deployments
• Aprox. 50 sensors in each deployment. More than 1500 sensors
15
SELECT DISTINCT?lat ?long ?platformName ?deploymentName WHERE {
?sensor ssn:observes [a prop:MotionProperty]; ?system ssn:hasSubSystem ?sensor;
ssn:onPlatform ?platform; ssn:hasDeployment ?deployment.
?deployment foaf:name ?deploymentName. ?platform dul:hasLocation [swissex:hasGeometry ?link];
foaf:name ?platformName. ?link omgeo:within(46.3 8.7 47.2 9.8);
geo-pos:lat ?lat; geo-pos:long ?long. }
Sensor Data Portal Application
• Problems• Too many sensors• Too Heterogeneous
• Any sensors available in this region?• Sensors that measure wind speed?• How about getting the data?
16
Playing with it
17
Querying the Observations
• Implementation of Ontology-based querying over GSN
• Using the R2RML mappings• Fronting GSN with SPARQL-Stream queries• Query & Data translation process
18
Query & Data Translation
19
qQuery
translation
q’Query
Processing
Data translation
dd’
Clie
nt mappings
[tuple][tuple]
[triple]
Ontology-based sensor query service
SPARQLStream
Target query Se
nso
r Ne
two
rks
SSN Onto
logy
R2RM
L
GSN
???
SELECT ?waveheightFROM STREAM <www.ssg4env.eu/SensorReadings.srdf> [NOW -10 MINUTES TO NOW]WHERE { ?WaveObs a ssn:Observation; sea:hasValue ?waveheight; }
Data Access
• GSN Web Services• GSN URL API
• Compose the query as a URL:
20
http://montblanc.slf.ch :22001/ multidata ?vs [0]= wan7 &field [0]= sp_wind &from =15/05/2011+05:00:00& to =15/05/2011+10:00:00&c_vs [0]= wan7 & c_field [0]= sp_wind & c_min [0]=10
SELECT sp_wind FROM wan7 [NOW -5 HOUR] WHERE sp_wind >10 ?
Calbimonte, J-P., Corcho O., Gray, A. Enabling Ontology-based Access to Streaming Data Sources. In ISWC 2010.
SPARQL-Stream
Using the Mappings
21
SELECT ?waveheightFROM STREAM <www.ssg4env.eu/SensorReadings.srdf> [NOW – 5 HOUR TO NOW]WHERE { ?WaveObs a ssn:ObservationValue; qudt:numericalValue ?waveheight; FILTER (?waveheight>10) }
wan7
timed: datetime PKsp_wind: float
xsd:datatype
ssn:ObservationValue
qudt:numericalValue
sp_wind
http://swissex.ch/data#Wan7/WindSpeed/ObsValue{timed}
timed,sp_wind
π
ω
σsp_wind>10
5 Hour
wan7
Algebra expressions
22
timed,sp_wind
π
ω
σ sp_wind>10
5 Hour
wan7
http://montblanc.slf.ch :22001/ multidata ?vs [0]= wan7 &field [0]= sp_wind &from =15/05/2011+05:00:00& to =15/05/2011+10:00:00&c_vs [0]= wan7 & c_field [0]= sp_wind & c_min [0]=10
SELECT sp_wind FROM wan7 [NOW -5 HOUR] WHERE sp_wind >10
Algebra construction
23
timed,sp_wind
π
ω
σ sp_wind>10
5 Hour
wan7
windsensor1
windsensor2
Static optimization
24Sensors, Mappings and Queries
timed,sp_wind
π
ω
σ sp_wind>10
5 Hour
wan7
timed,windvalue
π
ω
σ windvalue>10
5 Hour
windsensor1
timed,windvalue
π
ω
σ windvalue>10
5 Hour
windsensor2
25
Querying the ObservationsSELECT ?waveheightFROM STREAM <www.ssg4env.eu/SensorReadings.srdf> [NOW -10 MINUTES TO NOW STEP 1 MINUTE]WHERE { ?WaveObs a sea:WaveHeightObservation; sea:hasValue ?waveheight; }
Query translation
Query ProcessingC
lient
Mappings
SPARQLStream
[tuples]
Sensor Network
Data translation[triples]
GSN API
:Wan4WindSpeed a rr:TriplesMapClass; rr:tableName "wan7"; rr:subjectMap [ rr:template "http://swissex.ch/ns#WindSpeed/Wan7/{timed}"; rr:class ssn:ObservationValue; rr:graph ssg:swissexsnow.srdf ]; rr:predicateObjectMap [ rr:predicateMap [ rr:predicate ssn:hasQuantityValue ]; rr:objectMap[ rr:column "sp_wind" ] ];
R2RML Mappings
http://montblanc.slf.ch :22001/ multidata ?vs [0]= wan7 &field [0]= sp_wind
Translation overhead
26Sensors, Mappings and Queries
Conclusions
• Use of the SSN Ontology• Sensor metadata• Sensor observations
• Using R2RML mappings for virtual sensors• We can translate to query languages and APIs
• Abstract expressions for representing queries
• Applications• Improved sensor search• Federated environment• Schema heterogeneity
27
TODO
• Explore expressivity of queries• Expose as Linked Stream Data• Integrate with stored RDF data• Apply to other environments
• Complex-event-processing engines• OGC SOS Services• Pachube• etc
• Experimentation• Latency• Performance• Tuple rates• Query complexity
28
Thanks!
http://code.google.com/p/semanticstreams/
Questions, please.
29