A method for measuring structural information of dynamic graphs

By dynamically adjusting the encoding tree and incremental measurement, the decomposition of the entropy of the graph structure is global and local variables, solving the problem of high complexity of the dynamic graph structure information calculation, and achieving low complexity and fast and accurate structural information measurement.

CN115063495BActive Publication Date: 2024-11-19BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210593796.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2024-11-19
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

When measuring the structural information of dynamic graphs, the calculation complexity is high and the incremental modification of the encoding tree cannot be supported, resulting in the rapid and accurate measurement of the structural entropy of multiple time points becoming a difficult point.

Method used

Using the method of dynamically adjusting the encoding tree based on the structure data at the previous moment, the entropy of one-dimensional and two-dimensional graph structures is measured by incremental measurements, and the entropy of the changing graph structures is decomposed into global invariant and local change quantities, and the two-dimensional encoding tree is dynamically adjusted. Use fast calculation of the two-dimensional structural entropy of the dynamic graph.

Benefits of technology

It significantly reduces the complexity of structural entropy calculation and reduces time overhead. The maintenance complexity is only related to the incremental scale. It is suitable for large-scale graph data and avoids the huge overhead caused by the calculation of the entire graph.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115063495B_ABST
    Figure CN115063495B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for measuring structural information of a dynamic graph, comprising the steps of: obtaining a connected graph of the dynamic graph and a coding tree of the connected graph; based on the connected graph of the dynamic graph and the one-dimensional coding tree of the connected graph, using an incremental method to measure the one-dimensional graph structural entropy at the next moment, and decomposing the changed graph structural entropy into a global invariant and a local variation; based on the connected graph of the dynamic graph and the two-dimensional coding tree of the connected graph, using a strategy of dynamically adjusting the two-dimensional coding tree, quickly measuring the two-dimensional structural entropy of the dynamic graph. The present invention dynamically adjusts the coding tree based on the structural data of the previous moment, significantly reducing the computational complexity of measuring structural entropy, and solving the problem of high complexity and large time overhead in calculating the structural information of the dynamic graph in the existing method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of dynamic graph processing, and in particular relates to a method for measuring structural information of a dynamic graph. Background Art

[0002] The big data space in the real world is an object generated by the objective world, which has rules, noise and randomness. The rules are embedded in the large-scale noise structure, and the fundamental task of information processing is to decode the rules embedded in the large-scale noise structure. The structural information theory proposed by Li and Pan can measure the information embedded in complex systems. This amount of information can distinguish the rules and noise of cyberspace big data, thereby decoding the rules embedded in the large-scale noise structure. Structural information theory has great application value in the fields of biological data mining, information security, and graph neural network embedding dimension estimation.

[0003] The central idea of ​​structural information theory is that any graph structure data G can be decoded into a coding tree T. The coding tree T gives a code for the graph G, which minimizes the uncertainty in the sense of random walk in G. In essence, the coding tree is a hierarchical division of the graph nodes. According to the coding tree, the structural entropy of the graph G determined by T can be defined. It is theoretically proved that there is an optimal division that minimizes the corresponding structural entropy. The minimum value of this structural entropy is the structural information of the graph (graph structural entropy). The optimal coding tree that minimizes the structural entropy is called the essential structure of the graph G. The essential structure is an optimal hierarchical division of the node set of the graph G. Measuring the structural information of a graph means finding the optimal coding tree of the graph and calculating its corresponding structural entropy based on the principle of minimizing the structural entropy.

[0004] The methods proposed in the prior art still have many problems when measuring the structural information of dynamic graphs, as follows:

[0005] First, if you want to measure the structural information of a dynamic graph, you need to calculate the graph structural entropy at all time points. However, using the traditional structural entropy minimization algorithm, you need to reparse the coding tree at each time point and calculate its corresponding structural entropy. According to the definition, the time complexity of calculating from scratch increases dramatically, resulting in a sharp increase in computational overhead.

[0006] Existing structural entropy calculation algorithms do not support incremental modification of the coding tree, and can only reparse the coding tree after each modification. Therefore, how to quickly and accurately measure the structural entropy at multiple time points has become a major difficulty in calculating the structural information of dynamic graphs. Summary of the invention

[0007] In order to solve the above problems, the present invention proposes a method for measuring the structural information of dynamic graphs, which dynamically adjusts the coding tree based on the structural data of the previous moment, significantly reduces the computational complexity of measuring the structural entropy, and is used to solve the dilemma of high complexity and high time cost in calculating the structural information of dynamic graphs in existing methods.

[0008] To achieve the above object, the technical solution adopted by the present invention is: a method for measuring structural information of a dynamic graph, comprising the steps of:

[0009] Obtain a connectivity graph of the dynamic graph and a coding tree of the connectivity graph;

[0010] Based on the connectivity graph of the dynamic graph and the one-dimensional coding tree of the connectivity graph, the one-dimensional graph structure entropy at the next moment is measured incrementally to decompose the changed graph structure entropy into global invariants and local changes.

[0011] Based on the connectivity graph of the dynamic graph and the two-dimensional coding tree of the connectivity graph, the two-dimensional structural entropy of the dynamic graph is quickly measured by utilizing the strategy of dynamically adjusting the two-dimensional coding tree.

[0012] Furthermore, the connected graph G = (V, E) of the dynamic graph and the coding tree T of the connected graph G are obtained; in the connected graph, V represents the node set, and E represents the edge set; each node α in the coding tree T has a label T α ; The structural information of the connected graph G is determined by the coding tree T.

[0013] Furthermore, using the incremental method to measure the one-dimensional graph structure entropy at the next moment includes the following steps:

[0014] Determine the one-dimensional graph structure entropy of the connected graph G by using the structural information of the connected graph G determined by the one-dimensional coding tree T1;

[0015] According to the dynamic graph, new edges or vertices are added to the connected graph G to form a new graph G', and the one-dimensional graph structure entropy of the new graph G' is calculated;

[0016] According to the one-dimensional graph structure entropy of the new graph G', the scale increment parameter is determined, thereby defining a one-dimensional global invariant and a one-dimensional local variation;

[0017] The one-dimensional structural entropy after the increment is obtained is expressed as the sum of the one-dimensional global invariant and the one-dimensional local variation.

[0018] Furthermore, the case of adding a vertex includes adding an isolated vertex and adding an edge connecting the isolated vertex and a vertex on the graph; since adding an isolated vertex does not affect the one-dimensional structural entropy of the graph, it is essentially equivalent to adding an edge.

[0019] Furthermore, using the structural information of the connected graph G determined by the coding tree T1, the one-dimensional graph structural entropy of the connected graph G is determined as:

[0020]

[0021] Among them, d i Represents node v i , λ represents the root node, and m is the number of edges of graph G.

[0022] Furthermore, the dynamic adjustment strategy of the two-dimensional coding tree includes:

[0023] ① Traverse the ordered sequence of incremental edges at time t+1 in sequence. If a certain increment adds a new edge (v1, v2) between the nodes in the two graphs, the coding tree remains unchanged;

[0024] ② If a new node v is connected to the node u in community α in the graph, then the node set T of community α α =T α ∪{v}, ∪ represents the string concatenation operation.

[0025] Furthermore, the structural information determined by the two-dimensional coding tree T2 is used by the connected graph G;

[0026] And according to the dynamic graph, the connected graph G is affected by the incremental sequence of size n at time t+1 and becomes G", and the encoding tree at time t+1 is T2', and the two-dimensional graph structure entropy of the new graph G" is constructed;

[0027] According to the two-dimensional graph structure entropy of the new graph G", the scale increment parameter is determined, thereby defining the two-dimensional global invariant and the two-dimensional local variation;

[0028] The two-dimensional structural entropy after the increment is obtained is expressed as the sum of the two-dimensional global invariant and the two-dimensional local variation.

[0029] Furthermore, using the structural information of the connected graph G determined by the two-dimensional coding tree T2, the two-dimensional graph structural entropy of the connected graph G is determined as:

[0030]

[0031] Among them, α1, α2, …, α r It means that the nodes in the graph are divided into r communities by the encoding tree, where and Represents community α i The number and capacity of cutting edges, Represents community α i The node set in G; m represents the number of edges in G, d j Represents node v j The degree.

[0032] Furthermore, in the process of dynamically calculating the two-dimensional structural entropy using the structural information of the connected graph G determined by the two-dimensional coding tree T2, the properties of the connected graph at time t are maintained as follows:

[0033] ①The degree d of each vertex i ;

[0034] ②The capacity of each community V α and cutting edge g α ;

[0035] ③The total number of edges in the entire graph is m;

[0036] ④ Σ i∈V d i logd i and G ;

[0037] At time t+1, for a given increment sequence θ, the following increment information is counted to calculate the structural entropy:

[0038] ①Incremental scale n;

[0039] ②The number of cross-community edges n cr , thereby calculating the increment of the graph cut edge δ g (G) = 2n cr ;

[0040] ③The degree increment δ(v i );

[0041] ④ The cut edge increment δ of all nodes involved in θ g (α i ) and capacity increment δ V (α i ).

[0042] The beneficial effects of adopting this technical solution are:

[0043] The present invention has low time complexity: each calculation of the structural entropy of the dynamic graph utilizes the structural information of the previous time point, thereby greatly reducing the time cost. Specifically, the complexity of maintenance is only related to the incremental scale. The corresponding cost is that only a few parameters need to be maintained, and the additional space cost is small.

[0044] The present invention is explainable: the fast measurement of the two-dimensional structural entropy of the dynamic graph is based on the strategy of dynamically adjusting the two-dimensional coding tree, which assumes that when a graph is large enough, the division of the community structure will tend to be stable under a small amount of increments. The emergence of a new edge will hardly affect the division of the node. A new node is often divided into the community where the node it is directly connected to is located.

[0045] The present invention has a wide range of applications: there are a large number of large-scale graph data in the real world. The present invention is applicable to any graph data and the calculation method avoids the huge overhead caused by calculating the structural entropy of the entire graph each time, so it can be applied to various graph structures. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 The present invention is a flow chart of a method for measuring structural information of a dynamic graph. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described below with reference to the accompanying drawings.

[0048] In this embodiment, see Figure 1 As shown, the present invention proposes a method for measuring structural information of a dynamic graph, comprising the steps of:

[0049] Obtain a connectivity graph of the dynamic graph and a coding tree of the connectivity graph;

[0050] Based on the connectivity graph of the dynamic graph and the one-dimensional coding tree of the connectivity graph, the one-dimensional graph structure entropy at the next moment is incrementally measured, and the structure data at the previous moment is used to greatly reduce the computational complexity; the graph structure entropy after the change is decomposed into global invariants and local changes, providing a new perspective for processing the structural entropy increment;

[0051] Based on the connectivity graph of the dynamic graph and the two-dimensional coding tree of the connectivity graph, the two-dimensional structural entropy of the dynamic graph is quickly measured by utilizing the strategy of dynamically adjusting the two-dimensional coding tree.

[0052] As an optimization solution of the above embodiment: obtaining the connectivity graph of the dynamic graph and the coding tree of the connectivity graph, the specific solution is:

[0053] Get the connected graph G = (V, E) of the dynamic graph and the coding tree T of the connected graph G; V in the connected graph represents the node set, and E represents the edge set; each node α in the coding tree T has a label T α ; The structural information of the connected graph G is determined by the coding tree T.

[0054] As an optimization solution of the above embodiment, using incremental measurement of the one-dimensional graph structure entropy at the next moment includes the following steps:

[0055] Determine the one-dimensional graph structure entropy of the connected graph G by using the structural information of the connected graph G determined by the one-dimensional coding tree T1;

[0056] According to the dynamic graph, new edges or vertices are added to the connected graph G to form a new graph G', and the one-dimensional graph structure entropy of the new graph G' is constructed;

[0057] According to the one-dimensional graph structure entropy of the new graph G', the scale increment parameter is determined, thereby defining a one-dimensional global invariant and a one-dimensional local variation;

[0058] The one-dimensional structural entropy after the increment is obtained is expressed as the sum of the one-dimensional global invariant and the one-dimensional local variation.

[0059] Among them: using the structural information of the connected graph G determined by the coding tree T1, the one-dimensional graph structure entropy of the connected graph G is determined as:

[0060]

[0061] Among them, d i Represents node v i , λ represents the root node, and m is the number of edges of graph G.

[0062] Specifically, there are two basic operations on dynamic graphs: ① adding an edge; ② adding a vertex.

[0063] ①Add edge (v k ,v l ), since no new nodes are added, the one-dimensional coding tree of the new graph G' is still T1; the one-dimensional structural entropy of graph G' is written as:

[0064]

[0065]

[0066] Define a one-dimensional global invariant:

[0067]

[0068] δ is the scale increment parameter, which corresponds to the first term of the one-dimensional structural entropy of the new graph G' and is only related to the number of increments, and has nothing to do with the positions of the δ newly added edges.

[0069] Define one-dimensional local variation:

[0070]

[0071] This value corresponds to the second term of the one-dimensional structural entropy of the new graph G', which is related to the number of increments and the position of the newly added edges.

[0072] ② For the case of adding a vertex, it includes adding an isolated vertex and adding an edge connecting the isolated vertex and a vertex on the graph; since adding an isolated vertex does not affect the one-dimensional structural entropy of the graph, it is essentially equivalent to adding an edge.

[0073] Assume that the one-dimensional coding tree after adding vertex v is T1', and vertex v is connected to vertex u. The one-dimensional structural entropy determined by T' is:

[0074]

[0075] As an optimization solution of the above embodiment: the dynamic adjustment strategy of the two-dimensional coding tree includes:

[0076] ① Traverse the ordered sequence of incremental edges at time t+1 in sequence. If a certain increment adds a new edge (v1, v2) between the nodes in the two graphs, the coding tree remains unchanged;

[0077] ② If a new node v is connected to the node u in community α in the graph, then the node set T of community α α =T α ∪{v}, ∪ represents the string concatenation operation.

[0078] As an optimization solution of the above embodiment: using the structural information determined by the two-dimensional coding tree T2 of the connected graph G;

[0079] And according to the dynamic graph, the connected graph G is affected by the incremental sequence of size n at time t+1 and becomes G", and the encoding tree at time t+1 is T2', and the two-dimensional graph structure entropy of the new graph G" is constructed;

[0080] According to the two-dimensional graph structure entropy of the new graph G”, the scale increment parameter is determined, thereby defining the two-dimensional global invariant and the two-dimensional local variation;

[0081] The two-dimensional structural entropy after the increment is obtained is expressed as the sum of the two-dimensional global invariant and the two-dimensional local variation.

[0082] Specifically: Using the structural information of the connected graph G determined by the two-dimensional coding tree T 2, the two-dimensional graph structural entropy of the connected graph G is determined as:

[0083]

[0084] Among them, α1, α2, …, α r It means that the nodes in the graph are divided into r communities by the encoding tree, where and Represents community α i The number and capacity of cutting edges, Represents community α i The node set in G; m represents the number of edges in G, d j Represents node v j The degree.

[0085] Assume that graph G is affected by an incremental sequence of size n at time t+1 and becomes G". Let the coding tree at time t+1 be T2', the following inference holds:

[0086]

[0087] The incremental sequence at time t+1 is defined as an ordered sequence of incremental edges θ = {(v1,u1)→(v2,u2)→…→(v n ,u n )}. Let the set of communities where all the nodes involved in the incremental edges are located be the changing community set A = {α1, α2, ...}, where community α i The capacity increment δ V (α i ) is defined as the capacity change of the community. Obviously, ∑ α∈A δ V (α) = 2n. g (α i ) represents community α i The change of the cut edge, and the change of the cut edge of graph G is δ g (G) = ∑ α∈A δ g (α). Assume Represents community α i The set of nodes whose degree changes occur. The increment δ(v k ) is defined as the change in the node degree. The changed two-dimensional structural entropy can be written as:

[0088]

[0089]

[0090] Define a two-dimensional global invariant:

[0091]

[0092] Where n is the scale increment parameter, which is similar to the one-dimensional structural entropy. This value is only related to the number of increments and has nothing to do with the increment position.

[0093] Define the two-dimensional local variation:

[0094]

[0095] This value corresponds to the second term of the two-dimensional structural entropy of the new graph G', which is related to the number of increments and the positions of the newly added edges.

[0096] In order to ensure the feasibility of incremental calculation, the properties of the connected graph at time t are maintained as follows:

[0097] ①The degree d of each vertex i ;

[0098] ②The capacity of each community V α and cutting edge g α ;

[0099] ③The total number of edges in the entire graph is m;

[0100] ④ Σ i∈V d i logd i and G ;

[0101] At time t+1, for a given increment sequence θ, the following increment information is counted to calculate the structural entropy:

[0102] ①Incremental scale n;

[0103] ②The number of cross-community edges n cr , thereby calculating the increment of the graph cut edge δ g (G) = 2n cr ;

[0104] ③The degree increment δ(v i );

[0105] ④ The cut edge increment δ of all nodes involved in θ g (α i ) and capacity increment δ V (α i ).

[0106] By expressing the two-dimensional structural entropy after the increment as the sum of the global invariant and the local change, if the structural information at time t is known, we can calculate the global invariant at any increment scale n with a time complexity of O(1). In addition, the local change can be calculated with a time complexity of O(n). In addition, the maintenance of the graph properties mentioned above also only requires O(n). Therefore, the time complexity of incremental calculation of the two-dimensional structural entropy is reduced to O(n). In contrast, using the definition to calculate the two-dimensional structural entropy requires O(r+|V|).

[0107] The present invention divides the dynamic graph structural information increment into global invariants and local variations, and only needs to maintain a small number of parameters with very small time complexity to quickly and accurately calculate the one-dimensional and two-dimensional structural entropy of the graph. The complexity of maintenance is only related to the increment scale n, and has nothing to do with the number of nodes and edges of the graph G, which is in line with the characteristics of the real world system and has strong practical significance.

[0108] The present invention proposes a strategy for dynamically adjusting a two-dimensional coding tree for quickly measuring the two-dimensional structural entropy of a dynamic graph. This strategy has a certain theoretical basis, making the two-dimensional structural information measurement method interpretable.

[0109] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for measuring structural information of a dynamic graph, characterized in that: Includes steps: Obtain a connectivity graph of the dynamic graph and a coding tree of the connectivity graph; Obtain the connected graph G = (V, E) of the dynamic graph and the coding tree T of the connected graph G; in the connected graph, V represents a node set, and E represents an edge set; each node in the coding tree T has a label; the structural information of the connected graph G is determined by the coding tree T; Based on the connectivity graph of the dynamic graph and the one-dimensional coding tree of the connectivity graph, the one-dimensional graph structure entropy of the next moment is measured incrementally to decompose the changed graph structure entropy into global invariants and local changes. The incremental measurement of the one-dimensional graph structure entropy at the next moment includes the following steps: Determine the one-dimensional graph structure entropy of the connected graph G by using the structural information of the connected graph G determined by the one-dimensional coding tree T1; According to the dynamic graph, new edges or vertices are added to the connected graph G to form a new graph G', and the one-dimensional graph structure entropy of the new graph G' is calculated; According to the one-dimensional graph structure entropy of the new graph G', the scale increment parameter is determined, thereby defining a one-dimensional global invariant and a one-dimensional local variation; The one-dimensional structural entropy after the increment is obtained is expressed as the sum of the one-dimensional global invariant and the one-dimensional local variation; Based on the connectivity graph of the dynamic graph and the two-dimensional coding tree of the connectivity graph, the two-dimensional structural entropy of the dynamic graph is quickly measured by using the dynamic adjustment strategy of the two-dimensional coding tree; The dynamic adjustment strategy of the two-dimensional coding tree includes: ① Traverse the ordered sequence of incremental edges at time t+1 in sequence. If a certain increment adds a new edge (v1, v2) between the nodes in the two graphs, the coding tree remains unchanged; ② If a new node v is connected to the node u in community α in the graph, then the node set V of community α α =V α ∪{v}, ∪ represents the string concatenation operation.

2. A method for measuring structural information of a dynamic graph according to claim 1, characterized in that: The case of adding a vertex includes adding an isolated vertex and adding an edge connecting the isolated vertex and a vertex on the graph; since adding an isolated vertex does not affect the one-dimensional structural entropy of the graph, it is essentially equivalent to adding an edge.

3. The method for measuring structural information of a dynamic graph according to claim 1, characterized in that: Using the structural information of the connected graph G determined by the one-dimensional coding tree T1, the one-dimensional graph structural entropy of the connected graph G is determined as: Among them, d i Represents node v i , λ represents the root node, and m is the number of edges of graph G.

4. The method for measuring structural information of a dynamic graph according to claim 1, characterized in that: The structure information of the connected graph G is determined by the two-dimensional coding tree T2; And according to the dynamic graph, the connected graph G is affected by the incremental sequence of size n at time t+1 and becomes G", and the encoding tree at time t+1 is T2', and the two-dimensional graph structure entropy of the new graph G" is constructed; According to the two-dimensional graph structure entropy of the new graph G", the scale increment parameter is determined, thereby defining the two-dimensional global invariant and the two-dimensional local variation; The two-dimensional structural entropy after the increment is obtained is expressed as the sum of the two-dimensional global invariant and the two-dimensional local variation.

5. A method for measuring structural information of a dynamic graph according to claim 4, characterized in that: Using the structural information of the connected graph G determined by the two-dimensional coding tree T2, the two-dimensional graph structural entropy of the connected graph G is determined as: Among them, α1, α2, …, α r It means that the nodes in the graph are divided into r communities by the encoding tree, where and Represents community α i The number and capacity of cutting edges, Represents community α i The node set in G; m represents the number of edges in G, d j Represents node v j The degree.

6. A method for measuring structural information of a dynamic graph according to claim 4, characterized in that: Using the structural information of the connected graph G determined by the two-dimensional coding tree T2, in the process of dynamically calculating the two-dimensional structural entropy, the properties of the connected graph at time t are maintained as follows: ①The degree d of each vertex i ; ② The node set V of community α α and cutting edge g α ; ③The total number of edges in the entire graph is m; ④ and G ; At time t+1, for a given increment sequence θ, the following increment information is counted to calculate the structural entropy: ①Incremental scale n; ②The number of cross-community edges n cr , thereby calculating the increment of the graph cut edge δ g (G) = 2n cr ; ③The degree increment δ(v i ); ④ The cut edge increment δ of all nodes involved in θ g (α i ) and capacity increment δ V (α i ).