<!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>Linked Sensor Data Generation using Queryable RML Mappings?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Pieter Heyvaert</string-name>
          <email>pheyvaer.heyvaert@ugent.be</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ruben Taelman</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ruben Verborgh</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Erik Mannens</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ghent University - iMinds</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>As the amount of generated sensor data is increasing, semantic interoperability becomes an important aspect in order to support e cient data distribution and communication. Therefore, the integration of (sensor) data is important, as this data is coming from di erent data sources and might be in di erent formats. Furthermore, reusable and extensible methods for this integration are required in order to be able to scale with the growing number of applications that generate semantic sensor data. Current research e orts allow to map sensor data to Linked Data in order to provide semantic interoperability. However, they lack support for multiple data sources, hampering the integration. Furthermore, the used methods are not available for reuse or are not extensible, which hampers the development of applications. In this paper, we describe how the rdf Mapping Language (rml) and a Triple Pattern Fragments (tpf) server are used to address these shortcomings. The demonstration consists of a micro controller that generates sensor data. The data is captured and mapped to rdf triples using module-speci c rml mappings, which are queried from a tpf server.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In the Internet of Things paradigm, many real-world objects are connected
through the Internet [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In most cases this is facilitated by using sensors, that
collect data. Over the years these sensors have reduced in cost, and, hence, are
easier to obtain for consumers. This resulted in hardware projects, such as
Tessel1 and Espruino2, that o er modules that generate sensor data. Corcho and
Garc a-Castro [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] state that the addition of semantics to this data improves its
understandability, management and usability. Furthermore, they identify a
number of accompanying challenges, such as the integration of (sensor) data and the
rapid development of applications that produce semantic sensor data. They
conclude that the use of Semantic Web technologies and Linked Data can address
these challenges.
      </p>
      <p>
        Research is being conducted towards making the produced data available as
Linked Data, speci cally as Resource Description Framework (rdf) triples.
Publishing sensor data as Linked Data enables nding other related data and relevant
information, and facilitates interconnection and integration of data from di
erent communities and sources [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Barnaghi and Presser [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] present Sense2Web,
a platform to publish sensor data as Linked Data. They map the original data
in xml to rdf triples using xslt. However, when integration is required with
data in other data formats, xslt is not usable, as it is only limited to xml [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
This hampers the integration with (sensor) data in order formats, such as the
json format used by Schor et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Patni et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] developed an api that maps
the original xml data to rdf. Similar to xslt, the api is limited to data in the
xml format. Furthermore, the mappings are not accessible, as users can only use
the api. Therefore, when the mappings needs to be updated or extended for a
speci c use-case, a new mapping needs to be created, which hampers the rapid
development of applications.
      </p>
      <p>
        In the demo, we will show how these challenges can be addressed. We will
generate rdf based on the sensor data stream of modules connected to a Tessel
micro controller. The sensor data, available as json objects, is mapped to rdf
using the rdf mapping language (rml) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Furthermore, we publish the
mappings via a Triple Pattern Fragments (tpf) server [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This allows applications
to query the correct module-speci c mappings on demand, which improves the
mappings' reusability and allows users to build upon them.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Challenges</title>
      <p>In this section, we discuss how the two challenges are addressed by using rml
mappings and making them available through a tpf server.</p>
      <p>Integration of (Sensor) Data We use rml to de ne how sensor data is mapped
to rdf triples, because rml supports multiple heterogeneous data sources. Data
might come from di erent sensors that each use a di erent data format. The use
of di erent solutions for each data format to generate triples requires users to
install, learn, use and maintain these solutions. This hampers the generation of
triples. Furthermore, the data can come from multiple sensors and other sources.
Therefore, a solution is required that allows to integrate multiple data sources
at the same time. rml solves these two problems by o ering a declarative way
to de ne how data in multiple heterogeneous data sources is mapped to rdf
triples.</p>
      <p>Rapid Development of Applications We use a tpf server to publish the rml
mappings, because this allows applications and users to reuse the existing
mappings. The rapid development of applications that need to map (a stream of)
sensor data to rdf triples is only possible when existing mapping methods are
reusable and extensible. rml mappings can be published using any Linked Data
Fragments (ldf) server, because the mappings are expressed as rdf triples. This
Linked Sensor Data Generation using Queryable RML Mappings
Tessel
module
(1) data
(2) query</p>
      <p>Application
(3)</p>
      <p>RMLMapper
(4)</p>
      <p>
        RDF-Based
Application
allows applications to dynamically query the server for sensor-speci c mappings
on-demand. Additionally, when the mappings are updated, these applications
can query for the new version. Subsequently, when new rdf triples are
generated, the new mappings are used. Furthermore, when users need to update or
extend the mappings, they can do so without the need to de ne a completely
new mapping that includes their changes, as opposed to the api provided by
Patni et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] which hides the mapping from the users. To update the
mappings, rst, users query the server for the required mapping. Next, they update
or extend the mapping. Optionally, they can be published the mapping again, so
they become reusable for others. Though, rml mappings can be published using
any ldf server, we choose a tpf server instead of, e.g., a sparql endpoint, to
ensure availability if we provide public access to these mappings [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Demo</title>
      <p>Our demo consists of four steps, as shown in Fig. 1. First, the data of a Tessel
RFID module is captured by the application as json objects:
1 { "device":"TM-00-04-f000da30-006d4744-20bc2586",
2 "module":"rfid-pm532",
3 "uid":"3c527c00" }</p>
      <p>Each object contains the unique id of the RFID card that is tapped on the
module. Second, the ldf-server3, an implementation of a tpf server, is
dynamically queried for the module-speci c mapping. This showcases the rapid
development of applications as developers can reuse the existing mappings.
Additionally, the mappings can be cached to improve performance. Besides mapping
the sensor data to rdf triples, this mapping also maps the location of the sensor,
which is available in an xml le:</p>
      <sec id="sec-3-1">
        <title>3 https://github.com/LinkedDataFragments/Server.js</title>
        <p>This showcases the integration of multiple heterogeneous (sensor) data sources
to triples. Third, the mapping is executed by the rmlmapper4, which produces
the triples. Finally, they are outputted to the users:
1 @prefix ex: &lt;http://www.example.com/&gt;.
2 @prefix geo: &lt;http://www.w3.org/2003/01/geo/wgs84_pos#&gt;.
3
4 ex:TM-00-04-f000da30-006d4744-20bc2586 a &lt;https://w3id.org/saref#Sensor&gt; ;
5 &lt;http://www.schema.org/location&gt; ex:loc/50_41 ;
6 &lt;http://dbpedia.org/ontology/access&gt; "3c527c00".
7
8 ex:loc/50_41 geo:lat "50"; geo:long "41".</p>
        <p>During the demo, users will be able to see the original data stream in the
json format, the mapped rdf triples, and the rml mappings, provided by the
tpf server. Furthermore, users can update the mappings, and see the changes
when new rdf triples are generated. A screencast of the demo can be found
at http://users.ugent.be/~pheyvaer/sensor2rdf/. The open source code is
available at https://github.com/mmlab/demo-sensor2rdf.</p>
      </sec>
      <sec id="sec-3-2">
        <title>4 https://github.com/RMLio/RML-Mapper</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Melanie</given-names>
            <surname>Swan</surname>
          </string-name>
          .
          <source>Sensor Mania! The Internet of Things, Wearable Computing, Objective Metrics, and the Quanti ed Self 2.0. Journal of Sensor and Actuator Networks</source>
          ,
          <volume>1</volume>
          (
          <issue>3</issue>
          ):
          <volume>217</volume>
          {
          <fpage>253</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Oscar</given-names>
            <surname>Corcho</surname>
          </string-name>
          and
          <string-name>
            <given-names>Raul</given-names>
            <surname>Garc</surname>
          </string-name>
          a-Castro.
          <article-title>Five challenges for the Semantic Sensor Web</article-title>
          .
          <source>Semantic Web</source>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          , 2):
          <volume>121</volume>
          {
          <fpage>125</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Payam</given-names>
            <surname>Barnaghi</surname>
          </string-name>
          and
          <string-name>
            <given-names>Mirko</given-names>
            <surname>Presser</surname>
          </string-name>
          .
          <article-title>Publishing Linked Sensor Data</article-title>
          .
          <source>In Proceedings of the 3rd International Conference on Semantic Sensor Networks-Volume</source>
          <volume>668</volume>
          , pages
          <fpage>1</fpage>
          <lpage>{</lpage>
          16. CEUR-WS.org,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Anastasia</given-names>
            <surname>Dimou</surname>
          </string-name>
          , Miel Vander Sande, Pieter Colpaert, Ruben Verborgh, Erik Mannens, and Rik Van de Walle.
          <article-title>RML: A Generic Language for Integrated RDF Mappings of Heterogeneous Data</article-title>
          .
          <source>In Workshop on Linked Data on the Web</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Harshal</given-names>
            <surname>Patni</surname>
          </string-name>
          , Cory Henson, and
          <string-name>
            <given-names>Amit</given-names>
            <surname>Sheth</surname>
          </string-name>
          .
          <article-title>Linked Sensor Data</article-title>
          .
          <source>In Collaborative Technologies and Systems (CTS)</source>
          ,
          <source>2010 International Symposium on</source>
          , pages
          <volume>362</volume>
          {
          <fpage>370</fpage>
          . IEEE,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Lars</given-names>
            <surname>Schor</surname>
          </string-name>
          , Philipp Sommer, and
          <string-name>
            <given-names>Roger</given-names>
            <surname>Wattenhofer</surname>
          </string-name>
          .
          <article-title>Towards a zero-con guration wireless sensor network architecture for smart buildings</article-title>
          .
          <source>In Proceedings of the First ACM Workshop on Embedded Sensing Systems for Energy-E ciency in Buildings</source>
          , pages
          <volume>31</volume>
          {
          <fpage>36</fpage>
          . ACM,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Ruben</given-names>
            <surname>Verborgh</surname>
          </string-name>
          , Miel Vander Sande, Olaf Hartig, Joachim Van Herwegen, Laurens De Vocht, Ben De Meester, Gerald Haesendonck, and
          <string-name>
            <given-names>Pieter</given-names>
            <surname>Colpaert</surname>
          </string-name>
          .
          <article-title>Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web</article-title>
          .
          <source>Journal of Web Semantics</source>
          ,
          <volume>37</volume>
          {
          <fpage>38</fpage>
          :
          <fpage>184</fpage>
          {
          <fpage>206</fpage>
          ,
          <year>2016</year>
          . ISSN 1570-
          <fpage>8268</fpage>
          . doi:
          <volume>10</volume>
          .1016/j.websem.
          <year>2016</year>
          .
          <volume>03</volume>
          .003. URL http://linkeddatafragments.org/publications/jws2016.pdf.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>