Data partitioning and distributed query method
By building a set of locally connected attributes in RDF data and partitioning it, the problem of inefficient processing of complex SPARQL query is solved, and more efficient data communication and query performance is achieved.
Patent Information
- Application Number
- CN202510233896.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-17
AI Technical Summary
The existing RDF data division strategy degrades performance when processing complex SPARQL queries, resulting in inefficient processing.
By traversing multiple attributes of the RDF data graph, the edge-induced sub-graph corresponding to each attribute is extracted, and a greedy algorithm is used to build a set of locally connected attributes, perform data partitioning, and divide the data into multiple data partitions with edges that do not intersect according to the vertex disjoint division algorithm.
This method can select more attributes as local connectable attributes under the limitation of graph partition size, reduce the connection overhead of intermediate results during query, reduce data communication costs, and improve the efficiency and performance of complex SPARQL queries.
Smart Images

Figure CN120162358A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and specifically relates to a data partitioning and distributed query method. Background Art
[0002] The Resource Description Framework (RDF) is a standard for describing information about web resources. RDF uses triples in the form of <subject, property, object> to describe resources. By treating the subject and object as vertices, the triples as edges, and the property as its label, an RDF dataset can be regarded as a graph.
[0003] To retrieve and manage RDF graphs, a structured query language called SPARQL has been introduced. SPARQL queries consist of triple patterns, which are also triples but allow variables to be used in the subject, property, or object positions. A SPARQL query can also be regarded as a query graph with variables, and answering a SPARQL query is equivalent to finding a subgraph match of the query graph in the RDF graph.
[0004] In the latest version of SPARQL, the property position in a triple pattern can now be a property followed by an asterisk (*) or a plus sign (+) to find paths in the RDF graph where each edge has the specified property. A query containing a triple pattern with such a single-property recursive constraint is called a complex query. Complex queries can be applied to many practical scenarios. For example, in social network analysis, all friends known by LiHua can be traced through the <LiHua, knows*, person> pattern. Query logs from some real RDF graphs (such as Wikidata query logs) show that complex queries are very common. By analyzing the query logs on different dates in Wikidata, it can be found that a considerable proportion of the queries (ranging from 29.09% to 50.59%) belong to complex queries.
[0005] As the scale of RDF data increases, the research on distributed RDF systems becomes increasingly important. In a typical distributed RDF system, the RDF graph G is divided into a set of subgraphs, called partitions. Then each partition is sent to a site equipped with a centralized RDF system for storage. When a query is submitted, if it involves cross-matching across multiple partitions, an inter-partition join is required to find these cross-matches.
[0006] Since network communication is required to connect the matches of different partitions from different sites, the inter-partition join is usually the main bottleneck in distributed query processing.
[0007] Currently, existing RDF data partitioning strategies perform well in handling general SPARQL queries but pose challenges in complex SPARQL queries. Take the METIS method as an example. It adopts a vertex-disjoint partitioning scheme, but its performance degrades when dealing with complex queries involving single-attribute path constraints. In contrast, the VP method uses an edge-disjoint partitioning scheme, which is suitable for complex queries with single-attribute path constraints but cannot handle queries containing multiple attributes, resulting in decreased efficiency. Summary of the Invention
[0008] The technical problem to be solved by the present invention is to provide a data partitioning and distributed query method to improve the processing efficiency and performance of complex SPARQL queries.
[0009] In a first aspect, the present invention provides a data partitioning and distributed query method, which includes the following steps:
[0010] Traverse multiple attributes of the Resource Description Framework (RDF) data graph, extract the edge-induced subgraph corresponding to each attribute, and based on the partitioning information input by the user, use a greedy algorithm to construct a maximized locally connectable attribute set; the maximized locally connectable attribute set includes at least one of the multiple attributes, and the number of edges in the edge-induced subgraph corresponding to the at least one attribute is less than a preset threshold. The edge-induced subgraph consists of the edges containing the attribute and the two connected vertices.
[0011] Coarsen the weakly connected components of the edge-induced subgraphs corresponding to the multiple attributes to obtain a coarsened graph, and based on the vertex-disjoint partitioning algorithm, divide the coarsened graph into multiple edge-disjoint data partitions; the coarsened graph includes multiple supervertices, where one of the multiple supervertices includes the weakly connected components in the edge-induced subgraph corresponding to at least one attribute, and the other supervertices among the multiple supervertices include the weakly connected components in the edge-induced subgraphs corresponding to the other attributes except the at least one attribute among the multiple attributes. Different data partitions correspond to different attribute categories, and the attribute categories are locally connectable attributes or single attributes.
[0012] Obtain the query statement input by the user and determine the attribute type of the query statement.
[0013] Send the query statement to the data partition corresponding to the attribute type to obtain the query result corresponding to the query statement.
[0014] Optionally, using a greedy algorithm to construct a maximized locally connectable attribute set based on the partitioning information input by the user includes:
[0015] For each attribute respectively, through the calculation formula
[0016]
[0017] Obtain the cost Cost(L′) corresponding to the attribute; where L′ represents any one of the multiple attributes. L represents a set of multiple attributes, e(c) represents the number of edges of the weakly connected component c, and WCC(G[L′]) represents the set of weakly connected components of the attribute L′.
[0018] Initialize the local connectable attribute set to an empty set, and add the attributes to the local connectable attribute set in ascending order of cost until the local connectable attribute set meets the preset conditions, and obtain the maximized local connectable attribute set.
[0019] Optionally, the preset condition is
[0020] Cost(L local ) > (1 + ε) × |E| / K
[0021] Or
[0022] All the multiple attributes are added to the local connectable attribute set; where ε represents the maximum partition imbalance rate, used to describe the difference in partition sizes, |E| represents the number of edges in the local connectable attribute set, and K represents a positive integer.
[0023] Optionally, in the coarsened graph, the size of each super vertex is the number of edges of the weakly connected component in the super vertex.
[0024] Optionally, the multiple data partitions include a local connectable attribute data partition and a single-attribute data partition; the local connectable attribute data partition is used to store the weakly connected components in the edge-induced subgraph corresponding to at least one attribute, and the single-attribute data partition is used to store the weakly connected components in the edge-induced subgraph corresponding to the other attributes except at least one attribute.
[0025] Optionally, determine the attribute type of the query statement, including:
[0026] Traverse the attributes of the query statement. If all the attributes are included in the maximized local connectable attribute set, then determine the attribute type as the local connectable attribute; otherwise, determine the attribute type as the single attribute.
[0027] Optionally, the query result is obtained by connecting the local query results corresponding to each data partition.
[0028] Optionally, the weakly connected components in the edge-induced subgraph corresponding to each attribute in the maximized local connectable attribute set are located in the same data partition.
[0029] In a second aspect, the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above method is implemented.
[0030] In a third aspect, the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above method.
[0031] The beneficial effects of the present invention are as follows:
[0032] The data partitioning and distributed query method provided by the present invention constructs a maximized locally connectable attribute set by using a greedy algorithm, which can select as many attributes as possible as locally connectable attributes under the limitation of the graph partition size. Then, the weakly connected components of the edge-induced subgraph of the locally connectable attributes are sliced into a single data partition, ensuring that both the locally connectable attributes and the non-locally connectable attributes can obtain complete query results within a single data partition. Thus, the query can be completed within a single data partition as much as possible, reducing the connection overhead of intermediate results during the query and lowering the data communication cost. Especially when dealing with complex queries containing attribute recursive constraints, the query efficiency can be significantly improved. In addition, by sending the query statement to the data partition corresponding to the attribute type, a complete matching result can be obtained in one partition without waiting to request other partitions to obtain the attribute data missing in this partition, thereby avoiding communication interaction between data partitions and improving the overall data throughput of the distributed query, which is beneficial to improving the processing efficiency and performance of complex SPARQL queries. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a flowchart of the data partitioning and distributed query method in one embodiment of the present application;
[0034] Figure 2 is an RDF data graph in one embodiment of the present application;
[0035] Figure 3 is a schematic diagram of the weakly connected components of the edge-induced subgraph of the locally connectable attributes in one embodiment of the present application;
[0036] Figure 4 is a coarsened graph in one embodiment of the present application;
[0037] Figure 5 is a schematic diagram of the weakly connected components of the edge-induced subgraph of the non-locally connectable attributes in one embodiment of the present application;
[0038] Figure 6 is a schematic diagram of edge-disjoint data partitions in one embodiment of the present application;
[0039] Figure 7 is a schematic diagram of a query statement in one embodiment of the present application;
[0040] Figure 8Schematic diagram of the local connectable attribute that can be independently queried in one implementation manner of the present application;
[0041] Figure 9 Schematic diagram of the single attribute that can be independently queried in one implementation manner of the present application;
[0042] Figure 10 Schematic diagram of the query statement decomposition in one implementation manner of the present application;
[0043] Figure 11 Schematic diagram of the structure of the terminal device in one implementation manner of the present application. Detailed implementation manner
[0044] Aiming at the problems of low efficiency and poor performance of traditional methods in processing complex SPARQL queries, the present invention provides a data partitioning and distributed query method. This method uses a greedy algorithm to construct a maximized local connectable attribute set, which can select as many attributes as possible as local connectable attributes under the limitation of the graph partition size. Then, the weakly connected components of the edge-induced subgraph of the local connectable attributes are sliced into a single data partition, ensuring that both local connectable attributes and non-local connectable attributes can obtain complete query results in a single data partition, so that the query can be completed in a single data partition as much as possible, reducing the connection overhead of intermediate results during query and lowering the data communication cost. Especially when processing complex queries containing attribute recursive constraints, the query efficiency can be greatly improved; in addition, by sending the query statement to the data partition corresponding to the attribute type, a complete matching result can be obtained in one partition without waiting to request other partitions to obtain the attribute data missing in this partition, thus avoiding communication interaction between data partitions and improving the overall data throughput of distributed queries, which is beneficial to improving the processing efficiency and performance of complex SPARQL queries.
[0045] The data partitioning and distributed query method provided by the present invention will be described below.
[0046] As Figure 1 shown, the data partitioning and distributed query method includes the following steps:
[0047] Step 11, traverse multiple attributes of the Resource Description Framework (RDF) data graph, extract the edge-induced subgraph corresponding to each attribute, and use a greedy algorithm to construct a maximized local connectable attribute set based on the partition information input by the user.
[0048] The maximized locally connectable attribute set includes at least one of a plurality of attributes, and the number of edges in the edge-induced subgraph corresponding to at least one attribute is less than a preset threshold. The edge-induced subgraph is composed of the edges containing the attribute and the two vertices connected by the edges. It should be noted that in the embodiments of the present invention, the cost of an attribute is the size of the maximum weakly connected component of the edge-induced subgraph labeled with the attribute. Different from the traditional vertex-induced subgraph, the present invention uses the edge-induced subgraph, and the size of the weakly connected component is calculated by the number of edges.
[0049] It should be understood that the edge-induced subgraph means: given a labeled graph G = (V, E, L), L' is a non-empty subset of L. The subgraph composed of the edges containing the attributes in L' and the points at both ends is called the induced subgraph of G derived from L', simply referred to as the edge-induced subgraph.
[0050] The locally connectable attribute means: given an RDF graph G, the locally connectable attribute is a set of attributes on the graph G, denoted as L local . In the partitioning of the RDF graph, there is a set of attributes L local , such that each weakly connected component of the edge-induced subgraph G[L local labeled with the attribute is in a single partition. local
[0051] The process of constructing the maximized locally connectable attribute set by using the greedy algorithm based on the partition information input by the user in step 11 is described below, which specifically includes steps 11.1 to 11.2.
[0052] Step 11.1, for each attribute respectively, obtain the cost Cost(L') of the attribute through the calculation formula
[0053]
[0054] .
[0055] Among them, L' represents any one of a plurality of attributes, L represents the set of a plurality of attributes, e(c) represents the number of edges of the weakly connected component c, and WCC(G[L']) represents the set of weakly connected components of the attribute L'.
[0056] Step 11.2, initialize the locally connectable attribute set as an empty set, and add the attributes to the locally connectable attribute set in ascending order of cost until the locally connectable attribute set meets the preset conditions, and obtain the maximized locally connectable attribute set.
[0057] It should be noted that the above preset condition is
[0058] Cost(L local ) > (1 + ε) × |E| / K
[0059] or
[0060] All of the multiple attributes are added to the local connectable attribute set; where ε represents the maximum partition imbalance rate, which is used to describe the difference in partition sizes, |E| represents the number of edges in the local connectable attribute set, and K represents a positive integer.
[0061] It is worth mentioning that using the greedy algorithm to construct the maximized local connectable attribute set can select as many attributes as possible as local connectable attributes under the limitation of the graph partition size.
[0062] Step 12: Coarsen the weakly connected components of the edge-induced subgraphs corresponding to the multiple attributes to obtain a coarsened graph, and based on the vertex-disjoint partitioning algorithm, partition the coarsened graph into multiple edge-disjoint data partitions.
[0063] The coarsened graph includes multiple supervertices. One of the multiple supervertices includes the weakly connected components in the edge-induced subgraphs corresponding to at least one attribute, and the other supervertices among the multiple supervertices include the weakly connected components in the edge-induced subgraphs corresponding to the other attributes except the at least one attribute among the multiple attributes. Different data partitions correspond to different attribute categories, and the attribute categories are local connectable attributes or single attributes.
[0064] It should be noted that in the coarsened graph, the size of each supervertex is the number of edges of the weakly connected components in the supervertex. The multiple data partitions include local connectable attribute data partitions and single-attribute data partitions; the local connectable attribute data partitions are used to store the weakly connected components in the edge-induced subgraphs corresponding to at least one attribute, and the single-attribute data partitions are used to store the weakly connected components in the edge-induced subgraphs corresponding to the other attributes except the at least one attribute.
[0065] For the sake of easy understanding, the following will be described by taking a specific embodiment of the present application as an example.
[0066] In this example, the obtained RDF graph is as Figure 2 shown.
[0067] Select the local connectable attribute set L local by using the greedy algorithm to maximize the number of local connectable attributes. For the graph G, select the local connectable attribute set L local ={alma mater, doctoral student, institution}, and the non-local connectable attribute set L - L local ={influence}; coarsen the weakly connected components of the induced subgraphs of the local connectable attributes. The weakly connected components of the edge-induced subgraphs of the local connectable attributes are as Figure 3 shown. For example, the vertices numbered {01, 02, 05} and the connecting edges {doctoral student, alma mater, institution} are a weakly connected component of an induced subgraph of a local connectable attribute, which is coarsened to Figure 4Super node 2; Coarsen the weakly connected components of the induced subgraphs of each non-locally connectable attribute (attributes other than locally connectable attributes). The weakly connected components of the induced subgraphs of non-locally connectable attributes are as Figure 5 , for example, the vertices numbered {01, 08} and the connecting edge {influence} are a weakly connected component of a non-locally connectable attribute, which is coarsened into Figure 4 Super node 1. The result of coarsening is a set of super nodes to obtain the coarsened graph G c such as Figure 5 . The size of a super node is the number of edges. For example, the number of edges of super node 1 is 1, and its size Weight = 1. Perform a vertex-disjoint partitioning algorithm on the coarsened graph. Since the coarsened super vertices are the weakly connected components of the induced subgraphs of edges, the vertex-disjoint partitioning result of the coarsened graph is a set of edge-disjoint partitions such as Figure 6 The partitioning result {F1, F2}, and this set of partitions is the result of partitioning the coarsened graph into multiple edge-disjoint data partitions.
[0068] Step 13, obtain the query statement input by the user and determine the attribute type of the query statement.
[0069] Specifically, the process of determining the attribute type of the query statement is as follows: Traverse the attributes of the query statement. If all attributes are included in the maximized locally connectable attribute set, then determine the attribute type as locally connectable attribute; otherwise, determine the attribute type as single attribute.
[0070] Exemplarily, in an embodiment of the present invention, for the query Q input by the user, such as Figure 7 , decompose the query input by the user into a set of independently executable queries as sub-queries, distribute the sub-queries to each data partition for concurrent execution, and then collect the sub-query results to obtain the final result. Among them, the independently executable queries include two types. One is the locally connectable attribute independently executable query such as Figure 8 , and the other is the single attribute independently executable query such as Figure 9 . During the implementation process, traverse all the edges of query Q and determine whether the attribute of the edge is a locally connectable attribute L local , where {influence *} is a non-locally connectable attribute, and {Ph.D. student, institution, alma mater} are locally connectable attributes. Take the weakly connected components of the induced subgraphs of locally connectable attributes and the weakly connected components of the induced subgraphs of non-locally connectable attributes in query Q as sub-queries respectively. For example, Figure 7 The query Q is decomposed into Figure 10 Two sub-queries Q1 and Q2. Above 10 is the weakly connected component Q1 of the induced subgraph of non-locally connectable attributes, Figure 10 Below is the weakly connected component Q2 of the induced subgraph of locally connectable attributes.
[0071] Step 14: Send the query statement to the data partition corresponding to the attribute type to obtain the query result corresponding to the query statement.
[0072] Specifically, the query result is obtained by concatenating the partial query results corresponding to each data partition.
[0073] Exemplarily, all sub-queries are sent to all partitions, and each sub-query is executed concurrently on the partitions. The queries Q1 and Q2 are sent to the partitions F1 and F2 together, and Q1 and Q2 are executed in parallel on each partition. The query execution results on the partition F are collected, the union of the results of the same sub-query is obtained to get the sub-query result, and then the sub-query results are concatenated to get the final result. The union of the results of Q1 on F1 and F2 is obtained to get the result of Q1, the union of the results of Q2 on F1 and F2 is obtained to get the result of Q2, and finally the results of Q1 and Q2 are concatenated to get the distributed query result of query Q.
[0074] As Figure 11 shown, an embodiment of the present invention provides a terminal device. As Figure 11 shown, the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 11 only one processor is shown in ), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100. When the processor D100 executes the computer program D102, the steps in any of the above method embodiments are implemented.
[0075] Specifically, when the processor D100 executes the computer program D102, it traverses multiple attributes of the Resource Description Framework (RDF) data graph, extracts the edge-induced subgraph corresponding to each attribute, and constructs a maximized locally connectable attribute set using a greedy algorithm based on the partition information input by the user. It coarsens the weakly connected components of the edge-induced subgraphs corresponding to multiple attributes to obtain a coarsened graph, and divides the coarsened graph into multiple edge-disjoint data partitions based on the vertex-disjoint partitioning algorithm. It obtains the query statement input by the user and determines the attribute type of the query statement. It sends the query statement to the data partition corresponding to the attribute type to obtain the query result corresponding to the query statement. Among them, constructing a maximized locally connectable attribute set using a greedy algorithm can select as many attributes as possible as locally connectable attributes under the limitation of the graph partition size, and then cut the weakly connected components of the edge-induced subgraph of the locally connectable attributes into a single data partition, ensuring that both the locally connectable attributes and the non-locally connectable attributes can obtain complete query results in a single data partition, so that the query can be completed in a single data partition as much as possible, reducing the connection overhead of intermediate results during the query and lowering the data communication cost. Especially when dealing with complex queries containing attribute recursive constraints, it can greatly improve the query efficiency. In addition, by sending the query statement to the data partition corresponding to the attribute type, a complete matching result can be obtained in one partition without waiting to request other partitions to obtain the attribute data missing in this partition, thus avoiding communication interaction between data partitions and improving the overall data throughput of distributed queries, which is beneficial to improving the processing efficiency and performance of complex SPARQL queries.
[0076] The so-called processor D100 may be a central processing unit (CPU, Central Processing Unit), and this processor D100 may also be other general-purpose processors, digital signal processors (DSP, Digital Signal Processor), application-specific integrated circuits (ASIC, Application Specific Integrated Circuit), field-programmable gate arrays (FPGA, Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.
[0077] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as the hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk equipped on the terminal device D10, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory D101 may also include both the internal storage unit and the external storage device of the terminal device D10. The memory D101 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as the program code of the computer program. The memory D101 may also be used to temporarily store data that has been output or is to be output.
[0078] An embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments can be implemented.
[0079] An embodiment of the present application provides a computer program product, and when the computer program product runs on a terminal device, the terminal device can implement the steps in the above method embodiments when executed.
[0080] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the protection scope of the present application is limited to these examples; under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
[0081] One or more embodiments of the present application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of one or more embodiments of the present application shall be included in the protection scope of the present application.
Claims
1. A data partitioning and distributed query method, characterized in that: include: Traversing multiple attributes of a resource description framework RDF data graph, extracting an edge induced subgraph corresponding to each of the attributes, and constructing a maximized locally connectable attribute set using a greedy algorithm based on partition information input by a user; the maximized locally connectable attribute set includes at least one attribute among the multiple attributes, the number of edges in the edge induced subgraph corresponding to the at least one attribute is less than a preset threshold, and the edge induced subgraph is composed of an edge containing the attribute and two connected vertices thereof; The weakly connected components of the edge-induced subgraphs corresponding to the multiple attributes are coarsened to obtain a coarsened graph, and the coarsened graph is divided into multiple data partitions with non-intersecting edges based on a vertex-disjoint partitioning algorithm; the coarsened graph includes multiple supervertices, one of the multiple supervertices includes the weakly connected components in the edge-induced subgraph corresponding to the at least one attribute, and the other supervertices in the multiple supervertices include the weakly connected components in the edge-induced subgraphs corresponding to the other attributes among the multiple attributes except the at least one attribute, and different data partitions correspond to different attribute categories, and the attribute categories are locally connectable attributes or single attributes; Obtaining a query statement input by a user, and determining an attribute type of the query statement; The query statement is sent to the data partition corresponding to the attribute type to obtain a query result corresponding to the query statement.
2. The data partitioning and distributed query method according to claim 1, characterized in that: The partition information input by the user is based on the greedy algorithm to construct a maximum local connectable attribute set, including: For each of the above attributes, the formula is calculated The cost Cost(L′) corresponding to the attribute is obtained; wherein L′ represents any one of the multiple attributes, L represents a set of multiple attributes, e(c) represents the number of edges of the weakly connected component c, and WCC(G[L′]) represents the set of weakly connected components of attribute L′; Initialize the local connectable attribute set to an empty set, and add attributes to the local connectable attribute set in order of cost from small to large, until the local connectable attribute set meets a preset condition, thereby obtaining the maximized local connectable attribute set.
3. The data partitioning and distributed query method according to claim 2, characterized in that: The pre-condition is Cost(L local )>(1+ε)×|E| / K or All of the multiple attributes are added to the locally connectable attribute set; wherein ε represents the maximum imbalance rate of the partition, which is used to describe the difference in partition sizes, |E| represents the number of edges in the locally connectable attribute set, and K represents a positive integer.
4. The data partitioning and distributed query method according to claim 3, characterized in that: In the coarsened graph, the size of each super vertex is the number of edges of the weakly connected components in the super vertex.
5. The data partitioning and distributed query method according to claim 4, characterized in that: The multiple data partitions include locally connectable attribute data partitions and single attribute data partitions; the locally connectable attribute data partitions are used to store weakly connected components in the edge induced subgraph corresponding to the at least one attribute, and the single attribute data partitions are used to store weakly connected components in the edge induced subgraph corresponding to attributes other than the at least one attribute.
6. The data partitioning and distributed query method according to claim 5, characterized in that: Determining the attribute type of the query statement includes: The attributes of the query statement are traversed, and if the attributes are all included in the maximized locally connectable attribute set, the attribute type is determined to be a locally connectable attribute; otherwise, the attribute type is determined to be a single attribute.
7. The data partitioning and distributed query method according to claim 1, characterized in that: The query result is obtained by connecting the local query results corresponding to each data partition.
8. The data partitioning and distributed query method according to claim 1, characterized in that: The weakly connected components in the edge-induced subgraph corresponding to each attribute in the maximized locally connectable attribute set are located in the same data partition.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Partition-based SPARQL query processing method on distributed RDF system
CN112883063A
Distributed SPARQL query optimization method based on minimum attribute cut
CN114116785A
Distributed RDF graph query method and device, equipment and storage medium
CN114356977A
RDF knowledge graph data division and distributed query method
CN118113883A
Method and apparatus for association rules with graph patterns
US20170228448A1