Community detection and evolution analysis method for dynamic social network
By combining node embedding learning and community tag dissemination algorithms, combined with sliding windows and PageRank algorithms, precise community detection and evolution analysis of dynamic social networks is realized, and the problems of community structure detection and evolutionary laws in the existing technology are solved, and public opinion dissemination and group change prediction in social media are supported.
Patent Information
- Application Number
- CN202510126475.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-07-04
AI Technical Summary
It is difficult for the prior art to accurately detect and analyze the community structure and evolutionary laws in dynamic social networks, especially in the prediction of public opinion dissemination and group change trends in social media.
An algorithm combining node embedding learning and community label propagation is adopted, and dynamic social networks are divided smoothly with the idea of sliding windows. The community detection and evolution analysis are determined through node similarity and key node importance. The community detection and evolution analysis are used using the VecLPA non-overlapping community division algorithm and PageRank algorithm.
Accurate community detection and evolution analysis of dynamic social networks is realized, which can accurately identify changes in community structure and evolution laws, and supports effective predictions of public opinion dissemination and group changes.
Smart Images

Figure CN120259012A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of community discovery and its evolution, and particularly to a method for community detection and evolution analysis of dynamic social networks. Background Art
[0002] Complex networks are an emerging interdisciplinary research field. From the Internet to the WWW, from large power grids to global transportation networks, from scientific research cooperation networks to various economic, political, and social relationships, it can be said that people live in an era full of various complex networks. The research on complex networks also involves all aspects of social life.
[0003] In fact, to study the commonalities in the structures of various complex networks, more of the foundation of graph theory is needed. The abstract graph representation of a specific network uses abstract points to represent the nodes in the specific network, and the connections between the nodes are represented by the lines between the nodes. Using the method of graph theory, real-world problems are abstracted into graph problems, the elements such as people and objects in the complex structure of the real world are abstracted into points, and the relationships between the elements in the real world are abstracted into edges. In this way, different systems in the real world can be abstracted into a unified form, enabling better observation and summary of the development laws between different things.
[0004] Complex networks can be regarded as a powerful tool for describing complex systems. With the large amount of diverse network data generated by the rapid development of mobile devices, computers, and the Internet, the research on complex networks has also developed rapidly. By applying theoretical results to practical problems, the commonalities in complex systems in life can be better revealed, thus better understanding and revealing the real world.
[0005] As part of complex networks and also an integral part closely related to human society, the study of social networks has undoubtedly become increasingly important. With the development of existing Internet and mobile networks (such as 4G and 5G), community structures equivalent to those in the real society have emerged in the network. The study of social networks no longer simply analyzes social links from individual nodes but rather considers more of the overall characteristics of the network. In social media, users establish social relationships based on their interests, friends, or system recommendations, and the spread of information among users has made the scale of social networks grow larger. Detecting community structures in increasingly complex social networks and analyzing the evolution models of dynamic networks have become research hotspots. Communities in social networks refer to sets of points with similar characteristics divided in a certain way. Community structure generally refers to a set of nodes with tight connections, where nodes within the set are closely connected while the connections between nodes in the set and those outside the community are fewer. In daily life where social software is widely used, community detection in social networks plays a crucial role. By detecting communities in social networks, the spread of public opinion can be analyzed and the trend of public opinion can be controlled. Community evolution reflects the high dynamics of nodes at the micro level and the stability of the network at the macro level. By analyzing the characteristics and laws of community evolution, the emergence, growth, shrinkage, and disappearance of communities can be understood, and the changing trends of a group can be seen in practical applications, thus enabling better corresponding decisions to be made.
[0006] Therefore, the present invention focuses on the study of community detection and evolution analysis in complex dynamic social networks. Summary of the Invention
[0007] In view of this, embodiments of the present invention provide a method for community detection and evolution analysis of dynamic social networks to eliminate or improve one or more deficiencies existing in the prior art.
[0008] The first aspect of the present invention provides a method for community detection in dynamic social networks, the method comprising the following steps: obtaining a dynamic social network graph, smoothly dividing the dynamic social network graph into static social network graphs of multiple time periods based on the change trend of the dynamic social network graph, the dynamic social network graph including multiple nodes and multiple edges connecting the nodes; performing community detection on the static social network graphs of each time period based on the similarity between nodes by using an algorithm combining node embedding learning and community label propagation to obtain multiple community detection results corresponding to the static social network graphs of the multiple time periods.
[0009] In some embodiments of the present invention, the smoothly dividing the dynamic social network graph into static social network graphs of multiple time periods based on the change trend of the dynamic social network graph includes: Divide the dynamic social network graph into a plurality of static social network graphs with equal time slices according to the time line of the dynamic social network graph; Use a time line generation framework to describe the change trend of the dynamic social network graph based on the static social network graphs of the plurality of time slices, and merge the static social network graphs of the plurality of time slices according to the change trend to obtain smooth static social network graphs of a plurality of time periods.
[0010] In some embodiments of the present invention, the algorithm combining node embedding learning and community label propagation is used to perform community detection on the static social network graph of each time period based on the similarity between nodes, so as to obtain a plurality of community detection results corresponding to the static social network graphs of the plurality of time periods, including: Use a node embedding learning algorithm to extract the features of each node in the static social network graph of each time period to obtain a vector representation of each node; Calculate the similarity between the vector representations of each node and each neighbor node of each node to obtain a first similarity between each node and each neighbor node of each node; Initialize the community label of each node, and iteratively update the community label of each node based on the community label of the neighbor node corresponding to the highest first similarity between each node and each neighbor node of each node; Determine the community detection result of the static social network graph of the corresponding time period based on the updated community label of each node, where the community detection result includes at least one community, so as to obtain a plurality of community detection results corresponding to the static social network graphs of the plurality of time periods.
[0011] In some embodiments of the present invention, when the number of nodes in a community in the community detection result is less than a preset community minimum scale threshold or there is a single node in the community that is not pointed to, calculate the second similarity between the community and each neighbor node adjacent to the whole community, and merge the community into the community where the neighbor node with the highest second similarity is located.
[0012] The second aspect of the present invention provides a method for analyzing the community evolution of a dynamic social network, the method comprising the following steps: Use an algorithm for determining the relative importance between nodes to determine the key nodes in each community based on the mutual influence and relative importance between the nodes in each community in the community detection result of the dynamic social network graph, where the community detection result is obtained in advance based on the community detection method of the dynamic social network described in the foregoing first aspect, and the community detection result includes a plurality of community detection results corresponding to the static social network graphs of the dynamic social network graph divided into a plurality of time periods; Calculate the similarity between each community in every two adjacent time periods based on the key nodes in each community in every two adjacent time periods to determine the evolution results of each community.
[0013] In some embodiments of the present invention, the algorithm for determining the relative importance between nodes determines the key nodes in each community based on the mutual influence and relative importance between the nodes in each community in the community detection result of the dynamic social network graph, including: Use the PageRank algorithm to calculate the PageRank value of each node in each community in the community detection result of the dynamic social network graph, and use the PageRank value of each node as the initial influence weight of the node; Traverse each edge in the community, and calculate the average influence value of the two nodes on each neighbor node of their respective nodes and the difference between the two average influence values based on the initial influence weights of the two nodes connected by each edge. Use the sum value between the initial influence weight of the node with the larger initial influence weight among the two nodes and the absolute value of the difference as the updated influence weight of the node, and use the difference between the initial influence weight of the node with the smaller initial influence weight among the two nodes and the absolute value of the difference as the updated influence weight of the node; If the updated influence weight of the node is greater than the initial influence weight of the node, then the node is a relatively important node in the corresponding community, that is, a key node.
[0014] In some embodiments of the present invention, in the step of calculating the similarity between each community in every two adjacent time periods based on the key nodes in each community in every two adjacent time periods to determine the evolution results of each community, calculate the similarity between each community in every two adjacent time periods based on the key nodes in each community in every two adjacent time periods through the following formula: where I(G1, G2) and I(G2, G1) respectively represent the similarity between each community in the previous time period and each community in the next time period among every two adjacent time periods and the similarity between each community in the next time period and each community in the previous time period, G1 and G2 respectively represent each community in the previous time period and the next time period among every two adjacent time periods, |G1∩G2| represents the number of nodes that belong to both community G1 and community G2, |G1| and |G2| respectively represent the number of nodes in community G1 and community G2, x represents the key node, G1∩G2 represents the set of nodes that belong to both community G1 and community G2, and respectively represent the PageRank values used to represent the importance of the key node x in community G1 and community G2 respectively.
[0015] In some embodiments of the present invention, the evolution results of each community include dissolution, formation, persistence, contraction, growth, splitting, and merging; When I(G1, G2) < the first threshold and I(G2, G1) < the first threshold, the evolution type of the community is dissolution or formation; When I(G1, G2) ≥ the second threshold, I(G2, G1) ≥ the third threshold, and |G1| = |G2|, the evolution type of the community is persistence; When I(G1, G2) ≥ the second threshold, |G1| > |G2|, and the community in the latter time period matches only one community among all the communities in the previous time period, the evolution type of the community is contraction; When I(G1, G2) ≥ the second threshold, |G1| < |G2|, and the community in the previous time period matches only one community among all the communities in the latter time period, the evolution type of the community is growth; When I(G1, G2) < the second threshold, I(G2, G1) ≥ the third threshold, |G1| ≥ |G2|, and the community in the latter time period matches at least two communities among all the communities in the previous time period, the evolution type of the community is splitting; When I(G1, G2) ≥ the second threshold, I(G2, G1) < the third threshold, |G1| ≤ |G2|, and the community in the previous time period matches at least two communities among all the communities in the latter time period, the evolution type of the community is merging.
[0016] The third aspect of the present invention provides an electronic device, which includes: a computer device, the computer device includes a processor and a memory, computer instructions are stored in the memory, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the community detection method of the dynamic social network as described in the first aspect above, or implements the steps of the community evolution analysis method of the dynamic social network as described in the second aspect above.
[0017] The fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the community detection method of the dynamic social network as described in the first aspect above, or implements the steps of the community evolution analysis method of the dynamic social network as described in the second aspect above.
[0018] The fifth aspect of the present invention provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, it implements the steps of the community detection method of the dynamic social network as described in the first aspect above, or implements the steps of the community evolution analysis method of the dynamic social network as described in the second aspect above.
[0019] The method for community detection and evolution analysis of a dynamic social network according to the present invention reasonably evaluates the overall change trend of the dynamic social network by combining the idea of a sliding window, and smoothly divides the dynamic social network into static social networks of different time periods according to the timeline of the dynamic social network. Community discovery and community detection are performed on the static social networks of different time periods divided based on the VecLPA non-overlapping community partitioning algorithm proposed by the present invention, and accurate community detection can be achieved for complex dynamic social networks. Furthermore, starting from the relevance of community key nodes in different time periods, an evolution analysis algorithm for analyzing the change of the corresponding community structure through the change of the association between key nodes is proposed according to the node relative importance determination algorithm based on PageRank proposed by the present invention. According to the matching degree between key nodes in each community of adjacent time periods, the actual evolution trend and evolution law of each community in the dynamic social network can be accurately determined.
[0020] Additional advantages, objects, and features of the present invention will be partially described below, and will become partially apparent to those of ordinary skill in the art after studying the following, or can be learned from the practice of the present invention. The objects and other advantages of the present invention can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.
[0021] Those skilled in the art will understand that the objects and advantages that can be achieved by the present invention are not limited to the above specifically described, and the above and other objects that the present invention can achieve will be more clearly understood according to the following detailed description. Brief Description of the Drawings
[0022] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and do not constitute a limitation to the present invention.
[0023] Figure 1 It is a schematic flowchart of the method for community detection of a dynamic social network in an embodiment of the present invention; Figure 2 It is a schematic flowchart of the method for community evolution analysis of a dynamic social network in an embodiment of the present invention. Detailed Embodiments
[0024] To make the objects, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the embodiments and the drawings. Here, the illustrative embodiments and descriptions thereof of the present invention are used to explain the present invention, but do not limit the present invention.
[0025] Here, it should also be noted that, in order to avoid obscuring the present invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the present invention are shown in the drawings, while other details less relevant to the present invention are omitted.
[0026] It should be emphasized that the term "comprising / including" as used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0027] Here, it should also be noted that, unless otherwise specified, the term "connection" as used herein can refer not only to a direct connection, but also to an indirect connection with an intermediate.
[0028] In the following, embodiments of the present invention will be described with reference to the drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0029] In order to achieve the community detection (i.e., community detection) and community evolution law analysis of a complex dynamic social network, embodiments of the present invention provide a method for community detection and a method for community evolution analysis of a dynamic social network, which can achieve accurate community detection of a complex dynamic social network and can grasp the evolution laws of each community in the dynamic social network, and accurately determine the actual evolution trends of each community.
[0030] Figure 1 It is a schematic flowchart of a method for community detection of a dynamic social network in an embodiment of the present invention. As Figure 1 shown, the community detection method includes the following steps: Step S110, obtain a dynamic social network graph, and smoothly divide the dynamic social network graph into static social network graphs of multiple time periods based on the change trend of the dynamic social network graph, where the dynamic social network graph and the static social network graphs include multiple nodes and multiple edges connecting the nodes.
[0031] Specifically, the dynamic social network graph is a dynamic directed social network graph, including multiple nodes and multiple edges for connecting the nodes, where each edge connects two nodes. The dynamic directed social network graph means that in the social network, the relationship between nodes is dynamically changing over time and has a direction (i.e., there is a clear directivity). Here, nodes usually represent individuals or entities, such as users on a social platform, etc. The edges for connecting nodes represent the association relationships between nodes. For example, when user A shares and forwards an article or message published on the social platform to user B, there is a certain association relationship between user A and user B and user A points to user B (information transfer from user A to user B), or it can also be a friendship relationship from user A to user B, etc. That is to say, the dynamic directed social network not only reflects the connection status between nodes but also reveals the flow direction of information, resources, or influence between nodes. At the same time, since the network is dynamic, it will continuously evolve, new nodes and edges will appear, and existing nodes and edges may disappear or change.
[0032] In some embodiments, in step S110, the step of smoothly dividing the dynamic social network graph into multiple time-period static social network graphs based on the change trend of the dynamic social network graph includes the following steps: Divide the dynamic social network graph into multiple equally spaced time-slice static social network graphs according to the timeline of the dynamic social network graph; Use a timeline generation framework to describe the change trend of the dynamic social network graph based on the multiple time-slice static social network graphs, and merge the multiple time-slice static social network graphs according to the change trend to obtain multiple smoothly divided time-period static social network graphs.
[0033] This step requires a reasonable evaluation of the network evolution trend (change trend) of the dynamic social network graph, so that the adjacent network snapshots finally divided, that is, the static social network graphs in adjacent time periods, are smooth enough and no large number of new nodes will be generated, and the evolution trend will not be too drastic. However, if only the total number of nodes and edges on the static social network graph of each time period is used, the degree of network change cannot be accurately evaluated completely, and the large number of new and old node alternations or the changes in node connection relationships and edges in the network cannot be intuitively described. Therefore, this method uses the algorithm of the timeline generation framework to describe the trend of network evolution, so as to discover important events in the evolution process.
[0034] Specifically, the step of using a timeline generation framework to describe the change trend of the dynamic social network graph based on the multiple time-slice static social network graphs includes the following steps: Determine the change points in the dynamic social network graph and the changes on both sides of the change points based on the sliding window idea, determine the node types according to the changes on both sides of the change points, and calculate the change values of the nodes of this type in the dynamic social network graph. The node types include off-network nodes, on-network nodes, and stable nodes; Determine the change trend of the static social network graph for each time slice based on the change values of the nodes, so as to obtain the overall change trend of the dynamic social network graph.
[0035] Specifically, the timeline generation algorithm uses a sliding window of size ws to determine the changes on both sides of the change point (change spot) in the network. This change point can refer to points where changes such as the addition of new nodes, the departure of old nodes, and the increase and decrease of edges occur in the network. According to the changes on both sides of the change point, the nodes in the network are divided into four categories: off-network nodes, that is, nodes that no longer appear after the change point; on-network nodes, that is, nodes newly added after the change point; stable nodes, that is, nodes that appear before and after the change point; and noise nodes, that is, nodes that only appear at a certain moment. And calculate the change values of each type of node as shown in the following formula: Since noise nodes only appear at a certain moment, the change values of noise nodes have little impact on the evaluation of the overall change trend of the dynamic social network and can be ignored. Among them, represents the change value of node v between the t-th time slice and the t + 1-th time slice, d (t) (v) represents the degree of node v in the t-th time slice, adj (t) (v) represents the adjacency matrix of node v in the t-th time slice, V(dead) represents the set of off-network nodes, V(born) represents the set of on-network nodes, and V(stable) represents the set of stable nodes.
[0036] To avoid the influence of the size difference of each network snapshot (here referring to the static social network graph of each time slice) on the change trend δ(t, t + 1) of the static social network graph of each time slice, calculate each network snapshot according to the following formula to obtain the change value δ(t, t + 1): Among them, V(g (t) ) represents the number of nodes in the static social network graph g of the t-th time slice. Evaluate the change trend of the static social network graph of each time slice through this formula, so as to obtain the overall change trend of the dynamic social network, and thus form the timeline of the entire dynamic social network.
[0037] Next, in order to reasonably divide the time period of the dynamic social network, the above change values are normalized to the interval [0, 1] by the Min_Max (minimum-maximum) normalization method, and then the static social network graphs of multiple time slices are merged through a top-down algorithm to achieve a reasonable division and segmentation of the time period of the dynamic social network. The principle of the top-down algorithm is to consider every possible division of the time series of the dynamic social network and segment each time period to the best position. Specifically, by judging whether the approximation error between the two static social network graphs on both sides of each segmentation point is lower than a specified threshold, the starting segmentation point of each time period of the division is placed in the best position. If the approximation error is higher than the specified threshold, the algorithm recursively continues to segment until the approximation errors of the static social network graphs of all segmented time periods are lower than the specified threshold. The specified threshold can be 0.02.
[0038] Due to the sliding window strategy, the first ws / 2 - 1 change points and the last ws / 2 - 1 change points in the network cannot be effectively calculated by the timeline, so the number of effective change points is m - ws + 2. In fact, m >> ws. Therefore, for the first ws / 2 - 1 change points and the last ws / 2 - 1 change points, they are respectively merged with their adjacent time periods into one time period.
[0039] Step S120, adopt an algorithm combining node embedding learning and community label propagation to perform community detection on the static social network graph of each time period based on the similarity between nodes, so as to obtain multiple community detection results corresponding to the static social network graphs of the multiple time periods, and achieve community detection of the dynamic social network graph.
[0040] In this step, a community detection algorithm that combines and improves the algorithm for learning node embeddings (or node embedding learning algorithm) and the community discovery algorithm based on label propagation is used to perform community detection on the static social network graph for each time period. Among them, the algorithm for learning node embeddings is the Node2Vec algorithm, and the community discovery algorithm based on label propagation is the LPA algorithm. The community detection algorithm combined and improved from the two can be called the VecLPA non-overlapping community partitioning algorithm. The basic principle of the LPA algorithm is as follows: For each node in the network, a unique community label is initialized for the node at the initial stage. In each iteration process, the community label of the node will be changed according to the community labels of the neighbor nodes connected to the node. The principle of changing the label is to select the community label with the highest occurrence frequency among the community labels of the neighbor nodes connected to the node as the community label of the node, so as to update its own label. Through the continuous propagation of community labels in multiple iteration processes, finally, nodes with associated relationships and close connections have the same community label, that is, these nodes belong to the same community. On this basis, this method improves the above label propagation algorithm and combines the node features learned through the Node2Vec algorithm to perform label propagation according to the similarity between nodes, so that the relationship between nodes in the finally partitioned community is closer.
[0041] In some embodiments, in step S120, the algorithm that combines node embedding learning and community label propagation performs community detection on the static social network graph for each time period based on the similarity between nodes to obtain multiple community detection results corresponding to the static social network graphs of the multiple time periods, including the following steps: Use the node embedding learning algorithm to extract the features of each node in the static social network graph for each time period to obtain the vector representation of each node; Calculate the similarity between the vector representation of each node and the vector representations of each neighbor node of each node to obtain the first similarity between each node and each neighbor node of each node; Initialize the community label of each node, and iteratively update the community label of each node based on the community label of the neighbor node corresponding to the highest first similarity between each node and each neighbor node of each node; Determine the community detection result of the static social network graph corresponding to the corresponding time period based on the updated community label of each node. The community detection result includes at least one community to obtain multiple community detection results corresponding to the static social network graphs of the multiple time periods.
[0042] Specifically, the Node2Vec algorithm is used to extract features and learn for each node in the static social network graph of each time period, obtaining the feature representation or embedding representation of each node in the form of a vector. In the specific implementation process, the two hyperparameters p and q in the Node2Vec algorithm are set to 1 and 0.5 respectively, and the feature dimension of each finally obtained node is 64. After obtaining the features of each node, for each node, the similarity between the node and the features of each of its neighbor nodes is calculated to obtain the similarity between the node and each of its neighbor nodes. In the label propagation stage, first, each node initializes the community label it belongs to. Then, in each iteration process, each node updates its community label according to the community labels of its neighbor nodes (meanwhile, the community labels of the neighbor nodes will also be updated according to the community labels of their neighbor nodes). The greater the similarity between a neighbor node and the node, the greater the influence weight of the community label of the neighbor node on the community label of the node, that is, the more similar the nodes are, the more consistent the community labels they belong to, and the easier the community labels are to spread. Through the continuous propagation of the community labels in multiple iteration processes, finally, the nodes with higher similarity have consistent community labels, that is, these nodes belong to the same community. This makes the way of label propagation more reasonable, and the nodes in each community in the finally obtained community detection result are as similar as possible. In the specific implementation process, the similarity can be the cosine similarity or other specific ways of calculating similarity.
[0043] In some embodiments, in the case where the number of nodes in a community in the community detection result is less than the preset minimum community size threshold or there is a single node in the community that is not pointed to, the second similarity between the community and each of its neighbor nodes adjacent to the whole community is calculated, and the community is merged into the community where the neighbor node with the highest second similarity is located.
[0044] After the end of the entire label propagation phase, considering that there are actually some communities with too few nodes, and there may be single and isolated nodes in the directed network graph that are not pointed to by other nodes, the community label of this node remains in its initial state all the time. Since there are no neighbor nodes and it cannot be updated through label propagation, then this node will be regarded by the algorithm as an independent community with only a single node. To address the above problems, this method pre-sets a minimum community size threshold, and the minimum community size threshold can be 3. For communities with the number of community nodes less than this threshold, each node of this community is regarded as a whole, and each neighbor node adjacent to this community as a whole is considered, that is, all neighbor nodes of all nodes in this community. In specific implementation, the average value of the vector representation of the features of all nodes in this community is calculated, and the similarity between the average value and the vector representation of the features of each considered neighbor node is calculated to obtain the second similarity. For the neighbor node with the highest second similarity, this community as a whole is incorporated into the community where this neighbor node is located.
[0045] Figure 2 It is a schematic flowchart of the community evolution analysis method for a dynamic social network in an embodiment of the present invention. As Figure 2 shown, the community evolution analysis method includes the following steps: Step S210, using the node - to - node relative importance determination algorithm to determine the key nodes in each community based on the mutual influence and relative importance among the nodes in each community in the community detection result of the dynamic social network graph. The community detection result is obtained by previously using the community detection method of the dynamic social network described in any one of the foregoing embodiments. The community detection result includes multiple community detection results corresponding to the static social network graphs obtained by dividing the dynamic social network graph into multiple time periods.
[0046] In fact, when performing evolution analysis on each community, the dynamics and unpredictability of the community lead to different thresholds being required for different communities, which requires a large amount of manual intervention, and it is very difficult to select a suitable threshold such that the selected nodes can truly represent the evolution trend of the entire community. Therefore, this method proposes a node - to - node relative importance determination algorithm. By considering the mutual influence among the nodes in the community and using the relative importance among the nodes, the key nodes in each community are selected and determined. The key nodes are used to represent the relatively important nodes in the entire community.
[0047] In some embodiments, in step S210, the using the node - to - node relative importance determination algorithm to determine the key nodes in each community based on the mutual influence and relative importance among the nodes in each community in the community detection result of the dynamic social network graph includes the following steps: Calculate the PageRank value (PR value) of each node in each community in the community detection result of the dynamic social network graph using the PageRank algorithm, and use the PR value of each node as the initial influence weight of the node; Traverse each edge in the community, and calculate the average influence value of the two nodes on each neighbor node of their respective nodes and the difference between the two average influence values based on the initial influence weights of the two nodes connected by each edge. Use the sum value between the initial influence weight of the node with the larger initial influence weight among the two nodes and the absolute value of the difference as the updated influence weight of the node, and use the difference between the initial influence weight of the node with the smaller initial influence weight among the two nodes and the absolute value of the difference as the updated influence weight of the node; If the updated influence weight of the node is greater than the initial influence weight of the node, then the node is a relatively important node in the corresponding community, that is, a key node.
[0048] Specifically, the PageRank algorithm is used to calculate the importance of each node in each community through the following formula to obtain the PageRank value (PR value) of each node: where d is the damping factor, used to simulate the behavior of random jump of random browsers, usually taking a value of 0.85; M represents the original transition probability matrix; v j represents the node pointing to node v i , i represents the community node serial number, i = 1, 2,..., n, n represents the number of community nodes, and j represents the node serial number pointing to node v i ; L(v j ) represents the out-degree of node v j , that is, the number of directed edges from node v j pointing to other nodes.
[0049] The principle of the algorithm for determining the relative importance between nodes designed and proposed by this method is as follows: The PR value of each node calculated by the above formula is used as the initial influence weight of the node. Traverse each edge in each community. For the two nodes corresponding to each edge, considering the mutual influence between nodes, actually, when changing the influence weight of a node, the actual influence value of each node on each of its neighbor nodes should be the average of the influence weight of the node itself distributed to each neighbor node of the node, that is, the average influence value after dividing the initial influence weight of the node by the number of neighbor nodes. Therefore, calculate the difference between the average influence values of the above two nodes. And for the node with a larger initial influence weight, its updated influence weight after change is the sum of the initial influence weight and the absolute value of the above difference; for the node with a smaller initial influence weight, its updated influence weight after change is the difference between the initial influence weight and the absolute value of the above difference. After traversing each edge in each community, the updated influence weights of each node in each community are obtained. For each node, if its updated influence weight is greater than its initial influence weight, then it is determined that the node is a relatively important node in the corresponding community, that is, a key node.
[0050] Step S220: Calculate the similarity between each pair of adjacent communities based on the key nodes in each community for each pair of adjacent time periods to determine the evolution result of each community.
[0051] In order to accurately analyze the evolution results such as the evolution law, evolution state, and evolution type of communities, it is very important to efficiently and accurately associate the communities in adjacent time periods based on the community detection results. For this purpose, the algorithm for analyzing community evolution adopted in this method is mainly based on the GED (Group Evolution Discovery) model proposed by Bro′dka. The evolution state and evolution type of communities are divided into seven types: newborn, persistent, expanding, shrinking, merging, splitting, and disappearing. And the inclusion formula between communities is improved. By using the improved formula to calculate the similarity between each two adjacent time periods of each community, the association relationship between key nodes in different time periods of communities can be analyzed, and then the evolution results of each community can be determined from this association relationship. In the process of calculating the similarity between communities, all communities in all adjacent time periods are compared one by one, mainly based on the key nodes in the communities for comparison and matching, so as to determine whether there is an evolution association relationship between each two adjacent time periods of each pair of communities. The similarity between communities can be used to compare the commonness of features in two communities, such as the proportion of common nodes belonging to the two communities, etc., so as to quantitatively determine the similarity between two communities. In this field, the GED model and the inclusion formula between communities are important tools for understanding and describing community evolution in community network analysis. The GED model is a method for analyzing community evolution in a community network, and the inclusion formula between communities is used to calculate the number of elements in the union and intersection of multiple communities in community network analysis.
[0052] In some embodiments, in step S220, that is, in the step of determining the evolution results of each community by calculating the similarity between each two adjacent time periods of each community based on the key nodes in each community, the similarity between each two adjacent time periods of each community is calculated based on the key nodes in each community by the following formula: where I(G1,G2) and I(G2,G1) respectively represent the similarity between each community in the previous time period and each community in the next time period among each two adjacent time periods and the similarity between each community in the next time period and each community in the previous time period, G1 and G2 respectively represent each community in the previous time period and the next time period among each two adjacent time periods, |G1∩G2| represents the number of nodes that belong to both community G1 and community G2, |G1| and |G2| respectively represent the number of nodes in community G1 and community G2, x represents the key node, and G1∩G2 represents the set of nodes that belong to both community G1 and community G2, and They respectively represent the PR values used to represent the importance of the key node x in communities G1 and G2. The formula here is the specific form of the improved formula for the inclusion formula between communities, mainly by replacing in the inclusion formula between communities, and is obtained by only considering the influence brought by the key nodes in the community on the calculation of the similarity between communities, rather than considering all nodes in the community. This can greatly reduce the computational complexity of the similarity calculation and the community matching overhead, and improve the computational efficiency.
[0053] In some embodiments, the evolution results of each community obtained in step S220 include dissolution, formation, persistence, contraction, growth, splitting, and merging. These evolution results and evolution types are determined according to the following determination methods: When I(G1, G2) < the first threshold and I(G2, G1) < the first threshold, the evolution type of the community is dissolution or formation; When I(G1, G2) ≥ the second threshold, I(G2, G1) ≥ the third threshold, and |G1| = |G2|, the evolution type of the community is persistence; When I(G1, G2) ≥ the second threshold, |G1| > |G2|, and the community in the latter time period matches only one of all the communities in the previous time period, the evolution type of the community is contraction; When I(G1, G2) ≥ the second threshold, |G1| < |G2|, and the community in the previous time period matches only one of all the communities in the latter time period, the evolution type of the community is growth; When I(G1, G2) < the second threshold, I(G2, G1) ≥ the third threshold, |G1| ≥ |G2|, and the community in the latter time period matches at least two of all the communities in the previous time period, the evolution type of the community is splitting; When I(G1, G2) ≥ the second threshold, I(G2, G1) < the third threshold, |G1| ≤ |G2|, and the community in the previous time period matches at least two of all the communities in the latter time period, the evolution type of the community is merging.
[0054] The determination rules for the above-mentioned community evolution types generally match communities in adjacent time periods according to corresponding rules to obtain the corresponding community evolution type structure. When a community in the later time period does not match any of the communities in the previous time period, the community in the later time period is a newly born community, and the evolution type is formation; when a community in the previous time period does not match any of the communities in the later time period, the community in the previous time period has died out, and the evolution type is dissolution; when a community is successfully matched in two adjacent time periods before and after and basically does not change, the evolution type of the community is persistence. The evolution type of each community can only be one of the above types. The first threshold can be set to 0.1, and the second threshold and the third threshold can both be set to 0.5.
[0055] In summary, the community detection method and community evolution analysis method for a dynamic social network provided by the embodiments of the present invention reasonably evaluate the overall change trend of the dynamic social network in combination with the sliding window idea, and smoothly divide the dynamic social network into static social networks in different time periods according to the timeline of the dynamic social network. Based on the VecLPA non-overlapping community division algorithm proposed by the present invention, community discovery and community detection are performed on the static social networks in different time periods divided, and accurate community detection of complex dynamic social networks can be achieved. Furthermore, starting from the relevance of community key nodes in different time periods through the algorithm for determining the relative importance between nodes based on PageRank proposed by the present invention, an evolution analysis algorithm for analyzing the change of the corresponding community structure through the change of the association between key nodes is proposed. According to the matching degree between key nodes in each community in adjacent time periods, the actual evolution trend and evolution law of each community in the dynamic social network can be accurately determined.
[0056] Correspondingly, the present invention also provides an electronic device, which includes a computer device. The computer device includes a processor and a memory. Computer instructions are stored in the memory, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the foregoing method.
[0057] The embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing method are implemented. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium well-known in the technical field.
[0058] An embodiment of the present invention also provides a computer program product, including computer instructions, which implement the steps of the foregoing method when executed by a processor.
[0059] Those of ordinary skill in the art should understand that the various exemplary components, systems, and methods described in connection with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Specifically, whether to implement in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link.
[0060] It should be clear that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.
[0061] In the present invention, features described and / or illustrated for one embodiment can be used in the same or similar manner in one or more other embodiments, and / or combined with the features of other embodiments or replace the features of other embodiments.
[0062] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, various changes and variations can be made to the embodiments of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A community detection method for a dynamic social network, characterized in that, The method includes: Obtaining a dynamic social network graph, and smoothly dividing the dynamic social network graph into static social network graphs of multiple time periods based on the change trend of the dynamic social network graph, where the dynamic social network graph and the static social network graphs include multiple nodes and edges connecting the nodes; Using an algorithm combining node embedding learning and community label propagation to perform community detection on the static social network graphs of each time period based on the similarity between nodes, so as to obtain multiple community detection results corresponding to the static social network graphs of the multiple time periods.
2. The method according to claim 1, wherein The smoothly dividing the dynamic social network graph into static social network graphs of multiple time periods based on the change trend of the dynamic social network graph includes: Dividing the dynamic social network graph into static social network graphs of multiple equally spaced time slices according to the time line of the dynamic social network graph; Using a time line generation framework to describe the change trend of the dynamic social network graph based on the static social network graphs of the multiple time slices, and merging the static social network graphs of the multiple time slices according to the change trend to obtain smoothly static social network graphs of multiple time periods.
3. The method according to claim 1, wherein The using an algorithm combining node embedding learning and community label propagation to perform community detection on the static social network graphs of each time period based on the similarity between nodes, so as to obtain multiple community detection results corresponding to the static social network graphs of the multiple time periods includes: Using a node embedding learning algorithm to extract the features of each node in the static social network graph of each time period to obtain a vector representation of each node; Calculating the similarity between the vector representation of each node and the vector representations of each neighbor node of each node to obtain a first similarity between each node and each neighbor node of each node; Initializing the community label of each node, and iteratively updating the community label of each node based on the community label of the neighbor node corresponding to the highest first similarity between each node and each neighbor node of each node; Determining the community detection result of the static social network graph of the corresponding time period based on the updated community label of each node, where the community detection result includes at least one community, so as to obtain multiple community detection results corresponding to the static social network graphs of the multiple time periods.
4. The method according to claim 3, wherein In the case where the number of nodes in the community in the community detection result is less than a preset community minimum scale threshold or there is a single node in the community that is not pointed to, calculating the second similarity between the community and each neighbor node adjacent to the whole community, and merging the community into the community where the neighbor node with the highest second similarity is located.
5. A method for analyzing the community evolution of a dynamic social network, characterized in that, The method includes: Using a node relative importance determination algorithm to determine the key nodes in each community based on the mutual influence and relative importance between the nodes in each community in the community detection result of the dynamic social network graph, where the community detection result is obtained by previously using the community detection method of the dynamic social network according to any one of claims 1 to 4, and the community detection result includes multiple community detection results corresponding to the static social network graphs of multiple time periods obtained by dividing the dynamic social network graph; Calculate the similarity between each pair of adjacent communities in each pair of adjacent time periods based on the key nodes in each community to determine the evolution results of each community.
6. The method according to claim 5, characterized in that, The step of determining the key nodes in each community based on the mutual influence and relative importance among the nodes in each community in the community detection results of the dynamic social network graph by using the node relative importance determination algorithm includes: Calculate the PR value of each node in each community in the community detection results of the dynamic social network graph by using the PageRank algorithm, and use the PR value of each node as the initial influence weight of the node; Traverse each edge in the community, and calculate the average influence value of the two nodes on each neighbor node of their respective nodes and the difference between the two average influence values based on the initial influence weights of the two nodes connected by each edge. Use the sum value between the initial influence weight of the node with the larger initial influence weight among the two nodes and the absolute value of the difference as the updated influence weight of the node, and use the difference between the initial influence weight of the node with the smaller initial influence weight among the two nodes and the absolute value of the difference as the updated influence weight of the node; If the updated influence weight of the node is greater than the initial influence weight of the node, then the node is a relatively important node in the corresponding community, that is, a key node.
7. The method according to claim 5, characterized in that, In the step of calculating the similarity between each pair of adjacent communities in each pair of adjacent time periods based on the key nodes in each community to determine the evolution results of each community, calculate the similarity between each pair of adjacent communities in each pair of adjacent time periods based on the key nodes in each community through the following formula: Among them, I(G1, G2) and I(G2, G1) respectively represent the similarity between each community in the previous time period and each community in the next time period, and the similarity between each community in the next time period and each community in the previous time period among every two adjacent time periods. G1 and G2 respectively represent each community in the previous time period and the next time period among every two adjacent time periods. |G1∩G2| represents the number of nodes that belong to both community G1 and G2. |G1| and |G2| respectively represent the number of nodes in community G1 and G2. x represents the key node. G1∩G2 represents the set of nodes that belong to both community G1 and G2. and respectively represent the PR values used to represent the importance of the key node x in communities G1 and G2 respectively; The evolution results of each community include dissolution, formation, persistence, contraction, growth, splitting, and merging; When I(G1, G2) < the first threshold and I(G2, G1) < the first threshold, the evolution type of the community is dissolution or formation; When I(G1, G2) ≥ the second threshold, I(G2, G1) ≥ the third threshold, and |G1| = |G2|, the evolution type of the community is persistence; When I(G1, G2) ≥ the second threshold, |G1| > |G2|, and the community in the latter time period only matches one community among all the communities in the previous time period, the evolution type of the community is contraction; When I(G1, G2) ≥ the second threshold, |G1| < |G2|, and the community in the previous time period only matches one community among all the communities in the latter time period, the evolution type of the community is growth; When I(G1, G2) < the second threshold, I(G2, G1) ≥ the third threshold, |G1| ≥ |G2|, and the community in the latter time period matches at least two communities among all the communities in the previous time period, the evolution type of the community is splitting; When I(G1, G2) ≥ the second threshold, I(G2, G1) < the third threshold, |G1| ≤ |G2|, and the community in the previous time period matches at least two communities among all the communities in the latter time period, the evolution type of the community is merging.
8. An electronic device, comprising a processor, a memory, and computer instructions stored on the memory, characterized in that, The processor is configured to execute the computer instructions, and when the computer instructions are executed, the device implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.