Network topology generation method and device, electronic equipment and readable storage medium

By applying multi-label classification algorithm and topological node traffic maximization objective function in the Underlay network, the shortcomings of the topology generation of Underlay network in the existing technology are solved, and efficient, accurate and real-time topology automatic generation is achieved, meeting the complex needs of modern networks.

CN119854135AActive Publication Date: 2025-04-18CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411997069.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-18
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing technology has shortcomings in Underlay network topology generation, which is difficult to meet the needs of modern networks for efficient, accurate, real-time and general topology generation methods, especially when the scale of equipment and hosts continues to grow, the network structure is complex and dynamically changing.

Method used

By obtaining the attribute information of devices in the physical network, using the multi-label classification algorithm ML-KNN for classification clustering, combining the topology node traffic maximization objective function, the host device is reasoned upward along the physical network hierarchy order to determine the network topology. The method includes collecting, cleaning, and node processing equipment information, and improving data access efficiency through cache preheating.

Benefits of technology

It realizes the accurate and real-time automatic generation of Underlay network topology, ensures the integrity of network devices and hosts, and improves the comprehensiveness and efficiency of network management and analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854135A_ABST
    Figure CN119854135A_ABST
Patent Text Reader

Abstract

The invention discloses a network topology generation method and device, electronic equipment and a readable storage medium, and the method comprises the steps: obtaining the attribute information of a plurality of pieces of equipment in a physical network, the plurality of pieces of equipment comprising network equipment and host equipment; according to the attribute information of the multiple devices, the multiple devices are classified and clustered through a multi-label classification algorithm ML-KNN, and the classification and clustering result comprises the device types of the network devices in the multiple devices and the incidence relation between each network device and other network devices and / or host devices; and taking topology node flow maximization as an objective function, according to a classification clustering result, reasoning upwards from the host equipment along a hierarchical sequence of the physical network, and determining the network topology of the physical network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a network topology generation method and device, an electronic device, and a readable storage medium. Background Art

[0002] Underlay network is an important part of the network architecture of cloud computing data center, and is usually constructed in a hierarchical and domain-based design. With the widespread application and rapid development of cloud computing and cloud storage technologies, network structures are becoming increasingly complex, and the number of devices and hosts in a single resource pool availability zone continues to grow, which has become a significant trend in current network development. With the ever-changing network structure, network topology automatic generation technology, especially topology generation for Underlay networks, has become a hot topic in the field of network research.

[0003] For traditional network topology generation methods, as the scale of devices and hosts continues to grow, it takes a lot of time and effort to generate topologies based on human experience and pre-wired node relationships. At the same time, the current network topology is dynamically changing, and the adjustment of network devices and hosts poses a huge challenge to the real-time performance of traditional network topology generation methods. When the original devices and hosts in the available zones of the resource pool are complex and the node association is missing, traditional network topology generation methods cannot accurately restore the topological structure of each level and the relationship between the side-mounted devices, resulting in a large range of devices and hosts being lost in the topology, limiting the comprehensive management and analysis of the Underlay network in the later stage. Summary of the invention

[0004] The present application mainly provides a network topology generation method and device, an electronic device and a readable storage medium. The technical solution of the present application is implemented as follows:

[0005] In a first aspect, a network topology generation method is provided, the method comprising: acquiring attribute information of a plurality of devices in a physical network, the plurality of devices comprising network devices and host devices; classifying and clustering the plurality of devices according to the attribute information of the plurality of devices by means of a multi-label classification algorithm ML-KNN, the results of the classification and clustering comprising the device type of the network devices in the plurality of devices, and the association relationship between each of the network devices and other network devices and / or host devices; taking maximization of topology node traffic as an objective function, and determining the network topology of the physical network by reasoning upward from the host device along the hierarchical order of the physical network according to the results of the classification and clustering.

[0006] According to the above technical means, in the automatic generation and reasoning of topology, a multi-label classification algorithm is introduced, with the attribute information of network devices and hosts as features, and the device and host categories as labels, to achieve clustering from core device nodes to peripheral device nodes, and hierarchical clustering from core aggregation device nodes to lower-level host nodes. In the automatic generation and reasoning of topology, by introducing the maximization of topological node traffic as the objective function, the core network devices such as TOR, POD, north-south aggregation switches, and CMNET exports can be inferred from the host layer layer by layer, and the hierarchical and domain-based architecture of the network topology under the resource pool can be visualized.

[0007] In some embodiments, before obtaining the attribute information of multiple devices in the physical network, the method also includes: collecting device-related information of multiple original devices from the configuration management database CMDB; cleaning the device-related information of the multiple original devices, filtering out the original devices that are not in the network and / or the original devices with duplicate management IPs; mapping the cleaned device-related information of the multiple original devices to the node nodes one by one in a nodeized list manner; using the resource pool as an index, storing the relevant information of the original devices in each resource pool in the cache in a cache preheating manner.

[0008] In some embodiments, the obtaining of attribute information of multiple devices in the physical network includes: obtaining node list information of original devices corresponding to the multiple devices in the physical network from the cache; and using the node list information as the attribute information of each device.

[0009] Through the above technical means, when generating network topology, the high-speed reading and writing characteristics of the cache are utilized to directly obtain the pre-processed node information list from the cache, which can shorten the data reading time and improve the efficiency of topology generation.

[0010] In some embodiments, the method further includes: constructing a training data set, the training data set including attribute information of multiple original devices in the target resource pool; clustering the multiple original devices in the training data set using the multi-label classification algorithm ML-KNN; and training the multi-label classification algorithm ML-KNN based on the clustering results and the attribute labels of the multiple original devices in the training data set.

[0011] According to the above technical means, constructing the target resource pool training data set improves data targeting, reduces interference, and makes the trained model more in line with the actual network topology requirements; based on clustering results and attribute label training algorithms, their accuracy and adaptability can be improved, self-optimization can be achieved, long-term effectiveness can be ensured, and the quality of network topology generation can be improved.

[0012] In some embodiments, along the bottom-up hierarchical order of the physical network, the network devices include access layer devices, aggregation layer devices, core layer devices and export layer devices, and the access layer devices are arranged on the upper layer of the host devices; determining the network topology of the physical network includes: based on each of the host devices, taking maximizing the traffic path flowing into the host device as the objective function, determining the access layer device connected to each host device; based on each of the access layer devices, taking maximizing the traffic path flowing into the access layer devices as the objective function, determining the aggregation layer device connected to each access layer device.

[0013] In some embodiments, the aggregation layer device includes an east-west interconnection switch and a north-south export aggregation switch located on the upper layer of the east-west interconnection switch; determining the network topology of the physical network also includes: starting from the access layer device, traversing upward along the hierarchical order to the leaf node, recording each path from the access layer device to the leaf node; using the node that appears the most times on all paths as the north-south export aggregation switch.

[0014] In some embodiments, determining the network topology of the physical network further includes: screening according to device attributes of the network device to determine multiple target network devices whose device attributes are routing devices; screening the multiple target network devices according to a traffic maximization objective function to determine the export layer device.

[0015] According to the above technical means, by introducing the maximization of the topological node traffic path as the objective function, guided by the idea of ​​Underlay network layered architecture, starting from the host node traffic path, the objective function maximizes the reasoning of the upper-layer TOR device, and then the POD, north-south convergence and egress router are inferred upward, realizing the vertical layering of the network topology and the horizontal bypass, which ensures the integrity of the Underlay network topology generation.

[0016] In a second aspect, a network topology generating device is provided, the device comprising: an acquiring unit, for acquiring attribute information of a plurality of devices in a physical network, the plurality of devices comprising network devices and host devices; a clustering unit, for classifying and clustering the plurality of devices according to the attribute information of the plurality of devices by a multi-label classification algorithm ML-KNN, the results of the classification and clustering comprising the device type of the network devices in the plurality of devices, and the association relationship between each of the network devices and other network devices and / or host devices; an inference unit, for determining the network topology of the physical network by inferring upward from the host device along the hierarchical order of the physical network according to the results of the classification and clustering, with maximizing the topological node traffic as an objective function.

[0017] According to a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the method according to the first aspect.

[0018] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, and the computer program implements the method according to the first aspect when executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A network architecture diagram for applying the method of an embodiment of the present application;

[0020] Figure 2 A schematic flowchart of a network topology generation method provided in an embodiment of the present application;

[0021] Figure 3 A schematic flowchart of a network topology generation method provided in another embodiment of the present application;

[0022] Figure 4 A schematic flowchart of a training method for a multi-label classification algorithm provided in an embodiment of the present application;

[0023] Figure 5 A schematic flowchart of a method for inferring network topology provided in an embodiment of the present application;

[0024] Figure 6 A schematic flowchart of a method for inferring network topology provided in another embodiment of the present application;

[0025] Figure 7 A schematic flowchart of a method for inferring network topology provided in yet another embodiment of the present application;

[0026] Figure 8 A schematic structural diagram of a network topology generating device provided in an embodiment of the present application;

[0027] Fig. 9 A schematic structural diagram of an electronic device provided in this embodiment. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0030] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0031] Underlay network is an important part of the network architecture of cloud computing data center, and is usually constructed in a hierarchical and domain-based design. With the widespread application and rapid development of cloud computing and cloud storage technologies, network structures are becoming increasingly complex, and the number of devices and hosts in a single resource pool availability zone continues to grow, which has become a significant trend in current network development. With the ever-changing network structure, network topology automatic generation technology, especially topology generation for Underlay networks, has become a hot topic in the field of network research.

[0032] However, in the related art, there are still some problems when generating the network topology, which are described in detail below.

[0033] First, due to the continuous development of cloud computing and big data services, data centers need to accommodate more and more server, storage and other host resources, as well as various network devices that provide network connections for these hosts. Numerous devices are interconnected, forming an intricate connection relationship, making the topology structure large and complex, increasing the difficulty of topology generation and management.

[0034] Secondly, the Underlay network adopts a hierarchical and domain-based design concept. Although this design helps improve the scalability, flexibility, and manageability of the network, it also leads to the complexity of the topology. The device connection relationships between different layers and regions are diverse, which need to be precisely sorted out and managed to ensure efficient data transmission between various layers and regions. At the same time, the functions and configuration requirements of devices at different levels are different, which further increases the complexity of the topology.

[0035] Thirdly, in modern network environments, business needs are constantly changing, and adjustments to devices and hosts occur frequently. Factors such as the addition of new devices, removal of old devices, updates to device configurations, and dynamic changes in network traffic make the Underlay network topology constantly changing. This dynamic change requires the topology generation method to be able to adapt to network changes in real time and update the topology structure in a timely manner, which undoubtedly increases the complexity of topology management.

[0036] Finally, the Underlay network includes many types of devices, such as routers, switches, firewalls, servers, etc. Each device has different functions and characteristics, and its connection methods and configuration requirements are also different. For example, routers are responsible for routing and forwarding at the network layer, switches focus on switching at the data link layer, and firewalls are used for network security protection. The collaborative work and interconnection between different types of devices make the topology structure complex and diverse, and it is necessary to comprehensively consider the characteristics and relationships of various devices to build an accurate topology model.

[0037] To solve the above problems, one method in the related art is to generate five-tuple data by acquiring NetFlow messages sent by each network device, and then update the NetFlow flow data in the hash table according to the order in which the data flows arrive at the system, so as to generate a network topology. This method mainly relies on the analysis of network traffic data, and infers the connection relationship between devices by processing the five-tuple information such as source IP address, destination IP address, source port, destination port and protocol type in the NetFlow message, so as to construct a network topology.

[0038] Another method in the related art is implemented based on the target network element set. Specifically, according to all the obtained target network element sets, the topology source data of each network element in the target network element set is obtained in the adjacency matrix graph database, so as to generate the network topology for the target network element set. This method focuses on using the topology source data in the target network element set, and by searching and analyzing the relevant information in the adjacency matrix graph database, the connection relationship between the network elements is determined, and then the network topology structure is constructed.

[0039] The above two methods construct network topology structures based on different principles, but there are still some problems.

[0040] For traditional network topology generation methods, as the scale of devices and hosts continues to grow, the topology generated based on human experience and known node relationships from pre-wiring requires a lot of time and effort. At the same time, the current network topology is dynamically changing, and the adjustment of network devices and hosts poses a huge challenge to the real-time performance of traditional network topology generation methods.

[0041] When the original devices and hosts in the resource pool availability zone are complex and the node association is missing, the traditional network topology generation method cannot accurately restore the topological structure of each level and the relationship between the side-mounted devices, resulting in a large range of devices and hosts being lost in the topology, limiting the subsequent comprehensive management and analysis of the Underlay network.

[0042] The current underlay network covers the availability zones of various resource pools. Traditional topology generation methods cannot adapt to network topologies of various forms. There is a lack of common means for automatically generating network topologies under various resource pools. In addition, a lot of time is required to locate anomalies and perform subsequent maintenance while ensuring the integrity of devices and hosts.

[0043] In summary, the existing technology has many shortcomings in Underlay network topology generation, and it is difficult to meet the needs of modern network development for efficient, accurate, real-time and universal topology generation methods.

[0044] Therefore, a new technology is urgently needed to solve these problems and realize the automatic generation and optimized management of Underlay network topology.

[0045] In view of the above problems, the embodiments of the present application provide a network topology generation method and device, an electronic device and a readable storage medium. The technical solution of the present application will be described in detail with reference to the accompanying drawings.

[0046] Figure 1 The diagram shows an architecture diagram of an Underlay network to which the method provided by an embodiment of the present application is applied.

[0047] like Figure 1 As shown, the network architecture includes multiple types of network devices and multiple hosts connected to the network devices. The multiple types of network devices include export layer devices, core layer devices, aggregation layer devices and access layer devices.

[0048] Among them, the egress layer 110 is the core link for interconnection between the data center and the external network, and bears the important responsibility of exchanging traffic with external network devices and interconnecting with the internal switch devices of the data center. The main devices of the egress layer 110 may include Figure 1 In some implementations, the egress layer 110 also includes anti-DDOS devices, access firewalls, and other devices. These devices work together to ensure the secure and efficient transmission of data between the data center and the external network, while providing a unified network access point to the outside world, which is the portal for the entire Underlay network to communicate with the outside world.

[0049] The core layer 120 is located at the hub of the entire cloud data center, and the core switch plays a key role in this layer. It is responsible for connecting all aggregation switching devices and connecting upward to the routing devices at the network egress layer. In addition, the core switch is also closely connected to various network elements such as firewalls and IPSec / SSLVPN gateways. The main function of the core layer is to achieve high-speed data exchange and aggregation, provide a fast channel for data transmission between different regions and businesses, and ensure the security of the internal network of the data center through security devices such as firewalls. It is the core hub of the entire Underlay network data transmission.

[0050] exist Figure 1 In the network structure shown, the core switches of the core layer 120 include north-south egress aggregation switches 121 and east-west interconnection switches 122. They ensure the efficient operation of the network from different directions and functional levels.

[0051] The north-south egress aggregation switch 121 is responsible for connecting the internal network of the data center with the external wide area network, and realizing data transmission between the internal resources of the data center and external users or other networks. In the process of external connection, the north-south egress aggregation switch aggregates the outgoing traffic from various areas and servers inside the data center. These traffic may come from different business systems, different server groups or different network areas. The north-south egress aggregation switch gathers them and distributes them reasonably according to the target address and network strategy to ensure that the data can be accurately and efficiently transmitted to the external network.

[0052] The east-west interconnection switch 122 is responsible for the lateral traffic exchange within the data center, avoiding unnecessary north-south traffic detours. For example, when data is interacting between servers in the same business area, if it is forwarded directly through the north-south export aggregation switch, it will not only increase the load of the north-south link, but also increase the data transmission delay. The east-west interconnection switch allows these local flows to be exchanged directly within the region, improving network transmission efficiency, reducing network latency, while reducing the burden on the north-south export aggregation switches and improving the performance of the entire network. At the same time, the east-west interconnection switch 122 can also be combined with load balancing technology to achieve dynamic load balancing of server resources within the data center.

[0053] The aggregation layer 130 is composed of aggregation switches (POD) 131. Each group of aggregation switches manages the POD core to which it belongs. Its main task is to complete the traffic interconnection under the business domain and the management domain. In the network architecture, the aggregation switch is usually the demarcation point between the L2 and L3 networks. The L2 network is located below the aggregation switch and is mainly responsible for the access of devices and the second-layer forwarding of data; the L3 network is located above the aggregation switch to achieve routing and data exchange between different subnets. The aggregation layer plays a connecting role, aggregating the data of the access layer and transmitting it upward to the core layer, and distributing the data of the core layer to each access area, effectively improving the scalability and manageability of the network.

[0054] The access layer 140 is mainly composed of access switches (TOR) 141. Common access switches include TOR switches located at the top of the rack. The access layer is the first layer for devices and hosts to access the network. It is directly connected to the terminal devices and provides network access services for them. It is responsible for transmitting the data generated by the terminal devices to the upper aggregation layer, and forwarding the data received from the upper layer to the terminal devices, realizing the connection between the terminal devices and the entire Underlay network. It is the source and end point of network data.

[0055] The host 150 is located at the edge of the network and is the device closest to the user and application. In other words, the host 150 is a terminal device connected to the Underlay network. The host usually includes a server, a computer, and a storage device, etc., on which various applications and services are run, and data provided by other devices can also be obtained from the network. The host is located below the access layer and is connected to the access layer switch through a network card to access the Underlay network.

[0056] Figure 2 is a schematic flow chart of a network topology generation method provided in an embodiment of the present application, Figure 2 The method includes steps S210-S230.

[0057] In step S210, attribute information of multiple devices in the physical network is obtained.

[0058] It should be understood that the multiple devices mentioned here include network devices and host devices. The network device may include, for example, Figure 1 The export layer equipment, core layer equipment, aggregation layer equipment and access layer equipment in it.

[0059] Attribute information covers many aspects, such as the device's hardware configuration (such as CPU model, memory size, number of ports, etc.), software configuration (such as operating system version, network protocol support, etc.), device identification (such as device name, device number, etc.), network connection related information (such as IP address, subnet mask, gateway, connection port type, etc.), and the device's location and role in the network (such as the level, business domain, management area, etc.). By fully acquiring this attribute information, a rich data foundation is provided for the subsequent classification, clustering and topology reasoning of devices.

[0060] Taking the data center network as an example, the management IP address of the network device can be used for remote management and network configuration of the device; the device name and description can help identify the device type and function; the operating system type of the host device affects its support capabilities and security requirements for network services, and the intranet IP address is used for communication and resource access positioning within the internal network.

[0061] The acquisition of the above attribute information provides an accurate basis for subsequent classification and clustering, so that devices of different types and functions can be accurately distinguished and classified. At the same time, this information provides the necessary context information for topological reasoning, and can accurately infer the connection relationship and network architecture between devices based on this information.

[0062] It should also be noted that, in the embodiment of the present application, the attribute information of the above-mentioned multiple devices may be the original information of multiple device attributes of the multiple devices, or may be information processed from multiple original information, and the embodiment of the present application does not specifically limit this.

[0063] In step S220, the multiple devices are classified and clustered by using a multi-label classification algorithm ML-KNM according to the attribute information of the multiple devices.

[0064] The classification and clustering results include the device types of the network devices in the plurality of devices, and the association relationship between each network device and other network devices and / or host devices.

[0065] The device types of network devices may include, for example, egress layer devices, core layer devices, aggregation layer devices, and access layer devices, etc. Among them, the egress layer devices may be CNNET egress routers, anti-DDOS, access firewalls, etc., the core layer devices may be core switches, including north-south egress aggregation switches and east-west interconnection switches, the aggregation layer devices may be PODs, and the access layer devices may be TORs.

[0066] ML-KNN is an instance-based multi-label classification algorithm. Its core idea is to use the information of neighboring samples in the training set to predict the labels of new samples. In the network topology generation scenario, it uses the attribute information of network devices and hosts as features and the device and host categories as labels for learning and classification.

[0067] The ML-KNN algorithm treats each device as a data point, various attributes of the device as feature vectors, and the category to which the device belongs (such as router category, switch category, host category of different business domains, etc.) as a label. The algorithm calculates the similarity between devices (usually based on the distance between feature vectors, such as Euclidean distance, etc.) to find the k nearest neighbor devices of each device (k is a pre-set parameter). Then, based on the label information of these nearest neighbor devices, a certain voting or weighting strategy is used to determine the category label of the device.

[0068] At the same time, by analyzing the connection relationship between devices (such as which devices are directly connected, which devices often appear at the same time on the network path, etc.), the association relationship between devices is determined. For example, if there are multiple host devices and another switch device among the multiple nearest neighbor devices of a switch device, then it can be inferred that the switch is associated with these devices, and may be responsible for the access and data exchange of these host devices, and work in conjunction with another switch.

[0069] For example, by analyzing whether the device name and description contain specific keywords (such as "exit router", "aggregation switch", etc.) and the network connection-related information in its properties, the devices are classified into different types (such as CMNET export routers, north-south aggregation switches, etc.) and the associations between them are determined, such as which devices are usually connected together to form a specific network structure.

[0070] For host devices, they are classified according to their attributes (such as operating system type, business domain, etc.), and their connection relationship with network devices is determined, such as which TOR switch the host is connected to, and then associations are established with other network devices through the TOR switch.

[0071] In step S230, taking the maximization of topological node traffic as the objective function, based on the classification and clustering results, reasoning upward from the host device along the hierarchical order of the physical network is performed to determine the network topology of the physical network.

[0072] In the reasoning process, the selection and connection relationship of each node (device) is determined with the goal of maximizing the traffic carrying capacity and data transmission efficiency of the node in the entire network topology. Starting from the host device, the reasoning is gradually upward along the hierarchical structure of the network (such as access layer-TOR switch, aggregation layer-POD device, core layer-north-south aggregation switch and CMNET egress router, etc.).

[0073] According to the device categories and associations obtained by classification and clustering, combined with the traffic maximization objective function, select the nodes that are most likely to become the key devices of the next level. For example, when determining TOR devices, select those that are connected to multiple host devices and have high potential in traffic transmission (such as high port rate, good connection link quality, etc.); when inferring north-south aggregation switches, comprehensively consider the connection relationship with multiple TOR devices or POD devices and their importance in traffic aggregation and distribution paths (such as being at the intersection of multiple high-traffic paths).

[0074] By inferring the core network devices layer by layer from the host layer upwards and making comprehensive judgments based on the traffic maximization objective function and classification clustering results, it can accurately identify the key devices in the network and their connection relationships, avoid missing important devices or incorrect connection relationships, and thus build a complete and accurate physical network topology structure. This is of great significance for network management, troubleshooting, performance optimization, etc., enabling operation and maintenance personnel to perform effective network operation and maintenance operations based on accurate topology information, thereby improving the reliability and stability of the network.

[0075] According to the above technical means, in the automatic generation and reasoning of topology, a multi-label classification algorithm is introduced, with the attribute information of network devices and hosts as features, and the device and host categories as labels, to achieve clustering from core device nodes to peripheral device nodes, and hierarchical clustering from core aggregation device nodes to lower-level host nodes. In the automatic generation and reasoning of topology, by introducing the maximization of topological node traffic as the objective function, the core network devices such as TOR, POD, north-south aggregation switches, and CMNET exports can be inferred from the host layer layer by layer, and the hierarchical and domain-based architecture of the network topology under the resource pool can be visualized.

[0076] In some embodiments, Figure 3 As shown, before step S210, the method further includes steps S310-S340.

[0077] In step S310, device-related information of a plurality of original devices is collected from a configuration management database CMDB.

[0078] The configuration management database CMDB contains relevant information about various types of devices in the physical network (such as network devices and host devices). The collection process involves obtaining detailed configuration data of these devices from the CMDB through specific interfaces or query methods. These data may include basic attributes of the device (such as device name, device model, hardware serial number, etc.), network connection configuration (such as IP address, subnet mask, gateway, port configuration, etc.), device status information (such as whether it is online, device operating status, etc.), the resource pool or business domain information to which the device belongs, and the management-related information of the device (such as management account, management protocol, etc.). The collected device-related information is raw, unprocessed data, which provides a data source for subsequent processing steps.

[0079] The method of collecting the above-mentioned device related information can be, for example, a multi-threaded asynchronous method, and collecting from the CMDB by means of HTTP calls. Among them, the multi-threaded and asynchronous methods can improve the efficiency and response speed of collection.

[0080] As an implementation, the above-mentioned device-related information may be data in JSON format. JSON is a lightweight data exchange format. JSON may be a composite data type. JSON may include objects and arrays, JSON objects may be a collection of key-value pairs, and arrays may be a collection of value data. A JSON object may start with a left bracket "{" and end with a right bracket "}", each key data may be followed by a colon, and each key-value pair may be separated by a comma. As an example, JSON data may be, for example, {"b":3,"a":"xyz"}, which includes two key-value pairs, b=3 and a=xyz, respectively. A JSON array may start with a left bracket "[" and end with a right bracket "]", and each value data may be separated by a comma. As an example, JSON data may be, for example, {"b":["3","a","xyz"]}, which includes three key-value pairs, b=3, b=a, and b=xyz, respectively. The value data of JSON may be, for example, one or more of a number, a string, an object, an array, and a Boolean value. JSON data is data with nested relationships. The value data in a JSON object can contain other arrays or other objects. JSON data itself is a nested structure, which makes JSON data a tree-structured data in organization. The nested structure in JSON data makes JSON data easy to write, read and parse without the need for a special structure.

[0081] The following are examples of device-related information for network devices and host devices respectively:

[0082] {

[0083] "ecloud_net_device_manage_ip":"10.213.xx.xx",

[0084] "ecloud_net_device_bk_inst_name":"10235586xxxx",

[0085] "ecloud_net_device_set_name":"East China-xx-Center-Access Layer",

[0086] "ecloud_net_device_description":"xx-Management Domain CORE Zone-Access Switch-xxx",

[0087] "ecloud_net_device_in_network_status":"constructive_status",

[0088] "ecloud_net_device_system_name":"xx-PSC-xx-xx-M-JR-6865-3"

[0089] }

[0090] {

[0091] "resource_pool_bk_inst_name":"Huadong-xx",

[0092] "host_os_type":"Physical Machine",

[0093] "host_bk_host_name":"xx-PSC-P11F1-xx-PM-xx-CDM-05-xx",

[0094] "host_in_network_status":"operation_status",

[0095] "host_bk_host_innerip":"10.172.xx.xxx",

[0096] "host_pod_name":"xx business domain"

[0097] }

[0098] In step S320, the device-related information of the plurality of original devices is cleaned, and the original devices that are not in the network state and / or the original devices with duplicate management IP addresses are filtered out.

[0099] The collected original device-related information may contain some inaccurate, incomplete, or data that does not meet the requirements of topology generation. Filter out the original devices that are not in the network, that is, exclude the information of devices that are not currently operating normally in the network or are offline, because these devices do not participate in the actual network topology structure, and their information may interfere with subsequent analysis and reasoning. The original device information with duplicate management IP also needs to be filtered, because in the network environment, each device should have a unique management IP address, and duplicate IP addresses may cause network configuration conflicts and topology generation errors.

[0100] Filtering the above information can improve data quality and avoid affecting the connection relationship and device identification in the topology reasoning process. At the same time, it can improve the efficiency of topology generation by reducing unnecessary data processing.

[0101] In step S330, the cleaned device-related information of the plurality of original devices is mapped to the node nodes one by one in a node list manner.

[0102] A node list is a data representation method that organizes device information in a specific structure. It organizes the relevant information of each device into a list item, and each list item corresponds to a node. In this process, the key attributes of the device (such as device type, device name, level, connection relationship, etc.) are extracted and mapped to the corresponding attribute fields of the node. In the technical solution of the embodiment of the present application, a node list is generated based on the descriptive information of the network device and host device, the system name, the cluster name and other attributes.

[0103] After converting the device information into a node list, whether it is the input preparation for the classification and clustering algorithm or the analysis of the device relationship in the topological reasoning process, operations can be performed based on a unified node structure, which improves the convenience of data processing and the applicability of the algorithm. For example, when using the multi-label classification algorithm ML-KNN, the device attributes in the node list can be directly processed as the feature vector of the algorithm, which improves the execution efficiency of the algorithm.

[0104] The following is an example of a nodeized list of network devices and host devices:

[0105] (1) Network equipment:

[0106] {

[0107] 'host': 0,

[0108] "Access layer": 1,

[0109] "Core Layer": 2,

[0110] "stuff": 3,

[0111] "North-South": 4,

[0112] "SMNET egress router": 5,

[0113] "Intranet Firewall": 6,

[0114] "Internet Access Firewall": 7,

[0115] "SDN Firewall": 8,

[0116] "SDNNAT Gateway": 9,

[0117] "SDN Gateway": 10,

[0118] "VGW": 1l,

[0119] VTEP access switch: 12,

[0120] “Anti-DDoS”: 13,

[0121] "Load Balancing": 14,

[0122] "load_balancer": 14,

[0123] "switch": 15,

[0124] "firewall": 16,

[0125] "IPS / IDS": 17,

[0126] "virtual_machine": 18,

[0127] "WAF": 19,

[0128] "divider": 20,

[0129] "VPN": 21,

[0130] "DPI": 22,

[0131] "BYPASS": 23,

[0132] "Backtracking Analysis System": 24,

[0133] "router": 25

[0134] }

[0135] (2) Host device:

[0136] {

[0137] "0":"switch",

[0138] "1":"router",

[0139] "2":"firewall",

[0140] "3":"load_balancer",

[0141] "4":"virtual_machine",

[0142] "5":"IPS / IDS",

[0143] "6":"WAF",

[0144] "7": "Anti-DDoS",

[0145] "8":"Shunter",

[0146] "9":"VPN",

[0147] "10":"DPI",

[0148] "11":"BYPASS",

[0149] "12":"Backtracking Analysis System"

[0150] }

[0151] In step S340, the resource pool is used as an index and the relevant information of the original devices in each resource pool is stored in the cache by cache preheating.

[0152] Cache preheating is a means of optimizing data access performance. During the network topology generation process, the original device-related information that has been collected, cleaned, and noded is stored in the cache in resource pools.

[0153] The cache mentioned in the embodiment of the present application can be a high-speed cache in memory (such as a Redis cache), which has a fast data reading and writing speed. Using the resource pool as the index means that the device information of different resource pools is stored and managed separately in the cache, which is convenient for quickly obtaining and processing relevant device information according to the needs of the resource pool. In the cache preheating stage, the data is loaded into the cache in advance, rather than reading it from a slow storage device (such as a CMDB database) when needed, which improves the data access speed.

[0154] An enterprise may have multiple data center resource pools, each containing different servers, switches, and other devices. By storing device information in the cache using the resource pool as an index, when a network topology of a resource pool needs to be generated, the device information of the resource pool can be quickly obtained directly from the cache without searching and extracting from the entire enterprise's device information library, greatly improving data acquisition efficiency.

[0155] According to the above technical means, data preprocessing means are adopted to realize data collection and cleaning. At the same time, for the huge host and device data, the resource information is mapped to the node node one by one through the node list, and the node host and network device information is stored in Redis through cache preheating. This can improve data quality, ensure accuracy and effectiveness, and avoid interference from invalid data; structured storage of data can speed up the topology generation speed.

[0156] In some embodiments, the acquisition of attribute information of multiple devices in the physical network mentioned above further includes: acquiring node list information of original devices corresponding to the multiple devices in the physical network from the cache, and using the acquired node list information as attribute information of each device.

[0157] This method is based on Figure 3 Based on the data processing method shown, the cache stores the original device-related information in resource pools after collection, cleaning, and node processing, and this information exists in the form of a node list. When it is necessary to obtain device attribute information, the node list information of the corresponding device is directly read from the cache.

[0158] The cache has fast data reading and writing characteristics. It can obtain data from slow storage devices such as databases and read node list information from the cache in a very short time, greatly reducing the time cost of data acquisition. In addition, since the data in the cache is stored after preliminary processing (such as cleaning and nodeization), obtaining data from the cache can ensure that the data used each time is uniformly processed, standardized in format, accurate and effective.

[0159] Through the above technical means, when generating network topology, the high-speed reading and writing characteristics of the cache are utilized to directly obtain the pre-processed node information list from the cache, which can shorten the data reading time and improve the efficiency of topology generation.

[0160] In some embodiments, Figure 4 As shown, the method provided in the embodiment of the present application also includes steps S410-S430.

[0161] In step S410, a training data set is constructed.

[0162] The training data set includes the attribute information of multiple original devices in the target resource pool. The target resource pool is a specific resource pool selected from the entire physical network resources for building the training model, which can be any of the aforementioned multiple resource pools. The training data set is recorded as X = {x1, x2, ... x i}.

[0163] The training data set established based on the resource pool can better reflect the topological structure of the network to be generated. Training based on this can make the trained multi-label classification algorithm model more suitable for similar network scenarios.

[0164] When constructing the training data set, the processed attribute information of multiple original devices in the target resource pool is extracted from the aforementioned cache. These attribute information exist in the form of a node list (including multiple features such as device type and device name). By combining the device attribute information in the same resource pool, a targeted and representative training data set is formed, providing a data basis for subsequent multi-label classification algorithm training.

[0165] In step S420, a multi-label classification algorithm ML-KNN is used to cluster multiple original devices in the training data set.

[0166] The multi-label classification algorithm ML-KNN performs clustering based on the attribute information of the devices in the training data set and the features in the node list. The algorithm calculates the similarity between devices and finds the k nearest neighbor devices of each device (k is a pre-set parameter). Then, based on the category labels of these nearest neighbor devices (in this scenario, device category labels such as router category, switch category, and host categories in different business domains, etc.), a certain voting or weighting strategy is used to determine the category label of the device.

[0167] At the same time, during the clustering process, the connection relationship between devices is analyzed and the association relationship between devices is determined, such as which devices are often connected to each other, which devices have similar positional relationships on the network path, etc., so as to construct a clustering result based on device categories and association relationships.

[0168] In step S430 , the multi-label classification algorithm ML-KNN is trained according to the clustering result and the attribute labels of the multiple original devices in the training data set.

[0169] After completing the device clustering, use the clustering results and the original attribute labels of the devices in the training dataset (that is, the known true category labels of the devices) To adjust and optimize the parameters and models of the multi-label classification algorithm ML-KNN.

[0170] For all network devices x, the number of device attribute categories is denoted by C.x (l).

[0171]

[0172] Among them, C x (l) represents the device attribute label information contained in the k nearest neighbor sets corresponding to the host and device information in the training set.

[0173] During the training process, the algorithm evaluates the performance of the current model by comparing the differences between the device category prediction results obtained by clustering and the known true category labels (such as by calculating evaluation indicators such as accuracy and recall). Then, based on these differences, the back propagation algorithm or other optimization algorithms are used to adjust the model parameters (such as distance calculation weights, voting strategy parameters, etc.), so that the model can more accurately identify device categories and determine the association between devices in subsequent classification predictions. For example, if some switch devices are found to be incorrectly classified as router devices in the clustering results, the algorithm will adjust the weight parameters for calculating device similarity based on this error feedback, so that in subsequent calculations, more attention is paid to distinguishing the key attribute characteristics of switches and routers, thereby improving the accuracy of classification.

[0174] According to the above technical means, constructing the target resource pool training data set improves data targeting, reduces interference, and makes the trained model more in line with the actual network topology requirements; based on clustering results and attribute label training algorithms, their accuracy and adaptability can be improved, self-optimization can be achieved, long-term effectiveness can be ensured, and the quality of network topology generation can be improved.

[0175] In some embodiments, Figure 5 As shown, the aforementioned step S230, determining the network topology of the network, also includes steps S231-S232.

[0176] In step S231, based on each host device and taking maximizing the traffic path flowing into the host device as the objective function, an access layer device connected to each host device is determined.

[0177] According to the previous description, the Underlay network architecture is divided into the host layer, TOR layer, POD layer, north-south convergence, east-west convergence, and CMNET egress from bottom to top. The loss of the core layer will affect the loss of large parts of the network topology, resulting in incomplete topology generation. The upper layer of the host device is the access layer device. For the same host device, the path with the largest traffic path flowing into it is very likely to be the access layer device directly connected to the host device. Therefore. In the topology reasoning process, starting from the host device level, maximizing the traffic path flowing into the host device is used as a key consideration to determine the access layer device connected to it.

[0178] In step S232, based on each access layer device and taking maximizing the traffic path flowing into the access layer device as the objective function, a convergence layer device connected to each access layer device is determined.

[0179] According to the above steps, after determining the access layer device, continue to reason up one level, and determine the aggregation layer device connected to it with the goal of maximizing the traffic path flowing into the access layer device. By analyzing and calculating the traffic transmission under different connection paths, select the aggregation layer device that can provide the maximum traffic inflow path for the access layer device, thereby building a reasonable connection relationship between the access layer and the aggregation layer.

[0180] In some embodiments, see Figure 6 , step S230 also includes steps S233-S234.

[0181] In step S233, starting from the access layer device, traverse upward along the hierarchical order to the leaf node, and record each path from the access layer device to the leaf node.

[0182] In the topology reasoning process, starting from the access layer device, traverse upward layer by layer according to the hierarchical structure of the network until reaching the leaf node (that is, a node with no unvisited direct connection relationship, usually a high-level device or edge device in the network topology). During the traversal process, each device passed from the access layer device to the leaf node and the connection relationship between them are recorded in detail to form complete path information. For example, starting from an access layer switch, passing through the aggregation layer switch and the core layer switch, and finally reaching the north-south export aggregation switch (assuming it is a leaf node), all devices on this path and their connection order are recorded.

[0183] In step S234, the node that appears most frequently on all paths is used as the north-south egress aggregation switch.

[0184] After traversing and recording all paths from the access layer device to the leaf node, perform statistical analysis on the nodes that appear on the path. Calculate the frequency of each node appearing in all paths, and determine the node with the most appearances as the north-south egress aggregation switch.

[0185] The above judgment is based on the key position and functional characteristics of the north-south egress aggregation switch in the network topology. Since it is responsible for connecting the data center with the external network, a large amount of internal and external network data traffic needs to be forwarded and aggregated through it, so it will appear frequently in many network paths. Through this statistical analysis method based on the frequency of path occurrence, the north-south egress aggregation switch can be accurately identified from many devices.

[0186] In some embodiments, Figure 7As shown, step S230 also includes steps S235-S236.

[0187] In step S235, screening is performed according to the device attributes of the network devices to determine a plurality of target network devices whose device attributes are routing devices.

[0188] When determining the exit layer device, the first screening is performed based on the attribute information of the network device. The attributes of the network device include key information such as the device type. By searching for the attribute identifier of the device type as a routing device, possible target network devices are screened out from a large number of network devices. These target network devices have routing functions and can forward data and select routes between different networks. They are potential candidates for exit layer devices. For example, the attributes of a device may include the device model, device function description, etc. This information is used to determine whether the device is a router type, such as searching for the "router" keyword in the device description or querying the device library based on the device model to determine whether its type is a router, thereby determining a series of target network devices with routing capabilities.

[0189] In step S236, multiple target network devices are screened according to the traffic maximization objective function to determine the egress layer device.

[0190] After initially screening out multiple target network devices with routing device attributes, the traffic maximization objective function is further used to evaluate and screen these target network devices for the second time. At the same time, the nodes already included in TOR, POD, and north-south convergence are filtered out to accurately identify the CMNET export router, complete the construction of the entire network topology from bottom to top, from inside to outside, and realize the visualization of the hierarchical and domain-based architecture of the network topology under the resource pool.

[0191] According to the above technical means, by introducing the maximization of the topological node traffic path as the objective function, guided by the idea of ​​Underlay network layered architecture, starting from the host node traffic path, the objective function maximizes the reasoning of the upper-layer TOR device, and then the POD, north-south convergence and egress router are inferred upward, realizing the vertical layering of the network topology and the horizontal bypass, which ensures the integrity of the Underlay network topology generation.

[0192] Combination of the above Figure 1-Figure 7 , the method embodiment of the present application is described in detail, and the device embodiment of the present application will be described in detail with reference to the accompanying drawings. It should be understood that the description of the device embodiment corresponds to the method embodiment, so the part not described in detail can refer to the method embodiment above.

[0193] Figure 8 is a schematic structural diagram of a network topology generating device provided in an embodiment of the present application, Figure 8 The device 800 in the embodiment comprises:

[0194] The acquisition unit 810 is used to obtain attribute information of multiple devices in the physical network, where the multiple devices include network devices and host devices.

[0195] The clustering unit 820 is used to classify and cluster the multiple devices according to the attribute information of the multiple devices through the multi-label classification algorithm ML-KNN, and the classification and clustering results include the device type of the network devices in the multiple devices, and the association relationship between each network device and other network devices and / or host devices.

[0196] The reasoning unit 830 is used to determine the network topology of the physical network by reasoning upward from the host device along the hierarchical order of the physical network based on the classification and clustering results, taking the maximization of the topological node traffic as the objective function.

[0197] In some embodiments, the apparatus 800 further comprises:

[0198] The collection unit is used to collect device-related information of multiple original devices from the configuration management database CMDB.

[0199] The cleaning unit is used to clean the device-related information of multiple original devices, filter out the original devices that are not in the network state and / or manage the original devices with duplicate IP addresses.

[0200] The mapping unit is used to map the device related information of the cleaned multiple original devices to the node nodes one by one in a node list manner.

[0201] The storage unit is used to store the relevant information of the original devices in each resource pool in the cache by using the resource pool as an index through the cache preheating method.

[0202] In some embodiments, the acquisition unit 810 is further used to: acquire node list information of original devices corresponding to multiple devices in the physical network from the cache; and use the node list information as attribute information of each device.

[0203] In some embodiments, the apparatus 800 further includes a training set construction unit and a training unit.

[0204] The training set construction unit is used to construct a training data set, where the training data set includes attribute information of multiple original devices in the target resource pool.

[0205] The clustering unit is also used to cluster multiple original devices in the training data set using a multi-label classification algorithm ML-KNN.

[0206] The training unit is used to train the multi-label classification algorithm ML-KNN according to the clustering result and the attribute labels of the multiple original devices in the training data set.

[0207] In some embodiments, along the bottom-up hierarchical order of the physical network, the network devices include access layer devices, aggregation layer devices, core layer devices, and egress layer devices, and the access layer devices are arranged at the upper layer of the host device.

[0208] The reasoning unit 830 is also used to determine the access layer device connected to each host device based on each host device and taking maximizing the traffic path flowing into the host device as the objective function; and to determine the aggregation layer device connected to each access layer device based on each access layer device and taking maximizing the traffic path flowing into the access layer device as the objective function.

[0209] In some embodiments, the aggregation layer device includes an east-west interconnection switch and a north-south egress aggregation switch located on an upper layer of the east-west interconnection switch.

[0210] The reasoning unit 830 is also used to: start from the access layer device, traverse upward along the hierarchical order to the leaf node, record each path from the access layer device to the leaf node; and use the node that appears most times on all paths as the north-south export aggregation switch.

[0211] In some embodiments, the reasoning unit 830 is further used to: filter according to device attributes of the network device to determine multiple target network devices whose device attributes are routing devices; filter multiple target network devices according to the traffic maximization objective function to determine the export layer device.

[0212] The present application also provides an electronic device, Fig. 9 The dotted line in the figure indicates that the unit or module is optional. The electronic device 900 can be used to implement the method described in the above method embodiment. The electronic device 900 can be a chip or an electronic device. For example, the electronic device can be a computer or a server.

[0213] The electronic device 900 may include one or more processors 910. The processor 910 may support the electronic device 900 to implement the method described in the foregoing method embodiment. The processor 910 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a central processing unit (CPU). Alternatively, the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0214] The electronic device 900 may further include one or more memories 920. The memory 920 stores a program, which can be executed by the processor 910, so that the processor 910 executes the method described in the above method embodiment. The memory 920 may be independent of the processor 910 or integrated in the processor 910.

[0215] The electronic device 900 may further include a transceiver 930. The processor 910 may communicate with other devices or chips through the transceiver 930. For example, the processor 910 may transmit and receive data with other devices or chips through the transceiver 930.

[0216] The embodiment of the present application also provides a computer readable storage medium, which is used to store a computer program. When the computer program is executed, the method in the embodiment of the present application is implemented.

[0217] The embodiment of the present application also provides a computer program product. The computer program product includes a program. The computer program product can be applied to the electronic device provided in the embodiment of the present application, and the program enables the computer to execute the method executed by the electronic device in each embodiment of the present application.

[0218] The embodiment of the present application also provides a computer program. The computer program can be applied to the communication device provided in the embodiment of the present application, and the computer program enables a computer to execute the method executed by the electronic device in each embodiment of the present application.

[0219] It should be understood that the terms used in this application are only used to explain the specific embodiments of this application, and are not intended to limit this application. The terms "first", "second", "third", and "fourth" in the specification and claims of this application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0220] In the embodiments of the present application, the "indication" mentioned can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B.

[0221] In the embodiments of the present application, the "include" mentioned may refer to direct inclusion or indirect inclusion. Optionally, the "include" mentioned in the embodiments of the present application may be replaced with "indicate" or "used to determine". For example, A includes B, which may be replaced with A indicates B, or A is used to determine B.

[0222] In the embodiment of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0223] In the embodiments of the present application, the term "corresponding" may indicate that there is a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship of indication and being indicated, configuration and being configured, etc.

[0224] In the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0225] In various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0226] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0227] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0228] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0229] 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 (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 can be read by a computer 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 (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0230] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A network topology generation method, characterized in that: The method comprises: Acquire attribute information of a plurality of devices in a physical network, the plurality of devices including network devices and host devices; According to the attribute information of the multiple devices, the multiple devices are classified and clustered by a multi-label classification algorithm ML-KNN, wherein the classification and clustering results include device types of network devices in the multiple devices, and association relationships between each of the network devices and other network devices and / or host devices; Taking the maximization of topological node traffic as the objective function, according to the classification and clustering results, the network topology of the physical network is determined by reasoning upward from the host device along the hierarchical order of the physical network.

2. The method according to claim 1, characterized in that Before acquiring the attribute information of the plurality of devices in the physical network, the method further includes: Collect device-related information of multiple original devices from the configuration management database CMDB; Clean the device-related information of the multiple original devices, and filter out the original devices that are not online and / or the original devices with duplicate management IP addresses; Map the device-related information of multiple cleaned original devices to the node nodes one by one in the form of node lists; With the resource pool as the index, the relevant information of the original devices in each resource pool is stored in the cache through cache preheating.

3. The method according to claim 2, characterized in that The obtaining of attribute information of multiple devices in the physical network includes: Acquire node list information of original devices corresponding to multiple devices in the physical network from the cache; The node list information is used as the attribute information of each device.

4. The method according to claim 3, characterized in that The method further comprises: Constructing a training data set, wherein the training data set includes attribute information of multiple original devices in the target resource pool; Clustering multiple original devices in the training data set using the multi-label classification algorithm ML-KNN; The multi-label classification algorithm ML-KNN is trained according to the clustering result and the attribute labels of the multiple original devices in the training data set.

5. The method according to any one of claims 1 to 4, characterized in that Along the hierarchical order from bottom to top of the physical network, the network device includes an access layer device, a convergence layer device, a core layer device and an egress layer device, and the access layer device is arranged at an upper layer of the host device; The determining of the network topology of the physical network includes: Based on each of the host devices, taking maximizing the traffic path flowing into the host device as an objective function, determining an access layer device connected to each host device; Based on each of the access layer devices and taking maximizing the flow path flowing into the access layer device as the objective function, a convergence layer device connected to each access layer device is determined.

6. The method according to claim 5, characterized in that The aggregation layer device includes an east-west interconnection switch and a north-south egress aggregation switch located on the upper layer of the east-west interconnection switch; The determining of the network topology of the physical network further includes: Starting from the access layer device, traverse upward along the hierarchical order to a leaf node, and record each path from the access layer device to the leaf node; The node that appears most frequently on all paths is used as the north-south egress aggregation switch.

7. The method according to claim 6, characterized in that The determining of the network topology of the physical network further includes: Screening is performed according to the device attributes of the network device to determine a plurality of target network devices whose device attributes are routing devices; The multiple target network devices are screened according to the flow maximization objective function to determine the egress layer device.

8. A network topology generation device, characterized in that: The device comprises: An acquisition unit, configured to acquire attribute information of a plurality of devices in a physical network, wherein the plurality of devices include network devices and host devices; A clustering unit, configured to classify and cluster the multiple devices according to the attribute information of the multiple devices by using a multi-label classification algorithm ML-KNN, wherein the classification and clustering results include device types of network devices in the multiple devices, and association relationships between each of the network devices and other network devices and / or host devices; The reasoning unit is used to determine the network topology of the physical network by reasoning upward from the host device along the hierarchical order of the physical network based on the classification and clustering results, taking the maximization of the topological node traffic as the objective function.

9. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program implements the method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Network device layering method, network management device and computer readable storage medium

    CN108566296A

  • Sliced packet network (SPN) topology layout method and device, and readable storage medium

    CN115811740A

  • Data transmission method and device, network topology structure, equipment and storage medium

    CN118612809A

  • Network management method and apparatus

    US20160352582A1

  • Network topology mapping for correctly configuring clustered networks

    US20230239214A1