You are granted a license to use, reproduce and create derivative works of this document under Creative Commons Attribution 3.0 Unported License. This copyright applies to Stream Annotation Ontology specification and RDF.
Representing IoT data streams is an important requirement in semantic stream data applications, as well as in knowledge-based environments for Smart Cities. This study aims to semantically represent the features of a data stream defining the specifications of an information model on top of Semantic Sensor Networks (SSN), PROV-O and TimeLine Ontologies, and involves connections with the Complex Event Processing Ontology and Quality Ontology.
This is a work in progress and as such is subject to change. Comments are very welcome, please send them to First Author.
This study aims to semantically represent the features of a stream data. The SAO ontology is a lightweight semantic model, which is built on top of well-known models to represent IoT data streams. It has been developed within the realm of CityPulse project that contains four main modules, namely Stream Annotation Ontology (SAO), Quality, Compex Event Ontology, and User Profiles information models.
The SAO Ontology provides temporal concepts such as StreamData, Segment, StreamAnalysis on top of the TimeLine concepts, PROV-O, SSN and Event Ontology. Timeline Ontology extends OWL-Time with various timelines (e.g. universal or discrete), temporal concepts, such as Instant, and Interval, and interval relationships. The SAO ontology concepts are in line with PROV-O ontology principels where it adopts, Agent, Entity, Activity. In terms of event description, it adopts Event concept of the Event Ontology and provides a broad definition of the StreamEvent concept in order to express an artificial classification of a time region, corresponding to a particular data stream. It also extends the sensor observations described in SSN Ontology ssn:Observation through a concept, StreamData, that allows to describe Segment or Point linked to time intervals or time instants. Below is the depiction of the workflow of the SAO Ontology.
The following is an exemplification of an annotated stream based on SAO Ontology, where it describes a traffic observation of a sensor feature called, "Average Speed", for a pair of sensors that are provided by the City of Aarhus via Open Data Aarhus Platform.
prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#> .
prefix tl: <http://purl.org/NET/c4dm/timeline.owl#> .
prefix sao: <http://purl.oclc.org/NET/UNIS/sao/sao#> .
prefix ct: <http://www.insight-centre.org/ct#> .
:cityofaarhus a foaf:Organisation, prov: Agent .
<trafficData158324> a ces:PrimitiveEventService , ssn:Sensor ;
ssn:observes "Measured_Time" , "Estimated_Time" , "Congestion_Level" , "Vehicle_Count" , "Average_Speed" ;
prov: actedOnBehalfOf :cityofaarhus .
<http://unis/trafficData158324FoI-001>
ct:hasFirstNode [ a ct:Node ;
ct:hasCity "Hinnerup"^^xsd:string ;
ct:hasLatitude "56.23172069428216"^^xsd:double ;
ct:hasLongtitude "10.104986076057457"^^xsd:double ;
ct:hasStreet "Ãrhusvej"^^xsd:string
] ;
ics:hasSecondNode [ a ct:Node ;
ct:hasCity "Hinnerup"^^xsd:string ;
ct:hasLatitude "56.22579478256016"^^xsd:double ;
ct:hasLongtitude "10.116589665412903"^^xsd:double ;
ct:hasStreet "Ãrhusvej"^^xsd:string
] .
<http://unis/trafficData158324Property-001> a <http://www.surrey.ac.uk/ics#Average_Speed> ;
ssn:isPropertyOf <http://unis/trafficData158324FoI-001> .
<http://unis/trafficData158324Observation-001> a sao:Point , ssn:Observation ;
sao:hasUnitOfMeasurement <http://unit1:seconds>; “no brackets”
sao:value "141.0"^^xsd:double ;
sao:time [ a tl:Instant ;
tl:at "2014-09-30T06:00:00"^^xsd:dateTime ;
tl:duration "PT5M"^^xsd:duration
] ;
ssn:observedBy <trafficData158324> ;
ssn:observedProperty <http://unis/trafficData158324Property-001> .
prov:wasAttributedTo :cityofaarhus .
Below is an illustration of a description of an aggregation analysis output using on Symbolic Aggregate Approximation algorithm to compress the data for 24 hours long of traffic sensor observation for a sensor feature, called "Average Speed", with a segmentation size 12, and alphabet size 5. TimeLine Ontology is used to link the segment feature description with the time extent of a temporal entity representing the stream data. Thus, we can express a stream data as a time interval on the universal timeline, and also relate such an interval with the corresponding interval on the discrete timeline.
prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#> .
prefix tl: <http://purl.org/NET/c4dm/timeline.owl#> .
prefix sao: <http://purl.oclc.org/NET/UNIS/sao/sao#> .
prefix ct: <http://www.insight-centre.org/ct#> .
cityOfAarhus a foaf:Organisation, prov:Agent .
<trafficData158324> a ces:PrimitiveEventService , ssn:Sensor ;
ssn:observes "Estimated_Time" , "Congestion_Level" , "Vehicle_Count" , "Average_Speed" .
<http://unis/trafficData158324Property-001> a "http://www.surrey.ac.uk/ ics#Average_Speed" ;
ssn:isPropertyOf <http://unis/trafficData158324FoI-001> .
<http://unis/trafficData158324FoI-001>
ct:hasFirstNode [ a ct:Node ;
ct:hasCity "Hinnerup"^^xsd:string ;
ct:hasLatitude "56.23172069428216"^^xsd:double ;
ct:hasLongtitude "10.104986076057457"^^xsd:double ;
ct:hasStreet "Ãrhusvej"^^xsd:string
] ;
ct:hasSecondNode [ a ct:Node ;
ct:hasCity "Hinnerup"^^xsd:string ;
ct:hasLatitude "56.22579478256016"^^xsd:double ;
ct:hasLongtitude "10.116589665412903"^^xsd:double ;
ct:hasStreet "Ãrhusvej"^^xsd:string
] .
<VeryHighAverage_Speed001> a sao:StreamEvent ;
sao:time [ a tl:Interval ;
tl:beginsAtDateTime "27-Sep-2014 12:59:00"^^xsd:duration ;
tl:endsAtDateTime "27-Sep-2014 13:59:00"^^xsd:duration
] ;
prov:used <PAA-Average_Speedcae001> .
dc:description “VeryHigh Average Speed” ;
prov:wasAsscoatedWith :cityofaarhus .
<PAA-Average_Speed001> a sao:PiecewiseAggregateApproximation ;
sao:time [ a tl:Instant ;
tl:at "27-Sep-2014 12:59:00"^^xsd:date ;
tl:duration "PT1H"^^xsd:duration
] ;
sao:value “52”^^xsd:string ;
tl:onTimeLine <feature_timeline> ;
prov:wasGeneratedBy <VeryHighAverage_Speed001> ;
prov:wasAttributedTo :cityofaarhus .
ics:Average_SpeedSaxWord-001 a sao:SymbolicAggregateApproximation ;
sao:alphabetsize "5"^^xsd:int ;
sao:segmentsize "12"^^xsd:int ;
sao:time [ a tl:Instant ;
tl:at "01-Aug-2014 06:59:00"^^xsd:date ;
tl:duration "P1D"^^xsd:duration
] ;
sao:value "eeeeeeebbbcc"^^xsd:string ;
prov:wasGeneratedBy <http://unis/trafficData158324Property-001> ;
prov:wasAttributedTo :cityofaarhus .
<feature_timeline> a tl:UniversalTimeline .
The following sparql query exemplify how to query such turtle document to obtain results for all observations for property of average speed, which has been collected after "2014-09-29T10:20:00".
prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>
prefix tl: <http://purl.org/NET/c4dm/timeline.owl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix sao: <http://purl.oclc.org/NET/UNIS/sao/sao#>
select ?observation ?value ?observation_start ?property
WHERE { ?observation a ssn:Observation .
?observation sao:hasValue ?value .
?observation sao:time ?time .
?time tl:at ?observation_start .
?observation ssn:observedProperty ?property .
?property a "http://www.surrey.ac.uk/ics#Average_Speed" .
FILTER(?observation_start > "2014-09-29T10:20:00"^^xsd:dateTime)}
An alphabetical index of NAME terms, by class (concepts) and properties are given below. All the terms are hyperlinked to their detailed description for quick reference.
Classes: DiscreteCosineTransform, DiscreteFourierTransform, Mean, Median, KMeans, MovingAverage, PiecewiseAggregateApproximation, Point, Segment, StreamAnalysis, StreamData, StreamEvent, SymbolicAggregateApproximation, SensorSAX, UnitOfMeasurement, FeatureOfInterest, Observation, Sensor, Instant , Interval , SpatialThing, Activity, Entity
Properties: Timestamp, alphabetsize, hasDatatype, hasID, hasLocation, hasURI, quality, samplesize, samplingrate, segmentsize, stepsize, time, value, wasAttributedTo, wasAssociatedWith, used, wasDerivedFrom, wasGeneratedBy, , observationSamplingTime, observationResultTime, hasUnitOfMeasurement, hasSegment, hasPoint, beginsAtLocation, endsAtLocation sao:severity sao:status sao:severity sao:sensitivity sao:causeArea sao:name sao:levelOfInterest sao:comments sao:minwindowsize sao:maxwindowsize sao:sensitivity
URI: http://purl.oclc.org/NET/UNIS/sao/sao#StreamAnalysis
- It describes the methods that have been used in the data analysis process. The output of the method is descirbed by sao:value. It offers an opportunity to describe the output as points and segments along with its temporal relationships. With these features, it is not only possible to describe simple sensor observations (e.g. temperature) but also complex data, such as audio and video. The outputs can be described as matrix by using sao:value (string) along with the number of columns and rows involved in the matrix: this enables the annotated data to be easily reconstructed. This concept is also related to the prov:Entity.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#StreamData
- It describes a data stream as an observation point or a segment. It can also be used to describe a matrix by describing it as a sao:value (string) along with the number of columns and rows involved in the matrix: this enables the annotated data to be easily reconstructed. This concept is also related to the prov:Entity.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#StreamEvent
- It describes the output of stream observation, such as high temperature, high humidity, accident, high traffic congestion. It adopts the broad notion of event from the event ontology, which then applies to sensor network domain.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#DiscreteCosineTransform
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#DiscreteFourierTransform
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#Median
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#KMeans
- It describes K-Means method.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#PiecewiseAggregateApproximation
- It describes Piecewise Aggregate Approximation method.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#Point
- It describes data points (a single observation) of a data stream. It can be used both for data streams and data analysis outputs
URI: http://purl.oclc.org/NET/UNIS/sao/sao#Segment
- It describes the data segments of a data stream. It can be used both for data streams and data analysis outputs
URI: http://purl.oclc.org/NET/UNIS/sao/sao#SymbolicAggregateApproximation
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#SensorSAX
- It describes SensorSAX method is an extention of SAX algorithm.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#Timestamp
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#alphabetsize
- describes the alphabet size that have been used for a stream analysis technique (e.g. SymbolicAggregateApproximation)
URI: http://purl.oclc.org/NET/UNIS/sao/sao#hasDatatype
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#hasID
- describes the identification of the stream data
URI: http://purl.oclc.org/NET/UNIS/sao/sao#hasLocation
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#hasURI
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#quality
- Relates a stream data to an information entity regarding the quality
URI: http://purl.oclc.org/NET/UNIS/sao/sao#samplesize
- describes the number of samples that a stream data involve; or used for a stream analysis technique
URI: http://purl.oclc.org/NET/UNIS/sao/sao#samplingrate
-
URI: http://purl.oclc.org/NET/UNIS/sao/sao#segmentsize
- Describes the number of segments that have been used for a stream data/analysis
URI: http://purl.oclc.org/NET/UNIS/sao/sao#stepsize
- Describes the step size in other words the size of overlapping frames that have been used for a stream data/analysis
URI: http://purl.oclc.org/NET/UNIS/sao/sao#time
- Relates a segment to the time interval concept in Timeline Ontology
URI: http://www.w3.org/ns/prov#wasAttributedTo
- describes the relationship of an entity to an agent.
URI: http://www.w3.org/ns/prov#wasAssociatedWith
- describes an activity association as an assignment of responsibility to an agent for an activity, indicating that the agent had a role in the activity.
URI: http://www.w3.org/ns/prov#used
- describes usage of an entity by an activity.
URI: http://www.w3.org/ns/prov#wasDerivedFrom
- A derivation is a transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a pre-existing entity.
URI: http://www.w3.org/ns/prov#wasGeneratedBy
- Generation is the completion of production of a new entity by an activity. This entity did not exist before generation and becomes available for usage after this generation.
URI: http://purl.oclc.org/NET/ssnx/ssn#observationSamplingTime
- Relates a data stream or an event output to a time instant or a time interval concept in Timeline Ontology
URI: http://purl.oclc.org/NET/ssnx/ssn#observationSamplingTime
- Relates a stream data to Unit Of Measurement.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#hasSegment
- Relates a data stream to its data segment.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#hasPoint
- Relates a data stream to its observation point.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#beginsAtLocation
- Describes dynamic location of a sensor using a relation from ssn:FeatureOfInterest to geo:SpatialThing to describe the beginning location of the sensory measurement.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#endsAtLocation
- Describes dynamic location of a sensor using a relation from ssn:FeatureOfInterest to geo:SpatialThing to describe the ending location of the sensory measurement.
URI: http://purl.oclc.org/NET/UNIS/sao/sao#value
- describes the value of the stream data or stream analysis output; it can be an array of values
URI: http://purl.oclc.org/NET/UNIS/sao/sao#clustersize
- Describes the cluster size of KMeans clustering algorithm
URI: http://purl.oclc.org/NET/UNIS/sao/sao#status
- It describes the status of an event, such as Active, Scheduled
URI: http://purl.oclc.org/NET/UNIS/sao/sao#severity
- It describes the severity of an event, such as Serious, Moderate
URI: http://purl.oclc.org/NET/UNIS/sao/sao#sensitivity
- It describes the threshold of the sensitivity that is used for SensorSAX algorithm
URI: http://purl.oclc.org/NET/UNIS/sao/sao#minwindowsize
- It describes the minimum window size allowed for each segment of SensorSAX algorithm output
URI: http://purl.oclc.org/NET/UNIS/sao/sao#maxwindowsize
- It describes the maximum window size allowed for each segment of SensorSAX algorithm output
URI: http://purl.oclc.org/NET/UNIS/sao/sao#name
- It describes the name of event, such as Road works, Festival, Concert
URI: http://purl.oclc.org/NET/UNIS/sao/sao#levelOfInterest
- It describes the level of an interest for an event, such as High, Medium, Low
URI: http://purl.oclc.org/NET/UNIS/sao/sao#comments
- It describes the comments regarding an event
URI: http://purl.oclc.org/NET/UNIS/sao/sao#causeArea
- It describes the cause area as a bunch of coordinates
URI: http://purl.oclc.org/NET/UNIS/sao/sao#type
- It describes the type of event, such as Traffic, Cultural Event
Sefki Kolozali, Maria Bermudez-Edo, Daniel Puschmann, Frieder Ganz, Payam Barnaghi, A Knowledge-based Approach for Real-Time IoT Data Stream Annotation and Processing. Proceedings of the 2014 IEEE International Conference on Internet of Things (iThings 2014), September 2014, Taipei, Taiwan.
This work is part of the EU FP7 CityPulse project at the Institution for Communication Systems University of Surrey.