A method for visualizing network topology
By using the Louvain algorithm and an improved force-directed algorithm to perform community partitioning and layout optimization of networks, the problems of high computational complexity and poor layout effect of large-scale network topologies are solved, and efficient network visualization is achieved. This method is applicable to vehicle-to-everything (V2X) networks, satellite networks, and industrial networks.
Patent Information
- Application Number
- CN202411785400.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Existing network topology visualization tools face problems of high computational complexity and unsatisfactory layout effects when dealing with large-scale and complex network topologies. They cannot simultaneously meet the dual requirements of processing speed and visual effects, especially in designing complex large-scale network structures, where efficiency and effectiveness are insufficient.
The Louvain algorithm is used to identify communities in the network and partition them. An improved force-directed algorithm is then used for layout. Through sub-region division and local optimization, the layout efficiency and visual quality are improved.
It significantly reduces the number of global iterations, improves computing speed and layout accuracy, and forms a unified and coherent network view, meeting the visualization needs of various application scenarios such as vehicle networking, satellite networks and industrial networks.
Smart Images

Figure CN119788523B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of network security and network management, and in particular to a method for visualizing network topology. Background Technology
[0002] With the explosive growth of internet data, graph data processing has become an indispensable part of social life. Current network simulation technologies mostly use digital twin technology to simulate real-world network structures, creating simulated networks that closely resemble the real environment. This highly realistic network environment not only provides researchers with a risk-free testing platform but also makes network design and security analysis more efficient and accurate. Furthermore, the visualization of complex network topologies is a key tool for understanding large network systems. By transforming complex network structures into intuitive graphical representations, it greatly simplifies the diagnosis and optimization of network problems.
[0003] The visual system is the primary means by which humans acquire information, highlighting the core role of visualization in data presentation. By transforming abstract network data into intuitive graphics, it not only helps users effectively understand network characteristics, patterns, and behaviors but also supports data manipulation and analysis, enabling accurate predictions and judgments. Therefore, network topology visualization is not only an important development direction for network security and management but also a key technology for improving network operational efficiency and response speed. As networks continue to expand and become more complex, effective visualization tools have become essential for monitoring network health, optimizing performance, and preventing security threats.
[0004] Current network topology visualization tools are primarily designed for specific network topologies, often lacking adaptability to different levels and types of topologies. This deficiency prevents many placement algorithms from fully utilizing the inherent characteristics of the network structure, thus limiting their placement efficiency and visual appeal. Especially in modern scenarios where network size and density are rapidly increasing, existing visualization placement algorithms face significant challenges, such as high computational time complexity and poor placement results, severely impacting their practicality and feasibility. Furthermore, with the continuous expansion of networks, these tools often cannot handle large-scale data flows, leading to slow processing speeds, inability to update network status in real time, and increased difficulty in network operation and maintenance. Summary of the Invention
[0005] In view of the aforementioned shortcomings of existing technologies, the technical problem to be solved by this invention is the high computational complexity and unsatisfactory layout effect encountered when processing large-scale and complex network topologies. Existing methods generally cannot simultaneously meet the dual requirements of processing speed and visual effect, and their development complexity is high. This inefficiency and ineffectiveness are particularly evident in the design of complex large-scale network structures, and their application scenarios are limited. Therefore, this invention provides a method for network topology visualization. Considering various network scenarios, this method not only improves processing efficiency and visual quality of layout but also has broad application potential and significant practical value, effectively supporting the needs of modern network design and management.
[0006] To achieve the above objectives, the present invention provides a method for visualizing network topology, comprising the following steps:
[0007] Configure and prepare the raw data parameters for the network topology;
[0008] Input and store the raw data parameters of the network topology, ensuring that the format and structure of the input data are correct;
[0009] After receiving the input raw data parameters, the raw data parameters are cleaned and preprocessed;
[0010] After cleaning and preprocessing, the Louvain algorithm is used to identify communities in the network and partition them.
[0011] An improved force-directed algorithm is used to lay out the network topology of each sub-region after partitioning, and the layout parameters are adjusted.
[0012] Adjust the relative positions of each sub-region network topology, adjust the position of each node in the overall network topology according to the logical relationship between nodes, and merge the results obtained from the sub-region network topology partitioning algorithms.
[0013] The results are plotted to output network topology information, thus enabling visualization of complex network topology structures.
[0014] Furthermore, the raw data parameters are the connection relationships and interaction data of each node in the network, including source node information, target node information, and weight information.
[0015] Furthermore, after receiving the input raw data parameters, the raw data parameters are cleaned and preprocessed, specifically including:
[0016] Check for missing node or edge information, incorrect data format, or illegal characters. If the connection relationship between nodes does not meet expectations, correct or delete it. Complete or impute missing data points and use data inference methods to ensure the integrity of network data.
[0017] After cleaning, the raw data is uniformly converted into a standard format, and the numerical data is standardized. The standardized data structure includes a source node, a target node, and a weight.
[0018] Furthermore, the Louvain algorithm is used to identify communities in the network and partition the cleaned and preprocessed data, enabling rapid identification of different communities in the network through stepwise optimization of block size.
[0019] Furthermore, the Louvain algorithm is used to identify communities in the network and partition them, including the following steps:
[0020] 1) Initial partitioning and modularity optimization: First, each node is treated as a community. Then, through local optimization of modularity, the nodes in the network are assigned to the communities that can maximize modularity one by one. This process will continue until no node can be moved further to improve modularity.
[0021] 2) Community Aggregation: Next, the obtained communities are aggregated, and each community is treated as a separate node to construct a new network. On this new network, the edge weights between communities are the sum of the edge weights between different communities in the original network.
[0022] 3) Repeat the steps: Repeat the above steps on the aggregated network, that is, optimize the allocation of nodes by modularity, and then aggregate the community again until the modularity no longer increases significantly.
[0023] Furthermore, by first optimizing the modularity locally, the nodes in the network are assigned one by one to the communities that maximize the modularity. Specifically, during initialization, each node forms its own community.
[0024] Then, for each node, try to move it into the community of all its neighboring nodes, and select the community that increases the modularity the most;
[0025] This step is repeated until it is no longer possible to increase the modularity by moving nodes;
[0026] The modularity formula is as follows:
[0027]
[0028] Where A ij This represents the actual connection between node i and node j. A value of 1 indicates a connection between them; otherwise, a value of 0 indicates a connection between them. i and k jThese are the degrees of nodes i and j, respectively, which are the number of connections to other nodes. m is the total number of edges in the network, and δ(c i ,c j ) is an indicator function; its value is 1 when nodes i and j belong to the same community, and 0 otherwise. i k j / 2m is the expected number of connections between node i and node j in a random network.
[0029] Next, the communities are aggregated and treated as individual nodes. The above steps are repeated on the aggregated network until the modularity no longer increases. Specifically, when local moves can no longer increase the modularity, the Louvain algorithm treats the currently found communities as new super nodes, and the connections between communities become new edges with the weight of the edges being the sum of the original edges between communities. After that, the Louvain algorithm repeats the local optimization phase on this new simplified network.
[0030] Furthermore, when calculating the gravitational force between nodes within a community, a community coefficient α is introduced to enhance this gravitational force. This coefficient is dynamically adjusted based on the average connection density of nodes within the community and the community size. For node pairs i and j within the community, the gravitational force formula is adjusted as follows:
[0031]
[0032] Where d is the actual distance between nodes, and k is a constant. opt It is the ideal distance, when α is greater than 1, which enhances the attraction between nodes within the same community.
[0033] Furthermore, an improved force-directed algorithm is used to lay out the network topology of each sub-region after partitioning, and the layout parameters are adjusted. Specifically, the improved force-directed layout algorithm is used to lay out each independent sub-region independently, and the position of the nodes is adjusted according to the interaction forces between the nodes to optimize the visual display effect of the network.
[0034] Furthermore, in the improved force-directed algorithm, temperature is used to control the step size of node movement. Initially, a higher temperature allows nodes to make larger random movements to explore more layout schemes; as the temperature decreases, the step size of node movement decreases, refining the layout. The formula is as follows:
[0035] T(t) = T0·α t
[0036] Where T(t) is the temperature of the t-th iteration; T0 is the initial temperature; α is the temperature decay factor, usually 0 < α < 1; and t is the iteration number.
[0037] Technical effect
[0038] This invention provides a method for visualizing network topology. It employs the Louvain partitioning algorithm to subdivide complex network structures into multiple sub-regions. By identifying densely connected clusters or communities within the network, a structured framework for layout optimization is provided, simplifying subsequent processing. Subsequently, an improved force-directed layout algorithm is applied within each independent sub-region. This algorithm simulates the repulsive and attractive forces between nodes based on physical mechanics principles, ensuring a compact and orderly node layout within each sub-region. Through local optimization of each sub-region, this method significantly reduces the number of global iterations, improving computational speed and layout accuracy. Finally, the layout results of all sub-regions are merged to form a unified and coherent network view. This integration not only ensures overall visual aesthetics but also maintains the functionality and practicality of the layout. Compared to traditional methods, this invention improves layout efficiency while meeting the visualization needs of network topology in various application scenarios such as connected vehicles, satellite networks, and industrial networks, providing an effective tool for real-time network monitoring, security analysis, and system optimization.
[0039] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. Attached Figure Description
[0040] Figure 1 This is a flowchart of a network topology visualization method according to a preferred embodiment of the present invention;
[0041] Figure 2 This is a schematic diagram of a network topology visualization method according to a preferred embodiment of the present invention;
[0042] Figure 3 This is an input data source data structure diagram of a network topology visualization method according to a preferred embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram showing the result of a network topology visualization method according to a preferred embodiment of the present invention. Detailed Implementation
[0044] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0045] In the following description, specific details, such as particular internal procedures and techniques, are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will appreciate that the invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of the invention with unnecessary detail.
[0046] like Figure 1 As shown, this embodiment of the invention provides a network topology visualization method, which is a network topology visualization method based on combining sub-region partitioning and an improved force-directed algorithm, specifically including the following steps:
[0047] Step 101: Configure and prepare the original data parameters of the network topology. The data parameter information is the connection relationship and interaction data of each node in the network, specifically including source node information, destination node information and weight information.
[0048] Step 102: Input and store the original network topology data parameters, ensuring the format and structure of the input data. The input data format consists of three parts: source node, target node, and weight value.
[0049] Step 103: Before data analysis, perform necessary cleaning and preprocessing on the raw network structure data. Specifically, this includes:
[0050] Check for missing node or edge information, incorrect data format, or illegal characters. If the connections between nodes do not conform to expectations (such as self-loops or duplicate edges), they should also be corrected or deleted; missing data points should be completed or imputed using data inference methods to ensure the integrity of the network data.
[0051] The raw data is uniformly converted into a standard format, and the numerical data is standardized to ensure the consistency of the numerical range. The standardized data structure includes a source node, a target node, and a weight.
[0052] Step 104: After cleaning and preprocessing, the Louvain algorithm is used to identify communities in the network and partition them. The Louvain algorithm is used to identify the size and structural characteristics of communities, and to identify and divide tightly connected node groups in the network by maximizing modularity. The attraction and repulsion forces are adjusted to ensure high cohesion within groups and low interconnection between groups.
[0053] By progressively optimizing modularity, different communities within the network are quickly identified. This process consists of two phases: first, local optimization of modularity, where nodes are assigned one by one to communities that maximize modularity; then, communities are aggregated, treated as individual nodes, and the above steps are repeated on the aggregated network until modularity no longer increases. The modularity formula is as follows:
[0054]
[0055] Where A ij This represents the actual connection between node i and node j (value 1 if there is an edge connecting them; value 0 otherwise), k i and k j δ(c) represents the degree (i.e., the number of connections to other nodes) of nodes i and j, respectively, m is the total number of edges in the network, and δ(c) represents the number of connections to other nodes. i ,c j ) is an indicator function; its value is 1 when nodes i and j belong to the same community, and 0 otherwise. i k j / 2m is the expected number of connections between node i and node j in a random network.
[0056] The Louvain algorithm is used to initialize the network partitioning. This hierarchical optimization method is used to quickly discover community structure and optimize community partitioning by maximizing modularity. For each node i, the algorithm calculates the potential gain in modularity Q after moving it to the community of each neighboring node. The modularity gain is the key factor in deciding whether to move node i to a new community, and its calculation formula is as follows:
[0057]
[0058] Where, ∑ in It is the sum of the weights of all internal edges in the considered community; k i,in It is the sum of the weights of the edges between node i and other nodes in the community; ∑ tot k is the total degree of all nodes in the community (including all edges connecting to and from the community); i is the degree of node i, which is the sum of the weights of all edges connected to node i; m is the sum of the weights of all edges in the graph.
[0059] All nodes belonging to the same community will be merged into a new super node, and the edges in the network will also be merged accordingly. The edge weights of the new graph are the sum of the weights of the edges between corresponding communities in the original graph. This process is repeated iteratively until the merging operation no longer leads to a significant increase in modularity.
[0060] Step 105: Apply an improved force-directed algorithm to the partitioned results to lay out the network topology of each sub-region and adjust the layout parameters. Specifically, the improved force-directed layout algorithm is used to independently lay out each sub-region, adjusting the node positions based on the interaction forces between nodes to optimize the visual appearance of the network. During the layout process, the concept of temperature is used to control the step size of node movement.
[0061] Combining steps 104 and 105, the algorithm flowchart is as follows: Figure 2 As shown, the steps are as follows:
[0062] First, the Louvain algorithm is used to initialize the partitioning of the complex network structure, with the aim of decomposing the large network into several smaller sub-networks, each community consisting of nodes with a high connection density to each other.
[0063] Then, the gravity coefficient α is dynamically adjusted based on the connection density within the community and the size of the community. α is dynamically adjusted based on the average density of nodes within the community. If the connection density within the community is high, α needs to be decreased to avoid overcrowding; if the nodes within the community are too dispersed, α needs to be increased to improve cohesion. The gravity formula is as follows:
[0064]
[0065] Where d is the actual distance between nodes, and k is a constant. opt It is the ideal distance, while α (greater than 1) enhances the attraction between nodes within the same community.
[0066] Simultaneously, to avoid overlap between communities, β is adjusted to optimize based on the network size and the spatial distribution of communities. The adjustment of β is based on the spatial distribution of communities and the network size. If communities are too close together, β needs to be increased; if communities are too far apart, β needs to be decreased. An appropriate β can effectively prevent overlap between different communities while ensuring that the distance between communities is not too large. The repulsive force formula is as follows:
[0067]
[0068] Where d is the actual distance between nodes, k is a constant, and β (greater than 1) is for node pairs between communities to ensure that appropriate community spacing is maintained between different communities.
[0069] The initial setting rules for the two coefficients are as follows:
[0070] 1) α: This coefficient should reflect the appropriate density of connections between nodes within the community. This coefficient is proportional to the internal connection density of the community. It can start with a moderate value of 1.5 and then be dynamically adjusted according to the above.
[0071] 2) β: This coefficient is used to adjust the repulsion between nodes in different communities, preventing node overlap. It can be started with an initial value of 1.2, and then dynamically adjusted based on the above conditions.
[0072] The following will use an aviation network as an example to illustrate the method of the present invention, wherein the aviation network is divided into five regional communities by the Louvain partitioning algorithm, and the number of nodes and connections in each community is different.
[0073] Initially, α = 1.5 and β = 1.2 were set as initial values. α promotes close connections between airports within the community and enhances the density of routes within the region, while β ensures that communities maintain appropriate independence and avoids excessive integration of routes between different regions.
[0074] Then, the average connectivity density (the average number of flights between airports within each community) and the average shortest distance between communities (the average flight distance between airports in each community) were calculated.
[0075] If the average connection density of Community 1 is found to be 20% higher than the network average, it indicates that flights between airports within Community 1 are very frequent. To prevent over-concentration, α for Community 1 is reduced to 1.5*(1-0.2)=1.2.
[0076] If the average shortest distance between Community 2 and Community 3 is found to be 7 units, while the expected threshold is twice 10 units, i.e., 20 units, then the repulsive force needs to be increased to widen the distance between the two communities. The β between Community 2 and Community 3 is adjusted to 1.2*(10 / 7)=1.7.
[0077] Meanwhile, a temperature control mechanism is introduced to optimize the layout of each independent community during node placement: the movement step size of nodes in each iteration is controlled by temperature T(t), improving the flexibility and efficiency of the layout. The specific operation is as follows:
[0078] 1) Setting a relatively high initial temperature T0 allows nodes to move over a larger range in the early stages, which helps to quickly escape from possible local optima.
[0079] 2) Using the formula T(t)=T0·α t The temperature is controlled to decrease gradually, where α is a decay factor ranging from 0 to 1, such as 0.95, which means that the temperature will decrease by 5% after each iteration.
[0080] 3) As the temperature gradually decreases, the movement step size of the nodes decreases accordingly, allowing the algorithm to refine the node positions and gradually tend towards a more stable and balanced layout.
[0081] Steps 106-107: Adjust the relative positions between the sub-regions. First, initialize and randomly generate the initial positions of nodes in each sub-region, ensuring uniform distribution on the two-dimensional plane to avoid overlap. Then, iteratively update the results of each sub-region obtained in steps 104 and 105. The formula for calculating the new position of each node is p. new =p old +α·F
[0082] Where F is the net force on the node and α is the learning rate. The position of the node is updated by iterative updates until the system converges to a set threshold, usually 0.01. At this point, convergence can be considered achieved and the iteration can be stopped.
[0083] In this process, an object G is constructed using the optimized sub-region information through the NetworkX library. First, a graph object is created to store node and edge information. Specifically, for each optimized sub-region, its nodes are added to the graph, and the nodes are located using the sub-region's position information, saving the node IDs and related attributes. Next, connecting edges are added between sub-regions to form the complete network structure.
[0084] Next, set the node's visual attributes, including its size and color. The node's size can be adjusted based on its degree to reflect its importance, while the color can be set according to the type or characteristics of its sub-regions to improve readability.
[0085] After the graph is constructed, the network topology is plotted using the Matplotlib library. Simultaneously, the network node and edge information is output in CSV format, including the ID of each node and the source, destination, and weight information of each edge, for subsequent data analysis and processing.
[0086] The following example uses a random network as an illustration of a network topology visualization method based on a combination of sub-region partitioning and an improved force-directed algorithm, proposed according to an embodiment of the present invention. The input data source is as follows: Figure 3 As shown, the data structure is as follows:
[0087] Source Target Weight
[0088] These are the source node, the target node, and the weight. The weight may have different meanings in different network scenarios. For example, in transportation networks or network flows, the weight usually represents the flow of traffic through a certain edge; in other infrastructure networks such as power grids, the edge weight can represent the maximum carrying capacity of pipelines, power lines, etc.; in social networks, the edge weight can represent the degree of trust and importance between individuals.
[0089] The results obtained by the method of this invention are as follows: Figure 4As shown in the diagram, this example consists of 25 nodes and 66 edges. Each node's corresponding number is displayed to the right, and the number of nodes, edges, partitioning time using the Louvain algorithm, and overall layout time are also labeled in the lower right corner of the graph. Node colors represent different communities: by coloring nodes differently, it's easy to see which nodes belong to the same community. Each community is distinguished by a different color, reflecting the relative independence between communities. Nodes of the same color tend to be more connected in the network, while nodes of different colors are less connected.
[0090] In addition, the edge weight information affects the following two aspects:
[0091] 1) Distance between nodes: The larger the weight, the smaller the calculated gravity, which means that the attraction between two nodes is weakened, thus increasing the distance between the nodes; the weight directly affects the final distance between nodes. Edges with larger weights make the corresponding two nodes farther apart in the graph, while edges with smaller weights make the nodes closer together.
[0092] 2) Community structure: Weights do not directly determine the division of communities, but they do affect the structure and visualization of communities. When performing community detection, the Louvain algorithm considers the connectivity and modularity of edges. Weights affect the calculation of modularity. Edges with larger weights are more likely to be assigned to the same community because their connection is stronger.
[0093] Based on the tests in this embodiment, the network partitioning and layout efficiency has been significantly improved. In multiple tests with different input datasets, the average layout time has been reduced by approximately 34%. This significant improvement makes the algorithm perform well in large-scale network applications that require fast network analysis and visualization. Furthermore, due to the effect of partitioning, the clustering coefficient is improved by an average of approximately 15% compared to the ordinary force-directed algorithm. This improvement also allows nodes to be more concentrated in the same community, reflecting a tighter internal structure in the network.
[0094] This invention provides a network topology visualization method based on a combination of sub-region partitioning and an improved force-directed algorithm. The Louvain partitioning algorithm subdivides complex network structures into multiple sub-regions, identifying densely connected clusters or communities within the network to provide a structured framework for layout optimization and simplify subsequent processing. Subsequently, an improved force-directed layout algorithm is applied within each independent sub-region. This algorithm simulates the repulsive and attractive forces between nodes based on physical mechanics principles, ensuring a tight and orderly node layout within each sub-region. By performing local optimization on each sub-region, this method significantly reduces the number of global iterations, improving computational speed and layout accuracy. Finally, the layout results of all sub-regions are merged to form a unified and coherent network view. This integration not only ensures overall visual aesthetics but also maintains the functionality and practicality of the layout. Compared to traditional methods, this invention improves layout efficiency while meeting the visualization needs of network topology in various application scenarios such as vehicle-to-everything (V2X) networks, satellite networks, and industrial networks, providing an effective tool for real-time network monitoring, security analysis, and system optimization.
[0095] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A method for visualizing network topology, characterized in that, Includes the following steps: Configure and prepare the raw data parameters for the network topology; Input and store the raw data parameters of the network topology, ensuring that the format and structure of the input data are correct; After receiving the input raw data parameters, the raw data parameters are cleaned and preprocessed; After cleaning and preprocessing, the Louvain algorithm is used to identify communities in the network and partition them. An improved force-directed algorithm is used to lay out the network topology of each sub-region after partitioning, and the layout parameters are adjusted. Adjust the relative positions of each sub-region network topology, adjust the position of each node in the overall network topology according to the logical relationship between nodes, and merge the results obtained from the sub-region network topology partitioning algorithms. The results are plotted to output network topology information, thus enabling visualization of complex network topology structures.
2. The method for visualizing network topology as described in claim 1, characterized in that, The raw data parameters are the connection relationships and interaction data of each node in the network, including source node information, target node information, and weight information.
3. The method for visualizing network topology as described in claim 2, characterized in that, After receiving the input raw data parameters, the raw data parameters are cleaned and preprocessed, specifically including: Check for missing node or edge information, incorrect data format, or illegal characters. If the connection relationship between nodes does not meet expectations, correct or delete it. Complete or impute missing data points and use data inference methods to ensure the integrity of network data. After cleaning, the raw data is uniformly converted into a standard format, and the numerical data is standardized. The standardized data structure includes a source node, a target node, and a weight.
4. The method for visualizing network topology as described in claim 1, characterized in that, After cleaning and preprocessing, the Louvain algorithm is used to identify communities in the network and partition them to quickly identify different communities in the network through stepwise optimization of block size.
5. The method for visualizing network topology as described in claim 4, characterized in that, The Louvain algorithm is used to identify and partition communities in a network, including the following steps: 1) Initial partitioning and modularity optimization: First, each node is treated as a community. Then, through local optimization of modularity, the nodes in the network are assigned to the community that maximizes modularity one by one. This process is repeated until no node is moved to increase modularity. 2) Community Aggregation: Next, the obtained communities are aggregated, and each community is treated as a separate node to construct a new network. On this new network, the edge weights between communities are the sum of the edge weights between different communities in the original network. 3) Repeat the steps: Repeat the above steps on the aggregated network, that is, optimize the allocation of nodes by modularity, and then aggregate the community again until the modularity no longer increases significantly.
6. The method for visualizing network topology as described in claim 5, characterized in that, First, through local optimization of modularity, the nodes in the network are assigned one by one to the community that maximizes modularity. Specifically, during initialization, each node forms its own community. Then, for each node, try to move it into the community of all its neighboring nodes, and select the community that increases the modularity the most; This step is repeated until it is no longer possible to increase the modularity by moving nodes; The modularity formula is as follows: Where A ij This represents the actual connection between node i and node j. A value of 1 indicates a connection between them; otherwise, a value of 0 indicates a connection between them. i and k j These are the degrees of nodes i and j, respectively, which are the number of connections to other nodes. m is the total number of edges in the network, and δ(c i ,c j ) is an indicator function; its value is 1 when nodes i and j belong to the same community, and 0 otherwise. i k j / 2m is the expected number of connections between node i and node j in a random network.
7. The method for visualizing network topology as described in claim 6, characterized in that, Next, the communities are aggregated and treated as individual nodes. The above steps are repeated on the aggregated network until the modularity no longer increases. Specifically, when local moves can no longer increase the modularity, the Louvain algorithm treats the currently found communities as new super nodes, and the connections between communities become new edges with the weight of the edges being the sum of the original edges between communities. After that, the Louvain algorithm repeats the local optimization phase on this new simplified network.
8. The method for visualizing network topology as described in claim 6, characterized in that, When calculating the gravitational force between nodes within a community, a community coefficient α is introduced to enhance this force. This coefficient is dynamically adjusted based on the average connection density of nodes within the community and the community size. For node pairs i and j within the community, the gravitational formula is adjusted as follows: Where d is the actual distance between nodes, and k is a constant. opt It is the ideal distance, when α is greater than 1, which enhances the attraction between nodes within the same community.
9. The method for visualizing network topology as described in claim 1, characterized in that, An improved force-directed algorithm is used to lay out the network topology of each sub-region after partitioning, and the layout parameters are adjusted. Specifically, the improved force-directed layout algorithm is used to lay out each independent sub-region independently, and the position of the nodes is adjusted according to the interaction forces between the nodes to optimize the visual display effect of the network.
Citation Information
Patent Citations
Social media information propagation visualized analysis method and system based on map metaphor
CN106157155A
Incremental steady-state layout method for time-varying network data
CN109962811A