5th International Workshop on Semantic Sensor Networks at
                            ISWC2012



Deriving Semantic Sensor Metadata
     from Raw Measurements

         Jean-Paul Calbimonte1, Hoyoung Jeung2,
         Zhixian Yan3, Oscar Corcho1, Karl Aberer3


     1Ontology Engineering Group, Universidad Politécnica de Madrid
                        2SAP Research, Birsbane

         3LSIR, EPFL Ecole Polytechnique Fédérale de Lausanne



                        jp.calbimonte@upm.es




                                                                      Date: 14/11/2012
Sensor Observations


 Semantic metadata
                                Annotations



       Sensor Raw Measurements

Representation
                         Characterize

                     Classify
                                      Publish



                     2
Streaming Sensor Data

                       Data streams
                       Continuous evaluation
                       Timestamped tuples
                       Time windows




Do we know what we are sensing?


               3
Sensor Web




4
The Sensor Web

Universal, web-based access to sensor data




                    5
Semantic Sensor Web
   “too much (streaming) data but not enough (tools to
   gain and derive) knowledge”*
                                                                                                  LinkedSensorData
Sensor data publishing

Linked Data                                  LSM

                                                                 Sense2Web


Semantic sensor metadata                             Sensor APIs


                                                                                       ETALIS
Semantic Sensor Network ontology                                                                    Videk
                                                                             SwissEx


                                                                                            BOTTARI,
                                                                                            UrbanMatch
                                                 AEMET
                                                 transporte.
                                                 linkeddata.es



                                                                                                         SSN +CEP



                                             …many many more working on this
  * Sheth et al. 2008, Semantic Sensor Web
                                             6
SSN Ontology with other ontologies



  tool for modeling our sensor data




          ~what we are observing

      7
Sensor Metadata

swissex:Sensor1
    rdf:type ssn:Sensor;
    ssn:onPlatform swissex:Station1;
    ssn:observes cf-property:wind_speed.
swissex:Sensor2
    rdf:type ssn:Sensor;
    ssn:onPlatform swissex:Station1;
    ssn:observes cf-property:air_temperature.
swissex:Station1
    :hasGeometry [ rdf:type wgs84:Point;
                    wgs84:lat "46.8037166";
                    wgs84:long "9.7780305"].




                                         8
Sensor Observations

swissex:WindSpeedObservation1
   rdf:type ssn:Observation;
   ssn:featureOfInterest cf-feature:wind;
   ssn:observedProperty cf-property:wind_speed;
   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 ;




                                  9
Sensor Observations




 Heterogeneity




Reuse this data?
Publish as Linked Sensor Data?
Query with SPARQL-Stream?

   10
Cosm/Pachube Datastreams




not enough reliable metadata about
the observations

         11
Looking into the Data

        Air Pressure?




      Air Temperature?




12
Classifying Sensor Data




Unclassified input series
                                          Already classified time series

                       Representation
                            Classification
                              Metadata
                                     13
Related Tasks


• Querying time series
   • e.g. find a sub-sequence in a time series database
• Measuring time series similarity
   • e.g. are these time series the same?
• Time series classification
   • e.g. classify heart beat series: normal, murmur, et




                                14
Deriving Semantic Metadata




15
Data Representation



Represent the data approximating
with fewer linear segments

Accuracy vs Numerosity




    16
Constant Approximation


          • Use constant segments for a subset of points
4.5

 4

3.5

 3

2.5

 2

1.5

 1
      0       10   20    30   40    50    60   70    80    90   100




                                     17
Piecewise Linear Approximation
  4.1

 4.05



 3.95
       4
                                                          Reflect data trends
  3.9

 3.85

  3.8
                                                          Apply with different resolutions
 3.75

  3.7
           0   1   2   3   4   5   6   7   8   9   10
                                                          Applicable for different rates

 4.1
4.05
  4
3.95
 3.9
3.85
 3.8
3.75
 3.7
3.65
       0       1   2   3   4   5   6   7   8   9   10




                                                          18
Piecewise Linear Approximation




ri                         hi+1



                   hi

li




     begi           endi




            Constructing segments




              19
Linear Approximations


We care about the angles                     π/2
                                                       a   π/4



          a              c                                       b
              d
                                                                     0
                  a


                                                                 c
                                                           -π/4
                                                   d


                        Divide the angle space in sectors

                      Distribution of angles in training set



                             20
Slope Distributions



ts1   adacdaaad   [5a,0b,1c,3d]

ts2   adabbaaad   [5a,2b,0c,2d]


ts3   adccdaaad   [4a,0b,2c,3d]



                       Distance measure
                       Classification




                      21
Use the representation for Classifying


Linear approximation
Compute distribution of the slopes
K-nearest neighbor classification
Training-Test datasets:
   SwissExperiment
   AEMET




                             22
Experiments SwissEx


Confusion matrix
Experiments AEMET


Confusion matrix
Evaluation AEMET




25
Evaluation AEMET




cf-property:wind_speed rdf:type dim:VelocityOrSpeed;
 rdfs:label "wind speed";
 ssn:isPropertyOf cf-feature:wind;
 qu:propertyType qu:scalar;
 qu:generalQuantityKind qu:speed.



                           26
Metadata Properties

cf-property:air_temperature rdf:type dim:Temperature;
 ssn:isPropertyOf cf-feature:air;
 qu:propertyType qu:scalar;
 qu:generalQuantityKind qu:temperature.

cf-property:soil_temperature rdf:type dim:Temperature;
 ssn:isPropertyOf cf-feature:soil;
 qu:propertyType qu:scalar;
 qu:generalQuantityKind qu:temperature.
Querying Metadata

SELECT ?sensor
WHERE {
 ?sensor a ssn:Sensor ;
           ssn:observes cf-property:air_temperature .}




SELECT ?stream ?observedProperty
WHERE {
 ?sensor a ssn:Sensor ;
          ssn:observes ?observedProperty .
 ?stream ssn:isProducedBy ?sensor .
 ?observedProperty qu:generalQuantityKind qu:temperature .}



                                28
Evaluation vs SAX




29
Evaluation vs SAX




30
How much data do we need?




31
Conclusions
Classify Sensor Data
  • Piecewise Linear Representation
  • Segment slope distributions
  • kNN classification


Generate Metadata
  • Observed properties
  • Potentially unknown metadata

Future work
  • Combine with tag disambiguation?
  • Use pattern mining for online queries
  • Other techniques, shapelets, use
    other parameters
                                  32
…Thanks


    Questions, please.




jp.calbimonte@upm.es


            33

SSN2012 Deriving Semantic Sensor Metadata from Raw Measurements

  • 1.
    5th International Workshopon Semantic Sensor Networks at ISWC2012 Deriving Semantic Sensor Metadata from Raw Measurements Jean-Paul Calbimonte1, Hoyoung Jeung2, Zhixian Yan3, Oscar Corcho1, Karl Aberer3 1Ontology Engineering Group, Universidad Politécnica de Madrid 2SAP Research, Birsbane 3LSIR, EPFL Ecole Polytechnique Fédérale de Lausanne jp.calbimonte@upm.es Date: 14/11/2012
  • 2.
    Sensor Observations Semanticmetadata Annotations Sensor Raw Measurements Representation Characterize Classify Publish 2
  • 3.
    Streaming Sensor Data Data streams Continuous evaluation Timestamped tuples Time windows Do we know what we are sensing? 3
  • 4.
  • 5.
    The Sensor Web Universal,web-based access to sensor data 5
  • 6.
    Semantic Sensor Web “too much (streaming) data but not enough (tools to gain and derive) knowledge”* LinkedSensorData Sensor data publishing Linked Data LSM Sense2Web Semantic sensor metadata Sensor APIs ETALIS Semantic Sensor Network ontology Videk SwissEx BOTTARI, UrbanMatch AEMET transporte. linkeddata.es SSN +CEP …many many more working on this * Sheth et al. 2008, Semantic Sensor Web 6
  • 7.
    SSN Ontology withother ontologies tool for modeling our sensor data ~what we are observing 7
  • 8.
    Sensor Metadata swissex:Sensor1 rdf:type ssn:Sensor; ssn:onPlatform swissex:Station1; ssn:observes cf-property:wind_speed. swissex:Sensor2 rdf:type ssn:Sensor; ssn:onPlatform swissex:Station1; ssn:observes cf-property:air_temperature. swissex:Station1 :hasGeometry [ rdf:type wgs84:Point; wgs84:lat "46.8037166"; wgs84:long "9.7780305"]. 8
  • 9.
    Sensor Observations swissex:WindSpeedObservation1 rdf:type ssn:Observation; ssn:featureOfInterest cf-feature:wind; ssn:observedProperty cf-property:wind_speed; 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 ; 9
  • 10.
    Sensor Observations Heterogeneity Reusethis data? Publish as Linked Sensor Data? Query with SPARQL-Stream? 10
  • 11.
    Cosm/Pachube Datastreams not enoughreliable metadata about the observations 11
  • 12.
    Looking into theData Air Pressure? Air Temperature? 12
  • 13.
    Classifying Sensor Data Unclassifiedinput series Already classified time series Representation Classification Metadata 13
  • 14.
    Related Tasks • Queryingtime series • e.g. find a sub-sequence in a time series database • Measuring time series similarity • e.g. are these time series the same? • Time series classification • e.g. classify heart beat series: normal, murmur, et 14
  • 15.
  • 16.
    Data Representation Represent thedata approximating with fewer linear segments Accuracy vs Numerosity 16
  • 17.
    Constant Approximation • Use constant segments for a subset of points 4.5 4 3.5 3 2.5 2 1.5 1 0 10 20 30 40 50 60 70 80 90 100 17
  • 18.
    Piecewise Linear Approximation 4.1 4.05 3.95 4 Reflect data trends 3.9 3.85 3.8 Apply with different resolutions 3.75 3.7 0 1 2 3 4 5 6 7 8 9 10 Applicable for different rates 4.1 4.05 4 3.95 3.9 3.85 3.8 3.75 3.7 3.65 0 1 2 3 4 5 6 7 8 9 10 18
  • 19.
    Piecewise Linear Approximation ri hi+1 hi li begi endi Constructing segments 19
  • 20.
    Linear Approximations We careabout the angles π/2 a π/4 a c b d 0 a c -π/4 d Divide the angle space in sectors Distribution of angles in training set 20
  • 21.
    Slope Distributions ts1 adacdaaad [5a,0b,1c,3d] ts2 adabbaaad [5a,2b,0c,2d] ts3 adccdaaad [4a,0b,2c,3d] Distance measure Classification 21
  • 22.
    Use the representationfor Classifying Linear approximation Compute distribution of the slopes K-nearest neighbor classification Training-Test datasets: SwissExperiment AEMET 22
  • 23.
  • 24.
  • 25.
  • 26.
    Evaluation AEMET cf-property:wind_speed rdf:typedim:VelocityOrSpeed; rdfs:label "wind speed"; ssn:isPropertyOf cf-feature:wind; qu:propertyType qu:scalar; qu:generalQuantityKind qu:speed. 26
  • 27.
    Metadata Properties cf-property:air_temperature rdf:typedim:Temperature; ssn:isPropertyOf cf-feature:air; qu:propertyType qu:scalar; qu:generalQuantityKind qu:temperature. cf-property:soil_temperature rdf:type dim:Temperature; ssn:isPropertyOf cf-feature:soil; qu:propertyType qu:scalar; qu:generalQuantityKind qu:temperature.
  • 28.
    Querying Metadata SELECT ?sensor WHERE{ ?sensor a ssn:Sensor ; ssn:observes cf-property:air_temperature .} SELECT ?stream ?observedProperty WHERE { ?sensor a ssn:Sensor ; ssn:observes ?observedProperty . ?stream ssn:isProducedBy ?sensor . ?observedProperty qu:generalQuantityKind qu:temperature .} 28
  • 29.
  • 30.
  • 31.
    How much datado we need? 31
  • 32.
    Conclusions Classify Sensor Data • Piecewise Linear Representation • Segment slope distributions • kNN classification Generate Metadata • Observed properties • Potentially unknown metadata Future work • Combine with tag disambiguation? • Use pattern mining for online queries • Other techniques, shapelets, use other parameters 32
  • 33.
    …Thanks Questions, please. jp.calbimonte@upm.es 33