


摘 要: 为高效地存储和管理大规模语义Web数据,结合语义Web数据查询的特点,提出一种基于HBase的资源描述框架RDF(Resource Description Framework)数据存储改进方法。该方法将以主语+谓语、谓语+宾语、宾语+主语为索引的RDF数据存放在SP_O、PO_S、OS_P三张索引表中,同时将PO_S表按类划分为P_SO和P_OS两类,并给出改进的查询索引方法。对数据的加载存储,利用HBase自带的BulkLoad工具将数据上传至HBase存储表中。通过理论分析和实验结果显示,改进的存储方法对固定谓语的查询能作出快速响应;BulkLoad并行加载数据具有较高的加速比,在缩短数据加载时间的同时能提升系统整体存储性能。
关键词: 语义Web;HBase;RDF;数据存储
中图分类号: TP391.9 文献标识码: A DOI:10.3969/j.issn.1003-6970.2019.12.003
本文著录格式:朱道恒,秦学,刘君凤. 一种基于HBase的RDF数据存储改进方法[J]. 软件,2019,40(12):1317
An Improved Method of RDF Data Storage Based on HBase
ZHU Dao-heng, QIN Xue, LIU Jun-feng
(College of Big Data and Information Engineering, Guizhou University, Guiyang Guizhou 550025, China)
【Abstract】: In order to efficiently store and manage large-scale semantic Web data , an improved method of data storage based on HBase's resource description framework RDF is proposed., which combines the characteristics of semantic Web data query. In this method, RDF data indexed by subject + predicate, predicate + object, object + subject is stored in three index tables of SP_O, PO_S and OS_P.At the same time, PO_S table is divided into two categories, P_SO and P_OS, and an improved query index method is given. To load and store the data, the BulkLoad tool that HBase brings is used to upload the data to the HBase storage table. The theoretical analysis and experimental results show that the improved storage method can respond quickly to the fixed predicate query; BulkLoad parallel loading data has a high acceleration ratio, which can improve the overall storage performance of the system while shortening the data loading time.
【Key words】: Semantic web; HBase; RDF; Data storage
0 引言
语义Web核心思想是:通过在Internet上的文档中添加可被计算机所理解的语义,从而使整个Internet成为一個通用的信息交换媒介[1]。为规范化地描述Web资源及其属性,W3C组织提出了一个Web资源之间语义关系的开放元数据框架RDF[2]。RDF作为一种典型的非结构化数据,是一种规范的语义Web描述方法。
近年来,由于语义网发展迅速,语义Web数据呈现井喷式的增长,这使得关系型数据库管理系统已经很难管理这些数据。而关系型数据库在处理大规模语义Web数据时存储与查询效率均低于分布式数据库,越来越多的研究者开始利用分布式系统的海量数据存储与并行计算能力来解决海量数据管理问题[3-4]。
RDF数据的存储从以下两个方面入手:
(1)存储方面:建立合适的表结构使数据存储空间开销与查询性能达到一定平衡;……p>