<!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>HDTourist: Exploring Urban Data on Android</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Elena Hervalejo</string-name>
          <email>elena.hervalejo@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Miguel A. Mart´ınez-Prieto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Javier D. Fern´andez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oscar Corcho</string-name>
          <email>ocorcho@fi.upm.es</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DataWeb Research, Department of Computer Science</institution>
          ,
          <addr-line>Univ. de Valladolid</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Ontology Engineering Group (OEG)</institution>
          ,
          <addr-line>Univ. Polit ́ecnica de Madrid</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The Web of Data currently comprises ≈ 62 billion triples from more than 2,000 different datasets covering many fields of knowledge3. This volume of structured Linked Data can be seen as a particular case of Big Data, referred to as Big Semantic Data [4]. Obviously, powerful computational configurations are traditionally required to deal with the scalability problems arising to Big Semantic Data. It is not surprising that this “data revolution” has competed in parallel with the growth of mobile computing. Smartphones and tablets are massively used at the expense of traditional computers but, to date, mobile devices have more limited computation resources. Therefore, one question that we may ask ourselves would be: can (potentially large) semantic datasets be consumed natively on mobile devices? Currently, only a few mobile apps (e.g., [1, 9, 2, 8]) make use of semantic data that they store in the mobile devices, while many others access existing SPARQL endpoints or Linked Data directly. Two main reasons can be considered for this fact. On the one hand, in spite of some initial approaches [6, 3], there are no well-established triplestores for mobile devices. This is an important limitation because any potential app must assume both RDF storage and SPARQL resolution. On the other hand, the particular features of these devices (little storage space, less computational power or more limited bandwidths) limit the adoption of semantic data for different uses and purposes. This paper introduces our HDTourist mobile application prototype. It consumes urban data from DBpedia4 to help tourists visiting a foreign city. Although it is a simple app, its functionality allows illustrating how semantic data can be stored and queried with limited resources. Our prototype is implemented for Android, but its foundations, explained in Section 2, can be deployed in any other platform. The app is described in Section 3, and Section 4 concludes about our current achievements and devises the future work.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>Managing RDF in Mobile Devices</title>
      <p>Our approach for managing RDF is inspired by the role played by SQLite5 in
Android devices. SQLite is a self-contained SQL engine which is deployed as
3 Stats reported by LODStats: http://stats.lod2.eu/.
4 http://dbpedia.org/.
5 http://www.sqlite.org/.
an internal component of the application program. This way, the app itself can
read and write data directly from the database files without requiring a separate
process running as a DBMS (Database Management System).</p>
      <p>
        Similarly, our only requirement is to hold properly serialized RDF files and a
standardized interface to operate on them. Both responsibilities are provided by
the RDF/HDT [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] format, which serializes RDF using up to 15 times less space
than other syntaxes [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], while allowing basic SPARQL queries to be efficiently
resolved on the serialized file [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].Thus, including RDF/HDT as a library6 of the
app, allows it to manage and query semantic data in compressed space.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>HDTourist</title>
      <p>HDTourist is a proof-of-concept app7 built on top of RDF/HDT. It is designed
as a lightweight app to provide tourists with information when they are in a
foreign place. In these cases, people are more reluctant to connect to Internet
because of the potentially expensive costs of roaming. Thus, our mobile device
will be useful to keep compressed semantic information and query it offline.
Use case. Let us suppose that we plan our trip to Riva del Garda to attend
ISWC’2014, and our flight arrives to Verona. Fortunately, we have a day to visit
the city and decide to use HDTourist. Before leaving home, or in a Wi-Fi hotspot
(i.e. in the hotel), we use our Internet connection to download the RDF/HDT
file with relevant information about Verona. Currently, these data are obtained
by exploring different categories related to the DBpedia entity modeling the
city: http://dbpedia.org/page/Verona. In addition to semantic data, we can download
multimedia: images, maps of the region, etc. to improve the user experience. We
download them and HDTourist is ready to be used in our visit.</p>
      <p>Verona’s HDT file has 18, 208 triples, with a size of ≈850 KB, more than 4
times smaller than the original NTriples file (≈3.6 MB). Beyond the space
savings, this HDT file is self-queryable in contrast to the flat NTriples serialization.
3.1</p>
      <sec id="sec-3-1">
        <title>Retrieving Urban Data from DBpedia</title>
        <p>DBpedia contains a lot of descriptive data about cities, which we filter as follows:
given the URI u of a city (e.g. http://dbpedia.org/page/Verona), we run a CONSTRUCT
query on DBpedia which retrieves: i) all triples describing the city, i.e., all triples
comprising u as subject, and ii) all landmarks related to the city, i.e., all
resources (and their descriptions) linking to u. We restrict to resources of some
kind of landmarks that we have manually identified, e.g. resources of type Place
(http://dbpedia.org/ontology/Place), Historical Buildings
(http://dbpedia.org/ontology/HistoricPlace), etc. Other types specifically related to the city are considered, for
instance the squares in Verona (http://dbpedia.org/class/yago/PiazzasInVerona).</p>
        <p>The RDF subgraph returned by this CONSTRUCT query is then converted to
RDF/HDT and ready to be downloaded and queried by our mobile app.
6 We use the Java RDF/HDT library: https://github.com/rdfhdt/hdt-java.
7 Available at: http://dataweb.infor.uva.es/project/hdtourist/?lang=en.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Browsing Urban Data</title>
        <p>HDTourist uses categories to organize and display data. The main menu
comprises four categories: description, demography and geography, attractions, and
other interesting data. Figure 1 (a) shows the description of Verona, which
includes basic information about the city. The information showed in each category
is defined as SPARQL templates in XML configuration files (one per category),
such as the following one:
&lt;&lt;?cxamtelgovreyrsiiodn==""A 1t .t0r "a c teniocnosd"i&gt;ng=" u t f - 8 " ?&gt;
&lt;name&gt;A t t r a c t i o n s&lt;/name&gt;
&lt;group&gt;
&lt;name&gt;Squares&lt;/name&gt;
&lt;s p a r q l&gt;
SELECT ? l a b e l
WHERE
{ ? p l a c e r d f : t y p e &lt;h t t p : // dbpedia . org / c l a s s / yago / SquaresIn ${CITY}&gt; .</p>
        <p>? p l a c e r d f s : l a b e l ? l a b e l .}
UNION
{ ? p l a c e r d f : t y p e &lt;h t t p : // dbpedia . org / c l a s s / yago / PiazzasIn ${CITY}&gt; .
} ? p l a c e r d f s : l a b e l ? l a b e l .}
&lt;/ s p a r q l&gt;
&lt;/ group&gt;
&lt;group&gt;
. . . . &lt;name&gt;B u i l d i n g s&lt;/name&gt;</p>
        <p>This XML excerpt corresponds to Figure 1 (b) showing the category
“Attractions”, which includes Squares, Buildings, etc. Each group retrieves the label
of attractions with a SPARQL query which typically consists of a UNION of
Basic Graph Patterns searching for certain types of resources, as shown in the
excerpt. When parsing the XML, the template ${CITY} is converted to the
appropriated name, e.g. Verona. Each SPARQL query is then resolved making use
of the query API of RDF/HDT, retrieving the label shown in the screen layout.</p>
        <p>As shown in Figure 1 (c), each landmark can be expanded, obtaining
further information. In this screenshot, we choose the “Piazza delle Erbe” (within
“Squares”), and the app retrieves the triples describing it. The concrete
information to be shown in the landmark description is also configured by means of an
XML file containing one SPARQL template per category, again resolved against
the local RDF/HDT. As shown in the screenshot, pictures can be downloaded
and stored offline. Finally, HDTourist is able to show geolocated landmarks in
interactive maps, as shown in Figure 1 (d) for “Piazza delle Erbe”. The app uses
Google maps by default, but offline maps8 can be downloaded beforehand.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusions and Future Work</title>
      <p>The offline capacities and structured information consumption possibilities of
mobile devices are still several order of magnitudes below traditional devices.
With our demo we show that RDF/HDT can be used as a self-contained engine
to retrieve RDF information in mobile devices. To date, we have explored a given
set of cities and certain query templates to build the screen layout. We are now
exploring a spreading activation mechanism to automatically retrieve interesting
8 In this prototype we use Nutiteq SDK Maps, available at http://www.nutiteq.com/.
features of a city which are then converted to HDT on the server side. This also
takes into account other datasets besides DBpedia.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work has been funded by the European Commission under the grant
PlanetData (FP7-257641) and by the Spanish Ministry of Economy and
Competitiveness (TIN2013-46238-C4-2-R).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>C.</given-names>
            <surname>Becker</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Bizer. DBpedia Mobile</surname>
          </string-name>
          :
          <article-title>A Location-Enabled Linked Data Browser</article-title>
          .
          <source>In Proc. of LDOW, CEUR-WS 369, paper 14</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>A.E.</given-names>
            <surname>Cano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.S.</given-names>
            <surname>Dadzie</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Hartmann</surname>
          </string-name>
          .
          <article-title>Who's Who-A Linked Data Visualisation Tool for Mobile Environments</article-title>
          .
          <source>In Proc. of ISWC</source>
          , pages
          <fpage>451</fpage>
          -
          <lpage>455</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>J.</given-names>
            <surname>David</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Euzenat</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Rosoiu</surname>
          </string-name>
          .
          <article-title>Linked Data from your Pocket</article-title>
          .
          <source>In Proc. of DownScale, CEUR-WS 844, paper 2</source>
          , pages
          <fpage>6</fpage>
          -
          <lpage>13</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. J.D. Fern´andez, M. Arias,
          <string-name>
            <given-names>M.A.</given-names>
            <surname>Mart</surname>
          </string-name>
          <article-title>´ınez-</article-title>
          <string-name>
            <surname>Prieto</surname>
            , and
            <given-names>C.</given-names>
          </string-name>
          <article-title>Guti´errez. Management of Big Semantic Data</article-title>
          .
          <source>In Big Data Computing, chapter 4</source>
          . Taylor &amp; Francis,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>J.D. Fern</surname>
          </string-name>
          <article-title>´andez, M.A. Mart´ınez-</article-title>
          <string-name>
            <surname>Prieto</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <article-title>Guti´errez, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Polleres</surname>
          </string-name>
          .
          <article-title>Binary RDF Representation for Publication and Exchange (HDT)</article-title>
          .
          <source>W3C Member Submission</source>
          ,
          <year>2011</year>
          . http://www.w3.org/Submission/2011/03/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>D.</given-names>
            <surname>Le-Phuoc</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.X.</given-names>
            <surname>Parreira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Reynolds</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Hauswirth. RDF</surname>
          </string-name>
          <article-title>On the Go: An RDF Storage and Query Processor for Mobile Devices</article-title>
          .
          <source>In Proc. ISWC, CEUR-WS 658, paper 19</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>M.A.</given-names>
            <surname>Mart</surname>
          </string-name>
          <article-title>´ınez-</article-title>
          <string-name>
            <surname>Prieto</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Arias</surname>
            , and
            <given-names>J.D.</given-names>
          </string-name>
          <article-title>Fern´andez. Exchange and Consumption of Huge RDF Data</article-title>
          .
          <source>In Proc. of ESWC</source>
          , pages
          <fpage>437</fpage>
          -
          <lpage>452</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>V.C.</given-names>
            <surname>Ostuni</surname>
          </string-name>
          , G. Gentile,
          <string-name>
            <given-names>T.</given-names>
            <surname>Di</surname>
          </string-name>
          <string-name>
            <surname>Noia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Mirizzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Romito</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E. Di</given-names>
            <surname>Sciascio</surname>
          </string-name>
          .
          <article-title>Mobile Movie Recommendations with Linked Data</article-title>
          .
          <source>In Proc. of CD-ARES</source>
          , pages
          <fpage>400</fpage>
          -
          <lpage>415</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>G.</given-names>
            <surname>Parra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Klerkx</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Duval</surname>
          </string-name>
          . More!:
          <article-title>Mobile Interaction with Linked Data</article-title>
          .
          <source>In Proc. of DCI, CEUR-WS 817, paper 4</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>