A MinDFA-based method for attribute path querying and optimization in federated RDF systems

By constructing a MinDFA based on the Thompson algorithm and combining it with the B-DFS method, the problem of low attribute path query efficiency in SPARQL 1.1 in federated RDF systems is solved, and efficient attribute path query optimization is achieved.

CN113377810BActive Publication Date: 2025-10-28HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110758342.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-05
Publication Date
2025-10-28
Estimated Expiration
2041-07-05

AI Technical Summary

Technical Problem

The federated RDF system has not yet implemented attribute path lookup in SPARQL 1.1, resulting in low query efficiency.

Method used

We employ MinDFA based on the Thompson algorithm to quickly construct attribute path expressions, and combine it with the B-DFS method for query execution. By combining MinDFA and B-DFS, we optimize attribute path queries.

Benefits of technology

This enables efficient execution of SPARQL 1.1 attribute path queries in federated RDF systems, improving query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113377810B_ABST
    Figure CN113377810B_ABST
Patent Text Reader

Abstract

This invention relates to a method for querying and optimizing attribute paths in a federated RDF system based on MinDFA. The invention mainly includes (1) a method for quickly constructing attribute path expressions using MinDFA based on the Thompson algorithm for querying attribute paths in a federated RDF system; and (2) an attribute path query execution method based on MinDFA and B-DFS.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed RDF system data management and application, and to a method for attribute path querying and optimization in a federated RDF system based on MinDFA. Background Technology

[0002] With the rapid development of the information age and the formation of 5G networks, the scale of network resources is increasing daily, and the interconnections between these resources form a natural data semantic network. To formally describe these Web resources, the W3C proposed the concept of the Resource Description Framework (RDF) in 2004. It is mainly used to describe information such as the title, author, modification date, content, and copyright information of a webpage. In the RDF data conceptual model, network resources are named using Uniform Resource Identifiers (URIs). Its basic data form is a triple of <subject, predicate, object> and <subject, attribute, attribute value>, such as: <Zhang San, friend, Li Si> indicates that Zhang San has a friend named Li Si, and <Zhang San, age, 30> indicates that Zhang San's age attribute value is 30. Several RDF triples together form an RDF dataset. To manage the constructed RDF dataset, the W3C proposed SPARQL (Simple Protocol And RDF Query Language) 1.0 for RDF datasets in 2008. The query language is similar in form to SQL in relational databases, using the SELECT keyword to query RDF data that meets the WHERE condition. Due to the strong promotion by the W3C and the unique flexibility of RDF's structure, it is no longer limited to web resource data; increasingly, domain-specific data is also being represented in RDF format. As the size of RDF datasets continues to grow, the single-machine processing capabilities of centralized RDF systems have become insufficient, making distributed data systems a current research hotspot for query processing.

[0003] Federated RDF systems, a relatively new type of distributed RDF data system, consist of a control site and a series of independently managed RDF data sources. The updates and maintenance of these RDF data sources are managed independently by their respective data administrators, providing only SPARQL query interfaces and concealing all data within the dataset, thus ensuring data security to a certain extent. The control site handles user interaction, distributing user-submitted federated queries to the corresponding RDF data sources for SPARQL querying. Since the SPARQL query language was originally designed for centralized RDF systems and cannot be directly applied to federated RDF systems, SPARQL queries in federated RDF systems require certain processing and transformation. For a user-submitted SPARQL query, the control site first analyzes the federated SPARQL query statement, breaking it down into multiple subqueries. Then, these subqueries are distributed to the corresponding RDF data sources. Finally, the execution results of all subqueries are returned to the control site and joined to form the final result, which is then returned to the user.

[0004] The release of SPARQL 1.1 in 2013 introduced many complex query methods, including the new attribute path query, which can retrieve vertex pairs in a dataset that satisfy attribute path expression rules. These attribute path expression rules often require complex transformations to be replaced by basic queries, or are even difficult to replace with basic queries. However, the demand for these complex queries is increasing. Currently, existing federated RDF systems mainly implement the basic and multi-queries in SPARQL 1.0 and have made some optimizations, but have not yet implemented the complex queries in SPARQL 1.1. Therefore, to address the above issues, this invention proposes an attribute path query and optimization method for federated RDF systems based on MinDFA. This method implements the attribute path query in SPARQL 1.1 within a federated RDF system and improves query efficiency through relevant optimization strategies. Summary of the Invention

[0005] This invention aims to address the issue that federated RDF systems have not yet implemented attribute path queries in SPARQL 1.1.

[0006] To address this, this invention proposes a method for attribute path querying and optimization in a federated RDF system based on MinDFA, which mainly includes two aspects:

[0007] (1) A fast construction method of attribute path expression MinDFA for attribute path query in federated RDF system based on Thompson algorithm;

[0008] (2) Attribute path query execution method based on MinDFA and B-DFS.

[0009] The details are as follows:

[0010] Method (1) is used to quickly construct the attribute path expression in the federated attribute path query statement and its corresponding MinDFA; Method (2) is used to realize the fast query of attribute path expressions in the federated RDF system. The overall technical framework is shown in the appendix. Figure 1 The specific algorithm is as follows:

[0011] (1) A fast MinDFA method for constructing attribute path expressions in a federated RDF system based on the Thompson algorithm for attribute path query.

[0012] In a federated RDF system, the attribute path expression for an attribute path query can be represented as: SELECT * WHERE {? SP? O}, where P is the attribute path expression. The attribute path syntax specifies that an attribute path expression consists of regular expression operators, IRIs, and path elements. The set of regular expression operators can be represented as: S = {^, |, / , *, +, ?, !}.

[0013] To address the differences between IRIs and path elements in attribute path expressions and the parent and child sets of regular expressions, a dual mapping rule is established to convert them into ordinary regular expressions. Then, the Thompson algorithm is used to convert the regular expressions into NFAs, and the NFAs are converted into DFAs and minimized to form MinDFAs through power set construction and equivalent state elimination strategies. Finally, the MinDFAs constructed from the regular expressions are quickly reverse-mapped to the MinDFAs corresponding to the attribute path expressions using the dual mapping rule, enabling the rapid construction of MinDFAs corresponding to attribute path expressions in attribute path queries of federated RDF systems.

[0014] (2) Attribute path query execution method based on MinDFA and B-DFS

[0015] By employing a B-DFS method that combines breadth-first search and depth-first search, firstly, a breadth-first search matching method is used to query all data that satisfy the initial state self-transition and second state transition conditions for the first hop state transition of the attribute path expression MinDFA. Then, a depth-first search matching method is used for subsequent state transitions to achieve fast convergence of query results. Finally, an alternating buffer marking mechanism is used to eliminate potential cyclic duplicate matching problems, thus enabling fast querying of attribute path expressions in a federated RDF system. Attached Figure Description

[0016] Figure 1 This is a technical framework diagram of the present invention. Detailed Implementation

[0017] Combined with appendix Figure 1The technical roadmap and the steps of this invention are as follows:

[0018] Step 1: Construction of Auxiliary Index and Cost Model

[0019] In the offline phase, metadata of each dataset in the federated RDF system is extracted to construct auxiliary indexes for query decomposition and cost models for query plan generation.

[0020] Step 2: Query Decomposition and MinDFA Construction

[0021] Based on the auxiliary index built in the first step, the federated attribute path query statement is decomposed into multiple subqueries, and for each subquery containing an attribute path expression, a MinDFA corresponding to the attribute path expression is constructed.

[0022] Step 3: Query Plan Generation

[0023] The query cost of each subquery and the join cost between subqueries are evaluated based on the cost model constructed in the first step. The optimal query plan is generated based on the different join costs caused by different subquery execution orders.

[0024] Step 4: Execution of the query plan based on MinDFA

[0025] Each subquery statement is executed according to the subquery execution order in the query plan. Subqueries containing attribute path expressions are executed using a MinDFA-based query method. During execution, B-DFS and an alternating buffer marking mechanism are used to further improve query efficiency.

Claims

1. A method for attribute path querying and optimization in a federated RDF system based on MinDFA, characterized in that: (1) A fast construction method for attribute path expression MinDFA in attribute path query of federated RDF system based on Thompson algorithm, specifically including: converting it into a traditional regular expression by establishing a double mapping rule, then converting the traditional regular expression into an NFA by using Thompson algorithm, converting the NFA into a DFA and minimizing it to form a MinDFA by using power set construction and equivalent state elimination strategy, and finally mapping the MinDFA constructed by the traditional regular expression into the attribute path expression MinDFA by using double mapping rule, so as to realize the fast construction of the MinDFA corresponding to the attribute path expression in attribute path query of federated RDF system; (2) The attribute path query execution method based on MinDFA and B-DFS includes: using the B-DFS method that combines breadth-first search and depth-first search, the first state transition of the initial state of MinDFA is matched by breadth-first search, and the subsequent state transitions are matched by depth-first search to achieve fast convergence of query results.

2. The method as described in claim 1, characterized in that: Furthermore, the problem of cyclic and repeated matching is eliminated by the alternating buffering tagging mechanism, enabling fast querying of attribute path expressions in the federated RDF system.