45
Semantics, Sensor Networks and Linked Stream/Sensor Data 8 th Summer School on Ontological Engineering and Semantic Web (SSSW2011) Cercedilla, July 15 th 2011 Oscar Corcho Facultad de Informática, Universidad Politécnica de Madrid Campus de Montegancedo sn, 28660 Boadilla del Monte, Madrid http://www.oeg-upm.net [email protected] Phone: 34.91.3366605 Fax: 34.91.3524819

Semantic Sensor Networks and Linked Stream Data

Embed Size (px)

DESCRIPTION

Invited talk at the 8th Summer School on Ontological Engineering and Semantic Web, on Semantic Sensor Networks and Linked Stream/Sensor Data

Citation preview

Page 1: Semantic Sensor Networks and Linked Stream Data

Semantics, Sensor Networks and Linked Stream/Sensor Data

8th Summer School on Ontological Engineering and Semantic Web

(SSSW2011)Cercedilla, July 15th 2011

Oscar CorchoFacultad de Informática, Universidad Politécnica de Madrid

Campus de Montegancedo sn, 28660 Boadilla del Monte, Madrid

http://www.oeg-upm.net

[email protected]

Phone: 34.91.3366605

Fax: 34.91.3524819

Page 2: Semantic Sensor Networks and Linked Stream Data

Index

PART I

From the [Social] [Semantic] Web

… to Sensor Networks…

… to the Sensor Web / Internet of Things…

… to Semantic Sensor Web and Linked Stream/Sensor Data

Page 3: Semantic Sensor Networks and Linked Stream Data

The Semantic Web of Virtual Things and Data

• We start living in a well-organised virtual world…• “Data is mostly in relational databases and can be exported to

Linked Data” (Juan Sequeda)• “GoodRelations markup is conquering the world of products and

services with structured metadata” (Martin Hepp)• “We know where, what and whom” (Steffen Staab)• “We can search for it” (Peter Mika)• “And we can link all these data sources” (Tom Heath)• …

Disclaimer: “All tutors and invited speakers are equally important and order is not important. Those who do not appear should not be worried about that” (Enrico Motta and Asun Gómez-Pérez)

• However, the real world is far more heterogeneous and less well-organised than the data that we store in our computers(this is not the only property that it has, you will see more…)

3

Page 4: Semantic Sensor Networks and Linked Stream Data

Web, Semantic Web, Social Web, Social Semantic …

4Source: No idea about copyright (sorry…)

Page 5: Semantic Sensor Networks and Linked Stream Data

Sensor Networks

• Increasing availability of cheap, robust, deployable sensors as ubiquitous information sources

• Dynamic and reactive, but noisy, and unstructured data streams

Source: Antonis Deligiannakis

Page 6: Semantic Sensor Networks and Linked Stream Data

Parts of a Sensor

• Sensing equipment• Internal (“built-in”) • External

• CPU• Memory• Battery• Radio to transmit/receive data from other sensors

6Source: Antonis Deligiannakis

Page 7: Semantic Sensor Networks and Linked Stream Data

Who are the end users of sensor networks?

Source: Dave de Roure

The climate change expert, or a simple citizen

Page 8: Semantic Sensor Networks and Linked Stream Data

Not only environmental sensors, but many others…

8

Weather Sensors

Camera SensorsSatellite Sensors

GPS SensorsSensor Dataset

Source: H Patni, C Henson, A Sheth

Page 9: Semantic Sensor Networks and Linked Stream Data

How do we make these sensors more accessible?

9Source: SemsorGrid4Env consortium

Page 10: Semantic Sensor Networks and Linked Stream Data

10

The Sensor Web (related to Internet of Things)

• Universal, web-based access to sensor data

• Some sensor network properties:• Networked• Mostly wireless• Each network with some

kind of authority and administration

• Sometimes noisy

Source: Adapted from Alan Smeaton’s invited talk at ESWC2009

Page 11: Semantic Sensor Networks and Linked Stream Data

Should we care as computer scientists?

• They are mostly useful for environmental scientists, physicists, geographers, seismologists, … [continue for more than 100 disciplines]• Hence interesting for those computer scientists interested on

helping these users… We are many ;-)

• But they are also interesting for “pure” compuyter scientists (and even Semantic Web researchers)• They address an important set of “grand challenge”

Computer Science issues including: • Heterogeneity• Scale• Scalability• Autonomic behaviour• Persistence, evolution• Deployment challenges

• MobilitySource: Dave de Roure

Page 12: Semantic Sensor Networks and Linked Stream Data

12

A set of challenges in sensor data management

• Provisioning• Complexity of acquisition: distributed sources, data volumes,

uncertainty, data quality, incompleteness • Pre-processing incoming data: calibration on instruments

(specific), lack of re-grid, calibration, gap-filling features• Tools for data ingestion needed: generic, customizable,

provide estimates, uncertainty degree, etc.

• Spatial/temporal• Analysis, modeling

• Discovery: identify sources, metadata• Data quality: gaps, faulty data, loss, estimates• Analysis models • Republish analytic results, computations, • Workflows for data stream processing

Source: Data Management in the WorldWide Sensor Web. Balazinska et al. IEEE Pervasive Computing, 2007

Page 13: Semantic Sensor Networks and Linked Stream Data

13

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

Source: Data Management in the WorldWide Sensor Web. Balazinska et al. IEEE Pervasive Computing, 2007

Page 14: Semantic Sensor Networks and Linked Stream Data

A semantic perspective on these challenges

• Sensor data querying and (pre-)processing• Data heterogeneity• Data quality• New inference capabilities required to deal with sensor

information

• 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

• User interaction with sensor data

Page 15: Semantic Sensor Networks and Linked Stream Data

Vision (after some iterations, and more to come)

15

Networked Knowledge

Before 2010 2010-2015 2015-2020 Beyond 2020

Today Incremental Incremental-Visionary VisionaryInteroperability Middleware

Sensor ontologies Intra-network cross-

layer integration and optimization

Sensor Internet

Inter-network cross-layer integration and optimization

Information & Context

Relational database integration

Sensor network data warehouses

Stream aggregation Query processing

and reasoning on sensor networks

Event modelling

Database-stream integration

Sensor actuation (In-network processing)

QoS models

QoS-based information integration of DB and streams

Discovery Centralised non-semantic registries (sensorbase.org)

Semantic discovery of sensors and sensor data

Distributed registries Sensor network

location transparencyIdentity & Trust & Privacy

RFID tags No privacy mgmnt

URIs User-centric privacy

and policies

Virtual sensor networks through dynamic policies

Provenance Data provenance (where, what and who)

Data transformation processes (how)

Process and problem solving understanding (why)

Problem solving interpretation and explanation

Source: RWI Working Group on IoT: Networked Knowledge

Page 16: Semantic Sensor Networks and Linked Stream Data

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

• Early references…• Amit Sheth, Cory Henson, and Satya Sahoo, "Semantic Sensor

Web," IEEE Internet Computing, July/August 2008, p. 78-83• Sequeda J, Corcho O. Linked Stream Data: A Position Paper.

Proceedings of the 2nd International Workshop on Semantic Sensor Networks, SSN 09

• 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, SSN 10

Page 17: Semantic Sensor Networks and Linked Stream Data

LSD (Linked Stream/Sensor Data?)

• Very popular substance in the 60s

17

Page 18: Semantic Sensor Networks and Linked Stream Data

Let’s check some examples

• Meteorological data in Spain: automatic weather stations• http://aemet.linkeddata.es/• A number of SSSW2011 students involved in it• Open reviewing possibilities available at the Semantic Web

Journal: • http://www.semantic-web-journal.net/content/

transforming-meteorological-data-linked-data

• Live sensors in Slovenia• One of our SSSW2011 students involved in it ;-)• 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.

18

Page 19: Semantic Sensor Networks and Linked Stream Data

PART II

• How to create, publish and consume Linked Stream Data

Page 20: Semantic Sensor Networks and Linked Stream Data

How to deal with Linked Stream/Sensor Data

• Ingredients• An ontology model• Good practices in URI definition• Supporting semantic technology

• SPARQL extensions • To handle time and tuple windows• To handle spatio-temporal constraints

• REST APIs to access it

• A couple of lessons learned

Page 21: Semantic Sensor Networks and Linked Stream Data

Several efforts since approx. 2005State of the art on sensor network ontologies in the report below

In 2009, a W3C incubator group was started, which has just finishedLots of good people thereFinal report: http://www.w3.org/2005/Incubator/ssn/XGR-ssn-

20110628/Ontology: http://purl.oclc.org/NET/ssnx/ssnA good number of internal and external references to SSN

Ontologyhttp://www.w3.org/2005/Incubator/ssn/wiki/

Tagged_BibliographySSN Ontology paper submitted to Journal of Web Semantics

SSN ontologies. History

Page 22: Semantic Sensor Networks and Linked Stream Data

Skeleton

Device

Deployment

PlatformSite

System

Process

ConstraintBlockMeasuringCapability

OperatingRestriction

Data

Overview of the SSN ontology modules

Page 23: Semantic Sensor Networks and Linked Stream Data

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

Overview of the SSN ontologies

Page 24: Semantic Sensor Networks and Linked Stream Data

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

SSN Ontology. Sensor and environmental properties

Page 25: Semantic Sensor Networks and Linked Stream Data

A usage example

SWEET

Service

Coastal Defences

Ordnance Survey

Additional Regions

Role

DOLCE UltraLite

Schema

FOAF

Upper

External

SSG4Env

infrastructure

Flood domain

25

SSN

Page 26: Semantic Sensor Networks and Linked Stream Data

AEMET Ontology Network

• 83 classes• 102 object properties• 80 datatype properties• 19 instances• SROIQ(D)

Page 27: Semantic Sensor Networks and Linked Stream Data

How to deal with Linked Stream/Sensor Data

• Ingredients• An ontology model• Good practices in URI definition• Supporting semantic technology

• SPARQL extensions • To handle time and tuple windows• To handle spatio-temporal constraints

• REST APIs to access it

• A couple of lessons learned

Page 28: Semantic Sensor Networks and Linked Stream Data

Good practices in URI Definition

Sorry, no clear practices yet…

Page 29: Semantic Sensor Networks and Linked Stream Data

Good practices in URI Definition

• We have to identify…• Sensors• Features of interest• Properties• Observations

• Debate between being observation or sensor-centric• Observation-centric seems to be the winner• For some details of sensor-centric, check [Sequeda and

Corcho, 2009]

Page 30: Semantic Sensor Networks and Linked Stream Data

How to deal with Linked Stream/Sensor Data

• Ingredients• An ontology model• Good practices in URI definition• Supporting semantic technology

• SPARQL extensions • To handle time and tuple windows• To handle spatio-temporal constraints

• REST APIs to access it

• A couple of lessons learned

Page 31: Semantic Sensor Networks and Linked Stream Data

Semantically Integrating Streaming and Stored Data

Queries to Sensor/Stream Data

SNEEqlRSTREAM 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 { …

31

Page 32: Semantic Sensor Networks and Linked Stream Data

SPARQL-STR v1

32Sensors, Mappings and Queries

SELECT ?waveheight

FROM 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]

Page 33: Semantic Sensor Networks and Linked Stream Data

SPARQL-STR v2

Query

translation

Query Evaluator

Clie

nt

Stream-to-Ontology

Mappings (R2RML)

SPARQLStream (Og)

[tuples]

Stream Engine (S3)

Ontology-based Streaming Data Access Service

Relational DB (S2)

Sensor Network (S1)

RDF Store (Sm)

SPARQLStream algebra(S1 S2 Sm)

Data

translation

q

[triples]

SNEEql, GSN API

GSN

Page 34: Semantic Sensor Networks and Linked Stream Data

SwissEx

34Sensors, Mappings and Queries

• 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

Page 35: Semantic Sensor Networks and Linked Stream Data

Getting things done

• 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

35Sensors, Mappings and Queries

Page 36: Semantic Sensor Networks and Linked Stream Data

Sensor Metadata

36Sensors, Mappings and Queries

station

location

model

sensors

properties

Page 37: Semantic Sensor Networks and Linked Stream Data

Sensor Data: Observations

37Sensors, Mappings and Queries

Heterogeneity

Integration

Page 38: Semantic Sensor Networks and Linked Stream Data

SPARQL-STR + GSN

Page 39: Semantic Sensor Networks and Linked Stream Data

Ugly little demo

• Problems• Too many sensors• Too Heterogeneous

• Any sensors available in this region?• Sensors that measure wind speed?• How about getting the data?

39Sensors, Mappings and Queries

Page 40: Semantic Sensor Networks and Linked Stream Data

How to deal with Linked Stream/Sensor Data

• Ingredients• An ontology model• Good practices in URI definition• Supporting semantic technology

• SPARQL extensions • To handle time and tuple windows• To handle spatio-temporal constraints

• REST APIs to access it

• A couple of lessons learned

Page 41: Semantic Sensor Networks and Linked Stream Data

Sensor High-level API

Source: Kevin Page and rest of Southampton’s team at SemsorGrid4Env

Page 42: Semantic Sensor Networks and Linked Stream Data

Sensor High-level API

Source: Kevin Page and rest of Southampton’s team at SemsorGrid4Env

Page 43: Semantic Sensor Networks and Linked Stream Data

API definition

Source: Kevin Page and rest of Southampton’s team at SemsorGrid4Env

Page 44: Semantic Sensor Networks and Linked Stream Data

Lessons Learned

• High-level (part I)• 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 (part II)• 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

Page 45: Semantic Sensor Networks and Linked Stream Data

Semantics, Sensor Networks and Linked Stream/Sensor Data

8th Summer School on Ontological Engineering and Semantic Web

(SSSW2011)Cercedilla, July 15th 2011

Oscar Corcho

Acknowledgments: all those identified in slides + the SemsorGrid4Env team (Jean Paul Calbimonte, 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)