Constraint-driven rapid topology presentation method and device for network security and medium

By combining spectral drawing technology and force-oriented layout algorithm, a constraint-driven fast topology presentation method for network security is proposed, which solves the problems of poor graphics layout and insufficient universality in the existing technology, and achieves high-quality and fast-generated layout effects, which are suitable for the visualization needs of complex graphics.

CN119996212AActive Publication Date: 2025-05-13NANJING UNIV OF POSTS & TELECOMM
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510077103.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-13
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

In the prior art, when visualizing relationship information in graphical visualization, the layout of objects and connections is poor, which leads to confusion among users and takes a lot of time to manually adjust the layout, affecting the efficiency of use. At the same time, the layout algorithm is limited by the alignment and relative positioning of a single node or node group, limiting the universality of visualization.

Method used

A constraint-driven fast topology presentation method for network security is proposed. Combined with spectral drawing technology and force-oriented layout algorithm, high-quality layout is generated through initialization, preliminary layout constraints, and incremental layout optimization steps, and network topology structure is rendered in real time on Canvas canvas.

Benefits of technology

It realizes the rapid generation of high-quality layouts, taking into account the balance of layout speed and effect, supports the integration of multiple constraints, is suitable for the layout needs of large-scale complex graphics, and improves the versatility of user experience and visualization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996212A_ABST
    Figure CN119996212A_ABST
Patent Text Reader

Abstract

The invention discloses a network security-oriented constraint-driven rapid topology presentation method and device and a medium, and the method comprises the following steps: connecting sub-graphs of a composite graph to form an integral connected graph, and generating a preliminary layout based on the connected graph; performing rotation and reflection transformation operation on the whole layout to improve the compatibility of the whole layout and constraints, and executing various constraint conditions on the basis to obtain a preliminarily constrained layout; on the basis of the initial layout, overlapping among nodes and a nesting relation in a graph are eliminated, and various constraint conditions executed before are kept to refine and optimize the whole layout; a low cooling factor is set, overlapping is gradually eliminated, nesting is kept, constraint is maintained, and finally a high-quality layout is obtained; and the final network topology is presented on the canvas. The method is suitable for graphs needing to display complex node relations and hierarchical structures, and by means of the algorithm, the layout speed can be increased while high-quality layout is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer application and is a graph layout algorithm oriented to network security, with faster layout speed, better constraint effect and support for composite data. Technical Background

[0002] In today's era, science and technology have driven the rapid accumulation of data like a surging tide. Data from the Internet, Internet of Things, enterprises, scientific research and other fields are gathered in large quantities every day, with an astonishing scale and growth rate. In this context, 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, graphics or network topology diagrams are one of the most commonly used presentation forms. For relational data, network topology diagrams help security experts quickly identify potential risks and attack paths by intuitively displaying various objects and their connections. Network topology diagrams can not only effectively integrate complex network structures, interactive relationships between devices, data flows, and security events, but also help analysts understand potential vulnerabilities, abnormal traffic, and dependencies between systems 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, the relationship model displayed by network topology diagrams is clearer and more intuitive than traditional table displays. At present, the research on relational information-based technologies has the following shortcomings:

[0003] 1. When visualizing relational information through graphics, if the layout of objects and connections is poor, it will confuse users, and users usually spend up to 20% of their time manually adjusting the layout, which consumes a lot of energy and time and greatly affects usage efficiency.

[0004] 2. In practical applications, although layout algorithms are relatively free in terms of optimization indicators, applications often have specific field restrictions on the placement of individual nodes, or require alignment and relative positioning of a group of nodes. This makes it impossible for the layout to be fully free according to the algorithm, limiting the versatility of visualization in different scenarios. Summary of the invention

[0005] In view of the problems existing in the prior art, the purpose of the present invention is to invent a new type of automatic layout of composite graphs and a topological algorithm for network security-oriented automatic layout. On the one hand, it has the high speed of spectrum drawing technology and can quickly perform related calculations and layout operations; on the other hand, it also has the high quality shown by the force-directed layout algorithm, ensuring that the layout effect reaches an ideal state.

[0006] The present invention implements a constraint-driven rapid topology presentation method for network security through the following technical scheme, comprising the following steps:

[0007] Initialization: Connect the subgraphs of the composite graph to form an overall connected graph, and generate a preliminary layout based on this connected graph;

[0008] Preliminary layout constraints: Rotate and reflect the entire layout to improve the compatibility of the entire layout with the constraints. On this basis, various constraints are executed to obtain a preliminary constrained layout.

[0009] Improve the preliminary layout: Based on the preliminary layout, eliminate the overlap between nodes and the nested relationships in the graph, and maintain the various constraints previously executed to refine and optimize the entire layout.

[0010] Incremental layout optimization: set a low cooling factor, gradually eliminate overlaps, keep nesting, maintain constraints, and finally get a high-quality layout.

[0011] Network topology presentation: presents the final network topology on the canvas.

[0012] Furthermore, the initialization specific steps include the following:

[0013] S11, input composite graph G = (V, E, F), identify independent subgraphs in the composite graph, connect these subgraphs to form a simple subgraph that is connected as a whole;

[0014] S12. On this 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, storing the node information in the node array nodeArray, storing the edge in the edge array edgeArray, initializing the speed value of the node, setting the cooling coefficient, and storing the index value of the node in the index array indexArray;

[0016] Furthermore, the specific steps of the preliminary layout constraints include the following:

[0017] S21, according to the reference node and the layout target, calculate the angle to be rotated; 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, a suitable reflection axis is selected, and a reflection matrix is ​​applied to adjust the node positions through the reflection matrix to obtain a layout after reflection;

[0020] S23, alignment constraints, ensuring that all nodes that need to be aligned remain aligned after transformation; including alignment in the horizontal direction, vertical direction, and set direction, ensuring that the nesting relationship in the layout is not disrupted, and ensuring that the relative positions between nodes do not violate constraints after rotation and reflection transformation;

[0021] S24, processing the transformed layout constraints, fixed node constraints, for nodes that have been fixed in position, rotation or reflection transformation cannot be performed, alignment constraints are executed, the relative positions between nodes are re-evaluated, and the positions of nodes are adjusted as needed. Relative position constraints require that a fixed distance or relative position be maintained between specified nodes;

[0022] S25. Generate a preliminary layout.

[0023] Furthermore, the steps of improving the preliminary layout specifically include 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 forces, adjust the position of the node through continuous iteration, and finally eliminate the overlap between nodes, so that the overall layout becomes more compact and beautiful;

[0025] S32. When calculating node displacement, the nested relationship between nodes is considered, and 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 nodes can naturally gather around the parent node to form 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, its displacement in the x (y) direction will be adjusted to the average 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 that direction will be reset. For nodes involved in relative position constraints, their displacement in that direction will be adjusted, and they will only be allowed to move to positions that do not violate the constraints. 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 previously updated to maintain alignment.

[0028] Furthermore, the incremental layout optimization step specifically includes the following:

[0029] S41, setting 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 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 during the iteration; at the same time, the constraints are taken into account to ensure that the movement of the node does not violate these conditions; at this time, the calculation of the force does not only depend on the distance between the nodes, but also adjusts the magnitude and direction of the force according to the established constraints;

[0031] S43. In order to avoid instability or oscillation of nodes during the iteration process, an adaptive adjustment mechanism is used to control the maximum displacement range of the nodes;

[0032] S45. At the end of each round of iteration, the quality of the current layout is evaluated, including the node overlap, the clarity of the nested structure, and the satisfaction of the constraints. If the current layout meets the set convergence conditions, the optimization process is terminated in advance to obtain the final layout; if the convergence conditions are not met, the iteration continues until the final layout meets the requirements.

[0033] Furthermore, the incremental layout optimization step also includes the following:

[0034] S46. When further optimizing, it is also considered to add a local optimization step, that is, to perform more fine-grained optimization adjustments at each node or in a small range;

[0035] S47. Finally, through iterative optimization, a high-quality layout that meets all constraints is obtained.

[0036] Furthermore, the network topology presentation step includes:

[0037] The final network topology is rendered and displayed in real time on the Canvas canvas, including the connectivity between nodes, the layout positions of each node, the edge connection methods, and the topological features in the network. Through intelligent calculation and optimization of node positions, edge weights, and constraints, the network topology is ensured to be clear, easy to understand, and in line with user needs.

[0038] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0039] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0040] Compared with the prior art, the present invention has the following advantages:

[0041] The present invention combines the fast computing power of the spectrum drawing technology and the high-quality effect of the force-directed layout algorithm. Through fast preliminary layout generation and rotation and reflection transformation operations, a preliminary layout can be generated in a short time and quickly adapt to various constraints; at the same time, through the incremental optimization steps, the improvement of the final layout quality is ensured, and the balance of layout speed and effect can be taken into account at the same time. It is suitable for the layout requirements of large-scale complex graphics, and supports the fusion of multiple constraints during the execution process, such as alignment between nodes, maintenance of nested relationships, etc., and eliminates overlaps and maintains nested structures through a refined optimization process, and finally achieves high-quality layout. Especially in the incremental layout optimization stage, the problems in the layout are gradually eliminated through a low cooling factor, ensuring that the layout meets the constraints while continuously improving the layout effect. The present invention is suitable for graphics that need to display complex node relationships and hierarchical structures. In these applications, the number of nodes and edges is large, and there are layout problems such as nesting and overlapping. The use of this algorithm can improve the layout speed while ensuring high-quality layout. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a step diagram of the method of the present invention;

[0043] Figure 2 This is a flow chart of the initialization method of the present invention;

[0044] Figure 3 A flow chart of the preliminary layout constraint steps proposed by the present invention;

[0045] Figure 4 A flow chart of the steps for improving the preliminary layout proposed by the present invention;

[0046] Figure 5 A flow chart of the incremental layout optimization steps proposed by the present invention;

[0047] Figure 6 This is a rendering result diagram of the present invention. Specific implementation methods

[0049] The present invention realizes a constraint-driven rapid topology presentation method for network security through the following technical scheme, as shown in the attached Figure 1 As shown, the following steps are included:

[0050] S10, Initialization: Connect the subgraphs of the composite graph to form an overall connected graph, and generate a preliminary layout based on this connected graph. The specific process is as shown in the attached Figure 2 shown.

[0051] The initialization steps of S10 are specifically as follows:

[0052] S11. Traversing the nodes and edges in the graph, the graph can be divided into several independent subgraphs. Each independent subgraph is a subgraph Gi =(V i ,E i ,F i ), where V i is a set of nodes, E i is the edge set, F i is a set of edge types. We first use depth-first search (DFS) to identify these subgraphs.

[0053] S12. Select the subgraphs with the largest edge weights and connect them so that the final graph is a connected simple graph in which the independent subgraphs Figure 1 G 1 =(V 1 ,E 1 ,F 1 ), independent Figure 2 G 2 =(V 2 ,E 2 ,F 2 ), select the edge (V 1 ,V 2 )∈E to connect them, and we get a new graph G i =(V 1 ∪V 2 ,E 1 ∪E 2 ∪{(V 1 ,V 2 )},F 1 ∪F 2 ).

[0054] S13. On this connected simple subgraph, calculate the eigenvectors and eigenvalues ​​of the graph’s Laplacian matrix, and use the eigenvectors as node coordinates to get a preliminary layout. The Laplacian matrix is:

[0055] L=DA

[0056] Where D is the degree matrix, a diagonal matrix, the elements of D ij =(V∑ j F ij ), that is, the degree of node i, A is the adjacency matrix, where A ij =1 means there is an edge between node i and node j, A ij =0 means the node has no edge.

[0057] S14, calculate the eigenvalues ​​and eigenvectors of the Laplace matrix L. The characteristic problem of the Laplace matrix is:

[0058] Lv=λv

[0059] Among them, λ is the eigenvalue, v is the eigenvector, and for a graph with n nodes, the obtained eigenvector is represented as v1 ,v 2 ,…,v n

[0060] S15. Use the elements of the feature vector as the coordinates of the nodes to form a preliminary layout of the nodes. If the kth feature vector is selected as the node coordinate, the coordinates of node i can be expressed as:

[0061] x i =v k (i)

[0062] Among them, x i is the coordinate of node i, v k (i) is the i-th element of the k-th eigenvector.

[0063] S16. Store the node information in the 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 data indexArray.

[0064] S20, preliminary layout constraints: perform rotation and reflection transformation operations on the entire layout to improve the compatibility of the entire layout with the constraints. On this basis, various constraints are executed to obtain a preliminary constrained layout. The specific process is as shown in the attached figure. Figure 3 shown.

[0065] The preliminary layout constraint steps of S20 are specifically as follows:

[0066] S21. Calculate the angle to be rotated according to the reference node and the layout target. Align the layout to a specific axis and align the nodes along the axis by calculating the rotation angle R(θ). The rotation matrix R(θ) adjusts the coordinates of the nodes to obtain the new node positions. This step can help adjust the direction of the layout so that the overall direction of the layout is more consistent with the constraints.

[0067]

[0068] S22. According to the characteristics of the layout, a suitable reflection axis is selected, and a reflection matrix is ​​applied. The node positions are adjusted through the reflection matrix to obtain a layout after reflection.

[0069] S23, alignment constraints, ensure that all nodes that need to be aligned remain aligned after transformation, including alignment in the horizontal direction, vertical direction, and certain specific directions, to ensure that the nested relationship in the layout is not disrupted, and to ensure that the relative position between nodes does not violate the constraints after rotation and reflection transformation.

[0070] S24. Process the transformed layout constraints. Fixed node constraints: For nodes with fixed positions, rotation or reflection transformation cannot be performed. Alignment constraints are executed. The relative positions between nodes are re-evaluated and the positions of nodes are adjusted as needed. Relative position constraints require that specific nodes maintain a fixed distance or relative position.

[0071] S25. Generate a preliminary layout.

[0072] S30. Improve the preliminary layout: Based on the preliminary layout, eliminate the overlap between nodes and the nested relationship in the graph, and maintain the various constraints previously executed to refine and optimize the entire layout. The specific process is as follows: Figure 4 shown.

[0073] The object classifier of S30 above groups objects according to the signatures in the following specific steps:

[0074] 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 forces, adjust the position of the node through continuous iteration, and eventually eliminate the overlap between nodes, making the overall layout more compact and beautiful.

[0075] S32. When calculating node displacement, the nested relationship between nodes is considered, and the KD tree algorithm is used to ensure that the node is maintained inside its parent node. The corresponding force parameters are used to ensure that the nodes can naturally gather around the parent node to form a clear hierarchical structure.

[0076] 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 constraints, its displacement in the x (y) direction will be adjusted to the average value of the displacement in that 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, and they are only allowed to move to positions that do not violate the constraints. 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 previously updated to maintain alignment.

[0077] S40, incremental layout optimization: set a low cooling factor, gradually eliminate overlaps, maintain nesting, maintain constraints, and finally obtain a high-quality layout. The specific process is as follows Figure 5 shown.

[0078] The incremental layout optimization steps of the above S40 are specifically as follows:

[0079] 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.

[0080] S42. In each iteration, the position of the node is adjusted by calculating the mechanical model of the node. Each node updates its position during the iteration according to the interaction forces (such as repulsion and attraction) between it and other nodes. At the same time, constraints (such as alignment constraints, fixed node constraints, and relative position constraints) are taken into account to ensure that the movement of the node does not violate these conditions. At this time, the calculation of the force not only depends on the distance between the nodes, but also adjusts the magnitude and direction of the force according to the established constraints.

[0081] S43. In order to avoid instability or oscillation of nodes during the iteration process, an adaptive adjustment mechanism is used to control the maximum displacement range of the nodes. This mechanism can avoid layout instability caused by excessive displacement and ensure that each iteration will not deviate too far from the global optimal solution.

[0082] S44. At the end of each iteration, the quality of the current layout is evaluated, including the node overlap, the clarity of the nested structure, and the satisfaction of the constraints. If the current layout meets the set convergence conditions (such as the node overlap is below a certain threshold, the nesting relationship is reasonable, etc.), the optimization process can be ended in advance to obtain the final layout. If the convergence conditions are not met, the iteration continues until the final layout meets the requirements.

[0083] S45. When further optimizing, consider adding a local optimization step, that is, making finer-grained optimization adjustments at each node or in a small range. This step can help deal with local overlap or improper layout problems that may not be fully resolved during the global optimization process.

[0084] S46. Finally, through iterative optimization, a high-quality layout that meets all constraints is obtained. The layout is as compact as possible in space, there is no overlap between nodes, the nesting relationship is clear, and all kinds of constraints (such as alignment, fixed nodes, relative positions, etc.) are effectively maintained.

[0085] S50, Network topology presentation: Render and display the final network topology in real time on the Canvas canvas, including the connectivity between nodes, the layout of each node, the edge connection method, and the topological features in the network. Through intelligent calculation and optimization of node positions, edge weights, constraints, etc., the network topology is ensured to be clear, easy to understand, and in line with user needs. The final display can not only be used to visualize the network status, but also provide interactive operations, allowing users to intuitively view, adjust, and analyze the overall topology and performance of the network. The effect diagram is as follows: Figure 6 As shown, Figure 6The complex network structure is shown clearly and accurately. The connectivity between nodes is very intuitive, and the nodes are closely connected 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 graph can effectively reflect the associations in the network.

[0086] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0087] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0088] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the mobile source emission prediction methods based on time series feature migration in the above-mentioned embodiments.

[0089] It is understandable that the system, device and storage medium provided in the embodiments of the present invention correspond to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above methods.

[0090] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented 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 process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0091] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0092] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0093] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A constraint-driven rapid topology presentation method for network security, characterized in that: The steps of the method are as follows: Initialization: Connect the subgraphs of the composite graph to form an overall connected graph, and generate a preliminary layout based on this connected graph; Preliminary layout constraints: Rotate and reflect the entire layout to improve the compatibility of the entire layout with the constraints, and then execute the constraints on this basis to obtain a preliminary constrained layout; Improve the preliminary layout: Based on the preliminary layout, eliminate the overlap between nodes and the nested relationships in the graph, and maintain the various constraints previously executed to refine and optimize the entire layout; Incremental layout optimization: set a low cooling factor, gradually eliminate overlaps, maintain nesting, maintain constraints, and ultimately obtain a high-quality layout; Network topology presentation: presents the final network topology on the canvas.

2. According to claim 1, a constraint-driven rapid topology presentation method for network security is characterized in that: The specific steps of initialization include the following: S11, input composite graph G = (V, E, F), identify independent subgraphs in the composite graph, connect these subgraphs to form a simple subgraph that is connected as a whole; S12. On this 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; 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 constraint-driven rapid topology presentation method for network security according to claim 1, characterized in that: The specific steps of the preliminary layout constraint include the following: S21, according to the reference node and the layout target, calculate the angle to be rotated; 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; S22. According to the characteristics of the layout, a suitable reflection axis is selected, and a reflection matrix is ​​applied to adjust the node positions through the reflection matrix to obtain a layout after reflection; S23, alignment constraints, ensuring that all nodes that need to be aligned remain aligned after transformation; including alignment in the horizontal direction, vertical direction, and set direction, ensuring that the nesting relationship in the layout is not disrupted, and ensuring that the relative positions between nodes do not violate constraints after rotation and reflection transformation; S24, processing the transformed layout constraints, fixed node constraints, for nodes that have been fixed in position, rotation or reflection transformation cannot be performed, alignment constraints are executed, the relative positions between nodes are re-evaluated, and the positions of nodes are adjusted as needed. Relative position constraints require that a fixed distance or relative position be maintained between specified nodes; S25. Generate a preliminary layout.

4. The constraint-driven rapid topology presentation method for network security according to claim 1, characterized in that: The steps for improving the preliminary layout specifically include the following: 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 forces, adjust the position of the node through continuous iteration, and finally eliminate the overlap between nodes, so that the overall layout becomes more compact and beautiful; S32. When calculating node displacement, the nested relationship between nodes is considered, and 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 nodes can naturally gather around the parent node to form a clear hierarchical structure; 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, its displacement in the x (y) direction will be adjusted to the average displacement in this 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 involved in relative position constraints, their displacement in that direction will be adjusted, and they will only be allowed to move to positions that do not violate the constraints. 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 previously updated to maintain alignment.

5. The constraint-driven rapid topology presentation method for network security according to claim 1, characterized in that: The incremental layout optimization steps specifically include the following: S41, setting 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; 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 during the iteration; at the same time, the constraints are taken into account to ensure that the movement of the node does not violate these conditions; at this time, the calculation of the force does not only depend on the distance between the nodes, but also adjusts the magnitude and direction of the force according to the established constraints; S43. In order to avoid instability or oscillation of nodes during the iteration process, an adaptive adjustment mechanism is used to control the maximum displacement range of the nodes; S45. At the end of each round of iteration, the quality of the current layout is evaluated, including the node overlap, the clarity of the nested structure, and the satisfaction of the constraints. If the current layout meets the set convergence conditions, the optimization process is terminated in advance to obtain the final layout; if the convergence conditions are not met, the iteration continues until the final layout meets the requirements.

6. The constraint-driven rapid topology presentation method for network security according to claim 1, characterized in that: The incremental layout optimization step also includes the following: S46. When further optimizing, it is also considered to add a local optimization step, that is, to perform more fine-grained optimization adjustments at each node or in a small range; S47. Finally, through iterative optimization, a high-quality layout that meets all constraints is obtained.

7. The constraint-driven rapid topology presentation method for network security according to claim 1, characterized in that: The network topology presenting step comprises: The final network topology is rendered and displayed in real time on the Canvas canvas, including the connectivity between nodes, the layout positions of each node, the edge connection methods, and the topological features in the network. Through intelligent calculation and optimization of node positions, edge weights, and constraints, the network topology is ensured to be clear, easy to understand, and in line with user needs.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Layout method and system of network topological diagram

    CN101702655A

  • Topological graph drawing method and system and electronic equipment

    CN115272521A

  • Network topology presentation method based on random sampling and improved BH method

    CN116743592A

  • Graph network model training method and anomaly detection method based on graph network model

    CN117521757A

  • Robustness topology generation method based on arithmetic coding

    CN117938676A