A distributed SPARQL query optimization method based on minimum attribute cut

By adopting the minimum attribute cut graph data partitioning method in the distributed RDF system, the number of spanning attributes is reduced and the query is decomposed into subqueries, which solves the problem of low efficiency of spanning matching queries in the traditional method and achieves more efficient data processing.

CN114116785BActive Publication Date: 2024-09-24HUNAN UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111451035.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2024-09-24
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

When traditional distributed RDF systems process spanning matching queries, inter-partition connections lead to high data communication and computing overhead, and they can only execute star queries independently, limiting query efficiency.

Method used

The graph data partitioning method based on minimum attribute cut is adopted. By considering the attributes of edges, the number of spanning attributes is reduced, queries that cannot be executed independently are decomposed into independently executable subqueries, and the minimum attribute cut data partition is used to improve query efficiency.

Benefits of technology

It reduces inter-partition connection operations, reduces data communication time, expands query types that can be executed independently, improves query efficiency, and reduces the number of invalid intermediate matching results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116785B
    Figure CN114116785B
Patent Text Reader

Abstract

The present invention discloses a distributed SPARQL query optimization method based on minimum attribute cut, which belongs to the field of distributed systems and comprises the following steps: (1) reading the original RDF data graph and saving the edge attribute set L; (2) calculating the weakly connected components of each edge attribute and the corresponding cost; (3) selecting as many internal attributes as possible to obtain a coarsened graph of the data graph; (4) performing vertex partitioning on the coarsened graph and performing anti-coarsening processing to obtain the final partition; (5) decomposing the SPARQL query into a group of independently executable sub-queries; (6) executing the decomposed sub-queries in parallel in each partition to obtain matching results. The present invention expands the query types that can be executed independently in a distributed RDF system, reduces the connections between partitions, reduces the data communication time, and improves the query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed systems, and more specifically, to data partitioning and query processing of distributed RDF systems. Background Art

[0002] RDF (Resource Description Framework) is a data model proposed by the W3C organization. It uses the basic form of triples <subject, predicate, object> to represent the attributes and relationships of web resources. It is currently used in knowledge graphs, social network analysis and other fields. The RDF data model has a flexible representation format and can be represented not only as a table in a relational database, but also as a graph model. When RDF is represented as a graph, a triple represents a directed edge from the subject to the object and the two vertices connected to it. The subject and the object are the two vertices of the edge, and the predicate is the label on the directed edge. When W3C proposed RDF, it also proposed a standard query language SPARQL (simple protocol and RDF query language). SPARQL, like RDF, can also be represented as a graph model. The edges in the query graph are called triple patterns. The subject, predicate and object in the triple pattern can all be variables or constants. Because both SPARQL and RDF can be represented as graph models, SPARQL queries can be converted into subgraph matching problems.

[0003] With the rapid development of the Internet, the scale of RDF data sets continues to grow. Traditional single-machine systems can no longer effectively process massive RDF data, so distributed RDF systems have emerged. In distributed systems, data partitioning is a basic process. Specifically, the RDF data graph G is divided into a set of subgraphs {F 1 , F 2 , …, F k}, each subgraph is called a partition and is distributed in different machines. Currently, the most commonly used data partitioning method in distributed RDF systems is vertex partitioning, that is, each vertex is divided into different partitions, such as the common hash partitioning. In this type of method, some edges will be "split" between partitions, that is, the two vertices of the edge are divided into different partitions. In order to ensure the integrity of the graph, these split edges will be repeatedly stored in two partitions, which is called one-hop replication. If the two vertices of an edge are in the same partition, it is called an internal edge; otherwise it is called a spanning edge.

[0004] The query matching type is the same as the edge type, and can also be divided into two categories: internal matching, where the matching results are only contained in one partition; and cross matching, where the matching results are contained in multiple partitions. When the query to be executed has only internal matching, it only needs to be executed independently in each partition. For queries with cross matching, most existing methods decompose the query into a set of star queries, then execute the star query independently in each partition, and finally execute the inter-partition connection to obtain the final result. However, the inter-partition connection involves data communication and additional computing overhead, which has a great impact on query performance. In addition, in the traditional vertex partitioning method, the queries that can be executed independently can only be star-shaped, which has a large limitation. When processing general queries, distributed connections are usually performed, so the query efficiency is not high. Summary of the invention

[0005] Existing distributed RDF systems only determine whether a query can be executed independently based on the structure of the query graph, and only when the query graph is star-shaped is it considered to be independently executable. After considering the attributes of the edges in the graph data, the present invention expands the types of queries that can be executed independently, and is not limited to star-shaped queries. One of the purposes of the present invention is to provide a graph data partitioning method based on minimum attribute cuts, which can reduce the number of spanning attributes, thereby avoiding connection operations between partitions and reducing data communication time. A second purpose of the present invention is to provide a query decomposition method, which can decompose an original query that cannot be executed independently into a set of sub-queries that can be executed independently, thereby fully utilizing the advantages of minimum attribute cut data partitioning and improving query efficiency.

[0006] The present invention provides a distributed SPARQL query optimization method based on minimum attribute cut, which comprises the following steps:

[0007] Step S1: read the original RDF data graph G and save the edge attributes into the set L;

[0008] Step S2: Calculate the weakly connected component of each edge attribute and the corresponding cost;

[0009] Step S3: Select as many internal attributes as possible to obtain a coarsened graph of the data graph;

[0010] When processing static graph data, the number of edge attributes is fixed, and there are only two types: internal attributes and cross-attributes. Therefore, by using a heuristic greedy algorithm to select as many internal attributes as possible, the number of cross-attributes is minimized, that is, the minimum attribute cut is achieved. After selecting the internal attributes, each weakly connected component in the internal attributes is used as a superpoint to obtain a coarsened graph of the data graph.

[0011] Step S4: perform vertex partitioning on the coarsened graph and perform de-coarsening to obtain the final partition;

[0012] When partitioning the coarsened graph, you can use any vertex partitioning algorithm such as hashing or METIS. However, when partitioning, make sure that the number of vertices in each partition does not exceed (1+ε)×|V| / k to achieve load balancing between partitions. Here, ε is the maximum imbalance ratio defined by the user, and k is the number of partitions.

[0013] Step S5: decompose the SPARQL query into a set of independently executable subqueries;

[0014] The original SPARQL query is decomposed according to the spanning attributes obtained in step S3. The subqueries obtained by the decomposition can be executed independently in the partitions, and the shape of the subqueries is not limited to the star query.

[0015] Step S6: Execute the decomposed subqueries in parallel in each partition to obtain matching results.

[0016] By adopting the present invention, the following technical effects can be achieved:

[0017] The present invention proposes a distributed SPARQL query optimization method based on minimum attribute cuts. First, the attributes of the edges in the RDF data graph are considered to achieve the minimum attribute cut partitioning of the RDF data, so that the number of spanning attributes is minimized, thereby reducing the connection operations between partitions and reducing the data communication time. Then, the present invention decomposes the queries that cannot be executed independently into a group of sub-queries that can be executed independently. Different from the traditional method, the sub-queries that can be executed independently are no longer limited to star queries, which can further reduce the number of invalid intermediate matching results and improve the filtering effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a schematic diagram of the process of the present invention;

[0019] Figure 2 A schematic diagram of a data graph coarsening process according to an embodiment of the present invention;

[0020] Figure 3 Schematic diagram of the query decomposition process according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings so that those skilled in the art can more easily understand the present invention. It should be noted that the embodiment described below is only one embodiment of the present invention, not all embodiments. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without making creative work are all within the scope of protection of the present invention.

[0022] For the convenience of description and understanding, the symbols and concepts involved in the embodiments of the present invention are explained:

[0023] G: RDF data graph.

[0024] L: The attribute set of the edge in the RDF data graph.

[0025] q(v): The query graph to which the query point v belongs.

[0026] G[L′]: The induced subgraph of the attribute set L′, which is the subgraph composed of the attribute edges in L′.

[0027] DS(L′): The union-find set corresponding to the L′ attribute set.

[0028] Internal edge: If both vertices of an edge are in the same partition, then the edge is called internal edge.

[0029] Spanning edge: If the two vertices of an edge are in two different partitions, the edge is called a spanning edge.

[0030] Internal attribute: If an attribute has no crossing edges, then the attribute is called an internal attribute.

[0031] Spanning attribute: If an attribute has at least one spanning edge, then the attribute is called a spanning attribute, that is, the attribute has at least one spanning edge.

[0032] Independently executable queries: If a SPARQL query Q is executed on a partition F of the RDF graph G = {F 1 ,F 2 ,…,F k} are independently executable, then the matching of query Q does not require a join between partitions.

[0033] Minimum attribute cut partition: Given an RDF data graph G and a positive integer k, the minimum attribute partition F of G = {F 1 ,F 2 ,…,F k}, F satisfies: (1) The number of spanning attributes |L cross |minimum; (2) the number of vertices in each partition will not exceed (1+ε)×|V| / k, where ε is the user-defined maximum imbalance ratio and k is the number of partitions.

[0034] The present invention provides a distributed SPARQL query optimization method based on minimum attribute cut, the process of which is as follows: Figure 1 As shown, including:

[0035] S1: Read the original RDF data graph G and save the edge attributes into the set L;

[0036] S2: Traverse the set L and calculate the weakly connected component WCC(G{p}) and the corresponding cost Cost({p}) corresponding to each edge attribute p;

[0037] When calculating weakly connected components, different calculation methods can be used. In the embodiment of the present invention, a union-find data structure is used for optimization calculation. Step S2 specifically includes:

[0038] S2.1: traverse each attribute p in the set L and execute steps S2.2 to S2.4 for each attribute p;

[0039] S2.2: Initialize a union-find set DS({p}) for attribute p. In the union-find set, each node u corresponds to a tree and contains three attribute values ​​u({p}).parent, u({p}).rank and u({p}).size. Among them, u({p}).parent is the root node of u in DS({p}), and the initial value is u itself; u({p}).rank is the height value from the u node to the root node, and the initial value is 0; u({p}).size is the number of root vertices in the tree, and the initial value is 1;

[0040] S2.3: For edges in an RDF graph If its attribute is p, the trees corresponding to u and u′ in the union-find set DS({p}) can be merged, that is, the weakly connected components containing u and u′ can be merged. During the merging process, the root vertex of the tree with a smaller rank points to the root vertex of the tree with a larger rank. After all edges with attribute p are processed, if two vertices in the induced subgraph G[{p}] of attribute p are in the same connected component, then these two vertices are also in the same tree in the union-find set DS({p});

[0041] S2.4: Calculate the cost of attribute p as the internal attribute;

[0042] Because the method of the present invention requires that the number of vertices in each partition does not exceed (1+ε)×|V| / k in order to ensure load balancing between partitions, this embodiment defines the cost based on the size of the weakly connected component. Specifically, for a set of attributes L′ as the cost of the internal attribute is defined as follows:

[0043]

[0044] Where c is a weakly connected component in WCC(G[L,]), and |c| represents the number of vertices in c. Based on this cost function, the cost of the weakly connected component corresponding to each attribute can be calculated.

[0045] S3: Select as many internal attributes L as possible from the attribute set L in, so as to minimize the spanning attributes and set each internal attribute L in The corresponding weakly connected component in is taken as a superpoint to obtain the coarsened graph of the data graph. In the coarsened graph, superpoints can be connected by crossing edges;

[0046] Given a minimum attribute cut partition of a data graph G, assign a unique attribute to each edge in G. The resulting data graph is denoted as At this time, Calculating the minimum attribute cut in G is to calculate the minimum edge cut in G. Since the minimum edge cut problem is an NP-complete problem, the minimum attribute cut problem is also an NP-complete problem. It is precisely because the minimum attribute cut problem has this characteristic that in this embodiment, a heuristic greedy algorithm is used to select internal attributes, which specifically includes the following steps:

[0047] S3.1: Set the internal attribute set L in Initialized to empty;

[0048] S3.2: Determine whether the attribute set L is empty. If the set L is empty, the iteration ends; otherwise, execute steps S3.3 to S.3.8 respectively and continue to the next round of iteration;

[0049] S3.3: The minimum cost mincost is set to infinity, and the optimal attribute p opt Set to empty;

[0050] S3.4: traverse the attribute set L and execute steps S3.5 and S3.6 for attribute p respectively;

[0051] S3.5: Calculate WCC(G[L in ∪{p}]);

[0052] In this embodiment, in order to improve the computational efficiency of weakly connected components, a union-find data structure is used for optimization. Initially, the union-find set DS (L in ∪{p}) is set to DS(L in ). For the vertex u in DS({p}), the root vertex uRoot of the tree corresponding to DS({p}) can be obtained recursively. Then, in DS(L in ∪{p}) to obtain the root vertices of u and uRoot respectively. If the root vertices of u and uRoot are different, the corresponding trees are merged.

[0053] S3.6: If Cost(L in ∪ p ) is less than (1+ε)×|V| / k and is also less than mincost, then Cost(L in ∪ p ) is assigned to mincost and p is assigned to popt , then go to step S3.4; otherwise, mincost and p opt Keep unchanged and go directly to step S3.4;

[0054] S3.7: If after steps S3.4 to S3.6, the optimal attribute p opt If it is still empty, then end step S3 and proceed to step S4; otherwise, proceed to step S3.8;

[0055] S3.8: Delete attribute p from attribute set L opt , then p opt Add to the internal attribute set L in , then proceed to step S3.2 to continue selecting internal attributes;

[0056] by Figure 2 For example, the original data graph has 12 vertices and 6 edge attributes. After processing in step S3, the internal attribute L is selected. in ={starring,residence,producer,spouse,foundingDate}. The edge of the internal attribute is Figure 2 The bold edges in the graph form two weakly connected components. In the coarsened graph, these two weakly connected components each form a superpoint, and the superpoints are connected by edges across the birthPlace attribute.

[0057] S4: Use the vertex partitioning algorithm to partition the superpoints in the coarsened graph, and ensure that the number of vertices in each partition does not exceed (1+ε)×|V| / k. Where ε is the user-defined maximum imbalance ratio, and k is the number of partitions;

[0058] Because the number of vertices in the coarsened graph is much smaller than that in the original data graph, any vertex partitioning algorithm can be used to partition the vertices in the coarsened graph without worrying about taking a long time. For example, hash partitioning, METIS partitioning, etc. can be used. In this embodiment, S4 specifically includes:

[0059] S4.1: The number of vertices inside the superpoint in the coarsened graph is used as the weight of the superpoint, so as to use weighted hash partitioning on the coarsened graph to ensure that the number of vertices in the final data partition does not exceed (1+ε)×|V| / k;

[0060] S4.2: De-coarsening the superpoint set divided into the same partition in step S4.1 into a final partition, that is, dividing the original data points contained in the superpoint set into a partition in the original data graph;

[0061] by Figure 2 For example, if the number of partitions is 2, then Figure 2 The two super points in the graph are each a partition, that is, the original data graph will be Figure 2 The dotted line in is divided into two partitions, thus obtaining the final minimum attribute cut partition.

[0062] S5: Decompose the SPARQL query to be processed into a set of subqueries that can be executed independently;

[0063] In real SPARQL query tasks, queries may not be able to be executed independently. In order to fully utilize the advantages of minimum attribute cut data partitioning and reduce the connections between partitions, it is also necessary to decompose the original query into a set of sub-queries that can be executed independently. In this embodiment, step S5 specifically includes:

[0064] S5.1: Initialize an empty collection This collection is used to store the decomposed subqueries;

[0065] S5.2: Delete the edges whose edge attributes are variables or crossing attributes in the SPARQL query, and obtain a set of weakly connected components WCCs = {q′ 1 ,q′ 2 ,...,q′ x};

[0066] S5.3: Traverse edges in SPARQL queries where the edge attributes are variables or span attributes Execute steps S5.4 to S5.5 for this edge;

[0067] S5.4: If v 1 and v 2 belong to the same subquery, add edges to the subquery they belong to Then proceed to step S5.3 to continue a new round of iteration; otherwise, proceed to step S5.5;

[0068] S5.5: If |q(v 1 )|less than or equal to|q(v 2 )|, then the edge Add to q(v 2 ), otherwise add it to q(v 1 ) Add to v 1 and v 2 The subquery with more vertices in the subquery belongs to. Then, go to step S5.3 to continue a new round of iteration;

[0069] S5.6: Traversing subqueries q′ in WCCs i , if q′ i The number of vertices in is greater than 1, then q′ i Add to collection Here, we do not consider queries with 1 vertex because: such queries contain only one query point, the number of matching results is large and meaningless, and other queries will contain this query point;

[0070] by Figure 3 For example, after step S5.2, three subqueries q′ are obtained. 1 ,q′ 2 ,q′ 3 . Because query q′ 1 The number of vertices is greater than q′ 2 , so crossing the attribute edge Add to query q′ 1 Because q′ 2 and q′ 3 The number of vertices is the same, so the edges can be added to either of them. Assuming the edge is added to q′ 2 The subquery finally decomposed is Figure 3 Q 1 ,q 2 .

[0071] S6: Execute the decomposed subqueries in parallel in each partition to obtain matching results. In this embodiment, step S6 specifically includes:

[0072] S6.1: The master node of the distributed RDF system broadcasts the decomposed subquery to all slave nodes. When the slave node receives the subquery, it starts to perform subgraph matching in parallel within the partition to obtain intermediate matching results.

[0073] S6.2: Inter-partition connections are performed on the intermediate matching results in each node to obtain the final matching results, and the results are aggregated into the master node.

[0074] In summary, the present invention proposes a distributed SPARQL query optimization method based on minimum attribute cuts based on the consideration of edge attributes in RDF data graphs, which expands the types of queries that can be executed independently, reduces the connections between partitions, reduces data communication time, and thus improves query efficiency.

[0075] The above embodiment is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent substitution, improvement, etc. made to the invention should be included in the protection scope of the present invention.

Claims

1. A distributed SPARQL query optimization method based on minimum attribute cut, characterized in that: The following steps are included: (1) Read the original RDF data graph and save the edge attribute set L; (2) Calculate the weakly connected component of each edge attribute and the corresponding cost; The steps include: S2.1: traverse each attribute p in the set L and execute steps S2.2 to S2.4 for each attribute p; S2.2: Initialize a union-find set DS({p}) for attribute p; in the union-find set, each node u corresponds to a tree and contains three attribute values ​​u({p}).parent, u({p}).rank and u({p}).size; among them, u({p}).parent is the root node of u in DS({p}), and its initial value is u itself; u({p}).rank is the height value from u node to the root node, and its initial value is 0; u({p}).size is the number of root vertices in the tree, and its initial value is 1; S2.3: The trees corresponding to the edges in the RDF graph can be merged, that is, the weakly connected components containing u and u′ can be merged; during the merging process, the root vertex of the tree with a smaller rank points to the root vertex of the tree with a larger rank; after all the edges with attribute p are processed, if two vertices in the induced subgraph G[{p}] of attribute p are in the same weakly connected component, then these two vertices are also in the same tree in the union-find set DS({p}); here, the so-called weakly connected component refers to the connected area that can be formed in a directed graph by treating the edges as undirected edges; S2.4: The maximum value of u({p}).size in the RDF data graph is used as the cost for attribute p to be selected as an internal attribute. This is u({p}).size, which is the size of the largest weakly connected component in the induced subgraph G[{p}] of attribute p. (3) Select as many internal attributes as possible to obtain a coarsened graph of the data graph; The steps include: S3.1: Set the internal attribute set L in Initialized to empty; S3.2: Determine whether the attribute set L is empty. If the set L is empty, end the iteration and proceed to S3.9; otherwise, execute steps S3.3 to S.3.8 respectively and continue to the next round of iteration; S3.3: The minimum cost mincost is set to infinity, and the optimal attribute p opt Set to empty; S3.4: traverse the attribute set L and execute steps S3.5 and S3.6 for attribute p respectively; S3.5: Calculate WCC(G[L in ∪{p}]), that is, L in The induced subgraph G[L in ∪{p}] is the set of weakly connected components; In order to improve the computational efficiency of weakly connected components, the union-find data structure is used for optimization; initially, the union-find set DS (L in ∪{p}) is set to DS(L in ); For the vertex u in DS({p}), the root vertex uRoot of the tree corresponding to DS({p}) can be obtained recursively; then, in DS(L in ∪{p}) to obtain the root vertices of u and uRoot respectively. If the root vertices of u and uRoot are different, merge the corresponding trees; S3.6: If cost(L in ∪{p}) is less than (1+ε)×|V| / k and is also less than mincost, then Cost(L in ∪{p}) is assigned to mincost, p is assigned to p opt , then go to step S3.4; otherwise, mincost and p opt Keep unchanged and go directly to step S3.4; S3.7: If after steps S3.4 to S3.6, the optimal attribute p opt If it is still empty, then end step S3 and proceed to step S4; otherwise, proceed to step S3.8; S3.8: Delete attribute p from attribute set L opt , and then add popt to the internal attribute set L in , then proceed to step S3.2 to continue selecting internal attributes; S3.9: For the node set L obtained above in , we further construct its corresponding induced subgraph G[{L in }], and perform a specific graph coarsening process on this basis; specifically, we first identify G[{L in }], and then treat each of these weakly connected components as a single super-point (i.e., merge all nodes within each weakly connected component into a higher-level node); next, if there is at least one edge between any two weakly connected components in the original graph, connect a hyper-edge between their corresponding super-points; through this series of operations, we successfully transform the original graph into a coarsened graph, in which the number of nodes and edges is significantly reduced, but the important information about the connection relationship between the weakly connected components in the original graph is retained; (4) Perform vertex partitioning on the coarsened graph and perform de-coarsening to obtain the final partition; The steps include: S4.1: The number of vertices inside the superpoint in the coarsened graph is used as the weight of the superpoint, so as to use weighted hash partitioning on the coarsened graph to ensure that the number of vertices in the final data partition does not exceed (1+ε)×|V| / k; S4.2: De-coarsening the superpoint set divided into the same partition in step S4.1 into a final partition, that is, dividing the original data points contained in the superpoint set into a partition in the original data graph; (5) Decompose the SPARQL query into a set of independently executable subqueries; The steps include: S5.1: Initialize an empty set Q, which is used to store the decomposed subqueries; S5.2: Delete the edges whose edge attributes are variables or crossing attributes in the SPARQL query, and obtain a set of weakly connected components {q'1,q'2,...,q' y }, here the query for point v1 is q(v1); S5.3: Traverse edges in SPARQL queries where the edge attributes are variables or span attributes Execute steps S5.4 to S5.5 for this edge; S5.4: If v1 and v2 belong to the same subquery, add an edge to the subquery they belong to. Then proceed to step S5.3 to continue a new round of iteration; otherwise, proceed to step S5.5; S5.5: If |q(v1)| is less than or equal to |q(v2)|, then Add to q(v2), otherwise add to q(v1), that is, add the edge Add it to the subquery with more vertices in the subquery to which v1 and v2 belong; then, go to step S5.3 to continue a new round of iteration; S5.6: Traverse the subquery q in WCCs, and if the number of vertices in q is greater than 1, add q to the set Q; Here, we do not consider queries with 1 vertex because: such queries contain only one query point, the number of matching results is large and meaningless, and other queries will contain this query point; (6) The decomposed subqueries are executed in parallel in each partition to obtain matching results; The steps include: S6.1: The master node of the distributed RDF system broadcasts the decomposed subquery to all slave nodes. When the slave node receives the subquery, it starts to perform subgraph matching in parallel within the partition to obtain intermediate matching results. S6.2: Inter-partition connections are performed on the intermediate matching results in each node to obtain the final matching results, and the results are aggregated into the master node.

2. The distributed SPARQL query optimization method based on minimum attribute cut according to claim 1, characterized in that: In step 2, when calculating the weakly connected component, in order to facilitate the measurement of the attribute when selecting the internal attribute, the size of the weakly connected component is used as the cost of the attribute.

3. The distributed SPARQL query optimization method based on minimum attribute cut according to claim 1, characterized in that: Step 3: When processing static graph data, the number of edge attributes is fixed, and there are only two types: internal attributes and crossing attributes. By using a heuristic greedy algorithm, more internal attributes are selected as much as possible to minimize the number of crossing attributes, that is, to achieve the minimum attribute cut. After selecting the internal attributes, each weakly connected component in the internal attributes is used as a superpoint to obtain a coarsened graph of the data graph.

4. The distributed SPARQL query optimization method based on minimum attribute cut according to claim 1, characterized in that: Step 4: When partitioning the coarsened graph by vertices, you can use any vertex partitioning algorithm such as hashing or METIS. However, when partitioning, ensure that the number of vertices in each partition does not exceed (1+ε)×|V| / k to achieve load balancing between partitions; where ε is the user-defined maximum imbalance ratio, and k is the number of partitions.

5. The distributed SPARQL query optimization method based on minimum attribute cut according to claim 1, characterized in that: Step 5 decomposes the original SPARQL query according to the spanning attributes obtained in step 3. The decomposed subqueries can be executed independently within the partitions, and the shape of the subqueries is not limited to star queries.

Citation Information

Patent Citations

  • SPARQL basic graph mode query processing method based on star decomposition

    CN108520035A

  • A multi-query optimization method on a federated distributed RDF database

    CN109710638A

  • Distributed SPARQL query optimization method based on hybrid storage mode

    CN112835920A

  • Partition-based SPARQL query processing method on distributed RDF system

    CN112883063A

  • Distributed RDF query processing system for reducing join cost and communication cost

    KR101854284B1