A method for maintaining traffic state during network topology scaling
By combining the coordinates of the view layer and the hidden layer, the problem of incorrect traffic flow during node scaling in the network topology graph is solved, and dynamic traffic display and restoration of the topology graph are realized.
Patent Information
- Application Number
- CN202310675716.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-06-08
AI Technical Summary
Existing network topology mapping tools are insufficient in terms of dynamism and interactivity, and cannot effectively maintain the correct flow and restoration of traffic when nodes are scaled up or down.
By combining view layer coordinates and hidden layer coordinates, the intermediate state coordinate logic of traffic during topology scaling is calculated to ensure that traffic continues to flow correctly during node scaling.
It achieves the correct flow and restoration of traffic during topology scaling, maintaining the dynamic traffic display effect of the topology graph.
Smart Images

Figure CN117041063B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of topology analysis, and specifically relates to a method for maintaining traffic status when scaling network topology. Background Technology
[0002] Network topology diagrams are powerful analytical tools for observing the state and performance of various components of a network. Nodes in a topology diagram are interconnected and transmit data and interact with each other, giving the network topology diagram the characteristics of efficient perception and free interaction.
[0003] In a large network topology, numerous nodes may transmit traffic within a short period. However, due to the performance limitations of current solutions, data observation and recording are not efficient. Therefore, a network topology platform capable of selectively observing, collecting, statistically analyzing, and processing this type of high-concurrency data is necessary.
[0004] There are currently two main methods for creating topology diagrams:
[0005] 1) Commercial implementations, such as NetworkX and Cacti, possess proprietary image engines, providing users with various charts based on different data. NetworkX is widely used in visualization projects across various disciplines, but it has certain shortcomings in dynamic and interactive capabilities. NetworkX offers users limited configuration options and has certain requirements for usage scenarios. This means that the topology diagrams obtained using this tool must be repackaged by developers to adapt to multiple usage scenarios, inevitably leading to performance losses and significantly reduced interactivity. Visio, a software in the Microsoft Office suite, is responsible for drawing flowcharts and diagrams, and it also supports automatic topology diagram drawing via macros. However, Visio's dynamic and interactive capabilities are extremely weak, making it only suitable for static visualization of topology diagrams.
[0006] 2) Visualization chart libraries: Examples of such libraries include ECharts from the Apache Software Foundation, AntV from Ant Financial, and HighCharts from abroad. These libraries emphasize tool-specific features and are designed for mainstream MVVM (Model-View-ViewModel) frameworks, primarily focusing on providing chart libraries rather than complete business solutions. Users only need to provide data according to the library's usage standards to quickly obtain visualization results. However, these libraries also have significant drawbacks. They strictly limit usage methods and interfaces, failing to provide different rendering mechanisms for devices with varying key characteristics, thus limiting flexibility. Furthermore, the performance ceiling of these libraries depends entirely on the interfaces provided by each company, and cannot fully meet the high demands of users.
[0007] Among existing tools, the closest implementation to this functionality in topology graphs is the AntvG6 chart library. AntvG6's radial tree allows users to converge other branches of a given topology node by clicking, but traffic cannot be added to this tree structure. Furthermore, AntvG6's implementation of traffic-based charts does not support scaling nodes within the topology graph. Summary of the Invention
[0008] In view of the aforementioned deficiencies in the prior art, the purpose of this invention is to provide a method for maintaining traffic status during network topology scaling. This method utilizes a combination of view layer coordinates and hidden layer coordinates to obtain the intermediate state coordinates of traffic during topology scaling. This ensures the correct flow and restoration of traffic during topology node scaling.
[0009] To achieve the objectives of this invention, the following technical solutions are adopted:
[0010] A method for maintaining traffic state during network topology scaling, the method comprising the following steps:
[0011] Step 1) Provide visible layer coordinates and hidden layer coordinates for each node and traffic in the topology engine;
[0012] Step 2) Gather the node set: Before the topology shrinkage or expansion animation begins, collect all nodes involved in this topology shrinkage or expansion action as a node set;
[0013] Step 3) Node hierarchical filtering: Based on the hierarchical attributes of the topology nodes, find the node with the highest hierarchical attribute in the node set described in Step 2) as the key point for subsequent aggregation or expansion.
[0014] Step 4) Topology node scaling action: Except for the key points, the other nodes find the highest level node adjacent to themselves, and add an animation of each node moving to the highest level attribute node adjacent to itself and returning to the original coordinates; after the aggregation is completed, the traffic is also hidden due to the hiding of the edges, thus achieving the effect of aggregating topology nodes and edges.
[0015] Step 5) Calculate the flow ratio. The ratio of the part of the flow that has been completed in the edge to the length of the entire edge is calculated through the hidden layer. Since the ratio in the view layer is consistent with the ratio in the hidden layer during the scaling of the topology node, the ratio in the view layer is drawn based on this relationship.
[0016] Step 6) Convert the relative position mapping to the view layer. Before scaling the node, calculate the position coordinates of the flow in the view layer by using the coordinates of the nodes at both ends of the edge where the flow is located in the view layer and the flow ratio described in Step 5). When scaling the node, the ratio of the length of the flow that has completed flow on the edge to the length of the entire edge remains dynamically consistent in both the view layer and the hidden layer. Use the ratio and the coordinates of the nodes at both ends of the edge where the flow is located in the view layer to calculate the coordinate position of the flow in the view layer, and then draw it to maintain the correct flow and restoration of the flow.
[0017] Furthermore, in step 1), all topology nodes are set to a hidden coordinate layer in a fully expanded state;
[0018] Furthermore, in step 1), all operations will first be performed on the hidden layer, and then the results of the operations will be combined with the specific operations and mapped to the visible layer.
[0019] Furthermore, in step 4), during the contraction action, each node converges towards its adjacent highest-level node, and the converged node also eventually moves towards the node with the highest-level attribute among all nodes involved in this topology, so that all nodes can converge towards the point with the highest-level attribute.
[0020] Furthermore, in step 4), during the expansion action, an action is added to return each shrunken node to its coordinates in the hidden layer, which can realize the expansion and restoration of the node.
[0021] Furthermore, in step 4), the shrinking action hides the topological nodes and edges of the node collection set and associated edges described in step 2); the expanding action restores the topological nodes and edges of the node collection set and associated edges described in step 2).
[0022] Furthermore, in step 4), the node with the highest hierarchical attribute takes over the flow transmission and edge connection of the other nodes. During this process, due to the final overlap of the nodes, the length of the topological edge is 0. This edge can be hidden from the view layer to achieve the effect of converging the topological nodes and edges, while maintaining the correct flow of traffic.
[0023] Furthermore, in step 5), the method for calculating the ratio of the portion of the flow that has completed its flow in the corresponding edge to the total length of the edge is as follows: First, obtain the coordinates of the flow in the next frame, the coordinates of the flow in the hidden layer coordinate system, and the coordinates of the two endpoints of the edge where the flow is located in the hidden layer coordinate system. Then, the flow ratio = the distance of the flow that has completed its flow / the length of the edge where the flow is located in the hidden layer.
[0024] The beneficial effects of this invention are:
[0025] 1. By combining hidden layer coordinates with visible layer coordinates, topology scaling and dynamic traffic visualization can be achieved simultaneously.
[0026] 2. It can correctly display and restore the intermediate coordinates of the flow during the node scaling process;
[0027] 3. Maintain proper flow of traffic during topology scaling. Attached Figure Description
[0028] Figure 1 This is a flowchart of the method of the present invention;
[0029] Figure 2 This is a schematic diagram illustrating the calculation of the flow ratio according to the present invention;
[0030] Figure 3 This is a simplified topological example demonstrating the effects of this invention; Detailed Implementation
[0031] The embodiments of the present invention will be described in detail below. The embodiments described below are implemented based on the technical solution of the present invention, and detailed implementation methods and specific operation processes are given. However, the protection scope of the present invention is not limited to the embodiments described below.
[0032] Figure 1 This is a flowchart of the method of the present invention, which includes 6 stages: Stage 1 is to set the visible layer coordinates and hidden layer coordinates for topology nodes and traffic; Stage 2 is to aggregate the node set; Stage 3 is to filter the node layers; Stage 4 is to perform topology node scaling actions, including adding shrinking or expanding actions to topology nodes except for the highest point of the layer attribute; Stage 5 is to calculate the traffic flow ratio; Stage 6 is to convert the relative position mapping to the view layer.
[0033] like Figure 1This paper presents a method for maintaining traffic status during network topology scaling, which includes the following steps:
[0034] Step 1) Provide visible layer coordinates and hidden layer coordinates for each node and traffic in the topology engine;
[0035] Step 2) Gather the node set: Before the topology shrinkage or expansion animation begins, collect all nodes involved in this topology shrinkage or expansion action as a node set;
[0036] Step 3) Node hierarchical filtering: Based on the hierarchical attributes of the topology nodes, find the node with the highest hierarchical attribute in the node set described in Step 2) as the key point for subsequent aggregation or expansion.
[0037] Step 4) Topology node scaling action: Except for the key points, the other nodes find the highest level node adjacent to themselves, and add an animation of each node moving to the highest level attribute node adjacent to itself and returning to the original coordinates; after the aggregation is completed, the traffic is also hidden due to the hiding of the edges, thus achieving the effect of aggregating topology nodes and edges.
[0038] Step 5) Calculate the flow ratio. Calculate the ratio of the portion of the flow that has been completed in the edge to the total length of the edge. Because the ratio in the view layer is consistent with the ratio in the hidden layer during the scaling of the topology node, the ratio in the view layer is drawn based on this relationship using the hidden layer.
[0039] Step 6) Convert the relative position mapping to the view layer. Before scaling the node, calculate the position coordinates of the flow in the view layer by using the coordinates of the nodes at both ends of the edge where the flow is located in the view layer and the flow ratio described in Step 5). When scaling the node, the ratio of the length of the flow that has completed flow on the edge to the length of the entire edge remains dynamically consistent in both the view layer and the hidden layer. Use the ratio and the coordinates of the nodes at both ends of the edge where the flow is located in the view layer to calculate the coordinate position of the flow in the view layer, and then draw it. The intermediate coordinate calculation logic of the flow during the topology scaling process is obtained by combining the coordinates of the view layer and the hidden layer, which maintains the correct flow and restoration of the flow.
[0040] like Figure 2 As shown, step 5) involves calculating the flow rate ratio, which includes the following steps:
[0041] Nodes 2 and 9 converge towards nodes 0 and 5 respectively, while traffic is flowing from node 9 to node 2. First, the edge length X1 from node 2 to node 9 is calculated in the view layer. Then, the distance X2 of the completed flow is obtained using the coordinates of the hidden layer where the traffic is located and the coordinates of node 9 in the hidden layer. Subsequently, the flow ratio R = X2 / X1 is obtained. Then, the edge length Y1 of the traffic in the view layer is obtained by using the coordinates of node 9 and node 0 in the view layer. By using Y1 and the flow ratio R, the distance coordinates Y2 of the completed flow in the view layer are obtained. Finally, the traffic is drawn in the view layer, thus maintaining the flow of traffic during topology scaling.
[0042] like Figure 3 As shown, a simplified topology example is used to demonstrate the effect. During the topology scaling process, the topology nodes converge to the highest-level node in the topology and are finally expanded and restored. The traffic between the scaled nodes is converted to the view layer coordinates based on the logical layer coordinates on the left of the figure (which are not visible in normal use scenarios), thus maintaining the correct flow and restoration of traffic.
[0043] 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 preserving traffic state during network topology scaling, characterized by: Includes the following steps: Step 1) Provide visible layer coordinates and hidden layer coordinates for each node and traffic in the topology engine; Step 2) Gather the node set: Before the topology shrinkage or expansion animation begins, collect all nodes involved in this topology shrinkage or expansion action as a node set; Step 3) Node hierarchical filtering: Based on the hierarchical attributes of the topology nodes, find the node with the highest hierarchical attribute in the node set described in Step 2) as the key point for subsequent aggregation or expansion. Step 4) Topology node scaling action: Except for the key points, the other nodes find the highest level node adjacent to themselves, and add an animation of each node moving to the highest level attribute node adjacent to itself and returning to the original coordinates. After the aggregation is completed, the traffic is also hidden because the edges are hidden, thus achieving the effect of aggregating topological nodes and edges; Step 5) Calculate the flow ratio. The ratio of the part of the flow that has been completed in the edge to the length of the entire edge is calculated through the hidden layer. Since the ratio in the view layer is consistent with the ratio in the hidden layer during the scaling of the topology node, the ratio in the view layer is drawn based on this relationship. Step 6) Convert the relative position mapping to the view layer. Before scaling the node, calculate the position coordinates of the flow in the view layer by using the coordinates of the nodes at both ends of the edge where the flow is located in the view layer and the flow ratio described in Step 5). When scaling the node, the ratio of the length of the flow that has completed flow on the edge to the length of the entire edge remains dynamically consistent in both the view layer and the hidden layer. Use the ratio and the coordinates of the nodes at both ends of the edge where the flow is located in the view layer to calculate the coordinate position of the flow in the view layer, and then draw it. The intermediate coordinate calculation logic of the flow during the topology scaling process is obtained by combining the coordinates of the view layer and the hidden layer, which maintains the correct flow and restoration of the flow. In step 5), the method for calculating the ratio of the portion of the flow that has completed its flow in the corresponding edge to the total length of the edge is as follows: First, obtain the coordinates of the flow in the next frame, the coordinates of the flow in the hidden layer coordinate system, and the coordinates of the two endpoints of the edge where the flow is located in the hidden layer coordinate system. Then, the flow ratio is calculated as: Flow ratio = Flow distance completed / Flow length of the edge where the hidden layer is located.
2. The method for maintaining traffic status during network topology scaling according to claim 1, characterized in that: In step 1), all topology nodes are set to a hidden coordinate layer in a fully expanded state.
3. The method for maintaining traffic status during network topology scaling according to claim 1, characterized in that: In step 1), all operations will first be performed on the hidden layer, and then the results will be mapped to the visible layer in combination with the specific operations.
4. The method for maintaining traffic status during network topology scaling according to claim 1, characterized in that: In step 2), the nodes that have been converged expand all the shrunken points to complete the expansion action.
5. The method for maintaining traffic status during network topology scaling according to claim 1, characterized in that: In step 4), during the contraction action, each node converges towards its highest-level neighboring node, and the converged node eventually moves towards the node with the highest-level attribute among all nodes involved in this topology, so that all nodes can converge towards the point with the highest-level attribute.
6. The method for maintaining traffic status during network topology scaling according to claim 1, characterized in that: In step 4), during the expansion action, an action is added to return each shrunken node to its coordinates in the hidden layer, which can realize the expansion and restoration of the node.
7. The method for maintaining traffic status during network topology scaling according to claim 1, characterized in that: In step 4), the shrinking action hides the topological nodes and edges of the node collection set and associated edges described in step 2); the expanding action restores the topological nodes and edges of the node collection set and associated edges described in step 2).
8. The method for maintaining traffic status during network topology scaling according to claim 1, characterized in that: In step 4), the node with the highest hierarchical attribute takes over the flow transmission and edge connection of the other nodes. During this process, due to the final overlap of nodes, the length of the topological edge is 0. This edge can be hidden from the view layer to achieve the effect of converging topological nodes and edges, while maintaining the correct flow of traffic.
