<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Demo Paper: Helping IoT Application Developers with Sensor-based Linked Open Rules</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Amelie Gyrard</string-name>
          <email>gyrard@eurecom.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christian Bonnet</string-name>
          <email>bonnet@eurecom.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Karima Boudaoud</string-name>
          <email>karima@polytech.unice.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Eurecom, Sophia Antipolis, France Laboratoire I3S-CNRS/UNSA</institution>
          ,
          <addr-line>Sophia Antipolis</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Domain-speci c Internet of Things (IoT) applications are becoming more and more popular. They process data coming from sensor measurements. Adding semantic annotations to the sensory observations and measurements can allow to reason on data via logical rules. Stemming from Linked Open Data and Linked Open Vocabularies, we have designed sensor-based Linked Open Rules (S-LOR). S-LOR allows exploiting, reusing and combining rules to help developers design and combine cross-domain IoT applications. A proof-of-concept of S-LOR is available online at http://www.sensormeasurement.appspot.com/?p=swot template</p>
      </abstract>
      <kwd-group>
        <kwd>Semantic Web of Things (SWoT)</kwd>
        <kwd>Linked Open Rules</kwd>
        <kwd>Linked Open Vocabularies</kwd>
        <kwd>Sensor</kwd>
        <kwd>Domain ontologies</kwd>
        <kwd>Semantic Sensor Networks</kwd>
        <kwd>Machine-to-Machine (M2M)</kwd>
        <kwd>Internet of Things (IoT)</kwd>
        <kwd>Semantic Web</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Semantic annotations are applied to sensor in more than 200 ontology-based
projects1 in speci c domains such as health care, smart home, tourism,
transportation and agriculture. If all the semantic models and data representations
for these works were published online, we would be able to reuse the smart
reasoning methods to exploit, reuse and combine rules. If the rules are designed and
implemented in a uniform way, it would be easy to automatically extract rules to
build Sensor-based Linked Open Rules (S-LOR). As a rst step, we built
manually S-LOR to show its bene ts: (1) rules are reused since they have already been
designed and implemented by domain experts and (2) rules are interlinked with
each other to combine domains to build smart IoT applications. For example,
the rule if foggy then switch on fog lamp combines the weather domain
thanks to the foggy concept and the transportation domain thanks to the fog
1 http://www.sensormeasurement.appspot.com/?p=ontologies
lamp concept. Sheth et al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and Wei et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] are the early works that propose
the idea to reason on semantic sensor data (e.g., to deduce potentially icy,
blizzard, freezing concepts). Khandelwal et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] propose Rule Interchange Format
(RIF) as a standard format for the 'Linked Rules'. Seye el al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] implement a
tool to convert RIF rules into SPARQL CONSTRUCT rules and design a RIF
validator. RIF2 is designed by the W3C to unify various rule languages: SWRL,
RuleML (Rule Markup Language), R2ML (REWERSE Rule Markup Language),
F-logic but we did not nd any RIF-based tools that are already implemented
to extract rules. None of these works propose to reuse and extract rules already
implemented in ontology-based IoT projects. In this paper we present S-LOR to
help developers integrate a smart reasoning in their IoT applications. Developers
easily nd rules related to sensor observations designed by domain experts which
are represented in an uni ed way and are interoperable with each others since
rules are designed according to the Machine-to-Machine (M3) ontology3. M3 is
an extension of the W3C SSN4 ObservationValue concept and describes sensors,
measurements, units and domains to provide a basis for reasoning that can ease
the development of advanced applications.
2
      </p>
      <p>Sensor-based Linked Open Rules (S-LOR)
Automatic extraction of the linked rules is a challenging task due to
heterogeneous terminologies or rule formats and syntaxes:
{ Frequently, domain experts use popular ontology editor tools to design
owl:Restriction rules. Unfortunately, these rules are not designed in the
same way. In S-LOR, we convert them into SWRL, implemented with the
Jena5 framework and de ne an owl:Restriction template compatible with
the M3 ontology.
{ The rules are implemented with various ontology editors such as Protege,
OWL API, SWOOPS, Hozo, TopBraid, OWL DL ed2, Neon but do not have
the same syntax. Protege proposes at least 7 di erent plugins to write SWRL
rules.
{ The syntax of the rules is not the same according to the inference engine
used, the rules cannot be inferred by another reasoner such as Jena, Pellet,
Jess, Racer.
{ The rules are not published online, we extract them manually from research
articles (e.g., explanations, screenshots).
{ Some rules are implemented with the SPARQL Inferencing Notation (SPIN)6
language. SWRL rules can have equivalent rules written with SPIN language
(SPARQL CONSTRUCT).
2 http://www.w3.org/2005/rules/wiki/RIF FAQ
3 http://www.sensormeasurement.appspot.com/m3#
4 http://www.w3.org/2005/Incubator/ssn/ssnx/ssn
5 http://jena.apache.org/
6 http://spinrdf.org/
{ Di erent terms are used to describe sensor measurements and inferred
concepts. We are working with ontology mapping tools such as LogMap and
Aroma to automatically align concepts described in di erent ways such as
etymology (e.g., rain/rainy), synonyms (e.g., precipitation/rain), di erent
entities (e.g., driver's state de ned as concepts or as properties).
{ Redundant rules are not inserted in S-LOR, but we cite the author's work.
{ Divergence in rules. We observe that if one work de nes 16 rules related
to wind speed and another work only 5 rules, we detect that the values
are incompatible. The more rules are de ned by domain experts, the more
precise they will be. We update S-LOR according to the most precise work.</p>
      <p>For these reasons, we manually extracted rules to build S-LOR. It would be
possible to automate rule extraction if they are implemented as owl:Restriction
with Protege or OWL API and following our M3 template.</p>
      <p>
        To design a rule-based IoT application, developers get rules related to
sensor data through S-LOR. S-LOR has been designed to be compliant with the
Machine-to-Machine (M3) ontology [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and the Jena inference engine7. The M3
ontology is an intermediary step while waiting for the adoption of better
practices. By integrating M3, new IoT applications are becoming highly valued since
domains are combined and rules reused. S-LOR has been used to design three
IoT applications to link domains with each other: (1) transportation &amp; weather8
to suggest safety devices according to the weather (e.g., if snowy then safety
devices are snow-chains, ABS, ESP), (2) tourism &amp; weather9 to suggest
activities or clothes according to the weather, and (3) health care, weather &amp;
food with the naturopathy application10 to suggest ingredients or recipes
according to the user's emotional state, season, weather, etc. A sample of rules
in S-LOR is depicted in Figure 1, m3:Sensor subclasses are displayed in the
drop-down list. By choosing a sensor (e.g., m3:Precipitation), all rules
related to this sensor are displayed such as NoPrecipitation or HeavyRain and
the origins of the rules (e.g. Ko er, ThinkHome 2011 or Staroch 2013 as
depicted in Figure 1). Rules are implemented according to the Jena rule
syntax as following: [HeavyRain: (?measurement rdf:type m3:Precipitation)
(?measurement m3:hasValue ?v) (?measurement m3:hasUnit m3:MilimeterPerHour)
greaterThan(?v,20) lessThan(?v,50) -&gt;
(?measurement rdf:type weather-dataset:HeavyRain) ]
      </p>
      <p>IoT developers can reuse the M3 ontology11 and sensor-based Jena rules12
published online. To evaluate S-LOR, an evaluation form has been set up13 to
be lled by IoT developers. This process is ongoing.
7 http://jena.apache.org/documentation/inference/
8 http://www.sensormeasurement.appspot.com/?p=transport
9 http://www.sensormeasurement.appspot.com/?p=tourism
10 http://www.sensormeasurement.appspot.com/?p=naturopathy
11 http://www.sensormeasurement.appspot.com/m3#
12 http://www.sensormeasurement.appspot.com/RULES/LinkedOpenRules.txt
13
https://docs.google.com/forms/d/1HR2I4VbkHyAyKM1ElJp3bON</p>
      <p>Y3kk94YP2cIQDnxdCPU/viewform</p>
      <p>We designed Sensor-based Linked Open Rules (S-LOR) to extract, reuse and
combine rules to help developers design smart rule-based IoT applications.
SLOR is integrated in our M3 framework to ease the reasoning on sensor data
in IoT. Future works are to automatically extract rules and rewrite it to be
compliant with M3 rules.</p>
      <p>Acknowledgments. The authors would like to thank colleagues/friends/students
for fruitful discussions, valuable feedback or help for the implementation. This
work is supported by the Com4Innov Platform of Pole SCS14.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Sheth</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Henson</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sahoo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Semantic sensor web</article-title>
          .
          <source>Internet Computing, IEEE</source>
          <volume>12</volume>
          (
          <issue>4</issue>
          ) (
          <year>2008</year>
          )
          <volume>78</volume>
          {
          <fpage>83</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Wei</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barnaghi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Semantic annotation and reasoning for sensor data</article-title>
          .
          <source>Smart Sensing and Context</source>
          (
          <year>2009</year>
          )
          <volume>66</volume>
          {
          <fpage>76</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Khandelwal</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jacobi</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kagal</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Linked rules: principles for rule reuse on the web</article-title>
          .
          <source>In: Web Reasoning and Rule Systems</source>
          . Springer (
          <year>2011</year>
          )
          <volume>108</volume>
          {
          <fpage>123</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Seye</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faron-Zucker</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corby</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Follenfant</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Bridging the gap between rif and sparql: Implementation of a rif dialect with a sparql rule engine</article-title>
          .
          <source>AImWD</source>
          <year>2012</year>
          (
          <year>2012</year>
          )
          <fpage>19</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Gyrard</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bonnet</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boudaoud</surname>
            ,
            <given-names>K.:</given-names>
          </string-name>
          <article-title>Enrich machine-to-machine data with semantic web technologies for cross-domain applications</article-title>
          .
          <source>In: WF-IOT 2014, World Forum on Internet of Things, 6-8 March</source>
          <year>2014</year>
          , Seoul, Korea, Seoul, KOREA, REPUBLIC OF (03
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>