arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1707.01007cs.DB
收藏

基于矩阵乘法的上下文无关路径查询

Context-Free Path Querying by Matrix Multiplication

Rustam Azimov, Semyon Grigorev

摘要:

图数据模型在生物信息学、图数据库等领域有着广泛的应用。在这些领域,通常需要处理大型图的查询。一些最常见的图形查询是导航查询。查询评估的结果是图的节点之间的一组隐式关系,即图中的路径。指定这些关系的一种自然方法是使用边标签字母表上的形式语法指定路径。在这种方法中,对上下文无关路径查询的回答通常是一组三元组(A,m,n),使得存在从节点m到节点n的路径,其标记从给定上下文无关文法的非终结符A导出。使用关系查询语义来评估此类查询。路径查询语义的另一个示例是单路径查询语义,其需要呈现从节点m到节点n的单个路径,其标记是从使用关系查询语义评估的所有三元组(A,m,n)的非终结符A导出的。有许多算法使用这些语义进行查询评估,但它们在大型图上的性能都很差。高效大数据处理的最常见技术之一是使用图形处理单元(GPU)来执行计算,但这些算法不允许有效地使用这种技术。在本文中,我们展示了如何使用这些查询语义的上下文无关路径查询评估可以减少到矩阵传递闭包的计算。此外,我们提出了一个算法上下文无关的路径查询评估,它使用关系查询语义和矩阵运算的基础上,使它有可能通过使用GPU来加快计算。

英文摘要:

Graph data models are widely used in many areas, for example, bioinformatics, graph databases. In these areas, it is often required to process queries for large graphs. Some of the most common graph queries are navigational queries. The result of query evaluation is a set of implicit relations between nodes of the graph, i.e. paths in the graph. A natural way to specify these relations is by specifying paths using formal grammars over the alphabet of edge labels. An answer to a context-free path query in this approach is usually a set of triples (A, m, n) such that there is a path from the node m to the node n, whose labeling is derived from a non-terminal A of the given context-free grammar. This type of queries is evaluated using the relational query semantics. Another example of path query semantics is the single-path query semantics which requires presenting a single path from the node m to the node n, whose labeling is derived from a non-terminal A for all triples (A, m, n) evaluated using the relational query semantics. There is a number of algorithms for query evaluation which use these semantics but all of them perform poorly on large graphs. One of the most common technique for efficient big data processing is the use of a graphics processing unit (GPU) to perform computations, but these algorithms do not allow to use this technique efficiently. In this paper, we show how the context-free path query evaluation using these query semantics can be reduced to the calculation of the matrix transitive closure. Also, we propose an algorithm for context-free path query evaluation which uses relational query semantics and is based on matrix operations that make it possible to speed up computations by using a GPU.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑