Constraint-driven fast topology rendering method, device and medium for network security
Through the constraint-driven fast topology presentation method for network security, combined with spectral graph drawing and force-directed layout algorithm, the problem of poor layout in graph visualization is solved, and high-quality network topology graphs are quickly generated, which is suitable for large-scale complex graph layout.
Patent Information
- Application Number
- CN202510077103.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-01-17
AI Technical Summary
Existing technologies have poor layout in graphic visualization, requiring users to make manual adjustments, which is time-consuming and labor-intensive, and the versatility of layout algorithms in different scenarios is limited.
A constraint-driven fast topology rendering method for network security is adopted, which combines spectral graph drawing technology and force-directed layout algorithm to generate high-quality network topology graphs through initialization, preliminary layout constraints, improvement of preliminary layout and incremental layout optimization.
It can quickly generate high-quality network topology diagrams, support multiple constraints, and is suitable for large-scale complex graphic layouts. It improves the balance between layout speed and effect and is suitable for displaying complex node relationships and hierarchical structures.
Smart Images

Figure CN119996212B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of computer application, and is a graph layout algorithm for network security, faster layout speed, better constraint effect, and supporting composite data. TECHNICAL BACKGROUND
[0002] In today's era, technology drives data to accumulate at a rapid rate like a surging tide. Data from multiple fields such as the Internet, the Internet of Things, enterprises, and scientific research are gathered in a large amount every day, with a surprising scale and growth rate. Under this background, data visualization in the field of network security has received great attention and has become one of the key tools for analyzing and defending network threats. Among the various ways of data visualization, graphs or network topology graphs are one of the most commonly used presentation forms. For relational data, network topology graphs can help security experts quickly identify potential risks and attack paths by visually displaying various objects and their connection relationships. Network topology graphs not only effectively integrate complex network structures, interactions between devices, data flow directions, and security event information, but also help analysts understand potential vulnerabilities, abnormal traffic, and inter-system dependencies in the network. This visualization method plays an important role in network security protection, vulnerability detection, and threat response, especially when dealing with large-scale and complex network architectures. Compared to traditional table displays, network topology graphs present a more clear and intuitive relationship pattern. However, there are some shortcomings in the current research on technologies based on relational information:
[0003] 1. When visualizing relational information through graphs, poor object and connection layout can cause users to feel confused, and users often need to spend up to 20% of their time manually adjusting the layout, which consumes a lot of effort and time and greatly affects the efficiency of use.
[0004] 2. In practical applications, although layout algorithms are relatively free in optimization indicators, application programs often have specific domain restrictions on the placement of individual nodes or require alignment and relative positioning of a group of nodes, which limits the layout from fully utilizing the algorithm and restricts the universality of visualization in different scenarios. SUMMARY
[0005] To address the problems in the prior art, the present application aims to provide a new automatic layout topology algorithm for network security, which has high speed like spectral graph drawing technology and can quickly perform related operations and layout operations, and also has high quality like force-directed layout algorithms to ensure that the layout effect reaches an ideal state.
[0006] The present application is a constraint-driven fast topology presentation method for network security, comprising the following steps:
[0007] Initialization: Connect the subgraphs of the composite graph to form a whole connected graph, and generate a preliminary layout based on the connected graph;
[0008] Preliminary layout constraint: Perform rotation and reflection transformation operations on the whole layout to improve the compatibility of the whole layout with constraints, and execute various constraint conditions to obtain a preliminary constrained layout.
[0009] Perfect preliminary layout: On the basis of the preliminary layout, eliminate the overlap between nodes and the nesting relationship in the graph, and maintain various constraint conditions executed previously to refine and optimize the whole layout.
[0010] Incremental layout optimization: Set a low cooling factor, gradually eliminate overlap, maintain nesting, and maintain constraints to finally obtain a high-quality layout.
[0011] Network topology presentation: Present the final network topology on the canvas.
[0012] Further, the initialization specific steps include the following:
[0013] S11, input the composite graph G=(V, E, F), identify the independent subgraphs in the composite graph, connect the subgraphs to form a whole connected simple subgraph;
[0014] S12, on the connected simple subgraph, calculate the eigenvectors and eigenvalues of the Laplacian matrix of the graph, and use the eigenvectors as node coordinates to obtain a preliminary layout;
[0015] S13, store the node information in the node array nodeArray, store the edges in the edge array edgeArray, initialize the speed value of the node, set the cooling coefficient, and store the index value of the node in the index array indexArray;
[0016] Further, the preliminary layout constraint specific steps include the following:
[0017] S21, according to the reference node and the target of the layout, calculate the angle of rotation; align the layout to a specific axis, align the nodes along the axis by calculating the rotation angle, adjust the coordinates of the nodes by the rotation matrix R(θ), and obtain the new node position;
[0018]
[0019] S22, according to the characteristics of the layout, select a suitable reflection axis, and apply a reflection matrix to adjust the node position by the reflection matrix to obtain the reflected layout;
[0020] S23, alignment constraint, keep all nodes that need to be aligned in alignment after transformation; including horizontal, vertical and set direction alignment, to ensure that the nesting relationship in the layout is not disturbed, and the relative position between nodes will not violate the constraint after rotation and reflection transformation;
[0021] S24, processing the layout constraint after transformation, fixing node constraint, for the node that has fixed position, cannot be rotated or reflected, alignment constraint is executed, re-evaluate the relative position between nodes, and adjust the position of the node as needed, relative position constraint requires to keep the fixed distance or relative position between nodes;
[0022] S25, generating a preliminary layout.
[0023] Further, the perfecting preliminary layout step specifically includes the following:
[0024] S31, calculate the displacement of each node in each iteration, determine the moving direction and distance of the node according to the action of different types of force, adjust the position of the node by continuous iteration, finally eliminate the overlap between nodes, and make the overall layout more compact and beautiful;
[0025] S32, when calculating the node displacement, consider the nesting relationship between nodes, use KD tree algorithm to ensure that the node is maintained inside its parent node, and use the corresponding force parameter to ensure that the node can naturally gather around the parent node, forming a clear hierarchical structure;
[0026] S33, the displacement of the fixed node will be reset, that is, the node will not move; for the node group with vertical alignment constraint, the displacement in x(y) direction will be adjusted to the average value of the displacement in this direction;
[0027] If at least one of these nodes has a fixed node constraint in the same direction, all displacement values in this direction will be reset, for the node involving relative position constraint, its displacement in this direction will be adjusted, only allowed to move to the position that does not violate the constraint condition; if the node also has a fixed node constraint in the same direction, its displacement has been reset; if it also has an alignment constraint, its displacement has been updated to maintain the alignment.
[0028] Further, the incremental layout optimization step specifically includes the following:
[0029] S41, set a lower cooling factor that meets the set value, so that the algorithm can start from the current relatively stable initial layout and gradually converge to the final optimal layout;
[0030] S42, in each iteration, the position of each node is adjusted by calculating the mechanical model of the node; each node updates its position according to the interaction force between it and other nodes during the iteration process; at the same time, considering the constraint conditions, it is ensured that the movement of the node does not violate these conditions; at this time, the calculation of force not only depends on the distance between nodes, but also adjusts the size and direction of force according to the constraints that have been established;
[0031] S43, in order to avoid instability or oscillation of nodes during iteration, an adaptive adjustment mechanism is used to control the maximum displacement range of the nodes;
[0032] S45, at the end of each iteration, the quality of the current layout is evaluated, including node overlap, clarity of nested structure and satisfaction of constraint conditions, if the current layout meets the set convergence condition, the optimization process is ended in advance to obtain the final layout; if the convergence condition is not reached, the iteration is continued until the final layout meets the requirements.
[0033] Further, the incremental layout optimization step further comprises the following:
[0034] S46, when further optimizing, a local optimization step is also considered, that is, finer-grained optimization adjustment is performed in each node or small range;
[0035] S47, finally, through iterative optimization, a high-quality layout that meets all constraint conditions is obtained.
[0036] Further, the network topology presentation step comprises:
[0037] The final network topology structure is rendered and displayed in real time on the Canvas canvas, including the connection relationship between nodes and nodes, the layout position of each node, the connection mode of the edge and the topological characteristics existing in the network, through intelligent calculation and optimization of node position, edge weight and constraint condition, it is ensured that the network topology presents clear, easy to understand and meets the user's demand structure.
[0038] In another aspect, the application also discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to make the processor execute the steps of the above method.
[0039] In another aspect, the application also discloses a computer device, which comprises a memory and a processor, and the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the above method.
[0040] Compared with the prior art, the application has the following advantages:
[0041] The present application combines the fast operation ability of the spectrum mapping technology and the high quality effect of the force-directed layout algorithm. Through the fast preliminary layout generation and rotation, reflection transformation operation, a preliminary layout can be generated in a short time and quickly adapt to various constraint conditions; at the same time, through the incremental optimization step, the improvement of the final layout quality is ensured, the balance of layout speed and effect is considered, and the layout demand of large-scale complex graph is suitable, various constraint conditions such as the alignment between nodes and the maintenance of nested relationship are supported in the execution process, the overlap is eliminated and the nested structure is maintained through the fine optimization process, and finally the high quality layout is realized. Especially in the incremental layout optimization stage, the problems in the layout are gradually eliminated through the low cooling factor, so that the layout can meet the constraint conditions while continuously improving the layout effect. The present application is suitable for graphs that need to show complex node relationship and hierarchical structure. In these applications, the number of nodes and edges is large, and there are layout problems such as nesting and overlapping, so the algorithm can ensure high quality layout while improving the layout speed. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 The method steps of the present application are shown in the figure;
[0043] Figure 2 The method initialization method flow chart of the present application is shown in the figure;
[0044] Figure 3 The preliminary layout constraint step flow chart proposed by the present application is shown in the figure;
[0045] Figure 4 The perfect preliminary layout step flow chart proposed by the present application is shown in the figure;
[0046] Figure 5 The incremental layout optimization step flow chart proposed by the present application is shown in the figure;
[0047] Figure 6 The rendering result of the present application is shown in the figure. Specific implementation method
[0048] The present application is a constraint-driven fast topology presentation method for network security, as shown in the figure, including the following steps: Figure 1
[0049] S10, initialization: connecting the subgraphs of the composite graph to form a whole connected graph, generating a preliminary layout based on the connected graph, and the specific process is shown in the figure Figure 2
[0050] The initialization step S10 is specifically:
[0051] S11, traverse the nodes and edges in the graph, which can divide the graph into several independent subgraphs. Each independent subgraph is a subgraph Gi = (V i , E i , F i ), where V i is the set of nodes, E i is the set of edges, and F i is the set of edge types. First, use depth-first search (DFS) to identify these subgraphs.
[0052] S12, select the edge with the largest weight to connect these subgraphs, so that the final graph is a connected simple graph, where independent sub Figure 1 G1 = (V1, E1, F1), independent sub Figure 2 G2 = (V2, E2, F2), select edge (V1, V2) E to connect it, then get the new graph G i = (V1 U V2, E1 U E2 U {(V1, V2)}, F1 U F2).
[0053] S13, on this connected simple subgraph, calculate the eigenvectors and eigenvalues of the Laplacian matrix of the graph, use the eigenvectors as node coordinates to get the preliminary layout, the Laplacian matrix is:
[0054] L = D - A
[0055] where D is the degree matrix, a diagonal matrix, the element D ij = (V j F ij ) is the degree of node i, A is the adjacency matrix, where A ij = 1 indicates that there is an edge between node i and node j, A ij = 0 indicates that there is no edge between nodes.
[0056] S14, calculate the eigenvalues and eigenvectors of the Laplacian matrix L. The eigenvalue problem of the Laplacian matrix is:
[0057] Lv = λv
[0058] where λ is the eigenvalue and v is the eigenvector. For a graph with n nodes, the eigenvectors are represented as v1, v2, …, v n
[0059] S15, use the elements of the eigenvectors as the coordinates of the nodes to form the preliminary layout of the nodes. If the kth eigenvector is selected as the node coordinates, the coordinates of node i can be represented as:
[0060] x i = v k (i)
[0061] where x i is the coordinates of node i and vk (i) is the i-th element of the k-th feature vector.
[0062] S16, store the node information in the array nodeArray, store the edges in the edge array edgeArray, initialize the speed value of the node, set the cooling coefficient, and store the index value of the node in the data indexArray.
[0063] S20, preliminary layout constraint: rotate and reflect the entire layout to improve the compatibility of the entire layout with the constraint, and execute various constraint conditions to obtain a preliminary constrained layout, as shown in the specific flowchart of Fig. 2. Figure 3
[0064] The preliminary layout constraint step of S20 is specifically as follows:
[0065] S21, according to the reference node and the target of the layout, calculate the angle of rotation. Align the layout to a specific axis, and align the nodes along the axis R(θ) by calculating the rotation angle. The rotation matrix R(θ) adjusts the coordinates of the nodes to obtain new node positions. This step can help adjust the direction of the layout, so that the overall direction of the layout is more in line with the constraint conditions.
[0066]
[0067] S22, according to the characteristics of the layout, select the appropriate reflection axis, and apply the reflection matrix to adjust the node positions through the reflection matrix to obtain the reflected layout.
[0068] S23, alignment constraint, keep all the nodes that need to be aligned in the alignment relationship after transformation. Including horizontal, vertical and some specific direction alignment, keep the nesting relationship in the layout from being disturbed, and ensure that the relative positions between nodes will not violate the constraints after rotation and reflection transformation.
[0069] S24, process the transformed layout constraint, fix the node constraint, for the nodes that have fixed positions, cannot be rotated or reflected, execute the alignment constraint, reevaluate the relative positions between nodes, and adjust the positions of the nodes as needed. The relative position constraint requires that the specific nodes maintain a fixed distance or relative position.
[0070] S25, generate a preliminary layout.
[0071] S30, perfect the preliminary layout: on the basis of the preliminary layout, eliminate the overlap between nodes and the nesting relationship in the graph, and maintain the various constraint conditions executed before, to refine and optimize the entire layout, as shown in the specific flowchart of Fig. 3. Figure 4
[0072] The object classifier of S30 groups objects according to signatures, and the grouping step is specifically as follows:
[0073] S31, the displacement of each node is calculated in each iteration, the moving direction and distance of the node are determined according to the action of different types of forces, the position of the node is adjusted through continuous iteration, and finally the overlapping between nodes is eliminated, so that the overall layout becomes more compact and beautiful.
[0074] S32, when calculating the node displacement, the nesting relationship between nodes is considered, the KD tree algorithm is used to ensure that the node is maintained inside its parent node, and the corresponding force parameters are used to ensure that the node can naturally gather around the parent node, forming a clear hierarchical structure.
[0075] S33, the displacement of the fixed node will be reset, that is, the node will not move. For the node group with vertical (horizontal) alignment constraint, the displacement in the x (y) direction will be adjusted to the average value of the displacement in the direction. If at least one of these nodes has a fixed node constraint in the same direction, all displacement values in that direction will be reset, and for nodes involving relative position constraints, the displacement in that direction will be adjusted to allow movement to a position that does not violate the constraint condition. If the node also has a fixed node constraint in the same direction, its displacement has been reset; if it also has an alignment constraint, its displacement has been updated to maintain the alignment.
[0076] S40, incremental layout optimization: set a low cooling factor, gradually eliminate overlapping, maintain nesting, maintain constraints, and finally get a high-quality layout, the specific process is shown in the attached Figure 5 .
[0077] The incremental layout optimization step S40 is specifically as follows:
[0078] S41, set a lower cooling factor, so that the algorithm can start from the current relatively stable initial layout and gradually converge to the final optimal layout.
[0079] S42, in each iteration, the position of the node is adjusted by calculating its mechanical model. Each node updates its position during the iteration process according to the interaction force (such as repulsive force, attractive force) between it and other nodes. At the same time, considering the constraint conditions (such as alignment constraint, fixed node constraint and relative position constraint), it is ensured that the movement of the node will not violate these conditions. At this time, the calculation of force not only depends on the distance between nodes, but also adjusts the size and direction of force according to the constraints established.
[0080] S43、To avoid instability or oscillation of nodes during the iteration process, an adaptive adjustment mechanism is used to control the maximum displacement range of nodes. Through this mechanism, layout instability caused by excessive displacement can be avoided, ensuring that each iteration does not deviate too far from the global optimal solution.
[0081] S44、At the end of each iteration, the quality of the current layout is evaluated, including node overlap, clarity of nested structure, and satisfaction of constraint conditions. If the current layout meets the set convergence conditions (such as node overlap below a certain threshold, reasonable nesting relationship, etc.), the optimization process can be ended early to obtain the final layout. If the convergence conditions are not met, the iteration continues until the final layout meets the requirements.
[0082] S45、Further optimization, consider adding local optimization steps, that is, in each node or small range to carry out more fine-grained optimization adjustment. This step can help to deal with those in the global optimization process may not be completely solved the local overlap or layout problems.
[0083] S46、Finally, through iterative optimization, a high-quality layout that meets all the constraints is obtained. The layout is as compact as possible in space, with no overlap between nodes, clear nesting relationship, and various constraints (such as alignment, fixed nodes, relative position, etc.) are effectively maintained.
[0084] S50、Network topology presentation: render and display the final network topology structure on the Canvas canvas in real time, including the connection relationship between nodes and nodes, the layout position of each node, the connection mode of edges, and the topological characteristics existing in the network. Through intelligent calculation and optimization of node position, edge weight, constraint conditions, etc., ensure that the network topology presents a clear, easy-to-understand and user-demand-compliant structure. The final display can not only be used for visualizing the network state, but also can provide interactive operation, allowing users to intuitively view, adjust and analyze the overall topology and performance of the network, as shown in the effect diagram Figure 6 . Figure 6 The clear and accurate presentation of the complex network structure is shown. The connection relationship between nodes is very intuitive, and each node is connected closely through edges, forming a rich community structure. The overall layout is balanced and orderly, with rich details, so that the nodes and edges in the diagram can effectively reflect the relevance in the network.
[0085] In another aspect, the application also discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to make the processor execute the steps of the above method.
[0086] In still another aspect, the present application also discloses a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the above method.
[0087] In yet another embodiment provided in the present application, a computer program product containing instructions is provided, which, when executed on a computer, causes the computer to perform the mobile source emission prediction method based on timing characteristics migration in any of the above embodiments.
[0088] It can be understood that the system, device and storage medium provided by the embodiments of the present application correspond to the method provided by the embodiments of the present application, and the explanation, examples and beneficial effects of related contents can refer to the corresponding parts in the above method.
[0089] In the above embodiments, the system, device and storage medium provided by the embodiments of the present application can be realized by software, hardware, firmware or any combination thereof, in whole or in part. When realized by software, it can be realized in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the flow or function described in the embodiments of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0090] It is to be noted that, in the present text, the relative terms such as first and second, and the like are used merely to differentiate one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between such entities or operations. Moreover, the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements in the list, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0091] Each of the embodiments in the present specification is described in a relevant manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the description of the method embodiments.
[0092] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features. Such modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A network security oriented constraint driven fast topology rendering method, characterized in that, The steps of the method are as follows: Initialization: the subgraphs of the composite graph form a whole connected graph, and a preliminary layout is generated based on the connected graph; Preliminary layout constraint: rotation and reflection transformation operations are performed on the whole layout to improve the compatibility of the whole layout with the constraint, and the constraint condition is executed to obtain a preliminary constrained layout; Perfecting the preliminary layout: on the basis of the preliminary layout, the overlapping between nodes and the nesting relationship in the graph are eliminated, and various constraint conditions executed previously are maintained to refine and optimize the whole layout; Incremental layout optimization: a low cooling factor is set to gradually eliminate overlapping, maintain nesting, and maintain constraints, and finally obtain a high-quality layout; Network topology presentation: the final network topology is presented on the canvas; The specific steps of the preliminary layout constraint include the following: S21, according to the target of the reference node and the layout, calculate the angle of rotation; align the layout to a specific axis, align the node along the axis by calculating the rotation angle, and align the node to the specific axis by rotating the matrix adjust the coordinates of the node to obtain a new node position; S22, according to the characteristics of the layout, selecting a suitable reflection axis and applying a reflection matrix, adjusting the node position through the reflection matrix to obtain a reflected layout; S23, alignment constraint, all nodes that need to be aligned still maintain the alignment relationship after transformation; including horizontal, vertical and set direction alignment, ensuring that the nesting relationship in the layout is not disturbed, and ensuring that the relative position between nodes after rotation and reflection transformation does not violate the constraint; S24, processing the layout constraint after transformation, fixing the node constraint, for the nodes whose positions have been fixed, rotation or reflection transformation cannot be performed, alignment constraint is executed, the relative position between nodes is re-evaluated, and the position of the node is adjusted as needed, the relative position constraint requires that the distance or relative position between specified nodes is maintained; S25, generating a preliminary layout; The perfecting preliminary layout step specifically includes the following: S31, in each iteration, the displacement of each node is calculated, the movement direction and distance of the node are determined according to the action of different types of forces, and the position of the node is adjusted through continuous iteration, so that the overlapping between nodes is eliminated, and the overall layout becomes more compact and beautiful; S32, when calculating the node displacement, the nesting relationship between nodes is considered, the KD tree algorithm is used to ensure that the node is maintained within its parent node, and the corresponding force parameters are used to ensure that the node can naturally gather around the parent node, forming a clear hierarchical structure; S33, the displacement amount of the fixed node is reset, i.e. the node does not move; for the node group of the vertical alignment constraint, the displacement amount in the direction is adjusted to the average value of the displacement amount in the direction; the direction; If at least one of these nodes has a fixed node constraint in the same direction, all displacement values in that direction will be reset, for nodes involving relative position constraints, their displacement in that direction will be adjusted to only move to a position that does not violate the constraint condition; if the node also has a fixed node constraint in the same direction, its displacement has been reset; if it also has an alignment constraint, its displacement has been updated to maintain alignment; The incremental layout optimization step specifically includes the following: S41, set a low cooling factor that meets the set value, so that the algorithm can start from the initial layout and gradually converge to the final optimal layout; S42, in each iteration, the position of the node is adjusted by calculating the mechanical model of the node; Each node updates its position according to the interaction force between it and other nodes in the iteration process; at the same time, considering the constraint conditions, ensure that the movement of the node does not violate these conditions; at this time, the calculation of force not only depends on the distance between nodes, but also adjusts the size and direction of force according to the constraints that have been established; S43, in order to avoid the instability or oscillation of the node in the iteration process, an adaptive adjustment mechanism is used to control the maximum displacement range of the node; S45, at the end of each iteration, the quality of the current layout is evaluated, including node overlap, clarity of nested structure and satisfaction of constraint conditions, if the current layout meets the set convergence condition, the optimization process is ended in advance, and the final layout is obtained; If the convergence condition is not reached, continue iteration until the final layout meets the requirements; The network topology rendering step comprises: Real-time rendering and displaying the final network topology structure on the Canvas, including the connection relationship between nodes and nodes, the layout position of each node, the connection mode of the edge and the topological characteristics existing in the network, through intelligent calculation and optimization of node position, edge weight and constraint conditions, ensure that the network topology presents clear, easy to understand and meet the user's needs structure.
2. The method of claim 1, wherein, The initialization specific steps comprise the following: S11, inputting a composite graph identifying independent subgraphs in the composite graph, connecting the subgraphs to form a simple subgraph that is wholly connected; S12, on this connected simple subgraph, the eigenvectors and eigenvalues of the Laplacian matrix of the graph are calculated, and the eigenvectors are used as node coordinates to obtain a preliminary layout; S13, store the node information in the node array nodeArray, store the edge in the edge array edgeArray, initialize the speed value of the node, set the cooling coefficient, and store the index value of the node in the index array indexArray.
3. The method of claim 1, wherein: The incremental layout optimization step further comprises the following: S46, when further optimizing, a local optimization step is added, that is, finer granularity optimization adjustment is performed in each node or small range; S47, finally, through iterative optimization, a high-quality layout that meets all constraint conditions is obtained.
4. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor, so that the processor executes the steps of the method according to any one of claims 1 to 3. 5.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-4 when the computer program is executed by the processor. The computer program is executed by the processor, so that the processor executes the steps of the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Layout method and system of network topological diagram
CN101702655A
Topological graph drawing method and system and electronic equipment
CN115272521A