<!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>Mobile Endpoints: Accessing Dynamic Information from Mobile Devices</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Roberto Yus</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Eduardo Mena</string-name>
          <email>emenag@unizar.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Zaragoza</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Mobile devices are ubiquitous and, due to their increasing number of sensors and their powerful features, enable users to consume and produce huge amounts of highly-dynamic data (such as location data, other devices in range, and another local context information recollected by sensors). Semantic techniques can be applied to o er smart data to their users and remote client requests. In this paper we present the use of the SHERLOCK system as endpoint that processes GeoSPARQL-DL queries over mobile devices. It uses the GeoSPARQL extension to support location-based queries and the SPARQL-DL extension to support queries over OWL ontologies. To process the queries the system obtains dynamic data directly from mobile devices by communicating with them in a P2P manner.</p>
      </abstract>
      <kwd-group>
        <kwd>Semantic Web</kwd>
        <kwd>Mobile Computing</kwd>
        <kwd>SPARQL</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Current mobile devices (e.g., smartphones and tablets) are equipped with a high
number of sensors and communication mechanisms which make them not only
consumers but producers of interesting dynamic information. In this scenario
it is possible to develop useful information systems that, for example, use the
location of users obtained from their mobile devices for taxi searching, detecting
nearby friends, or restaurant suggestion, among many others.</p>
      <p>The Semantic Web has been proven useful to publish information from
sensors using OWL and RDF. Also, the query language SPARQL has become the
standard to retrieve and manipulate data stored in RDF format. However,
although users with mobile devices are sometimes consider sensors, having a
centralized Knowledge Base (KB) with updated information from them is not
feasible: There are millions of mobile devices generating information continuously
and also there could be other privacy and security implications.</p>
      <p>
        Therefore, due to the features of this scenario it would be more interesting
to view each device as a possible resource that can be queried independently,
i.e., as mobile endpoints. There are many challenges to take into account in this
scenario such as the collaboration among devices and the handling of ad hoc
communications. We are developing a general system (SHERLOCK [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]) which
provides users with interesting Location-Based Services (LBSs) and tackles many
of these challenges. SHERLOCK executes on mobile devices and leverages their
communication mechanisms to exchange information among them in an ad hoc
manner. The system uses: 1) OWL ontologies and semantic reasoners based
on Description Logics (DL) to handle knowledge about LBSs and interesting
objects, and 2) mobile agents to bring computation wherever needed and balance
CPU consumption and communication load.
      </p>
      <p>Here we introduce the processing of GeoSPARQL-DL queries, which makes
SHERLOCK-enabled devices behave as mobile GeoSPARQL-DL endpoints that
obtain information directly from mobile devices around to answer user requests.
We have adapted an existing Android prototype of the system to process these
queries and performed some preliminary experiments.
2</p>
    </sec>
    <sec id="sec-2">
      <title>The Query Language</title>
      <p>
        SHERLOCK provides users with LBSs and manages OWL ontologies and a
semantic DL reasoner to infer implicit knowledge exchanged among the devices.
Therefore, we de ne GeoSPARQL-DL, the query language used by the system,
as the combination of two preexisting extensions to SPARQL:
{ GeoSPARQL [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]: a standard for representation and querying of geospatial
linked data from the Open Geospatial Consortium (OGC).
{ SPARQL-DL [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]: a subset of SPARQL fully aligned with OWL 2 and which
can be used for the speci c questions typically associated with OWL.
      </p>
      <p>As an example of GeoSPARQL-DL query see Figure 1 where a user has
shown her interest in transports, di erent from taxis, within a radius of 1 km.
Notice that the restriction on the type of the objects has been modeled using
SPARQL-DL which would include subclasses of the sherlock:Transport
class which are not subclasses of sherlock:Taxi (e.g., sherlock:Shuttle);
also, the restriction on the location has been modeled using the geof:within
and geof:buffer operands from GeoSPARQL.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Query Processing</title>
      <p>The high-level algorithm used to process a query follows these steps:
1. Execute the query against the KB on the user device that could contain the
information requested from previous interactions.
2. Evaluate the need of querying external KBs : The results obtained in the
previous step are analyzed to evaluate if they are good enough for the user:
(a) Check the timestamp associated to each fact : In this scenario, information
changes dynamically so, for example, the location obtained for a taxi
10 minutes ago might not be interesting for the user.
(b) Check the number of results : If the answer obtained locally is empty or
below a certain limit, it should be upgraded.</p>
      <p>PREFIX sherlock: &lt;http://sid.cps.unizar.es/ontology/sherlock/&gt;
PREFIX geo: &lt;http://www.w3.org/2003/01/geo/wgs84_pos#&gt;
PREFIX geof: &lt;http://www.opengis.net/def/geosparql/function/&gt;
SELECT ?name, ?type, ?timestamp, ?lat, ?lon
WHERE {</p>
      <p>Type(?thing, sherlock:Transport),
DirectType(?thing, C),
DisjointWith(?C, sherlock:Taxi),
FILTER(geof:within(?thing,</p>
      <p>geof:buffer(51.139725, -0.895386, 1, ’km’))),
PropertyValue(?thing, sherlock:name, ?name),
PropertyValue(?thing, geo:lat, ?lat),
PropertyValue(?thing, geo:lon, ?lon),</p>
      <p>PropertyValue(?thing, sherlock:timestamp, ?timestamp)
}</p>
      <p>Finally, the results obtained from each tracker are correlated and presented
on the user device (location data are shown on a map).
4</p>
    </sec>
    <sec id="sec-4">
      <title>Prototype</title>
      <p>
        Up to the authors' knowledge, there is not implementation of
GeoSPARQLDL yet so, we developed a simple processor combining existing approaches. For
SPARQL-DL, we used a combination of the OWLAPI1, the SPARQL-DL API2,
and the HermiT reasoner [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], after porting it to Android [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. For GeoSPARQL,
there exist some partial implementations but designed for large triple stores
therefore, we have implemented a simple processor for the geof:within and
geof:buffer functions.
1 http://owlapi.sourceforge.net
2 http://www.derivo.de/en/resources/sparql-dl-api
      </p>
      <p>For a preliminary experiment3 we used four real devices: three smartphones
(simulating a taxi and two shuttles) and a tablet (simulating a user looking for
transportation). SHERLOCK on the tablet processed the query in Figure 1 on
the local KB and, to improve the answer, a mobile agent moved to one of the
smartphones to query the rest of devices in the vicinity about objects classi ed
as transports (SPARQL-DL Type constraint) which are not taxis (SPARQL-DL
DisjointWith constraint) and within a radius of 1 km from the user (GeoSPARQL
geof:within constraint). The location of the two shuttles (simulated by the
smartphones), which ful ll all the constraints, were returned as an answer which were
shown on a map on the user device.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Next Steps</title>
      <p>In this paper we introduced the GeoSPARQL-DL processing capabilities of
SHERLOCK-enabled mobile devices to provide their users with interesting LBSs.
We have introduced this query language (a combination of the SPARQL-DL and
GeoSPARQL extensions) and its processing, as well as the prototype developed.
In this way, a SHERLOCK-enabled device behaves as a mobile SPARQL
endpoint for users and transparently obtains the results deploying agents to query
the appropriate devices in a P2P manner. Also, the use of a query language
based on SPARQL enables the system to obtain results from external endpoints
such as DBpedia or GeoNames.</p>
      <p>In the future we plan to complete our implementation of GeoSPARQL-DL
focusing on supporting more GeoSPARQL functions and to incorporate a web
interface for users to pose queries to SHERLOCK-enabled devices. Also, we plan
to study the use of existing approaches to specify privacy policies regarding the
information from a user KB that agents from other devices can access.
Acknowledgments. This research was supported by the CICYT project
TIN-201346238-C4-4-R and DGA FSE.
3 http://sid.cps.unizar.es/SHERLOCK for videos and more information.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Battle</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kolas</surname>
            ,
            <given-names>D.:</given-names>
          </string-name>
          <article-title>GeoSPARQL: enabling a geospatial Semantic Web</article-title>
          .
          <source>Semantic Web Journal</source>
          <volume>3</volume>
          (
          <issue>4</issue>
          ),
          <volume>355</volume>
          {
          <fpage>370</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Shearer</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
          </string-name>
          , I.:
          <article-title>HermiT: A highly-e cient OWL reasoner</article-title>
          .
          <source>In: OWLED</source>
          . vol.
          <volume>432</volume>
          , p.
          <volume>91</volume>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>SPARQL-DL: SPARQL Query for OWL-DL. In: OWLED</article-title>
          . vol.
          <volume>258</volume>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Yus</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bobed</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Esteban</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bobillo</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mena</surname>
          </string-name>
          , E.:
          <article-title>Android goes semantic: DL reasoners on smartphones</article-title>
          .
          <source>In: 2nd International Workshop on OWL Reasoner Evaluation (ORE</source>
          <year>2013</year>
          ). pp.
          <volume>46</volume>
          {
          <issue>52</issue>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Yus</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mena</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ilarri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Illarramendi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>SHERLOCK: Semantic management of location-based services in wireless environments</article-title>
          .
          <source>Pervasive and Mobile Computing</source>
          <volume>15</volume>
          ,
          <issue>87</issue>
          {
          <fpage>99</fpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>