CN-122001774-A - Network layout determining method, device, equipment, medium and program product
Abstract
The application discloses a network layout determining method, a device, equipment, a storage medium and a program product, wherein the method comprises the steps of obtaining configuration information of a plurality of network nodes, determining adjacent matrixes of the plurality of network nodes and domain information of the plurality of network nodes based on the configuration information of the plurality of network nodes, determining initial coordinates of the plurality of network nodes based on the adjacent matrixes of the plurality of network nodes and the domain information of the plurality of network nodes through a network model, wherein the network model is used for predicting two-dimensional coordinates of each network node in a network structure of the plurality of network nodes based on a force-directed graph algorithm and a force-directed graph, conducting coordinate post-processing on the initial coordinates of the plurality of network nodes to obtain target coordinates of the plurality of network nodes, and determining the target network layout of the plurality of network nodes based on the adjacent matrixes of the plurality of network nodes and the target coordinates of the plurality of network nodes.
Inventors
- WANG XIA
- QIAN LING
- JIA YU
Assignees
- 中移(苏州)软件技术有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260114
Claims (15)
- 1. A network topology determination method, the method comprising: acquiring configuration information of a plurality of network nodes, and determining an adjacency matrix of the plurality of network nodes and domain information of the plurality of network nodes based on the configuration information of the plurality of network nodes; determining initial coordinates of the plurality of network nodes based on the adjacency matrix of the plurality of network nodes and domain information of the plurality of network nodes through a network model, wherein the network model is used for predicting two-dimensional coordinates of each network node in the plurality of network nodes in a network structure based on a force-directed graph algorithm and a force-directed graph; performing coordinate post-processing on the initial coordinates of the plurality of network nodes to obtain target coordinates of the plurality of network nodes; A target network layout of the plurality of network nodes is determined based on the adjacency matrix of the plurality of network nodes and the target coordinates of the plurality of network nodes.
- 2. The method of claim 1, wherein the determining the adjacency matrix for the plurality of network nodes and the domain information for the plurality of network nodes based on the configuration information for the plurality of network nodes comprises: Determining a connection relation between each network node and domain information of the plurality of network nodes based on configuration information of the plurality of network nodes; Determining a network structure of the plurality of network nodes based on the connection relation between each network node; Based on the network structure of the plurality of network nodes, an adjacency matrix of the plurality of network nodes is determined.
- 3. The method of claim 2, wherein the network model comprises a neural network architecture including an attention layer and a multi-layer perceptron, the method further comprising: Potential energy construction is carried out based on attractive force and repulsive force between each network node in the plurality of network nodes and domain attractive force corresponding to each network node, so that a total potential energy objective function is obtained; Determining, by an attention layer, feature representation vectors for the plurality of network nodes based on the adjacency matrix of the plurality of network nodes and domain information of the plurality of network nodes; Determining, by a multi-layer perceptron, predicted coordinates of the plurality of network nodes based on feature representation vectors of the plurality of network nodes; and updating model parameters based on the total potential energy objective function and the predicted coordinates of the plurality of network nodes to obtain the network model.
- 4. The method of claim 3, wherein the constructing the potential energy based on the attractive and repulsive forces between each of the plurality of network nodes and the domain attractive force corresponding to each of the network nodes to obtain the total potential energy objective function comprises: performing attribution division on the domains to which each network node belongs based on the domain information of the network nodes to obtain a plurality of network domains, wherein each network domain in the plurality of network domains comprises one or more network nodes; determining a domain center point of each network domain in the two-dimensional layout; Determining domain gravitation corresponding to each network node based on one or more network nodes in each network domain and domain center points of each network domain in a two-dimensional layout; and constructing potential energy based on the attraction and repulsion between each network node and the domain attraction corresponding to each network node to obtain the total potential energy objective function.
- 5. The method of claim 4, wherein determining the domain gravity corresponding to each network node based on the one or more network nodes in each network domain and the domain center point of each network domain in the two-dimensional layout comprises: determining the degree center degree, the proximity center degree and the intermediary center degree corresponding to each network node based on one or more network nodes in each network domain; Determining the node centrality corresponding to each network node based on the centrality corresponding to each network node, the proximity centrality and the intermediary centrality; and determining domain gravities corresponding to each network node based on the node centrality corresponding to each network node and the domain centrality of each network domain in the two-dimensional layout.
- 6. A method according to claim 3, wherein the determining, by the attention layer, the feature representation vector of the plurality of network nodes based on the adjacency matrix of the plurality of network nodes and the domain information of the plurality of network nodes, comprises: determining a connection structure relationship between each network node based on the adjacency matrix of the plurality of network nodes; Performing feature mapping on the connection structure relation among the network nodes and the domain information of the network nodes to obtain an embedded matrix of each network node; And inputting the embedding matrix of the network node into the attention layer aiming at each network node, enabling the attention layer to calculate the attention coefficients of the network node and other network nodes based on the embedding matrix of the network node, and calculating and outputting the characteristic representation vector of the network node based on the attention coefficients and the characteristic vectors of the other network nodes.
- 7. The method of claim 6, wherein the determining, by the multi-layer perceptron, the predicted coordinates of the plurality of network nodes based on the feature representation vectors of the plurality of network nodes, comprises: combining the embedded matrix of each network node with the characteristic expression vector of each network node to obtain combined vectors of the plurality of network nodes; and inputting the merging vector to the multi-layer perceptron, so that the multi-layer perceptron calculates and outputs the predicted coordinates of the plurality of network nodes based on the merging vector.
- 8. The method according to any one of claims 1 to 7, wherein performing coordinate post-processing on the initial coordinates of the plurality of network nodes to obtain target coordinates of the plurality of network nodes includes: Determining a target coverage rectangle corresponding to each network domain based on initial coordinates of one or more network nodes in each network domain; determining an average coverage rectangle corresponding to a plurality of network domains based on the target coverage rectangle corresponding to each network domain; Determining a scaling corresponding to each network domain based on the target coverage rectangle and the average coverage rectangle corresponding to each network domain; Scaling the target coverage rectangle corresponding to each network domain to the average coverage rectangle based on the scaling corresponding to each network domain, and scaling the initial coordinates of one or more network nodes in each network domain based on the scaling corresponding to each network domain to obtain transformed coordinates of the plurality of network nodes; and rotating and scaling the transformed coordinates of the plurality of network nodes to obtain target coordinates of the plurality of network nodes.
- 9. The method of claim 8, wherein the determining the target coverage rectangle for each network domain based on the initial coordinates of one or more network nodes in each network domain comprises: determining a geometric center point corresponding to each network domain based on initial coordinates of one or more network nodes in the network domain, wherein the geometric center point is used as a diagonal intersection point corresponding to the network domain; Taking the vertical direction of the connection line of the reference domain corresponding to the network domain and the geometric center point as the bottom edge direction corresponding to the network domain, wherein the reference domain refers to the domain with the most connecting edges with one or more network nodes in the network domain; Determining a target node corresponding to the network domain based on the bottom edge direction and/or the vertical direction corresponding to the bottom edge direction, wherein the target node has a maximum distance from the geometric center point in the bottom edge direction and/or the vertical direction; taking the distance between the target node and the geometric center point as the corresponding side length of the network domain; And determining a target coverage rectangle corresponding to the network domain based on the diagonal intersection point, the bottom edge direction and the side length.
- 10. The method of claim 9, wherein the rotating and scaling the transformed coordinates of the plurality of network nodes to obtain target coordinates of the plurality of network nodes comprises: performing principal component analysis on the plurality of network nodes to obtain principal direction vectors of the plurality of network nodes; rotating the transformation coordinates of the plurality of network nodes by taking the main direction vectors of the plurality of network nodes as axes to obtain the rotation coordinates of the plurality of network nodes; And scaling the rotation coordinates of the plurality of network nodes based on the preset window size to obtain target coordinates of the plurality of network nodes.
- 11. The method according to claim 10, wherein the method further comprises: If the node centrality corresponding to the changed network node exceeds a preset threshold value, marking the network domain to which the changed network node belongs and recording the number of the network domains with important change; And if the number of the network domains with important variation exceeds the preset proportion of the number of the network domains, determining a new target network layout of the network nodes.
- 12. A network topology determination apparatus, the apparatus comprising: an acquiring unit, configured to acquire configuration information of a plurality of network nodes; Determining initial coordinates of the plurality of network nodes based on the adjacency matrix of the plurality of network nodes and the domain information of the plurality of network nodes through a network model, wherein the network model is used for predicting two-dimensional coordinates of each network node in the plurality of network nodes in a network structure based on a force-directed graph algorithm and a graph-injection force network; The processing unit is used for carrying out coordinate post-processing on the initial coordinates of the plurality of network nodes to obtain target coordinates of the plurality of network nodes; The determining unit is further configured to determine a target network layout of the plurality of network nodes based on the adjacency matrix of the plurality of network nodes and the target coordinates of the plurality of network nodes.
- 13. A processing device comprising a processor and a memory for storing a computer program, the processor being arranged to invoke and execute the computer program stored in the memory for performing the method according to any of claims 1 to 11.
- 14. A computer readable storage medium storing a computer program for causing a computer to perform the method of any one of claims 1 to 11.
- 15. A computer program product comprising computer program instructions for causing a computer to perform the method of any one of claims 1 to 11.
Description
Network layout determining method, device, equipment, medium and program product Technical Field The present application relates to the field of computer networks, and in particular, to a network layout determining method, apparatus, device, storage medium, and program product. Background In modern network systems, visualization of network topology is of great importance for developers and testers to understand complex network structures. Network topology generation aims at presenting abstract graph structures in a two-dimensional or three-dimensional space in an intuitive way, thereby helping users to better analyze and manage network topology. In the related art, the network layout is usually generated by an algorithm based on a force-directed graph, an algorithm based on dimension reduction and an algorithm based on machine learning/deep learning, but the methods have the problems of performance bottleneck, poor flexibility, strong dependence on training data and the like when processing a large-scale network, and are difficult to meet the requirements of efficient and stable network layout generation without manual intervention. Disclosure of Invention In order to solve the above technical problems, embodiments of the present application provide a network layout determining method, apparatus, device, storage medium, and program product. The network layout determining method provided by the embodiment of the application comprises the following steps: acquiring configuration information of a plurality of network nodes, and determining an adjacency matrix of the plurality of network nodes and domain information of the plurality of network nodes based on the configuration information of the plurality of network nodes; determining initial coordinates of the plurality of network nodes based on the adjacency matrix of the plurality of network nodes and domain information of the plurality of network nodes through a network model, wherein the network model is used for predicting two-dimensional coordinates of each network node in the plurality of network nodes in a network structure based on a force-directed graph algorithm and a force-directed graph; performing coordinate post-processing on the initial coordinates of the plurality of network nodes to obtain target coordinates of the plurality of network nodes; A target network layout of the plurality of network nodes is determined based on the adjacency matrix of the plurality of network nodes and the target coordinates of the plurality of network nodes. The network layout determining device provided by the embodiment of the application comprises the following components: an acquiring unit, configured to acquire configuration information of a plurality of network nodes; Determining initial coordinates of the plurality of network nodes based on the adjacency matrix of the plurality of network nodes and the domain information of the plurality of network nodes through a network model, wherein the network model is used for predicting two-dimensional coordinates of each network node in the plurality of network nodes in a network structure based on a force-directed graph algorithm and a graph-injection force network; The processing unit is used for carrying out coordinate post-processing on the initial coordinates of the plurality of network nodes to obtain target coordinates of the plurality of network nodes; The determining unit is further configured to determine a target network layout of the plurality of network nodes based on the adjacency matrix of the plurality of network nodes and the target coordinates of the plurality of network nodes. The processing device provided by the embodiment of the application comprises a processor and a memory, wherein the memory is used for storing a computer program, and the processor is used for calling and running the computer program stored in the memory to execute any one of the network layout determining methods. The embodiment of the application provides a computer readable storage medium for storing a computer program, wherein the computer program enables a computer to execute any one of the network layout determining methods. The computer program product provided by the embodiment of the application comprises computer program instructions, wherein the computer program instructions enable a computer to execute any one of the network layout determining methods. According to the technical scheme, configuration information of a plurality of network nodes is obtained, adjacent matrixes of the plurality of network nodes and domain information of the plurality of network nodes are determined based on the configuration information of the plurality of network nodes, initial coordinates of the plurality of network nodes are determined through a network model based on the adjacent matrixes of the plurality of network nodes and the domain information of the plurality of network nodes, the network model is used for predicting two-dim