A method and device for estimating betweenness centrality based on sampling strategy

Through the betweenness centrality estimation method based on sampling strategy, by processing the centrality information of network nodes, selecting node sets, and calculating the approximate value of betweenness centrality, the problem of slow calculation speed in large-scale networks is solved, and low error and stable calculation efficiency are achieved.

CN120223573BActive Publication Date: 2025-09-30NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510441455.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-09-30
Estimated Expiration
2045-04-09

AI Technical Summary

Technical Problem

Traditional betweenness centrality calculation methods are difficult to meet the computational requirements of large-scale networks, and it is hoped that the computational speed can be accelerated by reducing some of the computational precision.

Method used

The betweenness centrality estimation method based on sampling strategy is adopted to obtain centrality information by processing network nodes, select node sets, and calculate the approximate betweenness centrality value.

Benefits of technology

The low-error and stable betweenness centrality calculation in large-scale networks is achieved, with obvious error regularity and improved computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223573B_ABST
    Figure CN120223573B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for estimating betweenness centrality based on a sampling strategy. The method comprises: processing a network G to obtain centrality information of network nodes; processing the centrality information of the network nodes to obtain a selected node set S; and processing the selected node set S to obtain an approximate betweenness centrality value. The method of the present invention has low calculation error, more obvious error patterns, more stable changes, and better results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network technology, and in particular to a betweenness centrality estimation method and device based on a sampling strategy. Background Art

[0002] Since the 21st century, human society has experienced rapid informatization, with the widespread adoption of mobile internet and the rapid deployment of the Internet of Things (IoT). This has led to a significant increase in the number of connected devices, and the increasing complexity of both the number of physical network devices and their connections. Real networks across diverse sectors, such as power grids, telecommunications networks, transportation networks, social networks, communication networks, and the Internet of Things, have formed a vast and encompassing online world.

[0003] By abstracting different real networks, the corresponding abstract networks often exhibit the same network properties. The systematic study of the properties and laws of abstract networks has formed the rich complex network science. The main research topics of complex network science include network centrality measurement and global network characteristics, network model structure and function analysis, network link prediction and recommendation algorithms, network dynamics, network control and optimization, etc. Network centrality measurement research plays a fundamental role in complex network science. In order to characterize the importance of nodes and edges in the network, researchers have proposed a variety of network centrality measures to evaluate the centrality of nodes and edges in the network from multiple perspectives. Network centrality measures mainly characterize the importance of nodes and edges in the network, and provide theoretical support for the identification of key nodes and key edges in real networks.

[0004] Betweenness centrality is a metric that characterizes the importance of a node or edge in a network from the perspective of network connectivity. It is also a key research topic in complex networks, and the study of its rapid calculation methods has far-reaching practical significance. For example, ranking the influence of core nodes in a social network can attract users and conduct targeted online marketing. By controlling the leader of a terrorist organization, the entire terrorist organization can be controlled, thereby preventing terrorist attacks. By protecting key servers in the network, it is possible to prevent them from being attacked by viruses or hackers, thereby ensuring the normal operation of the entire network. By isolating the source of infection, the spread of infectious diseases can be effectively prevented. In these practical applications, it is necessary to know the importance of each node in the network in order to identify key nodes.

[0005] However, as the number of nodes in a network increases and the connections between them become denser, the network's topology becomes increasingly complex. Traditional betweenness centrality calculation methods struggle to fully meet the requirements for calculating betweenness centrality in large-scale networks. Researchers hope to speed up calculations by reducing some of the computational precision, thereby achieving the goal of calculating betweenness centrality in large-scale networks. Therefore, the approximate calculation of betweenness centrality has become a hot topic in the field of complex network analysis. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a method and device for estimating betweenness centrality based on a sampling strategy, which speeds up the calculation by reducing some calculation precision, so as to achieve the purpose of calculating betweenness centrality in large-scale networks.

[0007] In order to solve the above technical problems, a first aspect of an embodiment of the present invention discloses a betweenness centrality estimation method based on a sampling strategy, the method comprising:

[0008] S1, processes the network G to obtain the centrality information of the network nodes;

[0009] S2, processing the centrality information of the network nodes to obtain a selected node set S;

[0010] S3, processing the selected node set S to obtain an approximate value of betweenness centrality.

[0011] As an optional implementation manner, in the first aspect of the embodiment of the present invention, processing the network G to obtain centrality information of the network nodes includes:

[0012] S11, processing the network G to obtain network system parameter information; the network system parameter information includes the extraction ratio p of the network nodes and the termination condition;

[0013] S12, using a centrality calculation model of a network node and processing the network G according to the network system parameter information to obtain centrality information of the network node;

[0014] The centrality calculation model expression of the network node is:

[0015]

[0016] Among them, PR(i) is the centrality information of node i, PR(j) is the centrality information of node j, c is the random jump probability, n is the number of vertices in the network, is the out-degree of node j, a ij is the weight between node i and node j.

[0017] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the centrality information of the network nodes to obtain the selected node set S includes:

[0018] S21, sorting the nodes of the network G according to the centrality information of the network nodes to obtain an ordered sequence of network nodes;

[0019] S22, selecting the first p·n nodes from the ordered sequence of network nodes to obtain a selected node set S.

[0020] As an optional implementation manner, in the first aspect of the embodiment of the present invention, processing the selected node set S to obtain an approximate betweenness centrality value includes:

[0021] S31, traversing the selected node set S to obtain the shortest path between the nodes;

[0022] S32, processing the shortest path between the nodes and the selected node set S to obtain the number of times the shortest path between the nodes passes through each vertex and edge in the network;

[0023] S33 , processing the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network to obtain an approximate value of betweenness centrality.

[0024] As an optional implementation manner, in the first aspect of the embodiment of the present invention, processing the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network to obtain an approximate betweenness centrality value includes:

[0025] Using a betweenness centrality approximation calculation model, the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network are processed to obtain an approximate betweenness centrality value;

[0026] The betweenness centrality approximate value calculation model expression is:

[0027]

[0028] Among them, σ(v i ,v j ) is the node v i To node v j The number of shortest paths, σ(v i ,v j |v) is node v i To node v j The number of shortest paths passing through node v, V is the vertex set of network G, and Bet(v) is the approximate betweenness centrality of node v.

[0029] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the expression of the network G is:

[0030] G=(V,E)

[0031] Among them, V represents the vertex set of the network, E represents the edge set of the network, n = |V| represents the number of vertices in the network, and m = |E| represents the number of edges in the network.

[0032] A second aspect of an embodiment of the present invention discloses a device for estimating betweenness centrality based on a sampling strategy, the device comprising:

[0033] The centrality information calculation module is used to process the network G and obtain the centrality information of the network nodes;

[0034] A selected node set calculation module is used to process the centrality information of the network nodes to obtain a selected node set S;

[0035] The betweenness centrality approximate value calculation module is used to process the selected node set S to obtain the betweenness centrality approximate value.

[0036] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the processing of the network G to obtain the centrality information of the network nodes includes:

[0037] S11, processing the network G to obtain network system parameter information; the network system parameter information includes the extraction ratio p of the network nodes and the termination condition;

[0038] S12, using a centrality calculation model of a network node and processing the network G according to the network system parameter information to obtain centrality information of the network node;

[0039] The centrality calculation model expression of the network node is:

[0040]

[0041] Among them, PR(i) is the centrality information of node i, PR(j) is the centrality information of node j, c is the random jump probability, n is the number of vertices in the network, is the out-degree of node j, a ij is the weight between node i and node j.

[0042] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the processing of the centrality information of the network nodes to obtain the selected node set S includes:

[0043] S21, sorting the nodes of the network G according to the centrality information of the network nodes to obtain an ordered sequence of network nodes;

[0044] S22, selecting the first p·n nodes from the ordered sequence of network nodes to obtain a selected node set S.

[0045] As an optional implementation manner, in the second aspect of the embodiment of the present invention, processing the selected node set S to obtain an approximate betweenness centrality value includes:

[0046] S31, traversing the selected node set S to obtain the shortest path between the nodes;

[0047] S32, processing the shortest path between the nodes and the selected node set S to obtain the number of times the shortest path between the nodes passes through each vertex and edge in the network;

[0048] S33 , processing the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network to obtain an approximate value of betweenness centrality.

[0049] As an optional implementation, in the second aspect of the embodiment of the present invention, processing the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network to obtain an approximate betweenness centrality value includes:

[0050] Using a betweenness centrality approximation calculation model, the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network are processed to obtain an approximate betweenness centrality value;

[0051] The betweenness centrality approximate value calculation model expression is:

[0052]

[0053] Among them, σ(v i ,v j ) is the node v i To node v j The number of shortest paths, σ(v i ,v j |v) is node v i To node v j The number of shortest paths passing through node v, V is the vertex set of network G, and Bet(v) is the approximate betweenness centrality of node v.

[0054] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the expression of the network G is:

[0055] G=(V,E)

[0056] Among them, V represents the vertex set of the network, E represents the edge set of the network, n = |V| represents the number of vertices in the network, and m = |E| represents the number of edges in the network.

[0057] The third aspect of the present invention discloses another betweenness centrality estimation device based on a sampling strategy, the device comprising:

[0058] a memory storing executable program code;

[0059] a processor coupled to the memory;

[0060] The processor calls the executable program code stored in the memory to execute part or all of the steps in the betweenness centrality estimation method based on sampling strategy disclosed in the first aspect of the embodiment of the present invention.

[0061] The fourth aspect of the present invention discloses a computer-storable medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all of the steps in the betweenness centrality estimation method based on sampling strategy disclosed in the first aspect of an embodiment of the present invention.

[0062] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0063] This invention discloses a method and device for estimating betweenness centrality based on a sampling strategy. By processing a network G, centrality information of network nodes is obtained; this centrality information of network nodes is then processed to obtain a selected node set S; and this selected node set S is then processed to obtain an approximate betweenness centrality value. This method has low calculation error, more obvious error patterns, more stable changes, and better results. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0065] Figure 1 1 is a flow chart of a betweenness centrality estimation method based on a sampling strategy disclosed in an embodiment of the present invention;

[0066] Figure 2 1 is a flow chart of another betweenness centrality estimation method based on a sampling strategy disclosed in an embodiment of the present invention;

[0067] Figure 3 The random network disclosed in the embodiment of the present invention is sampled based on PageRank centrality under different circumstances.

[0068] Figure 4The sampling error of the scale-free network based on PageRank centrality sampling in different situations disclosed in the embodiments of the present invention is:

[0069] Figure 5 The sampling error of the small-world network based on PageRank centrality sampling in different situations disclosed in the embodiments of the present invention is:

[0070] Figure 6 1 is a schematic structural diagram of a betweenness centrality estimation device based on a sampling strategy disclosed in an embodiment of the present invention;

[0071] Figure 7 It is a structural diagram of another betweenness centrality estimation device based on sampling strategy disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0072] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0073] The terms "first," "second," and so on, in the description and claims of the present invention and the accompanying drawings are used to distinguish between different objects, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or device.

[0074] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0075] The present invention discloses a method and device for estimating betweenness centrality based on a sampling strategy. The method comprises: processing a network G to obtain centrality information of network nodes; processing the centrality information of the network nodes to obtain a selected node set S; and processing the selected node set S to obtain an approximate betweenness centrality value. This method has low computational error, more pronounced error patterns, more stable variations, and better performance. Each method is described in detail below.

[0076] Example 1

[0077] See also Figure 1 , Figure 1 This is a flow chart of a method for estimating betweenness centrality based on a sampling strategy disclosed in an embodiment of the present invention. Figure 1 The described betweenness centrality estimation method based on sampling strategy is applied to the field of network technology, and the embodiment of the present invention does not limit it. Figure 1 As shown, the betweenness centrality estimation method based on sampling strategy may include the following operations:

[0078] S1, processes the network G to obtain the centrality information of the network nodes;

[0079] S2, processing the centrality information of the network nodes to obtain a selected node set S;

[0080] S3, processing the selected node set S to obtain an approximate value of betweenness centrality.

[0081] Optionally, the processing of the network G to obtain centrality information of network nodes includes:

[0082] S11, processing the network G to obtain network system parameter information; the network system parameter information includes the extraction ratio p of the network nodes and the termination condition;

[0083] S12, using a centrality calculation model of a network node and processing the network G according to the network system parameter information to obtain centrality information of the network node;

[0084] The centrality calculation model expression of the network node is:

[0085]

[0086] Among them, PR(i) is the centrality information of node i, PR(j) is the centrality information of node j, c is the random jump probability, n is the number of vertices in the network, is the out-degree of node j, a ij is the weight between node i and node j.

[0087] Optionally, another implementation method of step S12 is:

[0088] 1) Read the network G, G = (V, E), V = {v1, v2, ..., v n}, the elements in V are nodes (also called vertices) of the network G, n is the number of nodes, E={e1,e2,…,e m} is the edge set, m is the number of edges, and the element e in E i ={v i1 ,v i2 ,…,v ij} is a hyperedge, i=1,2,…,m,j=1,2,…,n;

[0089] 2) Process the network G to obtain the correlation matrix C, which is an n×m matrix. The element c in the matrix ij Takes 0 or 1, when node v i Located on the edge j When, c ij =1;

[0090] 3) Transform H to obtain the adjacency matrix A, element a in A ij is node v i and node v j The number of nodes on the same hyperedge;

[0091] The conversion method is:

[0092] Input matrix H

[0093] Enter the conversion option (0: adjacency → association; 1: association → adjacency)

[0094] If opt=1

[0095] n = number of H rows (number of nodes)

[0096] m = number of H columns (number of hyperedges)

[0097] Initialize the adjacency matrix, M1 = Zeros(n, n)

[0098] for i=1to m:

[0099] a=row information of each column in H matrix with non-zero entries

[0100] If a is not empty

[0101] All connected = the direct product (Cartesian product) of the information in the row where a is located

[0102] for traverse all connected

[0103] If the coordinates are not on the main diagonal of M

[0104] Write: Make the pre-written coordinate value +1 (automatically add 1)

[0105] 4) Calculate the centrality information of network nodes:

[0106]

[0107] Among them, PR is the centrality information of the network nodes, and M is the random transfer matrix:

[0108]

[0109] D v is the node out-degree, d H (j) is the node v i For hyperedge e j The out-degree of node v in matrix H i The out-degree set, D e is the node adjacency, d A (j) is the node v i For node v j The adjacency of node v in matrix A is i The adjacency set of matrix a=[a0,a1,…,a n ] is the correction matrix. When one column is all 0 (the node is an isolated node), a i =1,i=0,1,…,n, other a i = 0, e is the unit matrix, β represents the random walk probability of the node, β is 0.8 to 0.9, the specific value is set by the experiment, W is the node similarity matrix, the elements in W a(i) is the node v i The set of adjacent nodes of node v, a(j) is the node v j The set of adjacent nodes.

[0110] Optionally, the processing of the centrality information of the network nodes to obtain a selected node set S includes:

[0111] S21, sorting the nodes of the network G according to the centrality information of the network nodes to obtain an ordered sequence of network nodes;

[0112] S22, selecting the first p·n nodes from the ordered sequence of network nodes to obtain a selected node set S.

[0113] Optionally, processing the selected node set S to obtain an approximate betweenness centrality value includes:

[0114] S31, traversing the selected node set S to obtain the shortest path between the nodes;

[0115] S32, processing the shortest path between the nodes and the selected node set S to obtain the number of times the shortest path between the nodes passes through each vertex and edge in the network;

[0116] S33 , processing the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network to obtain an approximate value of betweenness centrality.

[0117] Optionally, processing the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network to obtain an approximate betweenness centrality value includes:

[0118] Using a betweenness centrality approximation calculation model, the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network are processed to obtain an approximate betweenness centrality value;

[0119] The betweenness centrality approximate value calculation model expression is:

[0120]

[0121] Among them, σ(v i ,v j ) is the node v i To node v j The number of shortest paths, σ(v i ,v j |v) is node v i To node v j The number of shortest paths passing through node v, V is the vertex set of network G, and Bet(v) is the approximate betweenness centrality of node v.

[0122] Optionally, the network G is expressed as:

[0123] G=(V,E)

[0124] Among them, V represents the vertex set of the network, E represents the edge set of the network, n = |V| represents the number of vertices in the network, and m = |E| represents the number of edges in the network.

[0125] As can be seen, the present invention discloses a method and device for estimating betweenness centrality based on a sampling strategy. By processing a network G, the centrality information of the network nodes is obtained; the centrality information of the network nodes is processed to obtain a selected node set S; and the selected node set S is processed to obtain an approximate betweenness centrality value. This method has low calculation error, more obvious error patterns, more stable changes, and better results.

[0126] Example 2

[0127] See also Figure 2 , Figure 2 This is a flow chart of another betweenness centrality estimation method based on a sampling strategy disclosed in an embodiment of the present invention. Figure 2 The described betweenness centrality estimation method based on sampling strategy is applied to the field of network technology, and the embodiment of the present invention does not limit it. Figure 2 As shown, the betweenness centrality estimation method based on sampling strategy may include the following operations:

[0128] 1. System parameter design

[0129] For a given network G, the user sets the network node extraction ratio p (0≤p≤1), termination conditions and other system parameters based on the network scale, connection relationship and degree distribution characteristics.

[0130] 2. PageRank centrality calculation

[0131] For a given network G, the user runs the PageRank efficient calculation method to obtain the PageRank centrality value of each node in the network, and obtains an ordered set of network nodes according to the PageRank centrality value.

[0132] 3. Selecting a Selected Node Set

[0133] According to the PageRank centrality value order of network nodes, the first p·n nodes in the node set are selected as the selected node set S. The nodes in the set S are all important and representative nodes in the network.

[0134] 4. Betweenness Centrality Calculation

[0135] Given a selected set S, we use S as an approximation of the entire vertex set V. We traverse the shortest paths between nodes in the selected set and calculate the number of times the shortest path passes through each vertex and edge in the network. We then use the shortest paths between nodes in the selected set to obtain an approximate value for betweenness centrality. The precise mathematical meaning can be expressed as:

[0136]

[0137] Among them, σ(v i ,v j ) is the node v i To node v j The number of shortest paths, σ(v i ,v j |v) is node v i To node v jThe number of shortest paths passing through node v, V is the vertex set of network G, and Bet(v) is the approximate betweenness centrality of node v.

[0138] As can be seen, the present invention discloses a method and device for estimating betweenness centrality based on a sampling strategy. By processing a network G, the centrality information of the network nodes is obtained; the centrality information of the network nodes is processed to obtain a selected node set S; and the selected node set S is processed to obtain an approximate betweenness centrality value. This method has low calculation error, more obvious error patterns, more stable changes, and better results.

[0139] Example 3

[0140] This example is conducted under three different types of networks: random networks, scale-free networks, and small-world networks. The generation of these three types of networks can be achieved through programming:

[0141] ① Random network

[0142] A random network is one in which the connection probabilities between all nodes are determined by a predetermined value. The Erdos-Renyi network is a typical example of a random network. In an Erdos-Renyi random network, the number of nodes n is typically constant. If two nodes are randomly selected to form an edge with a fixed probability p, the number of edges in the network is a random variable with an expected value of:

[0143]

[0144] Later, researchers discovered that many important features of Erdos-Renyi random networks emerge instantaneously. However, as research on Erdos-Renyi networks deepened, they discovered that Erdos-Renyi random networks differ significantly from other model networks. First, they lack a high clustering coefficient; second, their degree distribution follows a Poisson distribution, rather than the scale-free properties typically found in the real world.

[0145] G = nx.fast_gnp_random_graph(num_nodes, 0.02) #Generate a random network containing num_nodes nodes and an edge probability of 0.02

[0146] ②Scale-free networks

[0147] A type of non-uniform network that is relatively common in the real world, such as the World Wide Web and the human metabolic network. Their degree distributions differ from those of previously studied uniform networks in that they obey a power-law characteristic, meaning that a small number of nodes in the network control the vast majority of the connected edges, while a large number of nodes in the network only have a small number of connected edges. These non-uniform networks have a power-law degree distribution (p(k) ∝ k - γ), and non-uniform networks that follow this power-law distribution are called scale-free networks.

[0148] G = nx.barabasi_albert_graph(num_nodes, int(num_nodes*0.001), seed=42) # Generate a scale-free network with num_nodes nodes, each new node connected by num_nodes*0.001 edges, and an initial number of nodes of 5

[0149] ③ Small-world network

[0150] Small-world networks have good clustering properties, similar to regular networks. However, the average path length in small-world networks is similar to that in random networks. Below, the Newman-Watts small-world model is described in detail:

[0151] Starting from a regular network: for a nearest neighbor coupled network with n nodes, all nodes in the network are connected to s∈N neighbor nodes on the left and right, where s is an integer;

[0152] Application of random reconnection mechanism: Randomly select a pair of unconnected nodes to connect them by edge. There is only one edge between any two different nodes, and they are not connected to each other.

[0153] G = nx.watts_strogatz_graph(num_nodes, int(num_nodes*0.01), 0.2, seed = 42) # Generate a small-world network with num_nodes nodes, num_nodes*0.01 neighbors per node, and a reconnection probability of 0.2

[0154] 1. Sampling based on PageRank centrality

[0155] First, a network model is generated and the PageRank centrality of all nodes in the network is calculated. The PageRank centrality value is then assigned to the node, which becomes its probability of being selected in the sampling. The larger the degree, the greater the probability of being selected. Finally, the corresponding number of nodes are sampled according to the input sampling rate and the betweenness centrality of the sampled nodes is calculated. The core code of the algorithm is:

[0156]

[0157]

[0158] 2. Experimental performance analysis

[0159] In this section, we conduct sampling experiments based on random networks, scale-free networks, and small-world networks, and analyze the data obtained from the experiments from the aspects of computational accuracy and time complexity.

[0160] (1) Random Network

[0161] In the random network, we first generated random networks with 1000 and 2000 nodes and edge probabilities of 0.1, 0.06, and 0.02, respectively. Then, we sampled the corresponding number of nodes from the 1000 and 2000 node networks at sampling rates of 0.1, 0.2, 0.3, and 0.5, respectively, to perform calculations. The errors between the node betweenness centrality calculated based on various sampling methods and the exact calculation are shown in the following table:

[0162] We used the NetworkX database to generate random networks with 1000 and 2000 nodes, with edge probabilities of 0.1, 0.06, and 0.02 for each random network. We then sampled the random networks based on PageRank centrality and calculated betweenness centrality using the sampled nodes. The resulting errors compared to the exact calculated node betweenness centrality are shown in the following table:

[0163] Table 1 Sampling error based on PageRank centrality

[0164]

[0165]

[0166] Table 2 Comparison of sampling time based on PageRank centrality

[0167]

[0168] The data shows that within the same network, the error decreases as the sampling ratio increases. When the sampling ratio and edge probability remain constant, the error generally decreases as the network size increases. When the sampling ratio and network size remain constant, the error generally decreases as the edge probability (i.e., density) increases, but the error increases at a sampling ratio of 0.1. Overall, the error is minimized for a 2000-node network with an edge probability of 0.1 and a sampling ratio of 0.5. This suggests that PageRank centrality-based sampling strategies work better in random networks with larger and denser networks and higher sampling ratios. Figure 3This is the sampling error of PageRank centrality-based sampling under different circumstances disclosed in the embodiments of the present invention.

[0169] (2) Scale-free networks

[0170] In the scale-free network, we first generated scale-free networks with 1000 and 2000 nodes and edge ratios of 0.01, 0.03, and 0.05, respectively. Then, we sampled the corresponding number of nodes from the 1000 and 2000 node networks at sampling rates of 0.1, 0.2, 0.3, and 0.5, respectively, to perform calculations. The errors between the node betweenness centrality calculated based on various sampling methods and the exact calculation are shown in the following table:

[0171] First, we used the NetworkX database to generate scale-free networks with 1000 and 2000 nodes, respectively. Each scale-free network had three edge ratios: 0.01, 0.03, and 0.05. We then sampled the scale-free networks based on PageRank centrality and calculated betweenness centrality using the sampled nodes. The resulting errors compared to the exact calculated node betweenness centrality are shown in the following table:

[0172] Table 3 Sampling error based on PageRank centrality

[0173]

[0174] Table 4 Comparison of sampling time based on PageRank centrality

[0175]

[0176] The data shows that within the same network, the error decreases as the sampling ratio increases. When the sampling ratio and number of edges remain constant, the error generally decreases as the network size increases. When the sampling ratio and network size remain constant, the error generally decreases as the number of edges, or density, increases. However, the error becomes unstable at a sampling ratio of 0.1. Overall, for a 2000-node network, the error is minimized when the edge probability is 0.1 and the sampling ratio is 0.5. This suggests that PageRank centrality-based sampling strategies work better in scale-free networks with larger and denser networks and higher sampling ratios. Figure 4 is the sampling error of PageRank centrality-based sampling under different circumstances disclosed in the embodiments of the present invention;

[0177] (3) Small-world networks

[0178] In the small-world network, we first generated small-world networks with 1000 and 2000 nodes, and node-neighbor ratios of 0.03, 0.06, and 0.09, respectively. Then, we sampled the corresponding number of nodes from the 1000 and 2000 node networks at sampling rates of 0.1, 0.2, 0.3, and 0.5, respectively, to perform calculations. The errors between the node betweenness centrality calculated based on various sampling methods and the exact calculation are shown in the following table:

[0179] We used the NetworkX database to generate small-world networks with 1000 and 2000 nodes, respectively. The neighbor ratios of each small-world network node were 0.03, 0.06, and 0.09. We then sampled the small-world networks based on PageRank centrality and calculated betweenness centrality using the sampled nodes. The resulting errors compared to the exact calculated node betweenness centrality are shown in the following table:

[0180] Table 5 Sampling error based on PageRank centrality

[0181]

[0182] Table 6 Comparison of sampling time based on PageRank centrality

[0183]

[0184] The data shows that within the same network, as the sampling ratio increases, the error generally decreases, except for a sampling probability of 0.1. When the sampling ratio and the neighbor ratio remain constant, the error generally decreases as the network size increases. When the sampling ratio and network size remain constant, the error generally becomes unstable as the neighbor ratio (i.e., density) increases. Overall, for a 1000-node network, the error is minimized when the neighbor ratio is 0.03 and the sampling ratio is 0.2. This suggests that PageRank centrality-based sampling strategy works better in small-world networks with larger network sizes and higher sampling ratios. Figure 5 is the sampling error of PageRank centrality-based sampling under different circumstances disclosed in the embodiments of the present invention;

[0185] 3. Comparative analysis of experimental results

[0186] When the number of generated network nodes increases, the calculation error rate is generally higher when the sampling ratio is 10% or 20%. This is because the larger the network scale, the more complex the structure. The sampling ratios of 10% and 20% cannot meet the sampling requirements and the representativeness will be reduced. However, when the sampling probability reaches 50%, the sampling ratio can meet the sampling requirements and the error will not increase significantly.

[0187] In terms of running time, as the network scale increases, the network density increases, and the sampling ratio increases, the running time will increase to a certain extent.

[0188] At the same time, it can be seen that the calculation error of the sampling strategy based on PageRank centrality is slightly lower than that of the sampling strategy based on eigenvector centrality, and the calculation error pattern of the sampling strategy based on PageRank centrality is more obvious, the change is more stable, and the effect is better.

[0189] Example 4

[0190] See also Figure 6 , Figure 6 : is a schematic diagram of the structure of a betweenness centrality estimation device based on a sampling strategy disclosed in an embodiment of the present invention. Figure 6 The described betweenness centrality estimation device based on sampling strategy is applied in the field of network technology, and the embodiment of the present invention does not limit it. Figure 6 As shown, the betweenness centrality estimation device based on the sampling strategy may include the following operations:

[0191] S301, a centrality information calculation module, used to process the network G to obtain the centrality information of the network nodes;

[0192] S302, a selected node set calculation module, configured to process the centrality information of the network nodes to obtain a selected node set S;

[0193] S303, a betweenness centrality approximate value calculation module is used to process the selected node set S to obtain a betweenness centrality approximate value.

[0194] Example 5

[0195] See also Figure 7 , Figure 7 : is a schematic diagram of another betweenness centrality estimation device based on a sampling strategy disclosed in an embodiment of the present invention. Figure 7 The described betweenness centrality estimation device based on sampling strategy is applied in the field of network technology, and the embodiment of the present invention does not limit it. Figure 7 As shown, the betweenness centrality estimation device based on the sampling strategy may include the following operations:

[0196] A memory 401 storing executable program code;

[0197] a processor 402 coupled to the memory 401;

[0198] The processor 402 calls the executable program code stored in the memory 401 to execute the steps of the betweenness centrality estimation method based on the sampling strategy described in the first embodiment, the second embodiment, and the third embodiment.

[0199] Example 6

[0200] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the betweenness centrality estimation method based on sampling strategy described in Embodiment 1, Embodiment 2, and Embodiment 3.

[0201] The device embodiments described above are merely illustrative. Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0202] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the above technical solution, in essence, or the portion that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0203] Finally, it should be noted that the betweenness centrality estimation method and device based on sampling strategy disclosed in the embodiment of the present invention is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that it is still possible to modify the technical solutions recorded in the aforementioned embodiments, or to make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A betweenness centrality estimation method based on sampling strategy, characterized in that, The method comprises: S1, processes the network G to obtain the centrality information of the network nodes, including: S11, processing the network G to obtain network system parameter information; the network system parameter information includes the extraction ratio p of the network nodes and the termination condition; S12, using a centrality calculation model of a network node and processing the network G according to the network system parameter information to obtain centrality information of the network node; The centrality calculation model expression of the network node is: Among them, PR(i) is the centrality information of node i, PR(j) is the centrality information of node j, c is the random jump probability, n is the number of vertices in the network, is the out-degree of node j, a ij is the weight between node i and node j; S2, processing the centrality information of the network nodes to obtain a selected node set S, including: S21, sorting the nodes of the network G according to the centrality information of the network nodes to obtain an ordered sequence of network nodes; S22, selecting the first p·n nodes from the ordered sequence of network nodes to obtain a selected node set S; S3, processing the selected node set S to obtain an approximate betweenness centrality value, including: S31, traversing the selected node set S to obtain the shortest path between the nodes; S32, processing the shortest path between the nodes and the selected node set S to obtain the number of times the shortest path between the nodes passes through each vertex and edge in the network; S33 , processing the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network to obtain an approximate value of betweenness centrality.

2. The betweenness centrality estimation method based on sampling strategy according to claim 1, characterized in that: The processing of the shortest paths between the nodes and the number of times the shortest paths between the nodes pass through each vertex and edge in the network to obtain an approximate betweenness centrality value includes: Using a betweenness centrality approximation calculation model, the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network are processed to obtain an approximate betweenness centrality value; The betweenness centrality approximate value calculation model expression is: Among them, σ(v i ,v j ) is the node v i To node v j The number of shortest paths, σ(v i ,v j |v) is node v i To node v j The number of shortest paths passing through node v, V is the vertex set of network G, and Bet(v) is the approximate betweenness centrality of node v.

3. The betweenness centrality estimation method based on sampling strategy according to claim 1, characterized in that: The expression of the network G is: G=(V,E) Among them, V represents the vertex set of the network, E represents the edge set of the network, n = |V| represents the number of vertices in the network, and m = |E| represents the number of edges in the network.

4. A device for estimating betweenness centrality based on sampling strategy, characterized in that: The device comprises: The centrality information calculation module is used to process the network G and obtain the centrality information of the network nodes, including: S11, processing the network G to obtain network system parameter information; the network system parameter information includes the extraction ratio p of the network nodes and the termination condition; S12, using a centrality calculation model of a network node and processing the network G according to the network system parameter information to obtain centrality information of the network node; The centrality calculation model expression of the network node is: Among them, PR(i) is the centrality information of node i, PR(j) is the centrality information of node j, c is the random jump probability, n is the number of vertices in the network, is the out-degree of node j, a ij is the weight between node i and node j; The selected node set calculation module is used to process the centrality information of the network nodes to obtain the selected node set S, including: S21, sorting the nodes of the network G according to the centrality information of the network nodes to obtain an ordered sequence of network nodes; S22, selecting the first p·n nodes from the ordered sequence of network nodes to obtain a selected node set S; The betweenness centrality approximate value calculation module is used to process the selected node set S to obtain the betweenness centrality approximate value, including: S31, traversing the selected node set S to obtain the shortest path between the nodes; S32, processing the shortest path between the nodes and the selected node set S to obtain the number of times the shortest path between the nodes passes through each vertex and edge in the network; S33 , processing the shortest path between the nodes and the number of times the shortest path between the nodes passes through each vertex and edge in the network to obtain an approximate value of betweenness centrality.

5. A device for estimating betweenness centrality based on sampling strategy, characterized in that: The device comprises: a memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the betweenness centrality estimation method based on sampling strategy according to any one of claims 1 to 3.

6. A computer storable medium, characterized in that The computer storable medium stores computer instructions, and when the computer instructions are called, they are used to execute the betweenness centrality estimation method based on sampling strategy according to any one of claims 1 to 3.