Network topology model construction method and device, computer equipment, readable storage medium and program product

By constructing a network architecture in a three-dimensional virtual topology space, and using the logical hierarchy weights of nodes and link characteristics to calculate repulsive and attractive forces, the movement of nodes is controlled. This solves the problem that existing network topology models cannot represent spatial locations, and optimizes network layout and logical relationships.

CN121547362APending Publication Date: 2026-02-17CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511684809.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In existing network management and monitoring, the network topology model cannot reflect the spatial relationship between different nodes, resulting in a chaotic layout and unclear logical relationships.

Method used

In a three-dimensional virtual topology space, a network architecture is constructed. By obtaining the logical hierarchy weight values ​​of nodes and the bandwidth ratio and importance coefficient of links, the repulsive and attractive forces are calculated, and the movement of nodes in three-dimensional space is controlled to adjust their coordinate values ​​until force balance is achieved.

Benefits of technology

It realizes the spatial positional relationship of nodes in three-dimensional space, optimizes the layout of network topology model, balances physical realism and logical clarity, and solves the problem of chaos in complex network layout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121547362A_ABST
    Figure CN121547362A_ABST
Patent Text Reader

Abstract

The invention relates to a network topology model construction method and device, computer equipment, a readable storage medium and a program product. The method comprises the following steps: constructing an initial network topology model of a network architecture in a three-dimensional virtual topology space to reflect a spatial position relationship between different nodes; and adjusting the first coordinate values of the nodes on the basis of the logic level weight values of the nodes, meanwhile, obtaining repulsive force between different nodes on the basis of the logic level weight values of the nodes, obtaining attraction force between different nodes on the basis of the current bandwidth proportion and the importance coefficient of the link, and controlling the nodes to move on the basis of the repulsive force and the attraction force. And the second coordinate value and the third coordinate value of the node are adjusted according to the motion result, so that the problem of confusion possibly occurring in the complex network layout can be solved, the logic relationship among different nodes in the network topology model can be optimized, and the physical authenticity and the logic definition can be balanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, readable storage medium, and program product for constructing a network topology model. Background Technology

[0002] In the current field of network management and monitoring, network topology models are mainly presented in two-dimensional planar graphics, specifically, a planar topology structure that uses node icons and connections to form the network architecture. However, this planar topology structure cannot reflect the spatial relationships between different nodes. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, computer equipment, readable storage medium, and sequence product for constructing a network topology model that can reflect the spatial positional relationships between different nodes, in order to address the aforementioned technical problems.

[0004] Firstly, this application provides a method for constructing a network topology model, the method comprising:

[0005] An initial network topology model for constructing a network architecture in a three-dimensional virtual topology space; wherein, the three-dimensional virtual coordinate system of the three-dimensional virtual topology space includes a first coordinate axis, a second coordinate axis, and a third coordinate axis;

[0006] Based on the device type of the network device corresponding to any node in the initial network topology model, the logical level weight value of the node is obtained, and based on the logical level weight value, the first coordinate value of the node on the first coordinate axis is adjusted to obtain the intermediate network topology model.

[0007] For any two nodes located in the same link, based on the difference in the logical level weight values ​​of the two nodes, the first repulsive force component is obtained by projecting the repulsive force between the two nodes onto the reference coordinate plane; wherein, the reference coordinate plane is the coordinate plane formed by the second coordinate axis and the third coordinate axis;

[0008] Obtain the current bandwidth ratio and importance coefficient of the link where the two nodes are located, and based on the current bandwidth ratio and the importance coefficient, obtain the first attractive force component obtained by projecting the attractive force between the two nodes onto the reference coordinate plane; wherein, the importance coefficient represents whether the link is a backbone link or a branch link.

[0009] If the sum of the first repulsive force component and the first attractive force component of a node is not within a preset range, for any given node, the node is controlled to move based on the first repulsive force component and the first attractive force component.

[0010] For the intermediate network topology model, based on the motion results of the nodes, the second coordinate value of the nodes on the second coordinate axis and the third coordinate value on the third coordinate axis are adjusted to obtain the target network topology model.

[0011] In one embodiment, the initial network topology model for constructing the network architecture in a three-dimensional virtual topology space includes:

[0012] For any network device in the network architecture, obtain the configuration information, real-time performance data, and physical location information of the network device, and determine the connection relationship between different network devices;

[0013] Based on the configuration information, the 3D model of the network device is retrieved from the 3D model library;

[0014] Based on the 3D model, the real-time performance data, the physical location information, and the connection relationships, the initial network topology model is constructed.

[0015] In one embodiment, obtaining the first repulsive force component obtained by projecting the repulsive force between the two nodes onto the reference coordinate plane based on the difference in their logical hierarchy weight values ​​includes:

[0016] Obtain the first distance component obtained by projecting the distance between the two nodes onto the reference coordinate plane, and the repulsive force intensity between the two nodes;

[0017] Based on the first distance component and the repulsive force intensity, the first repulsive force component is obtained, and based on the difference in the logical level weight values ​​of the two nodes, the level difference coefficient between the two nodes is obtained.

[0018] The first repulsive force component is adjusted based on the hierarchical difference coefficient to obtain the adjusted first repulsive force component.

[0019] In one embodiment, obtaining the first attractive force component obtained by projecting the attractive force between the two nodes onto the reference coordinate plane based on the current bandwidth ratio and the importance coefficient includes:

[0020] The attraction strength between the two nodes is obtained, and the first attraction component is obtained based on the first distance component and the attraction strength;

[0021] The first attractive force is adjusted based on the current bandwidth ratio and the importance coefficient to obtain the adjusted first attractive force.

[0022] In one embodiment, controlling the movement of the node based on the first repulsive force component and the first attractive force component includes:

[0023] The second repulsive force component is obtained by projecting the adjusted first repulsive force component onto the second coordinate axis, and the third repulsive force component is obtained by projecting it onto the third coordinate axis.

[0024] The second attractive force is obtained by projecting the adjusted first attractive force onto the second coordinate axis, and the third attractive force is obtained by projecting it onto the third coordinate axis.

[0025] Based on the sum of all second repulsive force components and all second attractive force components of the node, the first velocity component of the node along the second coordinate axis is obtained, and based on the sum of all third repulsive force components and all third attractive force components of the node, the second velocity component of the node along the third coordinate axis is obtained.

[0026] Based on the first velocity component and the second velocity component, the node is controlled to move;

[0027] If any node meets the motion-stopping condition or has already stopped moving, control the node that meets the motion-stopping condition to stop moving, and reacquire the first repulsive force component and the first attractive force component of any node; wherein, the motion-stopping condition is that the movement distance of the node is not less than a first preset distance;

[0028] If the sum of the first repulsive force component and the first attractive force component of a node is not within the preset range, return to the step of obtaining the second repulsive force component obtained by projecting the adjusted first repulsive force component onto the second coordinate axis, and continue execution until the sum of the first repulsive force component and the first attractive force component of all nodes is within the preset range.

[0029] In one embodiment, the method further includes:

[0030] For the current round of motion iteration of a node, if the motion distance of any node is less than the second preset distance during the current round of motion iteration, then the second coordinate value and the third coordinate value are adjusted based on the result of the current round of motion iteration to obtain the target network topology model.

[0031] Secondly, this application also provides a network topology model construction apparatus, the apparatus comprising:

[0032] A construction module is used to construct an initial network topology model of the network architecture in a three-dimensional virtual topology space; wherein, the three-dimensional virtual coordinate system of the three-dimensional virtual topology space includes a first coordinate axis, a second coordinate axis, and a third coordinate axis;

[0033] The first acquisition module is used to acquire the logical level weight value of any node based on the device type of the network device corresponding to any node in the initial network topology model, and adjust the first coordinate value of the node on the first coordinate axis based on the logical level weight value to obtain the intermediate network topology model.

[0034] The second acquisition module is used to acquire, for any two nodes located in the same link, a first repulsive force component obtained by projecting the repulsive force between the two nodes onto a reference coordinate plane based on the difference in the logical level weight values ​​of the two nodes; wherein, the reference coordinate plane is the coordinate plane formed by the second coordinate axis and the third coordinate axis;

[0035] The third acquisition module is used to acquire the current bandwidth ratio and importance coefficient of the link where the two nodes are located, and based on the current bandwidth ratio and the importance coefficient, acquire the first attractive force component obtained by projecting the attractive force between the two nodes onto the reference coordinate plane; wherein, the importance coefficient represents whether the link is a backbone link or a branch link.

[0036] The control module is used to control the movement of any node based on the first repulsive force and the first attractive force when the sum of the first repulsive force and the first attractive force of a node is not within a preset range.

[0037] The adjustment module is used to adjust the second coordinate value of the node on the second coordinate axis and the third coordinate value on the third coordinate axis based on the motion results of the node in the intermediate network topology model, so as to obtain the target network topology model.

[0038] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the methods in any of the above embodiments.

[0039] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the methods in any of the above embodiments.

[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the methods in any of the above embodiments.

[0041] The aforementioned network topology model construction method, apparatus, computer equipment, readable storage medium, and program product construct an initial network topology model of the network architecture in a three-dimensional virtual topology space. The three-dimensional virtual coordinate system of the three-dimensional virtual topology space includes a first coordinate axis, a second coordinate axis, and a third coordinate axis. Based on the device type of the corresponding network device of any node in the initial network topology model, the logical hierarchy weight value of the node is obtained, and based on the logical hierarchy weight value, the first coordinate value of the node on the first coordinate axis is adjusted to obtain an intermediate network topology model. For any two nodes located in the same link, based on the difference in the logical hierarchy weight values ​​of the two nodes, the first repulsive force component obtained by projecting the repulsive force between the two nodes onto a reference coordinate plane is obtained. The reference coordinate plane is... The coordinate plane formed by the second and third coordinate axes is used to obtain the current bandwidth ratio and importance coefficient of the link where the two nodes are located. Based on the current bandwidth ratio and importance coefficient, the first attractive force component is obtained by projecting the attraction between the two nodes onto the reference coordinate plane. The importance coefficient represents whether the link is a backbone link or a branch link. If the sum of the first repulsive force component and the first attractive force component of a node is not within a preset range, the node is controlled to move based on the first repulsive force component and the first attractive force component for any given node. For the intermediate network topology model, the second coordinate value of the node on the second coordinate axis and the third coordinate value on the third coordinate axis are adjusted based on the movement results of the node to obtain the target network topology model. The method provided in this application constructs an initial network topology model of the network architecture in a three-dimensional virtual topology space, which can reflect the spatial positional relationship between different nodes. Based on the logical hierarchy weight value of the node, the first coordinate value of the node is adjusted. At the same time, the repulsive force between different nodes is obtained based on the logical hierarchy weight value of the node, and the attractive force between different nodes is obtained based on the current bandwidth ratio and importance coefficient of the link. The movement of the node is controlled based on the repulsive force and the attractive force, and the second and third coordinate values ​​of the node are adjusted according to the movement results. In this way, it can not only solve the confusion problem that may occur in complex network layout, but also optimize the logical relationship between different nodes in the network topology model, balancing physical realism and logical clarity. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart illustrating a method for constructing a network topology model in one embodiment;

[0044] Figure 2 This is a flowchart illustrating the initial network topology model construction method in one embodiment;

[0045] Figure 3 This is a structural block diagram of a network topology model construction device in one embodiment;

[0046] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0049] In one embodiment, such as Figure 1 As shown, a method for constructing a network topology model is provided. This embodiment illustrates the method by applying it to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0050] S102. Construct an initial network topology model of the network architecture in a three-dimensional virtual topology space; wherein, the three-dimensional virtual coordinate system of the three-dimensional virtual topology space includes a first coordinate axis, a second coordinate axis, and a third coordinate axis.

[0051] Optionally, the first coordinate axis Y-axis may be, but is not limited to, a coordinate axis perpendicular to the ground, and the second coordinate axis X-axis and the third coordinate axis Z-axis may be, but are not limited to, coordinate axes parallel to the ground.

[0052] Optionally, a 3D model of the network device is constructed in a 3D virtual topology space based on the device type of the network device, and a mapping relationship between logical connections and physical locations between devices is established, thereby obtaining a digital twin of any network device in the network architecture. After constructing the network topology model of the network architecture, the network topology model can be rendered in 3D and dynamically updated based on the Three.js engine, which is an open-source JavaScript (World Wide Web) 3D graphics library based on the web. Its core function is to quickly realize the creation, rendering and interaction of 3D scenes in the browser without relying on complex native 3D development technologies.

[0053] S104. Based on the device type of the network device corresponding to any node in the initial network topology model, obtain the logical level weight value of the node, and adjust the first coordinate value of the node on the first coordinate axis based on the logical level weight value to obtain the intermediate network topology model.

[0054] Optionally, the network device types may include, but are not limited to, core routers, firewalls, aggregation switches, access switches, and physical servers.

[0055] Optionally, hierarchical division is the basis for layout optimization of the initial network topology model. Its core is to transform the logical hierarchy of network devices into quantized coordinates in three-dimensional space, so as to realize the intuitive expression of "hierarchy is height".

[0056] Optionally, based on the core status and functional positioning of network devices in the network architecture, a hierarchical weight table is preset. The higher the weight value, the higher the logical level of the device, and the larger the first coordinate value on the first coordinate axis Y. The hierarchical weight table is shown in Table 1.

[0057] Table 1

[0058]

[0059] Optionally, the first initial coordinate value of a node on the first coordinate axis, the second initial coordinate value on the second coordinate axis, and the third initial coordinate value on the third coordinate axis in the initial network topology model are all determined based on the actual physical location information of the corresponding network device of the node.

[0060] Optionally, the first initial coordinate value is first obtained, and then the first initial coordinate value in the initial network topology model can be directly replaced with the first coordinate adjustment value to obtain the intermediate network topology model. Alternatively, the sum of the corresponding first initial coordinate value and the first coordinate adjustment value can be used as the first coordinate value of the node in the intermediate network topology model. Other adjustments can be made to the first initial coordinate value and the first coordinate adjustment value to obtain the intermediate network topology model. This application does not specifically limit this approach. The first coordinate adjustment value is used to ensure that nodes at different levels are separated in the Y-axis direction and can be calculated using the following formula:

[0061]

[0062] In the formula, Y is the first coordinate adjustment value, k is the hierarchical interval baseline value, which can be dynamically adjusted according to the scale of the network architecture, for example, k=2m, and q is the logical hierarchy weight value.

[0063] Optionally, if the actual physical location information of the nodes in the initial network topology model is unknown, clustering can be performed based on the network segment or region to which the network devices belong, providing a physical constraint basis for subsequent force field optimization. For example, for network devices located in the same network segment, clustering can be performed with a clustering radius ≤ 5m.

[0064] S106. For any two nodes located in the same link, based on the difference in the logical level weight values ​​of the two nodes, obtain the first repulsive force component obtained by projecting the repulsive force between the two nodes onto the reference coordinate plane; wherein, the reference coordinate plane is the coordinate plane formed by the second coordinate axis and the third coordinate axis.

[0065] Among them, the repulsive force acts between different nodes to prevent nodes from overlapping in three-dimensional space and to ensure the spatial independence of each node.

[0066] Optionally, the first repulsive force component of the two nodes in the reference coordinate plane can be calculated first, and then the hierarchical difference coefficient between the two nodes can be calculated based on the difference in the logical hierarchy weight values ​​of the two nodes, and the first repulsive force component can be adjusted based on the hierarchical difference coefficient.

[0067] S108. Obtain the current bandwidth ratio and importance coefficient of the link where the two nodes are located, and based on the current bandwidth ratio and importance coefficient, obtain the first attractive force component obtained by projecting the attractive force between the two nodes onto the reference coordinate plane; wherein, the importance coefficient represents the link type as a backbone link or a branch link.

[0068] The attraction effect acts between different nodes, clearly expressing network connectivity by pulling in nodes with existing link connections.

[0069] Optionally, the importance coefficient of a link is determined by the type of service carried by the link. Links carrying core database traffic are marked as backbone links, and links carrying non-core database traffic are marked as branch links. If the link type is a backbone link, the importance coefficient of the link is 2; if the link type is a branch link, the importance coefficient of the link is 1.

[0070] Optionally, the bandwidth ratio is the ratio between the actual bandwidth used by the link and the maximum allowed bandwidth, which is in the range of 0 to 1, reflecting the load pressure of the link.

[0071] Optionally, the first attractive force component of the two nodes in the reference coordinate plane can be calculated first, and then the first attractive force component can be adjusted based on the current bandwidth ratio and importance coefficient.

[0072] S110. When the sum of the first repulsive force component and the first attractive force component of a node is not within a preset range, for any node, control the node to move based on the first repulsive force component and the first attractive force component.

[0073] Optionally, if the sum of the first repulsive force component and the first attractive force component of all nodes is within a preset range, it indicates that the repulsive and attractive forces of the nodes are balanced, and the layout of the network topology model is stable and orderly.

[0074] Optionally, if the sum of the first repulsive force component and the first attractive force component of a node is not within a preset range, it indicates that the repulsive force and attractive force of the node are not in equilibrium. In this case, it is necessary to control the node to perform motion iterations. Specifically, based on the first repulsive force component and the first attractive force component of the node, the movement speed of the node is determined, and the node is controlled to move at the determined movement speed. After the movement ends, it is determined again whether the sum of the first repulsive force component and the first attractive force component of the node is within the preset range. If it is not within the preset range, the node is controlled to move in the same way until the sum of the first repulsive force component and the first attractive force component is within the preset range.

[0075] S112. For the intermediate network topology model, based on the motion results of the nodes, the second coordinate value of the nodes on the second coordinate axis and the third coordinate value on the third coordinate axis are adjusted to obtain the target network topology model.

[0076] Optionally, if all nodes in the intermediate network topology model are in a state of force equilibrium after motion iteration, the adjusted second coordinate value and the adjusted third coordinate value are determined based on the final position of the node.

[0077] In the aforementioned network topology model construction method, an initial network topology model of the network architecture is constructed in a three-dimensional virtual topology space. The three-dimensional virtual coordinate system of the three-dimensional virtual topology space includes a first coordinate axis, a second coordinate axis, and a third coordinate axis. Based on the device type of the corresponding network device of any node in the initial network topology model, the logical hierarchy weight value of the node is obtained. Based on the logical hierarchy weight value, the first coordinate value of the node on the first coordinate axis is adjusted to obtain an intermediate network topology model. For any two nodes located in the same link, based on the difference in the logical hierarchy weight values ​​of the two nodes, the first repulsive force component obtained by projecting the repulsive force between the two nodes onto the reference coordinate plane is obtained. The reference coordinate plane is the intersection of the second and third coordinate axes. The coordinate plane formed by the axes; obtain the current bandwidth ratio and importance coefficient of the link where the two nodes are located, and based on the current bandwidth ratio and importance coefficient, obtain the first attractive force component obtained by projecting the attraction between the two nodes into the reference coordinate plane; where the importance coefficient represents the link type as a backbone link or a branch link; when the sum of the first repulsive force component and the first attractive force component of a node is not within a preset range, for any node, control the node to move based on the first repulsive force component and the first attractive force component; for the intermediate network topology model, based on the node's movement results, adjust the second coordinate value of the node on the second coordinate axis and the third coordinate value on the third coordinate axis to obtain the target network topology model. The method provided in this application constructs an initial network topology model of the network architecture in a three-dimensional virtual topology space, which can reflect the spatial positional relationship between different nodes. Based on the logical hierarchy weight value of the node, the first coordinate value of the node is adjusted. At the same time, the repulsive force between different nodes is obtained based on the logical hierarchy weight value of the node, and the attractive force between different nodes is obtained based on the current bandwidth ratio and importance coefficient of the link. The movement of the node is controlled based on the repulsive force and the attractive force, and the second and third coordinate values ​​of the node are adjusted according to the movement results. In this way, it can not only solve the confusion problem that may occur in complex network layout, but also optimize the logical relationship between different nodes in the network topology model, balancing physical realism and logical clarity.

[0078] In some embodiments, such as Figure 2 As shown, the initial network topology model for constructing the network architecture in a three-dimensional virtual topology space includes:

[0079] S202. For any network device in the network architecture, obtain the network device's configuration information, real-time performance data, and physical location information, and determine the connection relationship between different network devices.

[0080] S204. Based on the configuration information, retrieve the 3D model of the network device from the 3D model library.

[0081] S206. Based on the 3D model, real-time performance data, physical location information, and connection relationships, construct the initial network topology model.

[0082] Optionally, network devices may include, but are not limited to, physical servers, switches, and routers; the configuration information of network devices may include, but is not limited to, device type, IP address, and interface information; the performance data of network devices may include, but is not limited to, port status data, CPU utilization, and memory utilization.

[0083] Optionally, but not limited to, network device configuration information can be obtained through at least one of LLDP (Link Layer Discovery Protocol), SNMP (Simple Network Management Protocol), or Telegraf (open source data collection agent).

[0084] Optionally, in the process of reading relevant data of network devices from the database, the entity name information of the network devices can be obtained first through the SNMP interface, and then the basic information of the database can be obtained from the MySQL database when the Python script is executed, and then the network devices can be traversed.

[0085] Optionally, the pre-edited OID (Object Identifier) ​​of the network device can be obtained, and the entity information ID of the network device can be dynamically added to the OID. Then, a Telegraf script for the OID can be generated, so that the Telegraf script can periodically collect device information and send it to Kafka for later use. Here, Telegraf is an open-source data collection agent tool, and Kafka is a distributed high-throughput message queue system.

[0086] In this embodiment, an initial network topology model is constructed based on a 3D model, real-time performance data, physical location information, and connection relationships. This enables the constructed initial network topology model to more accurately represent the network architecture.

[0087] In some embodiments, obtaining the first repulsive force component obtained by projecting the repulsive force between two nodes onto a reference coordinate plane based on the difference in the logical hierarchy weight values ​​of the two nodes includes: obtaining the first distance component obtained by projecting the distance between the two nodes onto the reference coordinate plane, and the repulsive force intensity between the two nodes; obtaining the first repulsive force component based on the first distance component and the repulsive force intensity, and obtaining the hierarchy difference coefficient between the two nodes based on the difference in the logical hierarchy weight values ​​of the two nodes; and adjusting the first repulsive force component based on the hierarchy difference coefficient to obtain the adjusted first repulsive force component.

[0088] Optionally, the repulsive force between different nodes is inversely proportional to the square of the node distance and directly proportional to the intensity of the repulsive force; the formula for calculating the first component of the repulsive force is shown below:

[0089]

[0090] In the formula, This is the first component of the repulsive force, expressed in field units. The repulsive force strength can be dynamically adjusted based on the number of nodes. For example, when the number of nodes > 500... It can be set to 1500; d is the first distance component between the two nodes in the reference coordinate plane. To avoid division by zero error, the minimum value of d is set to 0.1m.

[0091] Optionally, the hierarchy difference coefficient is used to dynamically correct the repulsion force. Since the repulsion force between high-level nodes and low-level nodes is significantly reduced, correcting the repulsion force can prevent the logical relationship from being broken due to excessive dispersion of cross-level nodes. The hierarchy difference coefficient between two nodes can be calculated by the following formula:

[0092]

[0093] In the formula, This is the hierarchical difference coefficient. and These are the logical hierarchy weights for nodes i and j, respectively.

[0094] Optionally, the adjusted first repulsive force component can be calculated using the following formula:

[0095]

[0096] In the formula, This is the first component of the repulsive force.

[0097] In this embodiment, the first repulsive force component is adjusted based on the hierarchical difference coefficient to obtain the adjusted first repulsive force component, making the adjusted first repulsive force component more accurate.

[0098] In some embodiments, obtaining the first attractive force component obtained by projecting the attractive force between two nodes onto the reference coordinate plane based on the current bandwidth ratio and importance coefficient includes: obtaining the attractive force intensity between the two nodes, and obtaining the first attractive force component based on the first distance component and the attractive force intensity; adjusting the first attractive force component based on the current bandwidth ratio and importance coefficient to obtain the adjusted first attractive force component.

[0099] Optionally, the attraction between different nodes is proportional to the distance between the nodes and the intensity of the attraction; the formula for calculating the first component of the attraction force is shown below:

[0100]

[0101] In the formula, The first component of attraction is expressed in force field units; The value of is the strength of attraction. In order to balance the game relationship between attraction and repulsion, it is set to 0.5 in this application; d is the first distance component between the two nodes in the reference coordinate plane.

[0102] Alternatively, the adjusted first attractive force component can be calculated using the following formula:

[0103]

[0104] In the formula, The adjusted first component of attraction; This represents the current bandwidth percentage. This represents the importance coefficient.

[0105] In this embodiment, the first attractive force is adjusted based on the current bandwidth ratio and importance coefficient to obtain the adjusted first attractive force, making the adjusted first attractive force more accurate.

[0106] In some embodiments, controlling the node to move based on the first repulsive force component and the first attractive force component includes: acquiring the second repulsive force component projected onto the second coordinate axis and the third repulsive force component projected onto the third coordinate axis; acquiring the second attractive force component projected onto the second coordinate axis and the third attractive force component projected onto the third coordinate axis; acquiring the first velocity component of the node along the second coordinate axis based on the sum of all the second repulsive force components and all the second attractive force components of the node, and acquiring the second velocity component of the node along the third coordinate axis based on the sum of all the third repulsive force components and all the third attractive force components of the node. Based on the first velocity component and the second velocity component, the nodes are controlled to move. If any node meets the motion stopping condition or has already stopped moving, the node that meets the motion stopping condition is controlled to stop moving, and the first repulsive force component and the first attractive force component of any node are reacquired. The motion stopping condition is that the movement distance of the node is not less than the first preset distance. If the sum of the first repulsive force component and the first attractive force component of a node is not within the preset range, the step of obtaining the second repulsive force component obtained by projecting the adjusted first repulsive force component onto the second coordinate axis is returned, and execution continues until the sum of the first repulsive force component and the first attractive force component of all nodes is within the preset range.

[0107] Alternatively, the second repulsive force component can be calculated using the following formula:

[0108]

[0109] In the formula, This is the component of the second repulsive force. and These are the coordinates of the two nodes on the second coordinate axis.

[0110] Alternatively, the third repulsive force component can be calculated using the following formula:

[0111]

[0112] In the formula, and These are the coordinates of the two nodes on the third coordinate axis.

[0113] Alternatively, the second attractive force component can be calculated as follows:

[0114]

[0115] Alternatively, the third attractive force component can be calculated as follows:

[0116]

[0117] Optionally, during the motion iteration process of a node, the node's motion speed is proportional to the net force it experiences, and the displacement is determined by the velocity and the damping coefficient.

[0118] Optionally, the first velocity component of any node in any round of motion iteration can be calculated as follows:

[0119]

[0120] In the formula, This is the damping coefficient, used to reduce layout oscillations caused by accumulated velocity; This represents the first velocity component of the node before the current motion iteration. This represents the first velocity component of the node during the iteration of this motion.

[0121] Alternatively, the second velocity component of any node can be calculated using the following formula:

[0122]

[0123] Optionally, This is the second velocity component of the node before the current motion iteration. This is the second velocity component of the node during the iteration of this motion.

[0124] Optionally, after any round of motion iterations, the distance moved by the node is as follows:

[0125]

[0126] Optionally, if the external forces acting on a node are in equilibrium during the node's movement, the node will stop moving; in each iteration, to avoid the node deviating excessively from the physical position constraints, the first preset distance can be, but is not limited to, set to 10m.

[0127] In this embodiment, by controlling the nodes in the network topology model to perform motion iteration, it is possible to ensure that the nodes in the target network topology model obtained after motion iteration are in a balanced state as much as possible.

[0128] In some embodiments, the method further includes: for the current round of motion iteration of the nodes, if the motion distance of any node is less than the second preset distance during the current round of motion iteration, then based on the result of the current round of motion iteration, the second coordinate value and the third coordinate value are adjusted to obtain the target network topology model.

[0129] Optionally, if the number of iterations reaches a preset number of iterations, the iteration process is stopped. For example, when the number of nodes in the network topology model is greater than 1000, the preset number of iterations is 100.

[0130] Optionally, when the average displacement change of all nodes is ≤0.1m / cycle, the iteration is terminated early to determine that the layout is stable.

[0131] Optionally, to avoid the layout getting stuck in local optima (such as nodes being arranged in a regular grid but link intersections not being reduced), a random perturbation of ±5% is added to the node displacement in each iteration, with the perturbation amplitude decreasing as the number of iterations increases (the final perturbation is ≤1%).

[0132] In this embodiment, the iteration is stopped based on a preset iteration stop condition, which can improve both iteration efficiency and the accuracy of iteration results.

[0133] Optionally, the core parameters in this embodiment were optimized through experiments with 100+ networks of different sizes (20-2000 nodes) to ensure stability and effectiveness in complex scenarios. The key parameters are shown in Table 2 below:

[0134] Table 2

[0135]

[0136] The method provided in this embodiment also includes:

[0137] (1) Use Bézier curves to create smooth links in Three.js (JavaScript 3D rendering library).

[0138] Define a starting point (source node center coordinates), an ending point (target node center coordinates), and two control points. The Y-coordinate of the control points is 1m higher than the Y-axis of the nodes to ensure that the link bends naturally in space.

[0139] A cubic Bézier curve is created based on the start point, control point, and end point. The link geometry is generated by uniformly sampling 50 points from the curve.

[0140] Assign a basic material to the link (default blue, transparency 0.6) and link it to real-time bandwidth data to achieve dynamic updates.

[0141] (2) Material rendering of the node model: the node base is made of metallic material and the shell is made of semi-transparent material; the power light is green to indicate normal operation and red to indicate fault (frequency 1Hz); the fan light is blue to show the rotation speed (the higher the speed, the faster the rotation); each network port corresponds to an independent LED light, green to indicate connection and gray to indicate disconnection.

[0142] (3) Real-time refresh of link status: dynamically adjust the link color according to the bandwidth utilization (green: ≤30%, yellow: 30%-70%, red: >70%), and map the link thickness to the bandwidth capacity (1Gbps→1px, 10Gbps→3px, 100Gbps→5px); alarm links flash according to level (1Hz for emergency alarms, 0.5Hz for general alarms).

[0143] (4) Integrate real-time performance data: Display CPU utilization, temperature and other indicators on the node model using floating labels, gradient colors and other methods.

[0144] (5) Supports perspective control: Users can achieve 360° rotation by dragging the mouse, zoom by scrolling the wheel, and double-click to focus on a specific node to generate an interactive 3D topology visualization interface that reflects the network operation status in real time.

[0145] (6) Key step: Topology layout optimization: Using the graph neural network (GNN) algorithm, the spatial position of nodes is automatically adjusted according to the network traffic characteristics, and nodes with high traffic interaction are arranged nearby to reduce link crossing.

[0146] (7) Abnormal pattern recognition: By training the LSTM (Long Short-Term Memory) model, the three-dimensional topological features (such as node distribution density and link traffic patterns) under normal network conditions are learned, and abnormal changes are detected and warnings are issued in real time.

[0147] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0148] Based on the same inventive concept, this application also provides a network topology model building apparatus for implementing the network topology model building method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more network topology model building apparatus embodiments provided below can be found in the limitations of the network topology model building method described above, and will not be repeated here.

[0149] In one exemplary embodiment, such as Figure 3 As shown, a network topology model construction device 300 is provided, including: a construction module 301, a first acquisition module 302, a second acquisition module 303, a third acquisition module 304, a control module 305, and an adjustment module 306, wherein:

[0150] The construction module 301 is used to construct an initial network topology model of the network architecture in a three-dimensional virtual topology space; wherein the three-dimensional virtual coordinate system of the three-dimensional virtual topology space includes a first coordinate axis, a second coordinate axis and a third coordinate axis.

[0151] The first acquisition module 302 is used to acquire the logical level weight value of the node based on the device type of the network device corresponding to any node in the initial network topology model, and adjust the first coordinate value of the node on the first coordinate axis based on the logical level weight value to obtain the intermediate network topology model.

[0152] The second acquisition module 303 is used to acquire, for any two nodes located in the same link, a first repulsive force component obtained by projecting the repulsive force between the two nodes onto a reference coordinate plane based on the difference in the logical level weight values ​​of the two nodes; wherein, the reference coordinate plane is the coordinate plane formed by the second coordinate axis and the third coordinate axis.

[0153] The third acquisition module 304 is used to acquire the current bandwidth ratio and importance coefficient of the link where the two nodes are located, and based on the current bandwidth ratio and the importance coefficient, acquire the first attractive force component obtained by projecting the attractive force between the two nodes onto the reference coordinate plane; wherein, the importance coefficient represents the link type of the link as a backbone link or a branch link.

[0154] The control module 305 is used to control the movement of any node based on the first repulsive force and the first attractive force when the sum of the first repulsive force and the first attractive force of a node is not within a preset range.

[0155] The adjustment module 306 is used to adjust the second coordinate value of the node on the second coordinate axis and the third coordinate value on the third coordinate axis based on the motion results of the node in the intermediate network topology model, so as to obtain the target network topology model.

[0156] In some embodiments, the construction module 301 is further configured to, for any network device in the network architecture, obtain the configuration information, real-time performance data and physical location information of the network device, and determine the connection relationship between different network devices; based on the configuration information, call the three-dimensional model of the network device from the three-dimensional model library; and construct the initial network topology model based on the three-dimensional model, the real-time performance data, the physical location information and the connection relationship.

[0157] In some embodiments, the second acquisition module 303 is further configured to acquire a first distance component obtained by projecting the distance between the two nodes onto the reference coordinate plane, and the repulsive force intensity between the two nodes; based on the first distance component and the repulsive force intensity, acquire the first repulsive force component, and based on the difference in the logical level weight values ​​of the two nodes, acquire the level difference coefficient between the two nodes; and adjust the first repulsive force component based on the level difference coefficient to obtain the adjusted first repulsive force component.

[0158] In some embodiments, the third acquisition module 304 is further configured to acquire the attraction strength between the two nodes, and acquire the first attraction force based on the first distance component and the attraction strength; adjust the first attraction force based on the current bandwidth ratio and the importance coefficient to obtain the adjusted first attraction force.

[0159] In some embodiments, the control module 305 is further configured to: acquire the second repulsive force component projected onto the second coordinate axis by the adjusted first repulsive force component, and the third repulsive force component projected onto the third coordinate axis; acquire the second attractive force component projected onto the second coordinate axis by the adjusted first attractive force component, and the third attractive force component projected onto the third coordinate axis; acquire the first velocity component of the node along the second coordinate axis based on the sum of all second repulsive force components and all second attractive force components of the node, and acquire the second velocity component of the node along the third coordinate axis based on the sum of all third repulsive force components and all third attractive force components of the node; and acquire the second velocity component of the node along the third coordinate axis based on the sum of the first velocity component. The second velocity component and the first velocity component are used to control the movement of the nodes. If any node meets the movement stop condition or has already stopped moving, the node that meets the movement stop condition is controlled to stop moving, and the first repulsive force component and the first attractive force component of any node are reacquired. The movement stop condition is that the movement distance of the node is not less than a first preset distance. If the sum of the first repulsive force component and the first attractive force component of a node is not within the preset range, the step of obtaining the second repulsive force component obtained by projecting the adjusted first repulsive force component onto the second coordinate axis is returned, and execution continues until the sum of the first repulsive force component and the first attractive force component of all nodes is within the preset range.

[0160] In some embodiments, the control module 305 is further configured to, for the current round motion iteration of the nodes, if the movement distance of any node is less than the second preset distance during the current round motion iteration, adjust the second coordinate value and the third coordinate value based on the current round motion iteration result to obtain the target network topology model.

[0161] Each module in the aforementioned network topology model construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0162] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a network topology model construction method.

[0163] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0164] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0165] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0166] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0167] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0168] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0169] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0170] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for constructing a network topology model, characterized in that, The method includes: An initial network topology model for constructing a network architecture in a three-dimensional virtual topology space; wherein, the three-dimensional virtual coordinate system of the three-dimensional virtual topology space includes a first coordinate axis, a second coordinate axis, and a third coordinate axis; Based on the device type of the network device corresponding to any node in the initial network topology model, the logical level weight value of the node is obtained, and based on the logical level weight value, the first coordinate value of the node on the first coordinate axis is adjusted to obtain the intermediate network topology model. For any two nodes located in the same link, based on the difference in the logical level weight values ​​of the two nodes, the first repulsive force component is obtained by projecting the repulsive force between the two nodes onto the reference coordinate plane; wherein, the reference coordinate plane is the coordinate plane formed by the second coordinate axis and the third coordinate axis; Obtain the current bandwidth ratio and importance coefficient of the link where the two nodes are located, and based on the current bandwidth ratio and the importance coefficient, obtain the first attractive force component obtained by projecting the attractive force between the two nodes onto the reference coordinate plane; wherein, the importance coefficient represents whether the link is a backbone link or a branch link. If the sum of the first repulsive force component and the first attractive force component of a node is not within a preset range, for any given node, the node is controlled to move based on the first repulsive force component and the first attractive force component. For the intermediate network topology model, based on the motion results of the nodes, the second coordinate value of the nodes on the second coordinate axis and the third coordinate value on the third coordinate axis are adjusted to obtain the target network topology model.

2. The method according to claim 1, characterized in that, The initial network topology model for constructing the network architecture in a three-dimensional virtual topology space includes: For any network device in the network architecture, obtain the configuration information, real-time performance data, and physical location information of the network device, and determine the connection relationship between different network devices; Based on the configuration information, the 3D model of the network device is retrieved from the 3D model library; Based on the 3D model, the real-time performance data, the physical location information, and the connection relationships, the initial network topology model is constructed.

3. The method according to claim 1, characterized in that, The method of obtaining the first repulsive force component by projecting the repulsive force between the two nodes onto the reference coordinate plane based on the difference in their logical hierarchy weight values ​​includes: Obtain the first distance component obtained by projecting the distance between the two nodes onto the reference coordinate plane, and the repulsive force intensity between the two nodes; Based on the first distance component and the repulsive force intensity, the first repulsive force component is obtained, and based on the difference in the logical level weight values ​​of the two nodes, the level difference coefficient between the two nodes is obtained. The first repulsive force component is adjusted based on the hierarchical difference coefficient to obtain the adjusted first repulsive force component.

4. The method according to claim 3, characterized in that, The step of obtaining the first attractive force component, projected onto the reference coordinate plane based on the current bandwidth ratio and the importance coefficient, includes: The attraction strength between the two nodes is obtained, and the first attraction component is obtained based on the first distance component and the attraction strength; The first attractive force is adjusted based on the current bandwidth ratio and the importance coefficient to obtain the adjusted first attractive force.

5. The method according to claim 4, characterized in that, The method of controlling the movement of the node based on the first repulsive force component and the first attractive force component includes: The second repulsive force component is obtained by projecting the adjusted first repulsive force component onto the second coordinate axis, and the third repulsive force component is obtained by projecting it onto the third coordinate axis. The second attractive force is obtained by projecting the adjusted first attractive force onto the second coordinate axis, and the third attractive force is obtained by projecting it onto the third coordinate axis. Based on the sum of all second repulsive force components and all second attractive force components of the node, the first velocity component of the node along the second coordinate axis is obtained, and based on the sum of all third repulsive force components and all third attractive force components of the node, the second velocity component of the node along the third coordinate axis is obtained. Based on the first velocity component and the second velocity component, the node is controlled to move; If any node meets the motion-stopping condition or has already stopped moving, control the node that meets the motion-stopping condition to stop moving, and reacquire the first repulsive force component and the first attractive force component of any node; wherein, the motion-stopping condition is that the movement distance of the node is not less than a first preset distance; If the sum of the first repulsive force component and the first attractive force component of a node is not within the preset range, return to the step of obtaining the second repulsive force component obtained by projecting the adjusted first repulsive force component onto the second coordinate axis, and continue execution until the sum of the first repulsive force component and the first attractive force component of all nodes is within the preset range.

6. The method according to claim 5, characterized in that, The method further includes: For the current round of motion iteration of a node, if the motion distance of any node is less than the second preset distance during the current round of motion iteration, then the second coordinate value and the third coordinate value are adjusted based on the result of the current round of motion iteration to obtain the target network topology model.

7. A network topology model construction device, characterized in that, The device includes: A construction module is used to construct an initial network topology model of the network architecture in a three-dimensional virtual topology space; wherein, the three-dimensional virtual coordinate system of the three-dimensional virtual topology space includes a first coordinate axis, a second coordinate axis, and a third coordinate axis; The first acquisition module is used to acquire the logical level weight value of any node based on the device type of the network device corresponding to any node in the initial network topology model, and adjust the first coordinate value of the node on the first coordinate axis based on the logical level weight value to obtain the intermediate network topology model. The second acquisition module is used to acquire, for any two nodes located in the same link, a first repulsive force component obtained by projecting the repulsive force between the two nodes onto a reference coordinate plane based on the difference in the logical level weight values ​​of the two nodes; wherein, the reference coordinate plane is the coordinate plane formed by the second coordinate axis and the third coordinate axis; The third acquisition module is used to acquire the current bandwidth ratio and importance coefficient of the link where the two nodes are located, and based on the current bandwidth ratio and the importance coefficient, acquire the first attractive force component obtained by projecting the attractive force between the two nodes onto the reference coordinate plane; wherein, the importance coefficient represents whether the link is a backbone link or a branch link. The control module is used to control the movement of any node based on the first repulsive force and the first attractive force when the sum of the first repulsive force and the first attractive force of a node is not within a preset range. The adjustment module is used to adjust the second coordinate value of the node on the second coordinate axis and the third coordinate value on the third coordinate axis based on the motion results of the node in the intermediate network topology model, so as to obtain the target network topology model.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.