随着XML文档的广泛使用,如何改善其查询效率已成为XML应用领域的研究热点。为此,借助关系数组等辅助结构设计了一种适合GPU处理的XPath查询算法GRAXQ。在关系数组构建期间,使用一个线程计算一个关系节点。在并行查询阶段,通过依次执行每个定位步且标记返回结果,从而极大减少了查询过程中的消重代价。实验结果表明,在查询较大规模文档时,与4线程M~2算法相比,采用该算法具有16.1倍的性能提升。
With the extensive application of XML documents, how to improve their query efficiency has become the research focus in XML application field. So we designed an XPath query algorithm called GRAXQ suitable for GPU processing with the help of auxiliary structures such as relation array, etc. In the stage of relation array construction, the algorithm uses one thread to calculate one relation node. In the stage of parallel query, by executing each localisation step in turn and marking the return results, the algorithm therefore greatly reduces the cost of eliminating duplicate results in query process. Experimental results showed that when querying the documents in larger scale, to apply this algorithm had the performance improvement up to 16:1 times compared with 4 threads M2 algorithm.