Publishing consuming Linked Sensor Data meetup Cuenca
1. 1st Latin American Linked Data Meetup
Cuenca, Ecuador
Publishing and Consuming
Linked Sensor Data
Jean-Paul Calbimonte
Ontology Engineering Group.
Facultad de Informática, Universidad Politécnica de Madrid.
jp.calbimonte@upm.es
Date: 01/12/2011
2. Linked Sensor Data 101
Motivation
Ingredients
Linked Sensor Data
Generate
Consume
2
8. Who are the end users of Sensor Networks?
The climate change expert, or a simple citizen
Source: Dave de Roure
9. Not only environmental, but many others…
Weather Sensors
GPS Sensors
Sensor Dataset
Satellite Sensors Camera Sensors
Source: H Patni, C Henson, A Sheth 9
10. The Sensor Web
Universal, web-based access to sensor data
Source: Adapted from Alan Smeaton’s invited talk 10 ESWC2009
at
12. Should we care as computer scientists?
“Grand Challenge” CS issues:
• Heterogeneity
• Scale
• Scalability
• Autonomic behaviour
• Persistence, evolution
• Deployment challenges
• Mobility
Anything left for Semantic Web research?
Source: Dave de Roure
13. Data from the Web
Flood risk alert:
South East England
Emergency
I have to make
planner
sense out of all this
data
wave data Environmental
forecasts defenses
Sensors, Mappings and Queries 13
14. Semantic Sensor Web / Linked Sensor Data (LSD)
A representation of sensor data following
the standards of Linked Data
But what is Linked Data?
15. What is Linked Data?
An extension of the current Web…
data are given well defined
and explicitly represented meaning
So that it can be shared and used
By humans and machines
And clear principles on how to publish data
15
16. The four principles (Tim Berners Lee, 2006)
Use URIs as names of things
Use HTTP URIs
Provide useful information when URI is dereferenced
Link to other URIs
http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html
16
18. Semantic Sensor Web / Linked Sensor Data (LSD)
A representation of sensor data following
the standards of Linked Data
• Early references…
• Sheth A, Henson C, and Sahoo S, Semantic Sensor Web, IEEE Internet
Computing, 2008.
• Sequeda J, Corcho O. Linked Stream Data: A Position Paper.
Proceedings of the 2nd International Workshop on Semantic Sensor
Networks, 2009.
• Le-Phuoc D, Parreira JX, Hauswirth M. Challenges in Linked Stream
Data Processing: A Position Paper. Proceedings of the 3rd International
Workshop on Semantic Sensor Networks, 2010.
19. Let’s check 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.soton.ac.uk/flood.html
• And some more from DERI Galway, Knoesis, CSIRO,
etc.
19
22. Coastal Channel Observatory and other sources
• Work with Flood environmental sensor data.
• SemSorGrid4Env project www.semsorgrid4env.eu.
Wind Speed
Wave Height
Tidal Observations
22
23. Motivation
Flood risk alert: Wave,
South East Real-time Wind, RDF
England data Tide
RDDF
Ontology
Emergency
Meteorological RDF
forecasts
planner
Flood defences
data RDF
...
... 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”
SPARQL
Enabling Ontology-based Access to Streaming Data Sources 23
24. Ingredients for Linked Sensor Data
Core ontological model
Additional domain ontologies
Guidelines for generation of identifiers
Sensor Web programming interfaces
Query processing engines
http://www.flickr.com/photos/santos/2252824606/
25. Sensor Metadata
station
location
sensors
model
properties
Sensors, Mappings and Queries 25
26. Sensor Metadata
• What properties are measured
• Which sensors available
• Where are they located
• How are they configured
• Who is responsible
Sensors, Mappings and Queries 26
28. Sensor Network Ontologies
Since aprox. 2005: Several proposals
Project specific
Reuse?
Alignment?
Best practices?
2009-2011: W3C SSN-XG incubator group
SSN Ontology: http://purl.oclc.org/NET/ssnx/ssn
29. SSN ontology modules
System OperatingRestriction
Deployment
Device Process
PlatformSite
Data
Skeleton
MeasuringCapability ConstraintBlock
30. Overview of the SSN ontologies
Deployment deploymentProcesPart only System OperatingRestriction
hasSubsystem only, some hasSurvivalRange only
SurvivalRange
DeploymentRelatedProcess
hasDeployment only
System
OperatingRange
Deployment deployedSystem only hasOperatingRange only
deployedOnPlatform only Process
inDeployment only Device hasInput only
Input
PlatformSite onPlatform only Device Process
Platform Output
attachedSystem only hasOutput only, some
Data Skeleton
isProducedBy some implements some
Sensor
Sensing
hasValue some sensingMethodUsed only
SensorOutput
detects only
SensingDevice observes only
ObservationValue SensorInput
isProxyFor only
Property
includesEvent some isPropertyOf some
observedProperty only
observationResult only
observedBy only hasProperty only, some
Observation FeatureOfInterest
featureOfInterest only
MeasuringCapability ConstraintBlock
hasMeasurementCapability only forProperty only
inCondition only inCondition only
MeasurementCapability Condition
31. SSN Ontology: Measurement Capabilities
Skeleton
Property
MeasuringCapability Communication
hasMeasurementProperty only
MeasurementCapability MeasurementProperty
Accuracy Resolution Selectivity Frequency Precision Latency
DetectionLimit Drift ResponseTime Sensitivity MeasurementRange
OperatingRestriction EnergyRestriction
Core ontological model
hasOperatingProperty only
OperatingRange OperatingProperty
EnvironmentalOperatingProperty MaintenanceSchedule OperatingPowerRange
hasSurvivalProperty only
SurvivalRange SurvivalProperty
EnvironmentalSurvivalProperty SystemLifetime BatteryLifetime
32. A model to bind them all
• W3C SSN Ontology
ssn:isProducedBy
ssn:SensorOutput
ssn:Sensor
ssn:observedBy
ssn:observationResult ssn:hasValue
ssn:Observation ssn:ObservationValue
ssn:observes
ssn:featureOfInterest
quantityValue
ssn:observedProperty
ssn:FeatureOfInterest
xsd:datatype
ssn:Property ssn:hasProperty
32
37. Examples: AWS, qu, Sweet
• http://www.w3.org/2005/Incubator/ssn/ssnx/meteo/
aws
Observed Properties
• http://www.w3.org/2005/Incubator/ssn/ssnx/qu/qu
Features of Interest
• http://sweet.jpl.nasa.gov/ Types of Sensors
Units of Measurement
Time
37
38. Ingredients for Linked Sensor Data
Core ontological model
Additional domain ontologies
Guidelines for generation of identifiers
Sensor Web programming interfaces
Query processing engines
http://www.flickr.com/photos/santos/2252824606/
40. Good practices in URI Definition
• URIs for:
• Observations
• Sensors
• Features of interest
• Properties
• Time periods
• Debate: observation or sensor-centric?
• Observation-centric seems to be the winner
• Sensor-centric, check [Sequeda and Corcho, 2009]
• Example:
http://aemet.linkeddata.es/resource/Observation/at
_1316382600000_of_08130_on_VV10m
when sensor property
41. Ingredients for Linked Sensor Data
Core ontological model
Additional domain ontologies
Guidelines for generation of identifiers
Sensor Web programming interfaces
Query processing engines
http://www.flickr.com/photos/santos/2252824606/
44. Ingredients for Linked Sensor Data
Core ontological model
Additional domain ontologies
Guidelines for generation of identifiers
Sensor Web programming interfaces
Query processing engines
http://www.flickr.com/photos/santos/2252824606/
45. Swiss-Experiment
• FP7 Network of Excellence
Environmental and GeoScience research
Swiss Alps
Geo
Researcher
... Snow,
Real-time Wind,
... data
... Radiation.
Lots of stuff
I want data to
create my
•How much snow is lost to evaporation?
models and
•Snow redistribution by wind
compare
• Wind erosion of sand
• ...
45
46. Where is the Data?
GSN server instance
.. wan7
sensor1
sensor2 timed: datetime PK
GSN sensor3 sp_wind: float
…
timed sp_wind
1 3.4
Queries
2 5.6
3 11.2
4 1.2
5 3.1
.. …
SELECT sp_wind FROM wan7 WHERE sp_wind >10
SELECT sp_wind FROM wan7 [NOW -5 HOUR] WHERE sp_wind >10
I want SPARQL!
46
47. Where is the Data?
GSN server instance
.. wan7
sensor1
sensor2 timed: datetime PK
GSN sensor3 sp_wind: float
…
Mappings
ssn:Observation
47
50. Queries to Sensor Data
SNEEql
RSTREAM SELECT id, speed, direction FROM wind [NOW];
Streaming SPARQL
PREFIX fire: <http://www.semsorgrid4env.eu/ontologies/fireDetection#>
SELECT ?WindSpeed
FROM STREAM <http://…/SensorReadings.rdf> WINDOW RANGE 1 MS SLIDE 1 MS
WHERE {
?sensor fire:hasMeasurements ?WindSpeed
FILTER (?WindSpeed<30)
}
C-SPARQL
SPARQL-Stream
REGISTER QUERY WindSpeedAndDirection AS
PREFIX fire: <http://www.semsorgrid4env.eu/ontologies/fireDetection#>
SELECT ?sensor ?speed ?direction
FROM STREAM <http://…/SensorReadings.rdf> [RANGE 1 MSEC SLIDE 1
MSEC]
WHERE { …
50
51. Query translation
SELECT ?waveheight
FROM STREAM <www.ssg4env.eu/SensorReadings.srdf>
[NOW – 5 HOUR TO NOW]
WHERE {
?WaveObs a ssn:ObservationValue;
qudt:numericalValue ?waveheight;
FILTER (?waveheight>10) }
SELECT sp_wind FROM wan7 [NOW -5 HOUR] WHERE sp_wind >10
52. Data Access
• GSN Web Services
• GSN URL API
• Compose the query as a URL:
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
?
52
53. Algebra expressions
π timed, 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&
sp_wind c_vs [0]= wan7 & c_field [0]= sp_wind & c_min [0]=10
σ sp_wind>10
ω 5 Hour
SELECT sp_wind FROM wan7 [NOW -5 HOUR] WHERE sp_wind >10
wan7
53
54. Using the Mappings
π timed,
sp_wind
SELECT ?waveheight
σ
FROM STREAM <www.ssg4env.eu/SensorReadings.srdf>
[NOW – 5 HOUR TO NOW]
sp_wind>10
WHERE {
?WaveObs a ssn:ObservationValue;
qudt:numericalValue ?waveheight; ω 5 Hour
FILTER (?waveheight>10) }
wan7
wan7 ssn:ObservationValue
http://swissex.ch/data#
timed: datetime PK qudt:numericalValue Wan7/WindSpeed/ObsValue{timed}
sp_wind: float
xsd:datatype
sp_wind
54
55. Algebra construction
π timed,
sp_wind
windsensor1
windsensor2 σ sp_wind>10
ω 5 Hour
wan7
Sensors, Mappings and Queries 55
57. Querying the Observations
SELECT ?waveheight
FROM STREAM <www.ssg4env.eu/SensorReadings.srdf>
[NOW -10 MINUTES TO NOW STEP 1 MINUTE]
WHERE {
?WaveObs a sea:WaveHeightObservation;
sea:hasValue ?waveheight; }
http://montblanc.slf.ch :22001/ multidata ?vs [0]= wan
Query
field [0]= sp_wind
translation GSN
SPARQLStream API
Client
Mappings Query
Processing
Sensor
Network
[tuples]
Data
[triples] translation
R2RML Mappings Query processing engines
57
58. Lessons Learned
• High-level
• 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
• Practical lessons learned
• Manage separately data and metadata of the sensors
• Data should always be separated between realtime-data and
historical-data
• Use the time format xsd:dateTime and the time zone
• Graphical representation of data for weeks or months is not
trivial anyway
59. Conclusions
Ingredients for Linked Sensor Data
Core ontology
Domain ontologies
Guidelines for identifiers
APIs
Query processing engines
Work in progress & examples
Challenges: generate & consume LSD
60. Thanks!
Acknowledgments: all those identified in slides, especially those working in LSD at OEG:
Oscar Corcho, Raúl García-Castro, Freddy Priyatna + the SemsorGrid4Env team (Alasdair
Gray, Kevin Page, etc.), the AEMET team at OEG-UPM (Ghislain Atemezing, Daniel Garijo,
José Mora, María Poveda, Daniel Vila, Boris Villazón) + Pablo Rozas (AEMET)
Questions, please.
jp.calbimonte@upm.es
60
Notas del editor
Addingsemanticsallowsthesearch and exploration of sensor data withoutany prior knowledge of the data sourceUsingtheprinciples of Linked Data facilitatestheintegration of stream data totheincreasingnumber of Linked Data collections
- A core ontological model that can be used to describe sensor data streams, including the metadata about the sensor data sources and their observations. We take into account here the ontology developed for this purpose in the context of the W3C Semantic Sensor Network Incubator Group, which can be considered the current standard to be followed. - A set of additional domain ontologies in the area in which sensors are applied and for which they generate measurements (e.g., if we deal with environmental sensors related to water, then ontologies about different aspects of water will be needed). These ontologies must be aligned with the previous core ontology.Guidelines for the generation of identifiers (in the form of URIs, since this is one of the key ingredients of Linked Data) for sensors, their observations and the features of interest that they observe.Supporting Sensor Web programming interfaces (APIs) that make use of the HTTP protocol for serving the corresponding data whenever the previous URIs are dereferenced. Query processing engines that support extended versions of SPARQL (the query language used for Linked Data) and handle some of the most characteristic aspects of data streams, such as time and/or tuple windows. The management of spatio-temporal extensions of this query language may be also useful in this context.
- A core ontological model that can be used to describe sensor data streams, including the metadata about the sensor data sources and their observations. We take into account here the ontology developed for this purpose in the context of the W3C Semantic Sensor Network Incubator Group, which can be considered the current standard to be followed. - A set of additional domain ontologies in the area in which sensors are applied and for which they generate measurements (e.g., if we deal with environmental sensors related to water, then ontologies about different aspects of water will be needed). These ontologies must be aligned with the previous core ontology.Guidelines for the generation of identifiers (in the form of URIs, since this is one of the key ingredients of Linked Data) for sensors, their observations and the features of interest that they observe.Supporting Sensor Web programming interfaces (APIs) that make use of the HTTP protocol for serving the corresponding data whenever the previous URIs are dereferenced. Query processing engines that support extended versions of SPARQL (the query language used for Linked Data) and handle some of the most characteristic aspects of data streams, such as time and/or tuple windows. The management of spatio-temporal extensions of this query language may be also useful in this context.
- A core ontological model that can be used to describe sensor data streams, including the metadata about the sensor data sources and their observations. We take into account here the ontology developed for this purpose in the context of the W3C Semantic Sensor Network Incubator Group, which can be considered the current standard to be followed. - A set of additional domain ontologies in the area in which sensors are applied and for which they generate measurements (e.g., if we deal with environmental sensors related to water, then ontologies about different aspects of water will be needed). These ontologies must be aligned with the previous core ontology.Guidelines for the generation of identifiers (in the form of URIs, since this is one of the key ingredients of Linked Data) for sensors, their observations and the features of interest that they observe.Supporting Sensor Web programming interfaces (APIs) that make use of the HTTP protocol for serving the corresponding data whenever the previous URIs are dereferenced. Query processing engines that support extended versions of SPARQL (the query language used for Linked Data) and handle some of the most characteristic aspects of data streams, such as time and/or tuple windows. The management of spatio-temporal extensions of this query language may be also useful in this context.
- A core ontological model that can be used to describe sensor data streams, including the metadata about the sensor data sources and their observations. We take into account here the ontology developed for this purpose in the context of the W3C Semantic Sensor Network Incubator Group, which can be considered the current standard to be followed. - A set of additional domain ontologies in the area in which sensors are applied and for which they generate measurements (e.g., if we deal with environmental sensors related to water, then ontologies about different aspects of water will be needed). These ontologies must be aligned with the previous core ontology.Guidelines for the generation of identifiers (in the form of URIs, since this is one of the key ingredients of Linked Data) for sensors, their observations and the features of interest that they observe.Supporting Sensor Web programming interfaces (APIs) that make use of the HTTP protocol for serving the corresponding data whenever the previous URIs are dereferenced. Query processing engines that support extended versions of SPARQL (the query language used for Linked Data) and handle some of the most characteristic aspects of data streams, such as time and/or tuple windows. The management of spatio-temporal extensions of this query language may be also useful in this context.
The where clasue for both SPARQL extensions is the same
- A core ontological model that can be used to describe sensor data streams, including the metadata about the sensor data sources and their observations. We take into account here the ontology developed for this purpose in the context of the W3C Semantic Sensor Network Incubator Group, which can be considered the current standard to be followed. - A set of additional domain ontologies in the area in which sensors are applied and for which they generate measurements (e.g., if we deal with environmental sensors related to water, then ontologies about different aspects of water will be needed). These ontologies must be aligned with the previous core ontology.Guidelines for the generation of identifiers (in the form of URIs, since this is one of the key ingredients of Linked Data) for sensors, their observations and the features of interest that they observe.Supporting Sensor Web programming interfaces (APIs) that make use of the HTTP protocol for serving the corresponding data whenever the previous URIs are dereferenced. Query processing engines that support extended versions of SPARQL (the query language used for Linked Data) and handle some of the most characteristic aspects of data streams, such as time and/or tuple windows. The management of spatio-temporal extensions of this query language may be also useful in this context.