<!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>Hash Tree Indexing for Fast SPARQL Query in Large Scale RDF Data Management Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Wenwen Li</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bingyi Zhang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guozheng Rao</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Renhai Chen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zhiyong Feng</string-name>
          <email>zyfengg@tju.edu.cn</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Computer Science and Technology,Tianjin University</institution>
          ,
          <addr-line>Tianjin 300350</addr-line>
          ,
          <country country="CN">P. R. China</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Computer Software,Tianjin University</institution>
          ,
          <addr-line>Tianjin 300350</addr-line>
          ,
          <country country="CN">P. R. China</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Tianjin Key Laboratory of Cognitive Computing and Application</institution>
          ,
          <addr-line>Tianjin 300350</addr-line>
          ,
          <country country="CN">P.R. China</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In the past decade, the volume of RDF (Resource Description Framework, which is a standard model for data interchange on the Web) data has grown enormously, and many RDF datasets (e.g., Wikipedia) have reached up to billions of triples. As a result, efficient management of this huge RDF data has become a tremedous challenge. In this paper, we present HTStore, a hash tree based system for fast storing and accessing large scale RDF data. The design of HTStore has three salient features. First, the compact design can effectively reduce the size of the indexes. Second, HTStore utilizes the hash function to significantly reduce the query time. Third, the proposed hash tree structure can easily adapt to the changes in data volume (e.g., data expansion). The experimental results demonstrate that the proposed system can improve the query efficiency up to 21.3% compared with the representative RDF data management systems.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        The RDF (Resource Description Framework) data model and its query language SPARQL
have been widely used for managing schema-free structured information. Large amounts
of semantic data are available in RDF format in many fields, such as Yago[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], DBLP[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
and DBpedia[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The statistics from Yago show that more than 100 billion triples were
published by September 2015.
      </p>
      <p>
        Several systems, such as Gstore[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and RDF-3x[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], have been proposed to
support RDF store and SPARQL query. According to the data management method, these
systems are generally classified into three categories: relational database based RDF
management, RDF triple management, and graph-based RDF data management.
Systems based on relational database leverage the relational database to manage RDF data.
In such systems, RDF data are stored in the database tables and performed data query
using the traditional SQL language. Leveraging mature data management technique of
relational database, RDF storing and querying are easy to implement. However,
systems based on relational database will destroy the original structure of RDF, and thus
introduce a large number of time consuming join operations and waste a lot of storage
space. Systems based on triple or RDF graph, such as RDF-3x and RDF Cube,
optimize the RDF data management by using B+ tree index or hash index to improve query
performance. Although this approach has shown to accelerate joins by orders of
magnitude, the lengthy comparison operations and high collision rate with data explosion
have become the Achilles’ heel of an RDF data management system.
      </p>
      <p>In this paper, we propose HTStore to fast store and access large scale RDF data.
In HTStore, we organize RDF data in the form of an RDF graph and establish indexes
according to the RDF graph. The index structure includes two layers: the hash layer
containing a hash table and the tree layer containing hash trees. More specifically, we
construct a hash table for fast lookup. When a hash collision happens in a hash table,
new hash trees will be established in the second layer. With such a structure, only
limited hash operations are required to perform a data query. As a result, the query time
is significantly reduced. We conduct experiments over LUBM datasets to confirm the
effectiveness and efficiency of our proposed approach. The experimental results prove
the proposed system can improve the query efficiency by 21.3% compared with the
representative RDF data management systems.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Design of HTStore</title>
      <p>In HTStore, we organize RDF data in the form of an RDF graph and establish
index according to the vertexes in the graph. Fig. 1 shows an overview of the proposed
structure used to manage RDF graph. The left part of the figure is an RDF graph, and
the right part is the index built according to the vertexes in the graph. Before
building an index in a RDF dataset, each vertex in the RDF graph is assigned a unique
identifier. The index structure includes two parts: the hash layer containing a hash
table and the tree layer containing hash trees. In the first layer, a m-length hash table
is constructed. In the second layer, we build hash trees dynamically based on a prime
sequence P = fp1; p2; p3 g during inserting RDF graph vertexes.</p>
      <p>001
1969-09-10
bornOnDate bornIn
Jack Ma 006</p>
      <p>chairmanOf
spouse
008
Cathy ZhangYing
009</p>
      <p>002 namedFor
ZheJiang Total area</p>
      <p>density
007
Alibaba
Group
website
Alibabagroup.com
services010</p>
      <p>Online shopping</p>
      <p>003
Qiantang River</p>
      <p>004
39,300 sq mi
1,400/sq mi
005
select ?x where {?x bornIn ZheJiang}</p>
      <p>string hash value:002
001</p>
      <p>003
004
002
007
009
005
006
008
010
hash layer
tree layer</p>
      <p>Suppose that we intend to insert a new vertex into an RDF datasets, Fig. 2 shows
different solutions for different insertion situations. The simplest case is when no collision
happens in hash table. The vertex will be added to the blank bucket directly(as shown in
Fig. 2(a)). In Fig. 2(b), collision happens in the hash table and there exists no hash tree
of the collided vertex. Therefore, a new hash tree should be established in the second
layer. If hash tree of the collided vertex has been constructed(as shown in Fig. 2(c)) and
collision still occurs between the new node and the root node of hash tree, according to
hash tree’s construction regulation, we will leverage first prime number p1 to obtain a
hash value t of the new node. It means that we will consider the t-th child node of root
node – cnode. If collision still occurs in the cnode, the second prime number p2 will be
used to determine which child node of cnode will be considered. Similar operations by
different prime number will be conducted until there is no collision occurs.
All the experiments were conducted on a Dell optiptex 7040 PC with a 3.20 GHz CPU,
16 GBytes of RAM. The operating system is a 64-bit Linux with 4.8.0 kernel. We
use LUBM as our datasets. LUBM (Lehigh University Benchmark) is developed to
facilitate the evaluation of Semantic Web repositories in a standard and systematic way.
It consists of a university domain ontology, customizable and repeatable synthetic data,
and several performance metrics. Different LUBM datasets have different sizes and
different triple numbers. We also compare our experiments with RDF-3x and Gstore.</p>
      <p>Table 1 lists the SPARQL query used in our experiment. We execute these six
queries over different LUBM datasets. Table 2 compares the query performance of our
method, Gstore and RDF-3x. In our query samples, Gstore always perform better than</p>
    </sec>
    <sec id="sec-3">
      <title>4 Conclusion</title>
      <p>In this paper, we propose HTStore to manage large scale RDF data. HTStore utilizes
the hash tree structure to significantly reduce the query time. In addition, the proposed
management scheme can also easily adapt to the changes in data volume.
Experimental results demonstrate that HTStore can effectively improve performance of SPARQL
query.</p>
    </sec>
    <sec id="sec-4">
      <title>Acknowledgement</title>
      <p>This work is supported by the programs of the National Natural Science Foundation of
China (61373165 and 61702357).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Farzaneh</given-names>
            <surname>Mahdisoltani</surname>
          </string-name>
          , Joanna Biega, and Fabian Suchanek.
          <article-title>Yago3: A knowledge base from multilingual wikipedias</article-title>
          .
          <source>In 7th Biennial Conference on Innovative Data Systems Research. CIDR Conference</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Michael</given-names>
            <surname>Ley</surname>
          </string-name>
          .
          <article-title>Dblp: some lessons learned</article-title>
          .
          <source>Proceedings of the VLDB Endowment</source>
          ,
          <volume>2</volume>
          (
          <issue>2</issue>
          ):
          <fpage>1493</fpage>
          -
          <lpage>1500</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Jens</given-names>
            <surname>Lehmann</surname>
          </string-name>
          , Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, Pablo Mendes,
          <string-name>
            <given-names>Sebastian</given-names>
            <surname>Hellmann</surname>
          </string-name>
          , Mohamed Morsey, Patrick van Kleef,
          <article-title>So¨ren Auer, and Chris Bizer. DBpedia - A Large-scale, Multilingual knowledge Base Extracted from Wikipedia</article-title>
          .
          <source>Semantic Web Journal</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Lei</given-names>
            <surname>Zou</surname>
          </string-name>
          , Jinghui Mo, Lei Chen,
          <string-name>
            <surname>M Tamer</surname>
          </string-name>
          <article-title>O¨zsu, and Dongyan Zhao. gStore: answering SPARQL queries via subgraph matching</article-title>
          .
          <source>Proceedings of the VLDB Endowment</source>
          ,
          <volume>4</volume>
          (
          <issue>8</issue>
          ):
          <fpage>482</fpage>
          -
          <lpage>493</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Thomas</given-names>
            <surname>Neumann</surname>
          </string-name>
          and
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Weikum</surname>
          </string-name>
          .
          <article-title>RDF-3X: a RISC-style engine for RDF</article-title>
          .
          <source>Proceedings of the VLDB Endowment</source>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          ):
          <fpage>647</fpage>
          -
          <lpage>659</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>