Method and device for estimating statistical attributes of social networks based on preference walk sampling

By adopting a sampling method based on preference wandering in social networks, the problem of large deviation between sample network attributes and real network attributes is solved, and a more accurate estimation of original network attributes is achieved.

CN119025761BActive Publication Date: 2025-02-28NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411510782.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-28
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

The existing social network sampling method leads to a large deviation between the sample network attributes and the real network attributes, making it difficult to accurately estimate the statistical attributes of the original network.

Method used

采用基于偏好游走的抽样方法,在原始社交网络的节点集合中选择多个节点进行并行游走,随机选择邻居节点并根据预先设置的抽样度偏好参数和节点度值计算接受概率,通过随机数生成决定是否加入样本集,记录节点的重采样次数以进行后续属性估计。

Benefits of technology

By introducing preference parameters and random walk mechanism, the sampling preference is controlled, and the number of resamplings of nodes is recorded to reweight the sample degree distribution, which improves the estimation accuracy of the original network attributes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for estimating the statistical attributes of a social network based on preference walk sampling. The method comprises: selecting multiple nodes from the node set of the original social network for parallel walk; calculating the acceptance probability of a neighbor node being accepted according to the degree preference parameter set by the pre-selected social network preference information and the degree value of the node; determining whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the random number generated randomly, and walking to the neighbor node; estimating the social attributes of the original social network according to the sample information of the sample set obtained by the parallel walk. The use of this method can solve the problem of large deviations between the sample network attributes and the real network attributes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of large-scale complex social networks, and in particular to a method and device for estimating statistical attributes of social networks based on preference walk sampling. Background Art

[0002] Many complex networks in reality are large-scale graphs or access-constrained data sets, especially social networks, where the number of members is large and growing rapidly, and the interactions between members evolve over time. It is not only difficult to obtain and process complete graph information in real time, but also consumes huge computing resources. When dealing with time-sensitive tasks, it is not possible to make efficient and fast analysis and conclusions, and it is very likely to miss the best time to handle events, leading to the outbreak of serious consequences. When obtaining information in online social networks, the data quality is not high, and the sample bias increases significantly, further increasing the difficulty and uncertainty of research. In order to meet the above challenges, network sampling is needed. Network sampling is a technology that strategically selects subsets of nodes and / or edges from the original graph to construct a subgraph that can reflect the characteristics of the original graph. It can effectively solve the problems of lack of data, high cost of complete investigation and difficulty in visualization.

[0003] In order to meet research needs, the core appeal of network sampling is to generate a set of "representative" samples, not just one sample. A large number of studies have shown that inappropriate local network data acquisition methods can greatly distort the complex structure and dynamic characteristics of the real network. Different survey groups and research purposes often correspond to different sampling methods. For example, respondent-driven sampling is widely used to investigate hidden population information that is difficult to access. Breadth-first search is used to capture distributed, large-scale online social networks with high efficiency and low time complexity. Random walk sampling is used in scenarios with high sample connectivity requirements. Most of these sampling methods are biased, that is, the sample attributes are not the same as the original network attributes. In recent years, scholars have mainly focused on adding intelligent algorithms or combining resampling processes on the basis of the original sampling methods to make the attributes of the sub-network closer to the real network or to make the characteristics of the sub-network closer to expectations according to task requirements. In order to solve the problems of low efficiency of simple random walk method in repeatedly sampling the same nodes and converging to a stable distribution, a node group random walk (NCRW) is proposed, which significantly improves the sample quality and estimation accuracy; a guided sampling algorithm (GS) is proposed to extract a small representative subgraph that retains its topological and statistical properties from a large graph. After sampling, the estimated values ​​of degree and clustering coefficient are used to guide the pruning of the graph. The obtained tiny sample retains the graph properties and the degree distribution is very close to the degree distribution in the original graph; an efficient hybrid evolutionary graph sampling algorithm (GA-CS) is proposed, and the resulting network has higher representativeness and consistency; a minority-centered graph sampling method (MCGS) based on the triangle algorithm and the tangent algorithm is proposed, and a greedy strategy is introduced to balance the retention of majority structure and minority structure in the sample.

[0004] As an important method, network sampling has the key application of effectively inferring various properties of the real network through the obtained sampled network data. However, many papers have revealed significant differences between the properties of the sampled network and the actual network, warning that the properties of the sampled network should not be simply used to replace the cognition of the real network. Specifically, even the scale-free characteristics of the sampled subgraph of the scale-free network cannot be preserved; further, the degree distribution of the sampled network is inconsistent with that of the parent network. For example, the sampled subgraph of the original network that originally follows the Poisson distribution actually presents a power-law distribution. In view of the existence of such problems, researchers have been committed to improving network sampling methods to narrow the gap between the properties of the sampled network and the real network. However, it is challenging to seek to construct a subgraph that can both widely represent and accurately replicate all the properties of the original network, because the accurate capture of some properties is often accompanied by underestimation or overestimation of other properties. In summary, the problem of attribute fidelity in the network sampling process and its coping strategies constitute a topic that needs to be explored in depth in the current research field.

[0005] In order to solve the above problems, traditional technology proposed a new sampling algorithm (DLA) based on distributed learning automata to balance two opposite selection strategies, effectively reducing the selection probability of high-degree nodes in RDS sampling; other technologies compared Metropolis–Hastings random walk (MHRW) with other sampling algorithms, proving that MHRW performs better in sampling large-scale graphs, and the sample attributes are closer to the population; there are also some technical solutions that add the minimum degree search strategy controlled by parameters to the random walk process, and propose the minimum preference random walk algorithm, which significantly reduces the search time. Other researchers solve this problem by correcting the estimator. Specifically, the study is conducted on scale-free networks, and the deviation of the statistical properties of the sampled networks under point sampling, edge sampling, and snowball sampling from the original network is quantitatively calculated; the asymptotic unbiasedness of the respondent-driven sampling subnetwork is proved from the perspective of degree distribution and sample individuals; the estimator of the number of second neighbors is corrected for the self-centered network.

[0006] Individuals in complex systems are closely connected and interact with each other, forming a network structure with complex coupling relationships. The degree value of a node is the simplest node attribute, which is a measure of the number of neighbors. It can also intuitively reflect the importance of the node. The degree distribution of the network is an important attribute that affects the robustness and propagation characteristics of the network, and is also the basis for accurately evaluating other network properties. Existing network sampling methods, especially chain sampling, often introduce different degrees of degree preference because the process of sampling is closely related to the edges, resulting in a large deviation between the sample network attributes and the real network attributes. Summary of the invention

[0007] Based on this, it is necessary to provide a social network statistical attribute estimation method and device based on preference walking sampling that can solve the problem of large deviation between sample network attributes and real network attributes caused by current social network sampling, in response to the above technical problems.

[0008] A method for estimating statistical attributes of a social network based on preference walk sampling, the method comprising:

[0009] Select multiple nodes from the node set of the original social network to start a parallel walking process;

[0010] Randomly select a neighbor node of the walk, and calculate the acceptance probability of the neighbor node being accepted according to the preset sampling degree preference parameter and node degree value;

[0011] Determine whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and walk to the neighbor node; wherein the nodes in the sample set are represented by a binary tuple, and the binary tuple includes a node number and the number of times it is drawn;

[0012] The statistical properties of the original social network are estimated according to the sample information of the sample set obtained by the parallel walk.

[0013] In one embodiment, the method further includes: calculating the acceptance probability of the neighbor node being accepted by the walking process according to the preset sampling degree preference parameter and the degree value of the node:

[0014] ;

[0015] in, Represents neighbor nodes Start Node The acceptance probability of acceptance, is the degree preference parameter, Indicates that there is no degree preference for samples, and nodes with different degree values ​​have the same probability of being accepted. represents a positive degree preference in the sampling process, The larger it is, the greater the probability of accepting the large-degree sample node. Indicates the starting node The degree value, Represents neighbor nodes The degree value.

[0016] In one embodiment, the method further includes: generating an interval Random number ;

[0017] like , then reject the neighbor node and reselect a neighbor node to calculate the acceptance probability;

[0018] like , then accept the neighbor node and add the neighbor node to the sample set , and wanders to the neighboring node.

[0019] In one embodiment, the sample set is represented as ,in is the node number, For Node The number of times sampled, is the total number of nodes in the sample set.

[0020] In one of the embodiments, the further step further includes: if the neighboring node , then update the sample set ;

[0021] If the neighbor node , then update the sample set .

[0022] In one embodiment, it also includes:

[0023] The random walk process is modeled as a Markov process; where The nodes are components of the state space. Corresponding status ;

[0024] The state transfer matrix of the Markov process is obtained by the sample selection mechanism of the sampling process. According to the state transfer matrix, the stationary distribution of the Markov process is obtained as follows:

[0025] ;

[0026] This stable distribution represents the degree value of the i-th node in a single-step walk. , the probability of being selected is ;

[0027] According to the stationary distribution, the degree distribution property of the sample network corresponding to the sample set is obtained, and according to the degree distribution property of the sample network, the estimated value of the degree distribution property of the original social network is obtained.

[0028] In one embodiment, it also includes:

[0029] set up:

[0030] ;

[0031] in, Representation Node The degree value of . Then the sample degree distribution can be expressed as:

[0032] .

[0033] The sample degree distribution is reweighted using the number of resampling times of the nodes in the sample set, and we get:

[0034] ,

[0035] in,

[0036] ,

[0037] Then the modified sample node degree distribution is:

[0038] .

[0039] According to the stationary distribution, the expected number of nodes with degree k in the sample is:

[0040] ;

[0041] in, is the number of iterations of the sampling process, For single-step walking, moderate The probability of a node being selected is the stationary distribution of nodes with degree k. is the original network degree distribution, then the sample degree distribution is:

[0042] ;

[0043] in and is the normalization constant;

[0044] According to the sample degree distribution of the sample network, the estimated value of the degree distribution attribute of the original social network is obtained as follows:

[0045] .

[0046] A device for estimating statistical attributes of a social network based on preference walk sampling, the device comprising:

[0047] A parallel walking module is used to select multiple nodes from the node set of the original social network to start a parallel walking process;

[0048] A node selection module is used to randomly select a neighbor node of the walk and calculate the acceptance probability of the neighbor node being accepted according to a preset sampling degree preference parameter and node degree value;

[0049] A walking module, used to determine whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and walk to the neighbor node; wherein the nodes in the sample set are represented by a binary group, and the binary group includes a node number and a number of times it is drawn;

[0050] The attribute estimation module is used to estimate the statistical attributes of the original social network according to the sample information of the sample set obtained by parallel walking.

[0051] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0052] Select multiple nodes from the node set of the original social network to start a parallel walking process;

[0053] Randomly select a neighbor node of the walk, and calculate the acceptance probability of the neighbor node being accepted according to the preset sampling degree preference parameter and node degree value;

[0054] Determine whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and walk to the neighbor node; wherein the nodes in the sample set are represented by a binary tuple, and the binary tuple includes a node number and the number of times it is drawn;

[0055] The statistical properties of the original social network are estimated according to the sample information of the sample set obtained by the parallel walk.

[0056] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0057] Select multiple nodes from the node set of the original social network to start a parallel walking process;

[0058] Randomly select a neighbor node of the walk, and calculate the acceptance probability of the neighbor node being accepted according to the preset sampling degree preference parameter and node degree value;

[0059] Determine whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and walk to the neighbor node; wherein the nodes in the sample set are represented by a binary tuple, and the binary tuple includes a node number and the number of times it is drawn;

[0060] The statistical properties of the original social network are estimated according to the sample information of the sample set obtained by the parallel walk.

[0061] The above-mentioned method, device, computer equipment and storage medium for estimating statistical attributes of social networks based on preference walk sampling, by introducing preference degree parameters, adopting random walk and acceptance rejection mechanism, realizes controllable sampling degree preference, and records the number of node resampling at the same time, providing more information for the original network attribute estimation. However, although the above process can obtain more key nodes, the sample network attribute information is biased. Since the above process represents the nodes in the sample set as binary tuples, and the binary tuples include the node number and the number of times it is drawn, when performing statistical attribute estimation, by reweighting the distribution, an accurate estimation of the original network degree distribution can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of a flow chart of a method for estimating statistical attributes of a social network based on preference walk sampling in one embodiment;

[0063] Figure 2 Schematic diagram of the parallel independent walk sampling algorithm with controllable degree preference; (a) represents the acceptance-rejection preference walk, and (b) represents the parallel independent random walk;

[0064] Figure 3This is a pseudo code diagram of the parallel independent walk sampling algorithm with controllable degree preference;

[0065] Figure 4 The experimental results of the average degree estimation of the BA (10000, 5) network under different sampling ratios and preferences; (a) represents the average degree of the sample nodes, (b) represents the average degree estimation value without resampling correction, and (c) represents the corrected average degree estimation value;

[0066] Figure 5 The KL divergence experimental results of the estimated degree distribution of the BA (10000, 5) network under different sampling ratios and preferences; (a) represents the KL divergence between the original network degree distribution and the sample degree distribution, (b) represents the KL divergence between the estimated degree distribution without resampling correction and the true degree distribution, and (c) represents the KL divergence between the corrected estimated degree distribution and the true degree distribution;

[0067] Figure 6 It is a structural block diagram of a social network statistical attribute estimation device based on preference walking sampling in one embodiment;

[0068] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0070] In one embodiment, Figure 1 As shown, a method for estimating statistical attributes of a social network based on preference walk sampling is provided, comprising the following steps:

[0071] Step 102: Select multiple nodes from the node set of the original social network to perform parallel walking.

[0072] Specifically, 5% of the total number of sample nodes in the original social network node set Randomly select nodes as the starting nodes of the parallel independent walk process, where , is the total number of nodes in the original network, is the sampling ratio. Since the initial node is randomly selected, it is not added to the sample set, otherwise it will affect the accuracy of the sample preference information. Then based on the randomly selected The nodes are used as the starting nodes of the parallel independent walking process to perform preference walking.

[0073] Step 104, randomly select a neighbor node of the walk, and calculate the acceptance probability of the neighbor node being accepted according to the preset sampling degree preference parameter and node degree value.

[0074] It is worth noting that classic network sampling methods, such as SRW, BFS, and FF, all have a certain degree of inherent bias, which is uncontrollable and will affect subsequent research. The sampling degree preference parameter set in this step can select appropriate degree preference parameters according to research needs to obtain more key nodes with large degree values ​​in the sample.

[0075] Step 106, determining whether to add the neighboring node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and wandering to the neighboring node.

[0076] The nodes in the sample set are represented by a binary tuple, which includes the node number and the number of times it is selected. In this step, the random walk + acceptance and rejection mechanism is improved, and the acceptance probability related to the node degree value and preference parameter is set to achieve controllable sampling degree preference. At the same time, the number of node resampling is recorded to provide more information for the original network attribute estimation.

[0077] Step 108: Estimate the statistical attributes of the original social network based on the sample information of the sample set obtained by the parallel walk.

[0078] In this step, although the above sampling process can obtain more key nodes, the sample network attribute information is biased. Directly using the sample network attributes to replace the original network attributes for subsequent research will cause inaccurate results, so the original network attributes need to be estimated.

[0079] Since the degree distribution of a large number of real networks presents a power-law distribution, there are few nodes with large degree values ​​and many nodes with small degree values. When the sampling ratio and preference parameters are large, the same node may be sampled repeatedly for multiple times. If the number of resampling times is not considered, the node will only be recorded once, which is inconsistent with the sample degree distribution derived from the stationary distribution. If the sample degree distribution is directly substituted into the degree distribution attribute calculation formula, the estimation result is not accurate. The present invention re-weights the sample degree distribution with the number of resampling times to obtain an approximate sample degree distribution, and substitutes the re-weighted sample degree distribution into the degree distribution attribute estimation formula to obtain an accurate estimate of the original network degree distribution.

[0080] In the above-mentioned social network statistical attribute estimation method based on preference walk sampling, the sampling degree preference is controlled by introducing the preference degree parameter, adopting the random walk and acceptance rejection mechanism, and recording the number of node resampling times to provide more information for the original network attribute estimation. However, although the above process can obtain more key nodes, the sample network attribute information is biased. Since the above process represents the nodes in the sample set as binary tuples, and the binary tuples include the node number and the number of times it is drawn, when performing statistical attribute estimation, the distribution of the original network can be accurately estimated by reweighting the distribution.

[0081] In one embodiment, according to the preset sampling degree preference parameter and the degree value of the node, the acceptance probability of the neighbor node being accepted by the walking process is calculated as:

[0082] ;

[0083] in, Represents neighbor nodes Start Node The acceptance probability of acceptance, is the degree preference parameter, Indicates that there is no degree preference for samples, and nodes with different degree values ​​have the same probability of being accepted. represents a positive degree preference in the sampling process, The larger it is, the greater the probability of accepting the large-degree sample node. Indicates the starting node The degree value, Represents neighbor nodes The degree value.

[0084] In one embodiment, the interval is generated Random number ;like , then reject the neighbor node and reselect a neighbor node to calculate the acceptance probability; if , then accept the neighbor node and add the neighbor node to the sample set , and wander to the neighboring nodes.

[0085] In another embodiment, the nodes in the sample set are in the form of two tuples, namely ,in is the node number, representing the nodes are selected as samples, Representative Node The number of times the node is drawn. When accepted during the walk, if ,but ;otherwise .

[0086] Figure 2 A schematic diagram of a parallel independent walk sampling algorithm with controllable degree preference is given; Figure 3 A pseudo code of a parallel independent walk sampling algorithm with controllable degree preference is given. The expected sampling ratio can be achieved by executing the parallel independent walk sampling algorithm with controllable degree preference and the pseudo code of the parallel independent walk sampling algorithm with controllable degree preference.

[0087] In one embodiment, the random walk process is modeled as a Markov process; wherein, The nodes are components of the state space. Corresponding status ;

[0088] The state transfer matrix of the Markov process is obtained from the sample selection mechanism of the sampling process. According to the state transfer matrix, the stationary distribution of the Markov process is obtained as follows:

[0089] .

[0090] This stable distribution represents the degree value of the i-th node in a single-step walk. , the probability of being selected is According to the stationary distribution, the degree distribution property of the sample network corresponding to the sample set is obtained, and according to the degree distribution property of the sample network, the estimated value of the degree distribution property of the original social network is obtained.

[0091] The specific derivation process is as follows:

[0092] According to the sample selection mechanism of the sampling process, the state transfer matrix of the Markov process is obtained as follows:

[0093] ;

[0094] in, is the stationary distribution of a simple random walk, is the acceptance probability of the selected neighbor;

[0095] ;

[0096] .

[0097] Depend on

[0098] ;

[0099] The stationary distribution of the Markov process is:

[0100] .

[0101] From the above stable distribution, we can know that when the wandering process tends to be stable, the probability of a node being selected is proportional to the power exponent of the degree value.

[0102] The theoretical distribution of sample degree values ​​can be obtained from the stationary distribution. However, when the preference degree or sampling ratio is large, some nodes will be selected multiple times due to the low proportion of large-degree nodes in the original network. Therefore, when using sample information to estimate the statistical properties of the original network, the sample distribution should be weighted by the number of draws.

[0103] Specifically, set:

[0104] ;

[0105] in, Representation Node The degree value of . Then the sample degree distribution can be expressed as:

[0106] .

[0107] The sample degree distribution is reweighted using the number of resampling times of the nodes in the sample set, and we get:

[0108] ;

[0109] in,

[0110] ;

[0111] Then the modified sample node degree distribution is:

[0112] .

[0113] According to the stationary distribution, the expected number of nodes with degree k in the sample is:

[0114] ;

[0115] in, is the number of iterations of the sampling process, For single-step walking, moderate The probability of a node being selected is the stationary distribution of nodes with degree k. is the original network degree distribution, then the sample degree distribution is:

[0116] ;

[0117] in and is the normalization constant;

[0118] According to the sample degree distribution of the sample network, the estimated value of the degree distribution attribute of the original social network is obtained as follows:

[0119] ;

[0120] In the specific experiment, for a scale-free network with 10,000 nodes and an average degree of 10 (BA(10000, 5)), a parallel independent walk sampling with controllable degree preference was performed with a sampling ratio of 0 to 0.5 and a degree preference parameter of 0 to 2. The sample average degree, the average degree estimate without resampling correction, and the corrected average degree estimate were calculated respectively. The calculation formula is as follows:

[0121] ;

[0122] ;

[0123] .

[0124] Depend on Figure 4 (a) It can be seen that the degree preference parameter The larger it is, the more large-degree nodes there are in the sample, and the larger the sample average degree is. As the sampling ratio increases, due to the limited number of large-degree nodes in the network, the sample cannot meet the expected preference, and under the same preference parameters, the sample average degree decreases. Figure 4 (b) and Figure 4 The estimated value of the original network average degree in (c) corrects the deviation of the sample degree distribution well. Figure 4 The horizontal axis is the sampling ratio, and the variation range is 0~0.5. Figure 4 The vertical axis of (a) is the average degree , Figure 4 The ordinate of (b) is the uncorrected average degree estimate , Figure 4 The vertical axis of (c) is the corrected average degree estimate .

[0125] In addition, we selected a scale-free network with 10,000 nodes and an average degree of 10 (BA(10000, 5)), and performed parallel independent walk sampling with controllable degree preference under the sampling ratio of 0 to 0.5 and the degree preference parameter of 0 to 2. We calculated the KL divergence of the network's true degree distribution, the sample degree distribution, the estimated degree distribution without resampling correction, and the corrected estimated degree distribution respectively. The calculation formula is as follows:

[0126] ;

[0127] ;

[0128] .

[0129] KL divergence is a measure of distribution similarity. The greater the difference between the two distributions, the greater the KL divergence. Figure 5 (a) It can be seen that the difference between the sample degree distribution and the true degree distribution is large. As the sampling ratio increases, that is, the sample size increases, the difference gradually decreases; Figure 5 The degree distribution estimate in (b) that has not been corrected by the number of resampling times corrects the deviation of the sample degree distribution to a certain extent. However, when the sampling ratio is large, the correction formula will over-correct because the sample degree preference does not meet expectations, resulting in a large deviation of the degree distribution estimate from the true value. Figure 5 The estimated value of degree distribution corrected by the number of resampling in (c) avoids the above problems very well, and the original network degree distribution can be accurately estimated under different degree preference parameters and sampling ratios. It is worth noting that Figure 5 The horizontal axis is the sampling ratio, and the vertical axis is , , They respectively represent the KL divergence between the original network degree distribution and the sample degree distribution, the KL divergence between the degree distribution estimate without resampling correction and the true degree distribution, and the KL divergence between the corrected degree distribution estimate and the true degree distribution.

[0130] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0131] In one embodiment, Figure 6 As shown, a social network statistical attribute estimation device based on preference walking sampling is provided, including: a parallel walking module 602, a node selection module 604, a walking module 606 and an attribute estimation module 608, wherein:

[0132] A parallel walking module 602 is used to select multiple nodes from the node set of the original social network for parallel walking;

[0133] The node selection module 604 is used to randomly select a neighbor node of the walk, and calculate the acceptance probability of the neighbor node being accepted according to the preset sampling degree preference parameter and node degree value;

[0134] A walking module 606 is used to determine whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and walk to the neighbor node; wherein the nodes in the sample set are represented by a binary group, and the binary group includes a node number and a number of times it is selected;

[0135] The attribute estimation module 608 is used to estimate the statistical attributes of the original social network according to the sample information of the sample set obtained by the parallel walk.

[0136] In one embodiment, the node selection module 604 is further configured to calculate the acceptance probability of the neighbor node being accepted by the walking process according to the preset sampling degree preference parameter and the degree value of the node:

[0137] ;

[0138] in, Represents neighbor nodes Start Node The acceptance probability of acceptance, is the degree preference parameter, Indicates that there is no degree preference for samples, and nodes with different degree values ​​have the same probability of being accepted. represents a positive degree preference in the sampling process, The larger it is, the greater the probability of accepting the large-degree sample node. Indicates the starting node The degree value, Represents neighbor nodes The degree value.

[0139] In one embodiment, the walk module 606 is also used to generate an interval Random number ;like , then reject the neighbor node and reselect a neighbor node to calculate the acceptance probability; if , then accept the neighbor node and add the neighbor node to the sample set , and wanders to the neighboring node.

[0140] In one embodiment, the sample set is represented as ,in is the node number, For Node The number of times sampled, is the total number of nodes in the sample set.

[0141] In one embodiment, the walking module 606 is further configured to: , then update the sample set ; If the neighbor node , then update the sample set .

[0142] In one embodiment, the attribute estimation module 608 is also used to

[0143] The random walk process is modeled as a Markov process; where The nodes are components of the state space. Corresponding status ;

[0144] The state transfer matrix of the Markov process is obtained by the sample selection mechanism of the sampling process. According to the state transfer matrix, the stationary distribution of the Markov process is obtained as follows:

[0145] .

[0146] This stable distribution represents the degree value of the i-th node in a single-step walk. , the probability of being selected is ;

[0147] According to the stationary distribution, the degree distribution property of the sample network corresponding to the sample set is obtained, and according to the degree distribution property of the sample network, the estimated value of the degree distribution property of the original social network is obtained.

[0148] In one embodiment, the attribute estimation module 608 is also used to

[0149] set up:

[0150] ;

[0151] in, Representation Node The degree value of . Then the sample degree distribution can be expressed as:

[0152] .

[0153] The sample degree distribution is reweighted using the number of resampling times of the nodes in the sample set, and we get:

[0154] ;

[0155] in,

[0156] ;

[0157] Then the modified sample node degree distribution is:

[0158] .

[0159] According to the stationary distribution, the expected number of nodes with degree k in the sample is:

[0160] ;

[0161] in, is the number of iterations of the sampling process, For single-step walking, moderate The probability of a node being selected is the stationary distribution of nodes with degree k. is the original network degree distribution, then the sample degree distribution is:

[0162] ;

[0163] in and is the normalization constant;

[0164] According to the sample degree distribution of the sample network, the estimated value of the degree distribution attribute of the original social network is obtained as follows:

[0165] .

[0166] For the specific definition of the social network statistical attribute estimation device based on preference walk sampling, please refer to the definition of the social network statistical attribute estimation method based on preference walk sampling above, which will not be repeated here. Each module in the above-mentioned social network statistical attribute estimation device based on preference walk sampling can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0167] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for estimating statistical attributes of a social network based on preference walking sampling is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0168] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0169] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.

[0170] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.

[0171] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0172] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0173] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for estimating statistical attributes of social networks based on preference walk sampling, characterized in that: The method comprises: Select multiple nodes from the node set of the original social network to start a parallel walking process; Randomly select a neighbor node to walk , according to the preset sampling preference parameters , start node The value of and neighbor nodes The value of , calculate the neighbor nodes Probability of acceptance ; Among them, select appropriate degree preference parameters according to research needs to achieve controllable sampling degree preference, Indicates that there is no degree preference for samples, and nodes with different degree values ​​have the same probability of being accepted. represents a positive degree preference in the sampling process, The larger it is, the greater the probability of accepting the sample node with large degree value; Determine whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and walk to the neighbor node; wherein the nodes in the sample set are represented by a binary tuple, and the binary tuple includes a node number and the number of times it is drawn; According to the sample information of the sample set obtained by the parallel walk, the statistical attributes of the original social network are estimated, including: The random walk process is modeled as a Markov process; where The nodes are components of the state space. Corresponding status ; The state transfer matrix of the Markov process is obtained by the sample selection mechanism of the sampling process. According to the state transfer matrix, the stationary distribution of the Markov process is obtained as follows: This stable distribution represents the degree value of the i-th node in a single-step walk. , the probability of being selected is ; According to the stationary distribution, the degree distribution property of the sample network corresponding to the sample set is obtained, and according to the degree distribution property of the sample network, the estimated value of the degree distribution property of the original social network is obtained; including: set up: in, Representation Node The degree value of , then the sample degree distribution can be expressed as: is the total number of nodes in the sample set, and the sample degree distribution is reweighted using the number of resampling times of the nodes in the sample set, resulting in: in, Then the modified sample node degree distribution is: According to the stationary distribution, the expected number of nodes with degree k in the sample is: in, is the number of iterations of the sampling process, For single-step walking, moderate The probability of a node being selected is the stationary distribution of nodes with degree k. is the original network degree distribution, then the sample degree distribution is: in and is the normalization constant; According to the sample degree distribution of the sample network, the estimated value of the degree distribution attribute of the original social network is obtained as follows: 。 2. The method according to claim 1, characterized in that: Determining whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and wandering to the neighbor node, including: Generation interval Random number ; like , then reject the neighbor node and reselect a neighbor node to calculate the acceptance probability; like , then accept the neighbor node and add the neighbor node to the sample set , and wanders to the neighboring node.

3. The method according to claim 2, characterized in that The sample set is represented as ,in is the node number, For Node The number of times sampled, is the total number of nodes in the sample set.

4. The method according to claim 2, characterized in that: The method further comprises: If the neighbor node , then update the sample set ; If the neighbor node , then update the sample set .

5. A device for estimating statistical attributes of social networks based on preference walk sampling, used to implement the method for estimating statistical attributes of social networks based on preference walk sampling according to any one of claims 1 to 4, characterized in that: The device comprises: A parallel walking module is used to select multiple nodes from the node set of the original social network to start a parallel walking process; Node selection module, used to randomly select a neighbor node for walking , according to the preset sampling preference parameters , start node The value of and neighbor nodes The value of , calculate the neighbor nodes Probability of acceptance ; Among them, select appropriate degree preference parameters according to research needs to achieve controllable sampling degree preference, Indicates that there is no degree preference for samples, and nodes with different degree values ​​have the same probability of being accepted. represents a positive degree preference in the sampling process, The larger it is, the greater the probability of accepting the sample node with large degree value; A walking module, used to determine whether to add the neighbor node to the sample set according to the relationship between the acceptance probability and the randomly generated random number, and walk to the neighbor node; wherein the nodes in the sample set are represented by a binary group, and the binary group includes a node number and a number of times it is drawn; The attribute estimation module is used to estimate the statistical attributes of the original social network according to the sample information of the sample set obtained by parallel walking.

Citation Information

Patent Citations

  • Unbiased delay sampling method of social network

    CN108833211A

  • Degree offset sampling method and system for social network

    CN110717107A