Method for carrying out graph compression based on relation between nodes and edges

By building adaptive graphs and using dynamic relationship tables, the sub-graph isomorphic search algorithm is optimized, and the problem of low isomorphic search efficiency in sub-graphs in the existing technology is solved, and efficient query and accuracy improvement on large-scale data sets are achieved .

CN119046486AInactive Publication Date: 2024-11-29THE ACAD OF TIANJIN UNIV HEFEI

Patent Information

Application Number
CN202411156024.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing subgraph isomorphic algorithms are inefficient when dealing with large-scale complex networks, and fail to make full use of the intrinsic relationship between nodes and edges in the graph, resulting in redundant computing and performance bottlenecks.

Method used

By defining four relationships between nodes (grammatical inclusion, syntax equivalent, query dependency inclusion and query dependency equivalent), building an adaptability graph and using dynamic relationship tables, optimizing node matching strategies during the search process, and applying improved backtracking algorithms To reduce search space and calculation time.

Benefits of technology

It significantly improves the efficiency and accuracy of subgraph isomorphic search, and is especially suitable for complex network environments with dense vertex relationships, reduces redundant calculations and is suitable for dynamically changing graph data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046486A_ABST
    Figure CN119046486A_ABST
Patent Text Reader

Abstract

The invention discloses a method for performing graph compression based on a relationship between nodes and edges, which is used for improving the efficiency of isomorphic search of sub-graphs and is suitable for processing a big data graph. The method comprises the following steps of: firstly, converting an original data graph into an adaptive graph by adopting a novel graph conversion algorithm; secondly, defining four relationships (grammar inclusion, grammar equivalence, query dependency inclusion and query dependency equivalence) among nodes in the data graph, and further compressing the adaptive graph with the help of the relationships to form super nodes and super edges; and finally, efficiently performing matching query of the sub-graphs through an improved backtracking search strategy by utilizing the hypergraph structure and the dynamic relation table. According to the method, the query speed of the subgraph isomorphism algorithm can be remarkably improved, and the improvement effect is particularly obvious in a data set with dense vertex relations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer science and graph data processing, and in particular to a method for graph compression based on the relationship between nodes and edges. Background Art

[0002] In the era of big data, graph data is widely used in many fields, including social networks, bioinformatics, network security, etc. A basic problem in graph data is subgraph isomorphism search, that is, finding a subgraph with the same structure as a given small graph in a large data graph. This problem is NP-Complete in computation, which brings great challenges to practical applications.

[0003] Traditional subgraph isomorphism algorithms, such as the Ullmann algorithm and the VF2 algorithm, are usually implemented based on a backtracking framework and are inefficient, especially when faced with large-scale complex networks. These algorithms encounter serious performance bottlenecks in practical applications because they need to process a large amount of redundant calculations and complex data structures.

[0004] In addition, existing methods often fail to fully utilize the intrinsic relationships between nodes and edges in the graph, resulting in low search efficiency. Therefore, developing a new graph processing algorithm to more efficiently solve the subgraph isomorphism problem is of great significance to improving the practicality and efficiency of graph data analysis. Summary of the invention

[0005] The purpose of the present invention is to make up for the defects of the existing technology and provide a method for graph compression based on the relationship between nodes and edges, aiming to improve the efficiency of subgraph isomorphism search. By defining four relationships between nodes in the data graph (syntactic inclusion, syntactic equivalence, query dependency inclusion and query dependency equivalence), the present invention can convert the original data graph into an adaptive graph, which simplifies the search process and reduces unnecessary calculations.

[0006] The present invention is achieved through the following technical solutions:

[0007] A graph compression algorithm for subgraph isomorphism search in graph data includes the following steps:

[0008] 1. Construct an adaptive graph: Based on the predefined relationships between nodes, equivalent nodes are merged into super nodes to form a new graph structure, namely the adaptive graph.

[0009] 2. Use dynamic relationship table: Based on the adaptive graph, use dynamic relationship table to maintain query dependencies between nodes to optimize the node matching strategy during the search process.

[0010] 3. Optimize the subgraph search algorithm: Apply an improved backtracking algorithm on the adaptive graph and use the structure of super nodes and hyper edges to reduce the search space and computation time.

[0011] According to the predefined relationship between nodes, equivalent nodes are merged into super nodes to form a new graph structure, namely adaptive graph G, and a dynamic relationship table H is constructed using a large data graph; four relationships of nodes are calculated for the adaptive graph G and the dynamic relationship table H, and the four relationships are grammatical inclusion, grammatical equivalence, query dependency inclusion and query dependency equivalence; the data graph is compressed based on the four relationships, and the query dependency relationship between nodes is maintained on the basis of the adaptive graph G using the dynamic relationship table H to optimize the node matching strategy during the search process; a backtracking algorithm is applied to the adaptive graph G, and the structure of super nodes and hyper edges is used to reduce the search space and calculation time. The search process is simplified through the structure of super nodes and hyper edges to achieve efficient subgraph isomorphism query. Through this graph compression and relationship definition, the query speed and accuracy of the algorithm can be significantly improved when processing large-scale data sets, especially for complex network environments with dense vertex relationships.

[0012] The construction of the adaptive graph G is first based on the predefined relationships between nodes, namely grammatical inclusion and grammatical equivalence. These relationships are defined by analyzing the structural characteristics of nodes and their neighborhoods. If the neighborhood set of a node is completely contained in the neighborhood set of another node, then there is a grammatical inclusion relationship between the two nodes:

[0013] a) The grammar includes: given a graph, if there is Where N(v) represents the neighborhood set of node v, that is, the set of all nodes adjacent to node v, then node v is called i The syntax contains node v j ;

[0014] b) Syntactic equivalence: Based on grammatical inclusion, if there is N(v i )=N(v j ), then we call node v i The syntax contains node v j , then the two nodes are grammatically equivalent, and the grammatically equivalent nodes are merged into a supernode;

[0015] A supernode in an adaptive graph is a set of nodes with equivalence relations, which can replace each other in the original graph without affecting the structural characteristics of the graph.

[0016] Based on the adaptive graph, a dynamic relationship table is used to maintain the query dependency between nodes to optimize the node matching strategy in the search process. For a given query graph Q, a dynamic relationship table H is used to maintain the query dependency between nodes to further optimize the node matching strategy in the search process. Given a query graph Q, the construction of the dynamic relationship table H is based on the predefined relationships between nodes, namely, query dependency inclusion and query dependency equivalence. These relationships are defined by analyzing the structural characteristics of nodes and their neighborhoods:

[0017] a) Query dependencies include: Where QDN(v) represents the neighborhood set of node v relative to a specific node u in the query graph Q. The node labels of this neighborhood set must appear in the labels of the neighborhood of vertex u in the query graph. Then node v is called i Query dependencies include node v j

[0018] b) Query dependency equivalence: Based on the query dependency inclusion, if there is a QDN (v i )=QDN(v j ),

[0019] Then we call node v i Query dependencies include node v j , then these two nodes are query-dependent equivalent,

[0020] In the search process of a given query graph, nodes with equivalent query dependencies are merged into a supernode.

[0021] Thus constructing the dynamic relation table H;

[0022] The dynamic relationship table optimizes the node matching strategy in the query process by pre-calculating and storing the potential relationships of the nodes in the graph. When constructing the dynamic relationship table, various potential relationships between nodes are first identified and defined. If in a given query graph Q, the neighborhood structure of a node is completely mapped to the neighborhood structure of another node, there is a query dependency inclusion relationship between the two nodes. The identification of this relationship is achieved through graph traversal and pattern matching algorithms.

[0023] Use adaptive graph G and dynamic relationship table H to integrate graph isomorphism algorithm:

[0024] a) Initialize candidate nodes:

[0025] C(u)={h∈H|SC-indegree(h)=0and label(h)=label(u)}

[0026] Here, C(u) is the candidate node set, and the supernode with the same label as the query node u and no semantic inclusion relationship in the adaptability graph, that is, SC-indegree is 0, is selected as the starting point; where,

[0027] h, is a candidate node that meets the conditions;

[0028] H, the set of candidate nodes that meet the conditions;

[0029] SC-indegree(h), indicates that the candidate node is not semantically included by any other candidate node;

[0030] Label(h), the label identifying this candidate node must be consistent with the label of the corresponding query node u;

[0031] b) Dynamic loading mechanism:

[0032] The loading process of candidate nodes is dynamic and depends on the determined node matches and the relationship information in the dynamic relationship table:

[0033] If f(u)=h is successful, then load{h′∈children(h)|all SC-parents ofh′are matched}

[0034] That is, if node u) successfully matches supernode h), all child nodes h' of supernode h) are loaded, but the premise is that all SC parent nodes of h' have been matched; here,

[0035] SC-parents h' identifies the parent nodes that contain all semantics of the current candidate node;

[0036] c) Search process:

[0037] The search process uses a backtracking strategy and optimizes the node matching of each step through a dynamic relationship table; the search uses the structure of super nodes and hyper edges to reduce computational complexity;

[0038] d) Optimization strategy:

[0039] The following optimization strategies are included:

[0040] Heuristic node selection: Use degree heuristics to select the next node in the query graph, giving priority to nodes with high degrees or nodes with a small set of candidate nodes;

[0041] Parallel processing: Exploiting the parallel processing capabilities of multi-core processors, different parts of the adaptability graph are assigned to different processing threads.

[0042] The advantages of the present invention are:

[0043] 1. Improve efficiency: Through the use of graph compression and adaptive graphs, redundant calculations in subgraph isomorphism search are significantly reduced, and the running speed of the algorithm is improved.

[0044] 2. Strong scalability: The design of the adaptive graph and dynamic relationship table makes the present invention not only applicable to static graphs, but also able to effectively process dynamically changing graph data.

[0045] 3. Adaptation to complex networks: The present invention is particularly suitable for complex networks with dense node relationships, such as social networks and protein interaction networks, and can effectively process large-scale data sets. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 Flowchart of the proposed subgraph isomorphism based on vertex and edge relationships;

[0047] Figure 2 This is a sample graph of the proposed backtracking algorithm based on subgraph isomorphism between vertex and edge relationships. DETAILED DESCRIPTION

[0048] To make the purpose, technical solution and advantages of the present invention clearer, the following is a further detailed description of the implementation of the present invention. This embodiment involves processing of social network graph data, and aims to demonstrate how to effectively use the method proposed by the present invention to accelerate the query process of subgraph isomorphism.

[0049] like Figure 1 As shown, a method for graph compression based on the relationship between nodes and edges, the method comprising:

[0050] The adaptive graph G and dynamic relationship table H are constructed using the big data graph; the four relationships of nodes are calculated for the adaptive graph G and the dynamic relationship table H (respectively recorded as grammatical inclusion, grammatical equivalence, query dependency inclusion, and query dependency equivalence); the data graph is compressed based on these four node relationships, and the search process is simplified through the structure of super nodes and hyper edges to achieve efficient subgraph isomorphism query. Through this graph compression and relationship definition, the query speed and accuracy of the algorithm can be significantly improved when processing large-scale data sets, especially for complex network environments with dense vertex relationships.

[0051] In the data processing of large graphs G = (V, E, Σ, L), especially in the problem of subgraph isomorphism, a core technology is the adaptive transformation of graphs, which involves converting traditional data graphs into adaptive graphs. This method can effectively compress the size of the graph and reduce the computational complexity. The construction of adaptive graphs is first based on predefined relationships between nodes, such as grammatical inclusion and grammatical equivalence. These relationships are defined by analyzing the structural features of nodes and their neighborhoods. For example, if the neighborhood set of a node can be completely contained in the neighborhood set of another node, then there is a grammatical inclusion relationship between the two nodes.

[0052] a) Syntactic Containment: Given a graph, if there exists Where N(v) represents the neighborhood set of node v, that is, the set of all nodes adjacent to node v, then node v is called i The syntax contains node v j .

[0053] b) Syntactic Equivalence: On the basis of grammatical inclusion, if there is (N(v i)=N(v j )), then we call node v i The syntax contains node v j , then the two nodes are syntactically equivalent. Syntactically equivalent nodes can be merged into a hypernode.

[0054] A hypernode in an adaptive graph is a set of nodes with equivalent relationships. These nodes can be replaced with each other in the original graph without affecting the structural characteristics of the graph. By merging equivalent nodes into a hypernode, the complexity of the graph can be greatly reduced and the efficiency of subsequent processing can be improved. For example, in bioinformatics and social network analysis, frequently occurring patterns or highly concentrated relationship networks can be effectively represented by hypernodes, thereby reducing unnecessary calculations when performing graph matching and pattern recognition.

[0055] In addition, the concept of hyperedge also plays an important role in adaptive graphs. Hyperedges connect two supernodes and represent complex or collective connections between multiple nodes in the original graph. Hyperedges can preserve high-level structural information that may be lost during the conversion process, ensuring query accuracy after graph compression. With the help of adaptive graphs, subgraph isomorphism searches can focus more on key structures, significantly improving search efficiency and accuracy.

[0056] In the data processing of large graphs G = (V, E, Σ, L), the dynamic relationship table is another key technology for handling the subgraph isomorphism problem in large-scale graph data. This technology optimizes the node matching strategy during the query process by pre-calculating and storing the potential relationships of the nodes in the graph. These relationships include but are not limited to the inclusion and equivalence relationships of query dependencies. These relationships not only rely on the attributes and neighborhood structure of the nodes themselves, but also take into account the specific needs of the query graph.

[0057] When constructing the dynamic relationship table H (as shown in the following algorithm), various potential relationships between nodes are first identified and defined. For example, if in a given query graph, the neighborhood structure of a node can be completely mapped to the neighborhood structure of another node, there is a query-dependent inclusion relationship between the two nodes.

[0058] The identification of such relationships relies on complex graph traversal and pattern matching algorithms, which usually require a lot of preprocessing and optimization algorithms to implement.

[0059]

[0060] One of the main applications of dynamic relation tables is to dynamically adjust the candidate node list during the search and matching process of the graph to reduce the amount of calculation and improve the accuracy of the match. In this way, nodes that are impossible to match can be excluded before executing the query, thereby reducing invalid search attempts. In addition, dynamic relation tables can also be used to optimize the storage structure and query algorithm of the graph, such as building an efficient index system by pre-screening important nodes and edges.

[0061] The integrated graph isomorphism algorithm using adaptive graph and dynamic relation table H is used.

[0062] a) Initialize candidate nodes:

[0063] C(u)={h∈H|SC-indegree(h)-0and label(h)=label(u)}

[0064] Here, (C(u)) is the set of candidate nodes, and those supernodes that have the same label as the query node u and do not have any mandatory containment relationship in the fitness graph (SC-indegree is 0) are selected as the starting points.

[0065] b) Dynamic loading mechanism:

[0066] To further improve efficiency, the candidate node loading process is dynamic and depends on the already determined node matches and relationship information in the DRT.

[0067] If f(u)=h is successful, then load{h′∈children(h)|all SC-parents ofh′are matched}, that is, if node u successfully matches supernode h, then load all child nodes h′ of h, but the premise is that all SC parent nodes of h′ have been matched.

[0068] c) Search process:

[0069] like Figure 2 As shown, the search process uses a backtracking strategy and optimizes the node matching of each step through a dynamic relationship table. In addition, the search utilizes the structure of super nodes and hyper edges to reduce the computational complexity.

[0070] d) Optimization strategy:

[0071] In order to improve the performance of the algorithm, the invention adopts the following optimization strategies:

[0072] Heuristic node selection: Use degree heuristics to select the next node in the query graph, giving priority to nodes with high degrees or nodes with a small set of candidate nodes to reduce the search space.

[0073] Parallel processing: Exploiting the parallel processing capabilities of modern multi-core processors, different parts of the fitness graph are assigned to different processing threads, thus speeding up the entire search process.

[0074] Embodiment Overview

[0075] Suppose we have a large-scale social network data graph (G = (V G ,E G )), where (V G ) is the set of users, (E G ) are the relationships between users (such as friends, colleagues, etc.). Our goal is to find the corresponding small graph (H = (V H ,E H ))All subgraphs with the same structure, where (H) represents a specific social circle pattern.

[0076] Step 1: Construct the fitness graph

[0077] 1. Node equivalence classification:

[0078] First, we analyze the nodes in the fitness graph and classify syntactically equivalent nodes according to their properties and their connection patterns. For example, user nodes with the same number of friends and similar interests can be considered equivalent.

[0079] These equivalent nodes are merged into super nodes, each super node represents a node group, and these nodes are interchangeable in the structure of the graph.

[0080] 2. Adaptive graph construction:

[0081] The original set of nodes is replaced with supernodes to construct a new adaptive graph G. In this adaptive graph, hyperedges connect those supernodes that are connected by actual edges in the original graph.

[0082] Step 2: Use dynamic relationship tables

[0083] 1. Maintenance of dynamic relationship table:

[0084] For each supernode in the adaptive graph, a dynamic relationship table is maintained to record the query dependency, inclusion and equivalence relationships with other supernodes. These relationships are dynamically updated based on the neighborhood set of the original node inside the supernode.

[0085] 2. Query optimization:

[0086] Before performing the subgraph isomorphism search, the candidate supernodes are pre-screened according to the dynamic relationship table to exclude those supernodes that cannot be matched to the query graph H, thereby reducing the search space.

[0087] Step 3: Optimize the subgraph search algorithm

[0088] 1. Improved backtracking search:

[0089] The subgraph search is performed on the adaptive graph using a backtracking algorithm. Before the search begins, the supernode whose label and structure best match the query graph H is selected as the starting point.

[0090] Using the information in the dynamic relationship table, the search process is optimized, for example by ignoring certain paths that have been excluded because they do not meet the relationship requirements.

[0091] 2. Result verification and output:

[0092] Whenever a subgraph that meets the conditions is found, it is recorded and output. Due to the use of graph compression and dynamic relationship tables, the entire search process is faster than traditional methods and reduces the consumption of computing resources.

[0093] Through the above implementation, the present invention not only significantly improves the efficiency of subgraph isomorphism search, but also demonstrates how to process large-scale graph data in practical applications. This method is particularly suitable for scenarios that require rapid response and processing of complex relational data, such as social network analysis, bioinformatics network exploration and other fields.

[0094] Unless otherwise specified, the models of the components in the embodiments of the present invention are not limited, and any device that can perform the above functions may be used.

[0095] Those skilled in the art will appreciate that the accompanying drawing is only a schematic diagram of a preferred embodiment, and the serial numbers of the embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0096] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for graph compression based on the relationship between nodes and edges, characterized in that: The method comprises: According to the predefined relationship between the nodes of the original data graph, equivalent nodes are merged into super nodes, thereby compressing and forming a new graph structure, namely the adaptive graph G. A backtracking algorithm is applied to the adaptive graph G, and the structure of super nodes and hyper edges is used to reduce the search space and computing time. During the search process, for a given query graph Q, a dynamic relationship table H is used to maintain the query dependency relationship between nodes to further optimize the node matching strategy in the search process.

2. A method for graph compression based on the relationship between nodes and edges according to claim 1, characterized in that: The construction of the adaptive graph G is first based on predefined relations between nodes, namely grammatical inclusion and grammatical equivalence, which are defined by analyzing the structural features of the nodes and their neighborhoods: a) The grammar includes: given a graph, if there is Where N(v) represents the neighborhood set of node v, that is, the set of all nodes adjacent to node v, then node v is called i The syntax contains node v j ; b) Syntactic equivalence: Based on grammatical inclusion, if there is N(v i )=N(v j ), then we call node v i The syntax contains node v j , then the two nodes are grammatically equivalent, and the grammatically equivalent nodes are merged into a supernode; A supernode in an adaptive graph is a set of nodes with equivalence relations, which can replace each other in the original graph without affecting the structural characteristics of the graph.

3. The method for graph compression based on the relationship between nodes and edges according to claim 1, characterized in that: In the adaptive graph G-based search process, for a given query graph Q, a dynamic relationship table H is used to maintain the query dependency between nodes to further optimize the node matching strategy in the search process; Given a query graph Q, the dynamic relation table H is constructed based on predefined relations between nodes, namely query dependency inclusion and query dependency equivalence. These relations are defined by analyzing the structural features of nodes and their neighborhoods: a) Query dependencies include: Where QDN(v) represents the neighborhood set of node v relative to a specific node u in the query graph Q. The node labels of this neighborhood set must appear in the labels of the neighborhood of vertex u in the query graph. Then node v is called i Query dependencies include node v j ; b) Query dependency equivalence: Based on the query dependency inclusion, if there is a QDN (v i )=QDN(v j ), then we call node v i Query dependencies include node v j , then these two nodes are query dependency equivalent. In the given query graph search process, the query dependency equivalent nodes are merged into a super node to construct the dynamic relationship table H.

4. A method for graph compression based on the relationship between nodes and edges according to claim 1, characterized in that: Use adaptive graph G and dynamic relationship table H to integrate graph isomorphism algorithm: a) Initialize candidate nodes: C(u)={h∈H|SC-indegree(h)=0 and label(h)=label(u)} Here, C(u) is the candidate node set, and the supernode with the same label as the query node u and no semantic inclusion relationship in the adaptability graph, that is, SC-indegree is 0, is selected as the starting point; where, h is a candidate node that meets the conditions; H is a set of candidate nodes that meet the conditions; SC-indegree(h) indicates that the candidate node is not semantically included by any other candidate node; Label(h) is the label that identifies this candidate node and must be consistent with the label of the corresponding query node u; Label(u) is the label that identifies the query node u that is being searched for a match during the search process; b) Dynamic loading mechanism: The loading process of candidate nodes is dynamic and depends on the determined node matches and the relationship information in the dynamic relationship table: If f(u)=his successful, then load{h′∈children(h)|all SC-parents of h'arematched} That is, if node u) is successfully matched to supernode h), all child nodes h' of supernode h) are loaded, but the premise is that all SC parent nodes of h' have been matched; here, SC-parents h' indicates the parent node that identifies and contains all semantics of the current candidate node; c) Search process: The search process uses a backtracking strategy and optimizes the node matching of each step through a dynamic relationship table; the search uses the structure of super nodes and hyper edges to reduce computational complexity; d) Optimization strategy: The following optimization strategies are included: Heuristic node selection: Use degree heuristics to select the next node in the query graph, giving priority to nodes with high degrees or nodes with a small set of candidate nodes; Parallel processing: Exploiting the parallel processing capabilities of multi-core processors, different parts of the adaptability graph are assigned to different processing threads.

Citation Information

Patent Citations

  • A network graph index method based on adjacent node trees

    CN102662974A

  • Code search method and device based on semantics

    CN113434539A

  • Reinforcing bar and manufacturing method thereof

    KR1020250081338A

Cited By

  • Sub-hypergraph inclusion query method

    CN120011600A

  • A hierarchical adaptive compression representation of spatiotemporal conflict graphs oriented towards conflict prediction error constraints

    CN123115072A