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

By using the multi-label classification algorithm ML-KNN and the objective function of maximizing topology node traffic, the efficiency and accuracy issues of Underlay network topology generation are solved, enabling efficient and accurate automatic topology generation and management, and supporting real-time network optimization and troubleshooting.

CN119854135BActive Publication Date: 2025-11-04CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies for generating Underlay network topologies suffer from problems such as long generation time, high effort consumption, poor real-time performance, and inability to accurately restore the topology structure of each layer and the relationships between adjacent devices. Especially in an environment where the scale of devices and hosts is constantly growing and changing, traditional methods are unable to meet the requirements for efficient, accurate, real-time and universal topology generation.

Method used

A multi-label classification algorithm, ML-KNN, is employed to classify and cluster devices by acquiring their attribute information. The network topology is determined by maximizing the traffic of topology nodes, reasoning upwards from the host devices along the physical network hierarchy. This method includes collecting device information from a configuration management database, cleaning and filtering invalid data, mapping node-based lists, and pre-warming the data with a cache. A training dataset is then constructed and the multi-label classification algorithm is trained, improving data processing efficiency and accuracy.

Benefits of technology

It enables efficient and accurate generation of topology in the Underlay network, ensuring the integrity of devices and hosts and the accuracy of connection relationships, supporting network management and troubleshooting, and improving network reliability and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854135B_ABST
    Figure CN119854135B_ABST
Patent Text Reader

Abstract

The application discloses a network topology generation method and device, electronic equipment and a readable storage medium. The method comprises the following steps: acquiring attribute information of a plurality of devices in a physical network, wherein the plurality of devices comprise network devices and host devices; performing classified clustering on the plurality of devices by using a multi-label classification algorithm ML-KNN according to the attribute information of the plurality of devices, wherein the classified clustering result comprises a device type of the network devices in the plurality of devices, and an association relationship between each network device and other network devices and / or host devices; and taking topology node flow maximization as an objective function, and reasoning upwards from the host devices along a hierarchical order of the physical network according to the classified clustering result, to determine a 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 technical field of cloud computing, and particularly relates to a network topology generation method and device, electronic equipment and a readable storage medium. BACKGROUND

[0002] Underlay network is an important part of cloud computing data center network architecture, and is usually constructed according to a hierarchical and domain design. With the wide application and rapid development of cloud computing and cloud storage technology, the network structure is increasingly complex, and the number of device hosts in a single resource pool availability zone continues to grow, which has become a significant trend in current network development. With the daily changes in network structure, network topology automatic generation technology, especially topology generation for Underlay network, has become a hot issue of concern in the field of network research.

[0003] For the traditional network topology generation method, as the scale of devices and hosts continues to grow, the topology generated according to the node relationship known by human experience and pre-wiring needs to consume a lot of time and effort. Meanwhile, the current network topology is dynamically changing, and the adjustment of network devices and hosts brings great challenges to the real-time performance of the traditional network topology generation method. When the original devices and hosts under the resource pool availability zone are complex and lack of node correlation, the traditional network topology generation method cannot accurately restore the topology structure of each level and the relationship of the side hanging devices, thereby causing a large range of devices and hosts to be lost in the topology, which limits the overall management and analysis of the Underlay network in the later period. SUMMARY

[0004] The present application mainly provides a network topology generation method and device, electronic equipment 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, and the method comprises: 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 by a multi-label classification algorithm ML-KNN according to the attribute information of the plurality of devices, the result of the classification and clustering comprising a device type of the network devices in the plurality of devices, and an association relationship between each network device and other network devices and / or host devices; taking topology node flow maximization as an objective function, and reasoning upwards from the host devices along a hierarchical order of the physical network according to the result of the classification and clustering to determine a network topology of the physical network.

[0006] According to the above technical means, in the topology automatic generation reasoning, a multi-label classification algorithm is introduced, the attribute information of the network equipment and the host is taken as the feature, and the equipment and the host category is taken as the label, so that the clustering and classification of the core equipment node to the peripheral equipment node and the hierarchical clustering of the core aggregation equipment node to the lower layer host node are realized. In the topology automatic generation reasoning, by introducing the topology node flow maximization as the objective function, the TOR, the POD, the north-south aggregation switch and the CMNET export and other core network equipment are inferred from the host layer to the upper layer, and the networking topology layering and the domain architecture visualization under the resource pool are realized.

[0007] In some embodiments, before the attribute information of the plurality of devices in the physical network is acquired, the method further includes: collecting device-related information of a plurality of original devices from a configuration management database (CMDB); cleaning the device-related information of the plurality of original devices, filtering the original devices in a non-network state and / or the original devices with duplicate management IP; mapping the cleaned device-related information of the plurality of original devices to node nodes one by one through a node list; and storing the related information of the original devices in each resource pool in the cache through a cache warm-up method.

[0008] In some embodiments, the attribute information of the plurality of devices in the physical network is acquired by: acquiring the node list information of the original devices corresponding to the plurality of devices in the physical network from the cache; and taking the node list information as the attribute information of each device.

[0009] Through the above technical means, when the network topology is generated, the preprocessed node information list is directly obtained from the cache by using the high-speed read-write characteristics of 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 a plurality of original devices in a target resource pool; clustering the plurality of original devices in the training data set by using the multi-label classification algorithm ML-KNN; and training the multi-label classification algorithm ML-KNN according to the clustering result and the attribute label of the plurality of original devices in the training data set.

[0011] According to the above technical means, the construction of the target resource pool training data set improves the data pertinence, reduces interference, and makes the trained model more suitable for actual network topology requirements; training the algorithm based on the clustering result and the attribute label can improve the accuracy and adaptability, realize self-optimization, ensure long-term effectiveness, and improve the quality of network topology generation.

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

[0013] In some embodiments, the aggregation layer devices include east-west interconnection switches and north-south egress aggregation switches arranged at the upper layer of the east-west interconnection switches; the determining of the network topology of the physical network further includes: starting from the access layer devices, traversing upwards to leaf nodes along the hierarchical order, and recording each path from the access layer devices to the leaf nodes; taking the node with the most occurrences on all paths as the north-south egress aggregation switch.

[0014] In some embodiments, the determining of the network topology of the physical network further includes: screening the target network devices according to the device attributes of the network devices, determining the target network devices as routing devices; screening the target network devices according to the traffic maximization objective function, and determining the egress layer devices.

[0015] According to the above technical means, by introducing the topology node traffic path maximization as the objective function, taking the underlay networking hierarchical architecture as the guide, starting from the host node traffic path, the TOR device at the upper layer is inferred by the objective function maximization, and the POD, the north-south aggregation, and the egress router are inferred upwards, the network topology is vertically layered and horizontally side-hung, and the integrity of the underlay networking topology generation is ensured.

[0016] In a second aspect, a network topology generation apparatus is provided, the apparatus includes: an acquisition unit configured to acquire attribute information of a plurality of devices in a physical network, the plurality of devices including network devices and host devices; a clustering unit configured to classify and cluster the plurality of devices by a multi-label classification algorithm ML-KNN according to the attribute information of the plurality of devices, a result of the classification and clustering including a device type of the network devices in the plurality of devices, and an association relationship of each network device with other network devices and / or host devices; and an inference unit configured to infer upwards from the host devices along a hierarchical order of the physical network according to the result of the classification and clustering, taking the maximum of the traffic of the topology node as the objective function, to determine a network topology of the physical network.

[0017] In a third aspect, an electronic device is provided, comprising a memory for storing a computer program, and a processor for executing the computer program to perform the method according to the first aspect.

[0018] In a fourth aspect, a computer readable storage medium is provided, for storing a computer program, which, when executed, implements the method according to the first aspect. BRIEF DESCRIPTION OF DRAWINGS

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

[0020] Figure 2 A schematic flowchart of the network topology generation method provided by the embodiments of the present application;

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

[0022] Figure 4 A schematic flowchart of the training method of the multi-label classification algorithm provided by the embodiments of the present application;

[0023] Figure 5 A schematic flowchart of the method of inferring the network topology provided by the embodiments of the present application;

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

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

[0026] Figure 8 A schematic structural diagram of the network topology generation device provided by the embodiments of the present application;

[0027] Figure 9 A schematic structural diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0028] In order to enable persons skilled in the art to better understand the schemes of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor fall within the scope of protection of the present application.

[0029] The terms "first", "second", and the like in the description and in the claims of the present application and above-described drawings are used to distinguish different objects, and are not used to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device including a series of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or device.

[0030] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily mutually exclusive of other embodiments. It is explicitly and implicitly understood that the embodiments described herein can be combined with other embodiments.

[0031] Underlay network is an important part of cloud computing data center network architecture, and is usually constructed according to a hierarchical and domain-based design. With the wide application and rapid development of cloud computing and cloud storage technology, the network structure is becoming increasingly complex, and the number of device hosts in a single resource pool availability zone continues to grow, which has become a significant trend in current network development. Along with the daily changes in network structure, network topology automatic generation technology, especially for Underlay network topology generation, has become a hot issue of concern in the field of network research.

[0032] However, in related technologies, there are still some problems in the topology generation of the network, which will be described in detail below.

[0033] First, with the continuous development of cloud computing and big data business, data centers need to accommodate more and more server, storage device and other host resources, as well as various network devices providing network connection for these hosts. Numerous devices are connected with each other, forming a complex connection relationship, making the topology structure large and complex, and increasing the difficulty of topology generation and management.

[0034] Secondly, Underlay network adopts a hierarchical and domain-based design concept, although this design helps to improve the scalability, flexibility and manageability of the network, but also leads to the complexity of the topology structure. The connection relationship between devices in different levels and areas is diverse, which needs to be accurately sorted out and managed to ensure efficient data transmission between different levels and areas. At the same time, the functions and configuration requirements of devices in different levels are different, which further increases the complexity of the topology structure.

[0035] Thirdly, in the modern network environment, business requirements are constantly changing, and the adjustment of devices and hosts occurs frequently. The addition of new devices, the removal of old devices, the update of device configurations, and the dynamic changes of network traffic, etc., make the Underlay network topology in constant change. This dynamic change requires the topology generation method to adapt to the changes of the network in real time and update the topology structure in time, which undoubtedly increases the complexity of topology management.

[0036] Finally, the Underlay network contains various types of devices, such as routers, switches, firewalls, servers, etc., each of which has different functions and characteristics, and their 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 mutual connection between different types of devices make the topology structure complex and diverse, and it is necessary to 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 obtaining the NetFlow packets sent by each network device, and then update the Netflow flow data in the hash table according to the order of the data flow to the system, to generate the network topology structure. This method mainly relies on the analysis of network traffic data, and through the processing of the five-tuple information such as source IP address, destination IP address, source port, destination port and protocol type in the NetFlow packet, the connection relationship between devices is inferred to construct the network topology.

[0038] Another method in the related art is implemented based on a 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, and the network topology is generated for the target network element set. This method focuses on using the topology source data in the target network element set to determine the connection relationship between network elements by searching and analyzing related information in the adjacency matrix graph database, and then constructing the network topology structure.

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

[0040] For the traditional network topology generation method, as the scale of devices and hosts continues to grow, the topology generated based on the node relationship known by human experience and 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 brings great challenges to the real-time performance of the traditional network topology generation method.

[0041] When the original devices and hosts under the resource pool available area are complex and the node association is missing, the traditional network topology generation method cannot accurately restore the topology structure of each level and the relationship of the side hanging device, resulting in a large range of devices and hosts missing in the topology, limiting the comprehensive management and analysis of the Underlay network in the later stage.

[0042] The current Underlay network covers each resource pool available area, and the traditional topology generation method cannot adapt to the various network topology structures. There is a lack of public means for automatic generation of network topology under each resource pool, and under the premise of ensuring the integrity of devices and hosts, a large amount of time needs to be invested in abnormal positioning and later maintenance.

[0043] In summary, the prior art has many deficiencies in Underlay network topology generation, which is difficult to meet the needs of modern network development for efficient, accurate, real-time and general topology generation methods.

[0044] Therefore, there is an urgent need for a new technology 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, electronic equipment and readable storage medium. The technical solutions of the present application will be described in detail below with reference to the accompanying drawings.

[0046] Figure 1 The architecture diagram of the Underlay network applying the method provided by the embodiments of the present application is shown.

[0047] As shown in Figure 1 The network architecture includes a plurality of types of network devices and a plurality of hosts connected with the network devices, and the plurality of types of network devices include an egress layer device, a core layer device, a convergence layer device and an access layer device.

[0048] The egress layer 110 serves as the core link for interconnection and intercommunication between the data center and the external network, and undertakes the important responsibility of interacting with the external network device for traffic and interconnecting with the internal switch device in the data center. The main device of the egress layer 110 can include the egress router 111 as shown in Figure 1 In some implementation modes, the egress layer 110 also includes DDOS-resistant devices, access firewalls and other devices. These devices work together to ensure the safe 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 gateway for communication between the entire Underlay network and the external world.

[0049] The core layer 120 is located at the hub position 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 to the routing device of the network exit layer. In addition, the core switch is also closely connected with various firewalls, IPSec / SSL VPN gateways and other network elements. The main function of the core layer is to realize high-speed switching and aggregation of data, provide a fast channel for data transmission between different regions and services, and at the same time guarantee the security of the internal network of the data center through security devices such as firewalls, which is the core hub of the entire Underlay network data transmission.

[0050] In Figure 1 In the network structure shown, the core switch of the core layer 120 includes the north-south exit aggregation switch 121 and the east-west interconnection switch 122. It guarantees the efficient operation of the network from different directions and functional levels.

[0051] The north-south exit aggregation switch 121 is responsible for connecting the internal network of the data center with the external wide area network, and realizing the data transmission between the internal resources of the data center and the external users or other networks. In the process of external connection, the north-south exit aggregation switch aggregates the outgoing traffic from various regions and servers within the data center. These traffics may come from different business systems, different server groups or different network regions, and the north-south exit aggregation switch will concentrate them and distribute 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 horizontal traffic switching within the data center, avoiding unnecessary north-south traffic detours. For example, when servers within the same business region interact with each other, if they directly forward through the north-south exit aggregation switch, not only will it increase the load of the north-south link, but also will cause the data transmission delay to increase. The east-west interconnection switch enables these local traffics to be exchanged within the region directly, improving the network transmission efficiency, reducing the network delay, and at the same time reducing the burden of the north-south exit aggregation switch, 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 realize 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 belonging to it, and its main task is to complete the traffic interconnection under the service domain and 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, mainly responsible for the access of devices and the two-layer forwarding of data; the L3 network is located above the aggregation switch, realizing the routing and data exchange between different subnets. The aggregation layer plays a role of connecting the upper and lower layers, aggregates the data of the access layer and transmits it to the core layer, at the same time, distributes the data of the core layer to each access area, effectively improving the expansibility and manageability of the network.

[0054] The access layer 140 is mainly composed of access switches (TOR) 141, and the common access switch is, for example, the TOR switch located at the top of the rack. The access layer is the first layer of devices and host computers accessing the network, and is directly connected with the terminal device to provide network access services for it. It is responsible for transmitting the data generated by the terminal device to the upper aggregation layer, and forwarding the data received from the upper layer to the terminal device, realizing the connection between the terminal device and the entire Underlay network, and is the source and terminal of network data.

[0055] The host 150 is located at the edge of the network, and is the device closest to the user and the application program, or in other words, the host 150 is the terminal device connected to the Underlay network. The host usually includes servers, computers and storage devices, etc., on which various application programs and services are run, and can also obtain data provided by other devices from the network. The host is located below the access layer and is connected to the access layer switch through a network card, thereby accessing the Underlay network.

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

[0057] In step S210, the attribute information of a plurality of devices in a physical network is acquired.

[0058] It should be understood that the plurality of devices mentioned here includes network devices and host devices, and the network devices may, for example, include the egress layer devices, core layer devices, aggregation layer devices and access layer devices, etc. in the foregoing Figure 1

[0059] ​The attribute information covers multiple aspects, such as hardware configuration of the device (such as CPU model, memory size, port number, 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 device position and role related information in the network (such as the level, business domain, management area, etc.). By comprehensively obtaining these attribute information, a rich data basis is provided for subsequent classification and clustering of the device and topology reasoning.

[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 capability and security requirement for network services, and the intranet IP address is used for communication and resource access positioning in the internal network.

[0061] The above attribute information provides 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, these information provides necessary context information for topology reasoning, which can accurately infer the connection relationship between devices and network architecture based on these information.

[0062] It should be noted that in the embodiments of the present application, the attribute information of the plurality of devices can be the original information of a plurality of device attributes of the plurality of devices, or the information processed from the plurality of original information, which is not limited in the embodiments of the present application.

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

[0064] The result of the above classification and clustering includes the device type of the network device in the plurality of devices, and the association relationship between each network device and other network devices and / or host devices.

[0065] The device type of the network device may, for example, include an export layer device, a core layer device, a convergence layer device, and an access layer device, etc. The export layer device may be a CNNET export router, an anti-DDOS, an access firewall, etc., the core layer device may be a core switch, including a north-south export convergence switch and an east-west interconnection switch, the convergence layer device may be a POD, and the access layer device may be a TOR.

[0066] ML-KNN is an instance-based multi-label classification algorithm that uses the information of the nearest neighbors 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, with various attributes of the device as feature vectors, and the category to which the device belongs (such as router category, switch category, host category in different business domains, etc.) as labels. The algorithm finds the k nearest neighbors of each device (k is a pre-set parameter) by calculating the similarity between devices (usually based on the distance between feature vectors, such as Euclidean distance, etc.). Then, according to the label information of these nearest neighbors, 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 together on the network path, etc.), the association relationship between devices is determined. For example, if a switch device has multiple host devices and another switch device among its multiple nearest neighbors, it can be inferred that the switch is associated with these devices, possibly responsible for the access and data exchange of these host devices, and works in coordination with the other switch.

[0069] For example, by analyzing whether the device's name and description contain specific keywords (such as "export router" "convergence switch" etc.) and its attribute network connection related information, the device is classified into different types (such as CMNET export router, north-south convergence switch, etc.), and the association relationship between them is determined, such as which devices are usually connected together to form a specific network structure.

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

[0071] In step S230, the network topology of the physical network is determined by reasoning upwards from the host devices along the hierarchical order of the physical network, with the maximum flow of the topology nodes as the objective function.

[0072] In the reasoning process, the selection of each node (device) and the determination of the connection relationship are aimed at maximizing the flow carrying capacity and data transmission efficiency of the node in the entire network topology. Starting from the host devices, the reasoning gradually proceeds upwards along the hierarchical structure of the network (such as access layer-TOR switch, convergence layer-POD device, core layer-north-south convergence switch and CMNET export router, etc.).

[0073] According to the device categories and the association relationships obtained by the classification clustering, and in combination with the traffic maximization objective function, a node that is most likely to be a key device of a next level is selected. For example, when determining TOR devices, devices that are connected to multiple host devices and have high potential in traffic transmission (such as high port rate, good connection link quality, etc.) are selected; when inferring north-south aggregation switches, the connection relationships with multiple TOR devices or POD devices and the importance in traffic aggregation and distribution paths (such as being at the intersection of multiple high-traffic paths) are comprehensively considered.

[0074] From the host layer, the core network devices are inferred layer by layer, and based on the traffic maximization objective function and the classification clustering results, comprehensive judgment is performed, so that the key devices in the network and their connection relationships can be accurately identified, important devices or false connection relationships can be avoided, and a complete and accurate physical network topology structure can be constructed. This has important significance for network management, fault diagnosis, performance optimization, and the like, so that the operation and maintenance personnel can perform effective network operation and maintenance operations based on accurate topology information, and the reliability and stability of the network can be improved.

[0075] According to the above technical means, in the topology automatic generation reasoning, a multi-label classification algorithm is introduced, the attribute information of the network devices and the hosts is taken as features, and the device and host categories are taken as labels, so that clustering and classification are implemented from the core device nodes to the peripheral device nodes, and from the core aggregation device nodes to the lower-layer host nodes. In the topology automatic generation reasoning, by introducing the topology node traffic maximization as an objective function, TOR, POD, north-south aggregation switches, and CMNET export and the like core network devices are inferred from the host layer to the upper layer, and the resource pool networking topology layering and domain architecture visualization are implemented.

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

[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 information about various devices (such as network devices and host devices) in a physical network. The collection process involves obtaining detailed configuration data of the devices from the CMDB through a specific interface or query. These data can include basic attributes of the devices (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 online, device running status, etc.), device resource pool or business domain information, and device management related information (such as management account, management protocol, etc.). The collected device related information is raw and unprocessed data, providing a data source for subsequent processing steps.

[0079] The collection of the above-mentioned device related information can be achieved by using a multi-thread asynchronous method to collect from the CMDB through HTTP calls. The multi-thread and asynchronous method can improve the efficiency and response speed of the collection.

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

[0081] Examples of device related information of network devices and host devices are given below:

[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":"East China-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 multiple original devices is cleaned, and original devices that are not in the network state and / or original devices with duplicate management IPs are filtered out.

[0099] In the collected raw device-related information, there can be some inaccurate, incomplete or not conforming to the topology generation requirements of data. Filtering non-network state raw devices, i.e. excluding those devices that are not currently in the network and are in the offline state, because these devices do not participate in the actual network topology, their information may interfere with subsequent analysis and reasoning. Raw device information that manages IP duplication also needs to be filtered, because in a network environment, each device should have a unique management IP address, and duplicate IP addresses can 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, since the unnecessary data processing amount is reduced, the efficiency of topology generation can be improved.

[0101] In step S330, the device-related information of the plurality of raw devices after cleaning is mapped to the node one by one through the node list.

[0102] The 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 field of the node. In the technical solution of the embodiments of the present application, the description information of network devices and host devices, system name, and cluster name and other attributes are used as the traction to generate the node list.

[0103] After converting the device information into a node list, whether it is input preparation for classification clustering algorithm or analysis of device relationship in topology reasoning, it can be operated based on a unified node structure, improving 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 used as the feature vector of the algorithm for processing, improving the execution efficiency of the algorithm.

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

[0105] (1) Network device:

[0106] {

[0107] "Host": 0,

[0108] "Access layer": 1,

[0109] "Core layer": 2,

[0110] "East-West": 3,

[0111] "North-South": 4,

[0112] "SMNET egress router": 5,

[0113] "Intranet firewall": 6,

[0114] "Internet access firewall": 7,

[0115] "SDN firewall": 8,

[0116] "SDN NAT gateway": 9,

[0117] "SDN gateway": 10,

[0118] "VGW": 11,

[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] "Splitter": 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":"splitter",

[0146] "9":"VPN",

[0147] "10":"DPI",

[0148] "11":"BYPASS",

[0149] "12":"backtracking analysis system"

[0150] }

[0151] In step S340, the related information of the original device in each resource pool is stored in the cache by cache preheating, taking the resource pool as the index.

[0152] Cache preheating is a means of optimizing data access performance. In the network topology generation process, the original device related information after collection, cleaning and nodalization is stored in the cache in units of resource pools.

[0153] The cache in the embodiments of the application can be a cache in memory (such as Redis cache), which has a fast data read-write speed. Taking the resource pool as the index means that the device information of different resource pools is stored and managed separately in the cache, facilitating quick access and processing of related device information according to the needs of the resource pool. In the cache preheating stage, the data is loaded into the cache in advance, instead of being read from a slow storage device (such as a CMDB database) when needed, thereby improving the data access speed.

[0154] The enterprise can have multiple data center resource pools, each of which contains different servers, switches and other devices. By storing device information in the cache indexed by resource pools, when it is necessary to generate the network topology of a certain resource pool, the device information of the resource pool can be quickly obtained from the cache without searching and extracting in the entire enterprise device information library, thereby greatly improving the data acquisition efficiency.

[0155] According to the above technical means, the data preprocessing means is adopted to realize the collection and cleaning of data, and for the huge host and device data, the resource information is mapped to the node one by one in the form of a node list, and the node list of the host and network device information is stored in Redis through the cache preheating mode, so that the data quality is improved, the accuracy and effectiveness are ensured, and the interference of invalid data is avoided; the structured storage of data can accelerate the topology generation speed.

[0156] In some embodiments, the above-mentioned obtaining attribute information of a plurality of devices in a physical network further includes: obtaining node list information of an original device corresponding to each of the plurality of devices in the physical network from the cache, and taking the obtained node list information as the attribute information of each device.

[0157] The method is based on the data processing method shown in Figure 3 The cache stores the original device related information in the form of a node list after collection, cleaning and node processing, and the information is stored in the cache in the form of a node list. When the device attribute information is needed, the node list information of the corresponding device is directly read from the cache.

[0158] The cache has fast data read-write characteristics, and the node list information can be read from the cache in a very short time, which greatly shortens the time cost of data acquisition. Moreover, since the data in the cache is stored after preprocessing (such as cleaning and node processing), the data used each time can be ensured to be uniformly processed, format standardized and accurate and effective.

[0159] Through the above technical means, when generating the network topology, the preprocessed node list information is directly obtained from the cache by using the high-speed read-write characteristics of the cache, which can shorten the data reading time and improve the efficiency of topology generation.

[0160] In some embodiments, as Figure 4 The method provided by the embodiments of the present application further includes steps S410-S430.

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

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

[0163] The training data set established based on the resource pool can better reflect the topology of the network to be generated, and training based thereon can make the multi-label classification algorithm model obtained by training more suitable for similar network scenarios.

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

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

[0166] The multi-label classification algorithm ML-KNN clusters based on the attribute information of the devices in the training data set, using the characteristics in the node list as the basis. The algorithm finds the k nearest neighbor devices (k is a pre-set parameter) of each device by calculating the similarity between the devices. Then, according to the class labels of these nearest neighbor devices (in this scenario, device class labels such as router class, switch class, and different service domain host class), a certain voting or weighting strategy is used to determine the class label of the device.

[0167] At the same time, in the clustering process, the connection relationship between the devices is analyzed to determine the association relationship between the devices, such as which devices are often connected to each other and which devices have similar positional relationships on the network path, thereby constructing a clustering result based on the device class and the association relationship.

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

[0169] After the device clustering is completed, the clustering result and the original attribute labels of the devices in the training data set (i.e., the known true class labels of the devices) are used to adjust and optimize the parameters and model of the multi-label classification algorithm ML-KNN.

[0170] For all network devices x, the number of device attribute classes is denoted as Cx (l).

[0171]

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

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

[0174] According to the above technical means, the construction of the target resource pool training data set improves the data pertinence, reduces interference, and makes the trained model more suitable for the actual network topology requirements; based on the clustering results and attribute label training algorithm, the accuracy and adaptability can be improved, self-optimization is realized, long-term effectiveness is ensured, and the network topology generation quality is improved.

[0175] In some embodiments, as shown in FIG. 2B, the foregoing step S230 of determining the network topology of the network further includes steps S231-S232. Figure 5

[0176] In step S231, the access layer device connected to each host device is determined based on each host device and with the maximum flow path into the host device as the objective function.

[0177] According to the foregoing description, in the Underlay network architecture, the core layer is lost, which will affect the missing of the large part 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 maximum flow path into it has a great probability of being the access layer device directly connected to the host device. Therefore, in the topology reasoning process, starting from the host device layer, the maximum flow path into the host device is maximized as a key consideration factor to determine the access layer device connected thereto.

[0178] ​At step S232, based on each access layer device, a converged layer device connected to each access layer device is determined as a target function of maximizing the traffic path flowing into the access layer device.

[0179] According to the foregoing steps, after the access layer device is determined, the inference continues to the upper level to determine the converged layer device connected thereto as a target of maximizing the traffic path flowing into the access layer device. By analyzing and calculating the traffic transmission in different connection paths, the converged layer device capable of providing the maximum traffic inflow path for the access layer device is selected, so as to construct a reasonable connection relationship between the access layer and the converged layer.

[0180] In some embodiments, referring to Figure 6 , step S230 further includes steps S233-S234.

[0181] At step S233, starting from the access layer device, the path from the access layer device to the leaf node is recorded in a hierarchical order.

[0182] In the topology inference process, starting from the access layer device, each device from the access layer device to the leaf node and the connection relationship therebetween are recorded in detail in a hierarchical order until the leaf node (i.e., a node without a direct connection relationship that has not been accessed, usually a high-level device or a boundary device in the network topology) is reached. For example, starting from an access layer switch, a converged layer switch, a core layer switch, and finally a north-south export converged switch (assuming that it is a leaf node), all the devices on the path and the connection order therebetween are recorded.

[0183] At step S234, the node appearing most frequently on all the paths is determined as the north-south export converged switch.

[0184] After all the paths from the access layer device to the leaf node are traversed and recorded, the nodes appearing on the paths are statistically analyzed. The frequency of each node appearing in all the paths is calculated, and the node appearing most frequently is determined as the north-south export converged switch.

[0185] The above determination is based on the key position and functional characteristics of the north-south export converged switch in the network topology. Since it is responsible for the connection between the data center and the external network, a large amount of internal and external network data traffic needs to pass through it for forwarding and convergence, and thus it frequently appears in numerous network paths. Through this statistical analysis method based on the frequency of path appearance, the north-south export converged switch can be accurately identified from numerous devices.

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

[0187] In step S235, the multiple target network devices are determined according to the device attribute of the network device, and the device attribute is a routing device.

[0188] In determining the egress layer device, first, a first screening is performed according to the attribute information of the network device. The attribute of the network device contains key information such as device type, and by searching for the attribute identification of the device type as a routing device, the possible target network devices are screened out from the numerous network devices. These target network devices have routing function and can perform data forwarding and routing selection between different networks, and are potential candidates for the egress layer device. For example, the attribute of the device can include device model, device function description, etc., and by these information, it is determined whether the device is a router type, such as searching for whether the keyword "router" is contained in the device description or according to the device model to query whether the type of the device is a router in the device library, so as to determine a series of target network devices with routing capability.

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

[0190] After the multiple target network devices with routing device attribute are preliminarily screened, the traffic maximization objective function is further used to evaluate and secondarily screen the target network devices. At the same time, the nodes contained in TOR, POD, and north-south convergence are filtered out, so as to accurately identify the CMNET egress router, complete the construction of the entire network topology from the bottom layer to the high layer and from the inside to the outside, and realize the visual of the layered and domain-structured architecture of the networking topology under the resource pool.

[0191] According to the above technical means, by introducing the topology node traffic path maximization as the objective function, and taking the Underlay networking layered architecture idea as the guide, starting from the traffic path of the host node, the objective function maximization reasoning upper layer TOR device is performed, and the POD, north-south convergence, and egress router are reasoned upwards, so as to realize the vertical layering and horizontal side hanging of the network topology, and ensure the integrity of the Underlay networking topology generation.

[0192] The above describes the method embodiment of the present application in detail. Figures 1-7 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, and therefore, the parts not described in detail can be referred to the method embodiment described above.

[0193] Figure 8 Fig. 1 is a schematic structural diagram of a network topology generation device provided by an embodiment of the present application, Figure 8 The device 800 in Fig. 1 includes:

[0194] The acquisition unit 810 is configured to acquire attribute information of a plurality of devices in a physical network, the plurality of devices including network devices and host devices.

[0195] The clustering unit 820 is configured to perform clustering and classification on the plurality of devices according to the attribute information of the plurality of devices by using a multi-label classification algorithm ML-KNN, and the clustering and classification result includes device types of the network devices in the plurality of devices and association relationships between each network device and other network devices and / or host devices.

[0196] The reasoning unit 830 is configured to determine a network topology of the physical network by reasoning upwards from the host devices along a hierarchical order of the physical network, with a topology node flow maximization as an objective function, according to the clustering and classification result.

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

[0198] The collection unit is configured to collect device-related information of a plurality of original devices from a configuration management database (CMDB).

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

[0200] The mapping unit is configured to map the cleaned device-related information of the plurality of original devices to node nodes one by one by using a node list.

[0201] The storage unit is configured to store the related information of the original devices in each resource pool in a cache by using a cache warm-up method, with the resource pool as an index.

[0202] In some embodiments, the acquisition unit 810 is further configured to acquire node list information of the original devices corresponding to the plurality of devices in the physical network from the cache, and use the node list information as the 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 configured to construct a training data set, and the training data set includes attribute information of a plurality of original devices in a target resource pool.

[0205] The clustering unit is further configured to perform clustering on the plurality of original devices in the training data set by using the multi-label classification algorithm ML-KNN.

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

[0207] In some embodiments, along a physical network bottom-up hierarchical order, the network devices include an access layer device, an aggregation 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.

[0208] The reasoning unit 830 is further configured to determine, on a per-host-device basis, the access layer device connected to each host device, with a maximum flow path into the host device as an objective function; and determine, on a per-access-layer-device basis, the aggregation layer device connected to each access layer device, with a maximum flow path 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 arranged at an upper layer of the east-west interconnection switch.

[0210] The reasoning unit 830 is further configured to traverse, from the access layer device, upwards along the hierarchical order to the leaf node, record each path from the access layer device to the leaf node, and determine, as the north-south egress aggregation switch, a node with the most occurrences on all paths.

[0211] In some embodiments, the reasoning unit 830 is further configured to determine, according to the device attribute of the network device, a plurality of target network devices with the device attribute as a routing device, and determine, according to the flow maximization objective function, the egress layer device by filtering the plurality of target network devices.

[0212] Embodiments of the present application also provide an electronic device, Figure 9 The dashed line in the above apparatus indicates that the unit or module is optional. The electronic device 900 can be used to implement the methods described in the above method embodiments. 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 can include one or more processors 910. The processor 910 can support the electronic device 900 to implement the method described in the foregoing method embodiments. The processor 910 can be a general-purpose processor or a special-purpose processor. For example, the processor can be a central processing unit (CPU). Alternatively, the processor can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

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

[0215] The electronic device 900 can further include a transceiver 930. The processor 910 can communicate with other devices or chips through the transceiver 930. For example, the processor 910 can perform data transceiving with other devices or chips through the transceiver 930.

[0216] The embodiments of the present application further provide a computer readable storage medium. The computer readable storage medium is used to store a computer program. The computer program is executed to implement the method in the embodiments of the present application.

[0217] The embodiments of the present application further provide a computer program product. The computer program product includes a program. The computer program product can be applied to the electronic device provided by the embodiments of the present application, and the program causes the computer to execute the method performed by the electronic device in the embodiments of the present application.

[0218] The embodiments of the present application further provide a computer program. The computer program can be applied to the communication device provided by the embodiments of the present application, and the computer program causes the computer to execute the method performed by the electronic device in the embodiments of the present application.

[0219] It should be understood that the terminology used herein is for the purpose of describing specific embodiments only and is not intended to be limiting. The terms "first", "second", "third", and "fourth" and the like in the description and in the claims, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms "including", "comprising", "consisting" and "having" and variations thereof, are meant to cover the case where zeroes or more of the listed elements are included. It is to be understood that the terms "including", "comprising", "consisting" and "having" and variations thereof, are meant to cover the case where zeroes or more of the listed elements are included.

[0220] In embodiments of the present application, the term "indicates" can be direct indication or indirect indication, or can be a relationship of association. For example, A indicates B can mean that B can be obtained directly through A, or can mean that A indicates C, and B can be obtained through C, or can mean that A and B have a relationship of association.

[0221] In embodiments of the present application, the term "comprises" can mean direct inclusion or indirect inclusion. Alternatively, the term "comprises" in embodiments of the present application can be replaced by "indicates" or "is used to determine". For example, A comprises B can be replaced by A indicates B, or A is used to determine B.

[0222] In embodiments 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 also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.

[0223] In embodiments of the present application, the term "corresponds to" can mean a direct correspondence or an indirect correspondence between the two, or can mean a relationship of association between the two, or can mean an indication and being indicated, configuration and being configured, and the like.

[0224] In embodiments of the present application, the term "and / or" is only used to describe the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this paper generally means that the front and rear associated objects have an "or" relationship.

[0225] In various embodiments of the present application, the size of the serial number of the above processes does not mean the order of execution, and the execution order of the processes should be determined according to their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0226] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other manners. For example, the above-described device embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and in actual implementation, another division manner can be adopted, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0227] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

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

[0229] In the above embodiments, all or part can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part can be realized 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, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium readable by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as digital video disc (DVD)) or semiconductor media (such as solid state disk (SSD)) and the like.

[0230] The above description is only specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for generating network topology, characterized in that, The method includes: Obtain attribute information of multiple devices in a physical network, including network devices and host devices; Based on the attribute information of the multiple devices, the multiple devices are classified and clustered using the multi-label classification algorithm ML-KNN. The classification and clustering results include the device type of the network devices among the multiple devices, and the association relationship between each network device and other network devices and / or host devices. Using the maximization of topology node traffic as the objective function, and based on the results of the classification and clustering, the network topology of the physical network is determined by reasoning upwards from the host device along the hierarchical order of the physical network. Following 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, with the access layer devices located above the host devices. The determination of the network topology of the physical network includes: Based on each host device, and with the objective function of maximizing the traffic path flowing into the host device, the access layer device connected to each host device is determined. Based on each access layer device, and with the objective function of maximizing the flow path into the access layer device, determine the aggregation layer device connected to each access layer device; The determination of the network topology of the physical network also includes: Based on the device attributes of the network devices, multiple target network devices whose device attributes are routing devices are identified; The egress layer device is determined by filtering the multiple target network devices according to the traffic maximization objective function.

2. The method according to claim 1, characterized in that, Before obtaining the attribute information of multiple devices in the physical network, the method further includes: Collect device-related information from multiple original devices from the Configuration Management Database (CMDB); Clean the device-related information of the multiple original devices, and filter out original devices that are not in the network state and / or original devices with duplicate management IPs; The device-related information of multiple original devices after cleaning is mapped to node nodes one by one using a node-based list; Using resource pools as indexes, relevant information about the original devices in each resource pool is stored in the cache through a cache preheating method.

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

4. The method according to claim 3, characterized in that, The method further includes: Construct a training dataset, which includes attribute information of multiple raw devices in the target resource pool; The multi-label classification algorithm ML-KNN is used to cluster multiple original devices in the training dataset; The multi-label classification algorithm ML-KNN is trained based on the clustering results and the attribute labels of multiple original devices in the training dataset.

5. The method according to any one of claims 1-4, characterized in that, The aggregation layer equipment includes an east-west interconnecting switch and a north-south exit aggregation switch located on top of the east-west interconnecting switch; The determination of the network topology of the physical network also includes: Starting from the access layer device, traverse upwards along the hierarchical order to the 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 selected as the north-south exit convergence switch.

6. A network topology generation device, characterized in that, The device includes: An acquisition unit is used to acquire attribute information of multiple devices in a physical network, including network devices and host devices; The clustering unit is used to classify and cluster the multiple devices according to their attribute information using the multi-label classification algorithm ML-KNN. The results of the classification and clustering include the device type of the network devices among the multiple devices, and the association relationship between each network device and other network devices and / or host devices. The inference unit is used to determine the network topology of the physical network by reasoning upwards from the host device along the hierarchical order of the physical network based on the classification and clustering results, with the objective function of maximizing the traffic of the topology nodes. Following 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, with the access layer devices located above the host devices. The determination of the network topology of the physical network includes: Based on each host device, and with the objective function of maximizing the traffic path flowing into the host device, the access layer device connected to each host device is determined. Based on each access layer device, and with the objective function of maximizing the flow path into the access layer device, determine the aggregation layer device connected to each access layer device; The determination of the network topology of the physical network also includes: Based on the device attributes of the network devices, multiple target network devices whose device attributes are routing devices are identified; The egress layer device is determined by filtering the multiple target network devices according to the traffic maximization objective function.

7. An electronic device, characterized in that, It includes a memory and a processor, the memory being used to store a computer program and the processor being used to execute the computer program to perform the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, which, when run, implements the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

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

    CN108566296A

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

    CN118612809A