A method for calculating the reachability probability of an uncertain graph based on landmark nodes

By building an index based on landmark nodes and calculating the reachability probability of the uncertain graph using the inclusion and repulsion principle, the problem of low computing efficiency in the prior art is solved, and efficient reachability probability calculation is achieved.

CN116662404BActive Publication Date: 2025-08-01ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310625216.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2025-08-01
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

The existing uncertain graph-reachable probability calculation methods are inefficient and time-consuming in large-scale networks, especially Monte Carlo sampling and recursive sampling methods require frequent resampling.

Method used

Using a method based on landmark nodes, the forward and reverse landmark nodes of each node are constructed through offline sampling, the reachability probability of nodes to landmark nodes is calculated using the convexity principle, and the reachability probability between a given node pair is calculated through the landmark nodes.

Benefits of technology

On the premise of ensuring the calculation accuracy, the calculation efficiency of the probability that the node pairs in the uncertain graph can be greatly improved, reducing the time-consuming of the sampling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662404B_ABST
    Figure CN116662404B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for calculating the reachability probability of an uncertain graph based on landmark nodes, including: (1) modeling the network in the real world into an uncertain graph; (2) constructing landmark nodes corresponding to each node by offline sampling; (3) calculating the reachability probability of each node to its landmark node; (4) calculating the reachability probability between a given pair of nodes through the landmark nodes. While ensuring that the calculation accuracy of the reachability probability between any two nodes in the uncertain graph is close to that of the mainstream method, the present invention improves the time efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of uncertain graphs in data mining, and particularly to a method for calculating the reachability probability of an uncertain graph based on landmark nodes. Background Art

[0002] In the field of data mining, an uncertain graph is a commonly used model. Many relationships in the real world are modeled as uncertain graphs. The reachability probability between two nodes in an uncertain graph, also known as two-terminal reliability, has a very wide range of applications. For example, due to unexpected traffic jams, a road network can be modeled as an uncertain graph, where nodes represent locations and edges represent roads between locations. The edge probability is set as the probability that there is no traffic jam on the road between two locations. The actual meaning of the reachability probability between two nodes is the probability that there is no traffic jam when starting from one location to another. There are also autonomous systems in computer networks. The connections between autonomous systems may fail due to external or internal reasons. Modeling it as an uncertain graph, the reachability probability between the nodes where two autonomous systems are located can measure the connection quality between them. In addition, the reachability probability between two nodes in an uncertain graph also has extensive uses in fields such as social, financial, computer science, and news dissemination.

[0003] Existing methods for calculating the reachability probability of an uncertain graph, such as the Monte Carlo sampling method, the recursive sampling method, and the fixed-width tree decomposition method, are all based on sampling. Each time these methods are used to calculate the reachability probability between two nodes, re-sampling is required. Therefore, it will consume a large amount of time in a large-scale uncertain graph. To solve this problem, the present invention is inspired by the field of shortest paths and proposes a method for calculating the reachability probability based on landmark nodes. Summary of the Invention

[0004] The present invention proposes a method for calculating the reachability probability of an uncertain graph based on landmark nodes, which improves the calculation efficiency of the reachability probability while the accuracy is close to that of mainstream methods. The method includes the following steps:

[0005] (1) Model the network in the real world as an uncertain graph;

[0006] (2) Offline sample to construct landmark nodes corresponding to each node;

[0007] (3) Calculate the reachability probability of each node to its landmark node;

[0008] (4) Calculate the reachability probability between a given pair of nodes through the landmark nodes.

[0009] For the offline construction of landmark nodes corresponding to each node in step (2), it includes the following steps:

[0010] Step (2.1) Let Where n = |V|, is the total number of nodes. Uniformly randomly sample r+1 sets of nodes, whose number of nodes is 1, 2, 2 respectively. 2 ,…,2 r , represented as a node set S0, S1,,…,S r .

[0011] Step (2.2) generates a node set S for each sample i And for each node v∈V in the uncertain graph, calculate the maximum path probability MaxPr(S i , v) and MaxPr(v, S i ), the maximum path probability is the maximum value of the product of the edge probabilities of all paths from one node to another. After taking the logarithm of the edge probability of the uncertain graph and then inverting it, the shortest path between two nodes corresponds to the path with the maximum path probability. Starting from node v, perform the single-source shortest path algorithm to reach the node set S i The algorithm ends immediately at any node in . Thus, for each node v∈V, a set of nodes S from node v is obtained. i The node l with the largest maximum path probability forward , while MaxPr(v, S i )=MaxPr(v,l forward ). Similarly, from the node set S i Starting from the reverse edge of node v, the single-source shortest path algorithm is used, and the algorithm ends at the node set S i Any node in backward Indicates. Node l forward and l backward is called node v in the node set S i The forward landmark nodes and reverse landmark nodes in r+1 sets of nodes will get r+1 sets of forward and reverse landmark nodes for each node.

[0012] Step (2.3) repeats steps (2.1) and (2.2) k times. For each node v∈V in the uncertain graph, a set of (r+1)k positive landmark node information L is stored. forward (v)={l i , i = 1, 2, ..., (r + 1) k-1, (r + 1) k}, and (r + 1) k reverse landmark node information set L backward (v)={l j , j = 1, 2, …, (r+1)k-1, (r+1)k}, the parameter k can control the number of landmark nodes.

[0013] Regarding the calculation of the reachability probability of each node to its landmark node in step (3), the feasibility basis is the principle of inclusion - exclusion, including the following steps:

[0014] In step (3.1), first calculate the maximum path probability MaxPr(v, l) from node v to landmark node l for d times. Initialize ans = 1. Each time after calculating the maximum path probability MaxPr(v, l) from node v to landmark node l using the single - source shortest - path algorithm, delete the edge where the maximum path probability is located. Restore all the deleted edges in the last calculation, and update ans = ans×(1 - MaxPr(v, l)). Finally, 1 - ans is the reachability probability from node v to landmark node l, denoted as R(v, l). The calculation of the reachability probability R(l, v) from landmark node l to node v is the same.

[0015] In step (3.2), store all the obtained reachability probabilities in the landmark node information set, and (r + 1)k forward landmark node information sets L forward (v) = {(l i , R(v, l i )) for i = 1, 2, …, (r + 1)k - 1, (r + 1)k} can be obtained, as well as (r + 1)k reverse landmark node information sets L backward (v) = {(l j , R(l j , v)) for j = 1, 2, …, (r + 1)k - 1, (r + 1)k}.

[0016] The working principle of the present invention is: using this index - based method of landmark nodes to make a good estimate of the reachability probability, transferring the main computational time - consuming part to the calculation of the reachability probability of each node to its landmark node in step (3), and using the principle of inclusion - exclusion to avoid the time - consuming sampling process.

[0017] The advantages of the present invention are: compared with the prior art, the present invention greatly improves the calculation efficiency of the reachability probability between given node pairs on the premise of ensuring the calculation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flowchart of a method for calculating the reachability probability of an uncertain graph based on landmark nodes according to the present invention.

[0019] Figure 2 is an example of calculating the reachability probability of each node to its landmark node in a method for calculating the reachability probability of an uncertain graph based on landmark nodes according to the present invention.

[0020] Figure 3It is a flowchart of a traffic congestion prediction method applying a method for calculating reachability probability of an uncertain graph based on landmark nodes of the present invention. Detailed implementation manners

[0021] The following will describe the specific implementation of the present invention in detail with reference to the accompanying drawings, and the invention will be described in detail in combination with the illustrated process.

[0022] Embodiment 1

[0023] As Figure 1 shown, the present invention provides a method for calculating reachability probability of an uncertain graph based on landmark nodes, including the following steps:

[0024] (1) Model the network in the real world to be analyzed into an uncertain graph, and reasonably set the edge probabilities according to the network properties;

[0025] (2) For the uncertain graph obtained in step (1), construct landmark nodes corresponding to each node through offline sampling. Each node in the uncertain graph will obtain (r + 1)k forward landmark nodes and reverse landmark nodes;

[0026] (3) For the landmark nodes obtained in step (2), calculate the reachability probability from each node to its landmark node. As Figure 2 shown, set the maximum number of path probability calculations d = 3. First, find the maximum path probability from node v to landmark node l. The initial maximum path probability MaxPr(v, l) is 0.5×0.5 = 0.25, and the path MaxPrPath(v, l) is v→u3→l. Update ans = 1 - MaxPr(v, l) = 0.75, and set the existence probabilities of all edges on MaxPrPath(v, l) to 0. Continue to find the maximum path probability from node v to landmark node l, and get the maximum path probability MaxPr(v, l) as 0.3×0.3 = 0.09, and the path MaxPrPath(v, l) is v→u2→l. Update ans = ans×(1 - MaxPr(v, l)) = 0.6825. Set the existence probabilities of all edges on v→u2→l to 0. Then find the maximum path probability from node v to landmark node l, and get the maximum path probability MaxPr(v, l) as 0.1×0.1 = 0.01, and the path MaxPrPath(v, l) is v→u1→l. Update ans = ans×(1 - MaxPr(v, l)) = 0.675675, and restore all the edges whose existence probabilities were set to 0 before for subsequent reachability probability calculations. At this time, there is no path from node v to landmark node l, and the finally calculated result R(v, l) = 1 - 0.675675 = 0.324325;

[0027] (4) For the reachability probability from each node to the landmark node calculated in step (3), calculate the reachability probability R(s, t) between the given node pair through the landmark node. The calculation formula is R(s, t) = max{R(s, l) × R(l, t), l ∈ L}, where L is the set of common landmark nodes in the set of forward landmark nodes of the source node s and the set of reverse landmark nodes of the target node t.

[0028] Embodiment 2

[0029] This embodiment is a traffic congestion prediction method applying the method for calculating the reachability probability of an uncertain graph based on landmark nodes of the present invention. As Figure 3 shown, it specifically includes the following steps:

[0030] (1) Model the road network into an uncertain graph, where the nodes represent locations and the edges represent the roads between the locations. The edge probability is set to the proportion of snapshots without traffic congestion in all snapshots of this road over a period of time.

[0031] (2) For the uncertain graph obtained in step (1), construct the corresponding landmark nodes for each node through offline sampling. Each node in the uncertain graph will obtain (r + 1)k forward landmark nodes and reverse landmark nodes.

[0032] (3) For the landmark nodes obtained in step (2), calculate the reachability probability from each node to its landmark node. For a single node, a total of (r + 1)k sets of forward landmark node information L forward (v) = {(l i , R(v, l i ))), i = 1, 2,..., (r + 1)k - 1, (r + 1)k} containing reachability probabilities can be obtained, and (r + 1)k sets of reverse landmark node information L backward (v) = {(l j , R(l j , v)), j = 1, 2,..., (r + 1)k - 1, (r + 1)k} containing reachability probabilities.

[0033] (4) For the reachability probability from each node to the landmark node calculated in step (3), calculate the reachability probability R(s, t) between the given node pair through the landmark node. The calculation formula is R(s, t) = max{R(s, l) × R(l, t), l ∈ L}, where L is the set of common landmark nodes in the set of forward landmark nodes of the source node s and the set of reverse landmark nodes of the target node t.

[0034] (5) Based on the reachability probability R(s, t) between the given node pairs obtained in step (4), traffic jam prediction can be carried out. The actual meaning of the reachability probability R(s, t) is the probability that there is no traffic jam between the corresponding locations. The larger the probability, the greater the likelihood that there is no traffic jam between these two locations, which is used as a basis for travel.

[0035] Finally, it should be noted that the above embodiments are only relatively representative examples of the present invention. Obviously, the technical solution of the present invention is not limited to the above embodiments, and there can be different solutions for the steps in the claims. Those of ordinary skill in the art can make various modifications or changes to the above embodiments without departing from the inventive concept of the present invention. Therefore, the protection scope of the present invention is not limited by the above embodiments, but should be the maximum scope that conforms to the innovative features mentioned in the claims.

Claims

1. A method for calculating the reachability probability of an uncertain graph based on landmark nodes, characterized by the following steps: (1) Model the network in the real world into an uncertain graph; (2) Offline sampling to construct landmark nodes corresponding to each node; (3) Calculate the reachability probability of each node to its landmark node; the specific steps are as follows: (3.1) First, calculate the maximum path probability MaxPr(v, l) from node v to landmark node l for d times. The parameter d is adjusted according to the actual situation. Initialize ans = 1. After each time using the single-source shortest path algorithm to calculate the maximum path probability MaxPr(v, l) from node v to landmark node l, delete the edge where the maximum path probability is located. Restore all the deleted edges in the last calculation, and update ans = ans × (1 - MaxPr(v, l)); finally, 1 - ans is the reachability probability from node v to landmark node l, denoted as R(v, l); the calculation of the reachability probability R(l, v) from landmark node l to node v is the same; (3.2) Store all the obtained reachability probabilities in the landmark node information set to obtain a set \(L\) of \((r + 1)k\) forward landmark node information containing reachability probabilities. forward \(L^{(v)}=\{(l\) i , \(R(v, l\) i \())), i = 1, 2, \(\cdots\), \((r + 1)k - 1, (r + 1)k\}\), and a set \(L^{(v)}\) of \((r + 1)k\) backward landmark node information containing reachability probabilities backward \(L^{(v)}=\{(l\) j , \(R(l\) j , \(v)), j = 1, 2, \(\cdots\), \((r + 1)k - 1, (r + 1)k\}\); (4) Calculate the reachability probability between given node pairs through landmark nodes; the specific steps are as follows: Take out the set of forward landmark node information of the source node s and the set of reverse landmark node information of the target node t, find the set of common landmark nodes L. For l ∈ L, multiply the corresponding forward reachability probability R(s, l) and reverse reachability probability R(l, t), and take the maximum value as the reachability probability.

2. The method for calculating the reachability probability of an uncertain graph based on landmark nodes according to claim 1, wherein The specific steps of the offline sampling in step (2) to construct landmark nodes corresponding to each node are as follows: (2.1) Let where n = |V|, which is the total number of nodes; uniformly and randomly sample r + 1 sets of node sets, and their numbers of nodes are 1, 2, 2 2 , …, 2 r , denoted as node sets S0, S1, …, S r ; (2.2) For each node set S generated by sampling i and for each node v ∈ V in the uncertain graph, calculate the maximum path probability MaxPr(S i , v) and MaxPr(v, S i ). The maximum path probability is the maximum value of the products of the probabilities of all edges on all paths from one node to another node; after taking the logarithm of the uncertain graph edge probabilities and then taking the negative, the shortest path between two nodes corresponds to the path where the maximum path probability lies; Starting from node v, perform the single-source shortest path algorithm to reach the node set S i The algorithm ends immediately at any node in ; thus, for each node v∈V, a set of nodes S from node v is obtained. i The node l with the largest maximum path probability forward , while MaxPr(v,S i )=MaxPr(v,l forward ); Similarly, from the node set S i Starting from the reverse edge of node v, the single-source shortest path algorithm is used, and the algorithm ends at the node set S i Any node in backward Represents; node l forward and l backward is called node v in the node set S i The forward landmark nodes and reverse landmark nodes in the r+1 set of nodes will get r+1 sets of forward and reverse landmark nodes for each node; (2.3) Repeat steps (2.1) and (2.2) k times. For each node v ∈ V in the uncertain graph, (r + 1)k sets of forward landmark node information L forward (v) = {l i , i = 1, 2, …, (r + 1)k - 1, (r + 1)k}, and (r + 1)k sets of reverse landmark node information l backward (v) = {l j , j = 1, 2, …, (r + 1)k - 1, (r + 1)k} are stored. The parameter k controls the number of landmark nodes. Larger uncertain graphs require more landmark nodes to achieve a good reachability probability estimate.