Network topological graph processing method and device, equipment and storage medium
By automatically analyzing and generating the network topology diagram processing method of the equipment link table, the problem of construction understanding difficulty and inefficiency caused by the complexity of the network topology diagram of the computer room is solved, and construction efficiency and data standardization are improved.
Patent Information
- Application Number
- CN202510570849.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, the complex drawing of computer room network topology maps leads to increased difficulty in understanding of the construction team, low analysis efficiency, low standardization, and affecting the progress and quality of the construction design.
Provide a network topology diagram processing method. By obtaining the target network topology diagram drawn by the user and its drawing type, it automatically parses and generates a device link table, including grouping or aggregation relationships between devices, link connection relationships with fully interconnected nodes at both ends of the connection, device port interconnection relationships and one-to-one interconnection relationships, reducing the need for manual analysis.
It realizes that there is no need for manual analysis and fill in forms, reduces the difficulty of understanding of the construction party, improves construction efficiency, simplifies the workload of topology diagrams, and ensures the standardization and reliability of data.
Smart Images

Figure CN120455284A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network construction, and in particular to a network topology processing method, device, equipment and storage medium. Background Art
[0002] With the rapid development of cloud computing, the complexity of the network in the computer room is also gradually increasing, resulting in more complicated computer room network topology maps. In order to solve the problem of complex drawing, relevant personnel draw simple topology maps by designing simple drawing specifications for topology maps, which greatly reduces the complexity of the topology maps. Subsequently, construction personnel need to understand and parse the network configuration information expressed in the simple topology map according to the corresponding drawing specifications and technical experience. However, different designers may draw different specifications. The construction team needs to parse the network configuration information expressed in the topology map based on the drawing specifications corresponding to the simple topology map, which requires the construction team to understand the drawing specifications corresponding to all designers, increasing the difficulty of understanding for the construction team and the risk of parsing errors. As the scale and complexity of network design increase, the efficiency of manually parsing network topology maps and filling in network connection tables is very low, and the degree of standardization is low, which affects the construction design progress and quality assurance. Summary of the Invention
[0003] In view of this, the present invention provides a network topology processing method, device, equipment and storage medium to solve the problem of low efficiency and low standardization in manually parsing network topology and filling in network connection tables.
[0004] In a first aspect, the present invention provides a method for processing a network topology map, the method comprising: obtaining a target network topology map drawn by a user and a target drawing type used for drawing the target network topology map, wherein the target drawing type is one of multiple drawing types, a first drawing type indicating a grouping or aggregation relationship between devices, a second drawing type indicating a link connection relationship in which nodes at both ends of a connection are fully interconnected, a third drawing type indicating a link connection relationship in which device ports in nodes at both ends of a connection are interconnected, and a fourth drawing type indicating a link connection relationship in which nodes at both ends of a connection are interconnected in a one-to-one manner, wherein the nodes include single devices, and / or groups of the same devices, and / or aggregations of the same devices; based on the target drawing type, parsing the target network topology map to obtain a topology parsing result; and generating a device link table based on the topology parsing result.
[0005] The network topology map processing method provided by the present invention obtains the target network topology map and the target drawing type drawn by the user, parses the target network topology map based on the target drawing type, obtains the topology parsing result, and generates a device link table based on the topology parsing result, thereby automatically parsing the network topology map based on the drawing type selected by the user and generating a device link table. There is no need for manual parsing and filling in the table, which reduces the difficulty of understanding for the construction party and improves construction efficiency.
[0006] In an optional embodiment, when the target drawing type is the first drawing type, the target network topology map is parsed and processed based on the target drawing type, including: splitting the current group into a corresponding number of devices based on the number of devices marked in the current group, and / or splitting the current group into a corresponding number of sub-groups based on the number of groups and the number of devices marked in the current group, and splitting each sub-group into a corresponding number of devices, wherein the device content of the sub-group is consistent with the device content of the current group, and / or splitting the current device into a corresponding number of devices based on the number of devices marked in the current device.
[0007] In an optional embodiment, when the target drawing type is the second drawing type, the target network topology diagram is parsed and processed based on the target drawing type, including: splitting the current device into a corresponding number of devices based on the number of devices marked by the current device, and / or splitting the current group into a corresponding number of devices based on the number of devices marked by the current group, and / or splitting the current group into a corresponding number of sub-groups based on the number of groups and the number of devices marked by the current group, and splitting each sub-group into a corresponding number of devices, wherein the device content of the sub-group is consistent with the device content of the current group; according to the link connection relationship of the fully interconnected nodes at both ends of the connection and the link type of the connection between the nodes at both ends in the target network topology diagram, a link connection is established in which all devices in the first end and the second end are fully interconnected.
[0008] In an optional embodiment, when the target drawing type is the third drawing type, the first end node includes multiple network device ends, and the second end node includes multiple server device ends. The target network topology diagram is parsed and processed based on the target drawing type, including: splitting the current network device into a corresponding number of network devices based on the number of devices marked by the current network device in the first end node, and splitting the current server device into a corresponding number of server devices based on the number of devices marked by the current server device in the second end node; establishing a link connection between the server device with an unconnected port in the second end node and the port of the network device with a connectable port in the first end node based on the link type of the port connection of the devices at both ends, and / or splitting the current network group into A corresponding number of sub-network device groups, and based on the number of devices marked by the current server device in the second end node, the current server device is split into a corresponding number of server devices; based on the link type of the link connection between the ports of the devices at both ends, the server device with no connected ports in the second end node is connected to the sub-network device group with connectable ports in the first end node, wherein the number of connection ports of the sub-network device group is consistent with the number of connectable ports of any network device in the sub-network device group; based on the number of devices marked in the current sub-network device group, the current sub-network device group is split into a corresponding number of devices; the port of the current device in the current sub-network device group is connected to the first set of server devices, and the first set of server devices is connected to all server devices that have established link connections with the current sub-network device group.
[0009] In an optional embodiment, when the target drawing type is the fourth drawing type, the number of groups and / or the number of devices respectively marked in the two end nodes are consistent, and the target network topology diagram is parsed and processed based on the target drawing type, including: based on the number of devices marked by the current device, the current devices in the two end nodes are respectively split into a corresponding number of devices, and a one-to-one correspondence link connection is established between the two end devices, and / or, based on the number of groups marked by the current group in the first end node, the current group is split into a corresponding number of sub-groups, and based on the number of devices marked by the current device in the second end node, the current device is split into a corresponding number of devices, and a one-to-one correspondence link connection is established between the sub-groups and the devices; based on the number of devices marked by the current sub-group in the first end node, the current sub-group is split into a corresponding number of devices, and each device after the split of the first end node is respectively established with a corresponding number of devices. A link connection of the first device, wherein the first device is a device in the second end node that establishes a one-to-one connection with the current sub-group, and / or, based on the number of groups marked by the current group in the first end node, the current group is split into a corresponding number of sub-groups, and based on the number of groups marked by the current group in the second end node, the current group is split into a corresponding number of sub-groups, and a one-to-one correspondence link is established between the sub-groups in the first end node and the sub-groups in the second end node; based on the number of devices marked by the current first sub-group in the first end node, the current first sub-group is split into a corresponding number of devices, and based on the number of devices marked by the current second sub-group in the second end node, the current second sub-group is split into a corresponding number of devices, wherein the first sub-group and the second sub-group are in a link connection relationship; a link connection is established between each device in the current first sub-group and all devices in the current second sub-group.
[0010] In a second aspect, the present invention provides a network topology map processing device, which includes: a topology map acquisition module, which is used to obtain a target network topology map drawn by a user and a target drawing type used to draw the target network topology map, wherein the target drawing type is one of multiple drawing types, the first drawing type indicates the grouping or aggregation relationship between devices, the second drawing type indicates the link connection relationship of the nodes at both ends of the connection are fully interconnected, the third drawing type indicates the link connection relationship of the device ports in the nodes at both ends of the connection, and the fourth drawing type indicates the link connection relationship of the nodes at both ends of the connection in a one-to-one manner, and the nodes include single devices, and / or groups of the same devices, and / or aggregations of the same devices; a topology parsing module, which is used to parse and process the target network topology map based on the target drawing type to obtain a topology parsing result; and a device link table generation module, which is used to generate a device link table based on the topology parsing result.
[0011] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the network topology map processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0012] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the network topology graph processing method of the first aspect or any corresponding embodiment thereof.
[0013] In a fifth aspect, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the network topology graph processing method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0015] Figure 1 is a schematic flow chart of a method for processing a network topology graph according to an embodiment of the present invention;
[0016] Figure 2 is an example diagram of a project construction process according to an embodiment of the present invention;
[0017] Figure 3 is an example flow chart of a method for processing a network topology graph according to an embodiment of the present invention;
[0018] Figure 4 is a flow chart of another network topology processing method according to an embodiment of the present invention;
[0019] Figure 5 is an example diagram of a first drawing scene in a first drawing type according to an embodiment of the present invention;
[0020] Figure 6 is an example diagram of a second drawing scene in the first drawing type according to an embodiment of the present invention;
[0021] Figure 7 is an example diagram of a third drawing scene in the first drawing type according to an embodiment of the present invention;
[0022] Figure 8is an example diagram of a fourth drawing scene in the first drawing type according to an embodiment of the present invention;
[0023] Figure 9 is an example diagram of a fifth drawing scene in the first drawing type according to an embodiment of the present invention;
[0024] Figure 10 is an example diagram of a first drawing scene in a second drawing type according to an embodiment of the present invention;
[0025] Figure 11 is an example diagram of a second drawing scene in a second drawing type according to an embodiment of the present invention;
[0026] Figure 12 is an example diagram of a third drawing scene in the second drawing type according to an embodiment of the present invention;
[0027] Figure 13 is an example diagram of a fourth drawing scene in the second drawing type according to an embodiment of the present invention;
[0028] Figure 14 is an example diagram of a fifth drawing scene in the second drawing type according to an embodiment of the present invention;
[0029] Figure 15 is an example diagram of a first drawing scene in a third drawing type according to an embodiment of the present invention;
[0030] Figure 16 is an example diagram of a second drawing scene in the third drawing type according to an embodiment of the present invention;
[0031] Figure 17 is an example diagram of a first drawing scene in a fourth drawing type according to an embodiment of the present invention;
[0032] Figure 18 is an example diagram of a second drawing scene in a fourth drawing type according to an embodiment of the present invention;
[0033] Figure 19 is an example diagram of a third drawing scene in a fourth drawing type according to an embodiment of the present invention;
[0034] Figure 20 is an example diagram of a target network topology diagram drawn using a first drawing type according to an embodiment of the present invention;
[0035] Figure 21 is an example diagram of a network topology diagram of a link connection between single devices after parsing according to an embodiment of the present invention;
[0036] Figure 22 is an example diagram of a target network topology diagram of the third drawing type according to an embodiment of the present invention;
[0037] Figure 23 is a structural block diagram of a network topology processing device according to an embodiment of the present invention;
[0038] Figure 24 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0040] According to an embodiment of the present invention, an embodiment of a network topology diagram processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] In this embodiment, a network topology processing method is provided, which can be used for the above-mentioned computer device. Figure 1 FIG. 1 is a flow chart of a method for processing a network topology diagram according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0042] Step S101: obtaining a target network topology map drawn by a user and a target drawing type used for drawing the target network topology map.
[0043] The target drawing type is one of multiple drawing types. The first drawing type indicates a grouping or aggregation relationship between devices. The second drawing type indicates a link connection relationship in which nodes at both ends of a connection are fully interconnected. The third drawing type indicates a link connection relationship in which device ports in nodes at both ends of a connection are interconnected. The fourth drawing type indicates a link connection relationship in which nodes at both ends of a connection are interconnected in a one-to-one manner. Nodes include single devices, and / or groups of the same devices, and / or aggregations of the same devices.
[0044] like Figure 2As shown, after the network construction project is launched, the network topology designer can determine the target drawing type based on the details of the computer room network, and can draw a simplified version of the target network topology map corresponding to the computer room network according to the target drawing type, and deliver the target topology map to the construction party. The construction party can use computing equipment to restore the simplified version of the target network topology map into a detailed topology map of the link connections between devices according to the restoration strategy corresponding to the target drawing type.
[0045] In a specific embodiment, Figure 3 As shown, the computer device integrates multiple drawing types, including at least a first drawing type, wherein the first drawing type is a general drawing type, such as aggregating the same devices and grouping the devices to reduce the number of displayed devices. The first drawing type is the basis for other drawing types; the second drawing type indicates the link connection relationship of the nodes at both ends of the connection fully interconnected, that is, after the combined or aggregated group or device is split into individual devices, a fully interconnected link connection is established between the devices at both ends based on the link connection relationship of the devices; the third drawing type indicates the link connection relationship of the device ports interconnected in the nodes at both ends of the connection, wherein the devices at both ends are respectively a server device and a network device, and the server device and the network device are connected through ports, that is, after the combined or aggregated group or device is split into individual devices, a link connection between the devices is established based on the number of network ports and the number of servers; the fourth port indicates the link connection relationship of the nodes at both ends of the connection in a one-to-one manner, that is, the number of labels after aggregation or grouping at both ends is required to be consistent, so that a one-to-one link connection is established based on the consistent number at both ends, which is only for example.
[0046] Step S102: Based on the target drawing type, the target network topology map is parsed to obtain a topology parsing result.
[0047] like Figure 3 As shown, the computer device of an embodiment of the present invention can parse the target network topology map based on the restoration and parsing strategy corresponding to the target drawing type to obtain a topology parsing result, wherein the topology parsing result includes each device in the two end nodes and the link connection between the devices.
[0048] Step S103: Generate a device link table based on the topology analysis result.
[0049] The embodiment of the present invention can extract link connection information between devices from the topology analysis results, including key data such as source device, destination device, connection port, link type (such as Ethernet, optical fiber, wireless, etc.) and link status (normal, faulty), and can also supplement other link attributes according to the device configuration and network environment, such as link bandwidth, transmission rate, delay and other performance parameters. If there is redundant backup of the link, the backup link information also needs to be recorded, as an example only; subsequently, the data format of the link information can be unified to ensure the standardization of the data in the device link table, and the link information can be verified through a verification algorithm, such as checking the compatibility of the device ports at both ends of the link, the rationality of the link status, etc., to ensure that the generated device link table data is reliable, and finally the table structure definition (such as link ID, device name, link type, etc.) is performed, and the topology analysis results are filled into the defined list to generate a complete device link table, as an example only.
[0050] The network topology map processing method provided by the present invention obtains the target network topology map and the target drawing type drawn by the user, parses the target network topology map based on the target drawing type, obtains the topology parsing result, and generates a device link table based on the topology parsing result, thereby automatically parsing the network topology map based on the drawing type selected by the user and generating a device link table. There is no need for manual parsing and filling in the table, which reduces the difficulty of understanding for the construction party and improves construction efficiency.
[0051] In this embodiment, a network topology processing method is provided, which can be used for the above-mentioned computer device. Figure 4 FIG. 1 is a flow chart of a method for processing a network topology diagram according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0052] Step S401: Obtain the target network topology map drawn by the user and the target drawing type used to draw the target network topology map. The target drawing type is one of multiple drawing types. The first drawing type indicates the grouping or aggregation relationship between devices. The second drawing type indicates the link connection relationship in which the nodes at both ends of the connection are fully interconnected. The third drawing type indicates the link connection relationship in which the device ports in the nodes at both ends of the connection are interconnected. The fourth drawing type indicates the link connection relationship in which the nodes at both ends of the connection are interconnected in a one-to-one manner. The nodes include single devices, and / or groups of the same devices, and / or aggregations of the same devices. For details, please refer to Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0053] Step S402: Based on the target drawing type, the target network topology map is parsed to obtain a topology parsing result.
[0054] Specifically, when the target drawing type is the first drawing type, step S402 includes:
[0055] Step S4021: based on the number of devices marked in the current group, split the current group into a corresponding number of devices, and / or, based on the number of groups and the number of devices marked in the current group, split the current group into a corresponding number of sub-groups, and split each sub-group into a corresponding number of devices, wherein the device content of the sub-group is consistent with the device content of the current group, and / or, based on the number of devices marked in the current device, split the current device into a corresponding number of devices.
[0056] The first drawing type designed in the embodiment of the present invention is a general drawing type, which generally includes five drawing scenarios in the network topology diagram. The first drawing scenario is as follows: Figure 5 As shown, a single device connects to a single device, and the devices are not grouped, directly indicating the link connection relationship between the two devices; the second scenario is as follows Figure 6 As shown, in a group-connected single-device scenario: the first end node is a group, and the second end node is a single device, the current group can be split into a corresponding number of devices based on the number of devices marked in the current group in the network topology diagram (for example, the groups into which multiple devices are divided can be represented by boxes, and the number of devices displayed in the box is the number of devices marked in the current group). For example, if two devices are displayed in the current group, the current group can be split into two devices, and based on the link connection between the current group in the first end node and the device in the second end node, a link connection is established between each device after the first end node is split and the device in the second end node. This is just an example.
[0057] The third drawing scene is as follows Figure 7 As shown, the first end node is a device group and the second end node is a device group. Based on the number of devices marked in the current group in any end node in the network topology diagram, the current group can be split into a corresponding number of devices. Then, based on the link connection between the group in the first end node and the group in the second end node, a link connection can be established between each device after the first end node is split and each device after the second end node is split. The fourth drawing scenario is as follows Figure 8 As shown, the current group in the network topology diagram is marked with the number of groups and the number of devices in the group. There is no limitation on how to mark the number of groups, and it can be set according to actual specification requirements. For example, "× number" is used to represent the number of groups, and the number of devices can be marked with the number of devices displayed in the group box. In the subsequent parsing process, the current group can be split into a corresponding number of sub-groups based on the number of groups marked, where the device content of the sub-group (including information such as the number of devices and data) is consistent with the device content of the current group. The sub-group can also be split into the corresponding number of devices based on the number of devices displayed in the sub-group. The fifth drawing scenario is as follows Figure 9As shown, the current device in the network topology diagram is marked with the device quantity. For example, "× quantity" is used on the current device to indicate the device quantity. Subsequently, the current device can be split into the corresponding number of devices based on the marked device quantity. This is only an example.
[0058] In an optional embodiment, when the target drawing type is the second drawing type, the target network topology map is parsed and processed based on the target drawing type, including: splitting the current device into a corresponding number of devices based on the number of devices marked by the current device, and / or splitting the current group into a corresponding number of devices based on the number of devices marked by the current group, and / or splitting the current group into a corresponding number of sub-groups based on the number of groups and the number of devices marked by the current group, and splitting each sub-group into a corresponding number of devices, wherein the device content of the sub-group is consistent with the device content of the current group; according to the link connection relationship of the fully interconnected nodes at both ends of the connection and the link type of the connection between the nodes at both ends in the target network topology map, a link connection is established in which all devices in the first end and the second end are fully interconnected.
[0059] The second drawing type designed in the embodiment of the present invention indicates a link connection relationship in which the nodes at both ends of the line are fully interconnected, that is, the link connection relationship between the devices at both ends is interconnected in pairs, which includes at least five drawing scenarios. The first drawing scenario is as follows: Figure 10 As shown, the first end node is the aggregated node, and the second end node is a single device. Based on the number of devices marked by the current device in the first end node, the current device can be split into a corresponding number of devices. Then, based on the fully interconnected link connection relationship of the two end nodes, a fully interconnected link connection of all devices at both ends can be established; the second drawing scenario is as follows Figure 11 As shown, the first-end and second-end nodes are both aggregated nodes. The current device can be split into a corresponding number of devices based on the number of devices marked in the current device at both ends, and then a fully interconnected link connection of all devices at both ends can be established based on the link information of the first-end node and the second-end node in the network topology diagram. The fully interconnected link connection information of all devices at both ends is consistent with the link connection information of the first-end node and the second-end node displayed in the network topology diagram, and the link information includes at least the number of devices connected to the nodes at both ends.
[0060] The third drawing scene is as follows Figure 12As shown, the first end node is a group of devices and the second end node is a single device. Then, based on the number of groups marked by the current group in the first end node, the current group can be split into a corresponding number of sub-groups. Based on the fully interconnected link connection relationship between the two end nodes, a fully interconnected link connection between all sub-groups in the first end node and all devices in the second end node is established. Then, based on the number of devices marked in the current sub-group in the first end node, the current sub-group can be split into a corresponding number of devices. Finally, a fully interconnected link connection between all devices split in the first end node and all devices in the second end node can be established. The fourth drawing scenario is as follows Figure 13 As shown, the first end node is a group of devices, and the second end node is an aggregation of the same devices. The current group in the first end node can be split into a corresponding number of sub-groups based on the number of groups marked by the current group, and the current device can be split into a corresponding number of devices based on the number of devices marked by the current device in the second end node. Then, based on the fully interconnected link connection relationship between the sub-groups and the devices, a fully interconnected link connection between all sub-groups in the first end node and all devices in the second end node can be established. Subsequently, based on the number of devices marked by the current sub-group in the first end node, the current sub-group can be split into a corresponding number of devices, and then a fully interconnected link connection between all devices in the first end node and all devices in the second end node can be established.
[0061] The fifth drawing scene is as follows Figure 14 As shown, the first end node is a group of devices, and the second end node is also a group of devices. The current group can be split into a corresponding number of sub-groups based on the number of groups marked by the current group in the first end node, and the current group can be split into a corresponding number of sub-groups based on the number of groups marked by the current group in the second end node. Then, based on the fully interconnected link connection relationship between the two end nodes, a fully interconnected link connection between all sub-groups in the first end node and all sub-groups in the second end node can be established. The current sub-group can also be split into a corresponding number of devices based on the number of devices marked by the current sub-group in the first end node, and the current sub-group can be split into a corresponding number of devices based on the number of devices marked by the current sub-group in the second end node. Finally, a fully interconnected link connection between all devices in the first end node and all devices in the second end node can be established. This is just an example.
[0062] In an optional embodiment, when the target drawing type is the third drawing type, the first end node includes multiple network device ends, and the second end node includes multiple server device ends. Based on the target drawing type, the target network topology diagram is parsed and processed, including: based on the number of devices marked by the current network device in the first end node, the current network device is split into a corresponding number of network devices, and based on the number of devices marked by the current server device in the second end node, the current server device is split into a corresponding number of server devices; based on the link type of the port connection of the two end devices, the server device with an unconnected port in the second end node is connected to the port of the network device with a connectable port in the first end node, and / or, based on the number of groups marked by the current network group in the first end node, the current network group is split into the corresponding number of server devices. A corresponding number of sub-network device groups are selected, and based on the number of devices marked by the current server device in the second end node, the current server device is split into a corresponding number of server devices; based on the link type of the link connection between the ports of the devices at both ends, a link connection is established between the server device with no connected ports in the second end node and the sub-network device group with connectable ports in the first end node, wherein the number of connection ports of the sub-network device group is consistent with the number of connectable ports of any network device in the sub-network device group; based on the number of devices marked in the current sub-network device group, the current sub-network device group is split into a corresponding number of devices; a link connection is established between the port of the current device in the current sub-network device group and the first server device set, and the first server device set is all server devices that have established link connections with the current sub-network device group.
[0063] The third drawing type designed in the embodiment of the present invention is applied to the link connection scenario between the server and the network device. One end node is the server device and the other end device is the network device (when the network device is the upper layer and the server is the lower layer, the link from the upper layer to the lower layer is the Down line). The link connection between the two end nodes is achieved by the number of network device ports and the number of servers. It includes at least two drawing scenarios. The first drawing scenario is as follows: Figure 15As shown, the first end node and the second end node are both aggregation nodes of the same device. First, the current network device can be split into a corresponding number of network devices based on the number of devices marked by the current network device in the first end node, and the current server device can be split into a corresponding number of server devices based on the number of devices marked by the current server device in the second end node. Then, a link connection can be established between the server device with an unconnected port in the second end node and the port of the network device with a connectable port in the first end node. In a specific embodiment, the number of network devices is four and the number of server devices is seven. The server device can be connected to the port of the first network device first. When the port of the first network device is used up (for example, a network device has only two connectable ports), the port of the second network device can be used to connect until all server devices are connected. This is just an example.
[0064] The second drawing scene is as follows Figure 16 As shown, the first end node is a network group, and the second end node is a server device aggregation, wherein the server devices can also be grouped and the network devices can be aggregated, without limitation. First, based on the number of groups marked by the current network device group in the first end node, the current network device group can be split into a corresponding number of sub-groups, and based on the number of devices marked by the current server device in the second end node, the current server device can be split into a corresponding number of server devices. Then, a link connection can be established between the server device with no connected ports in the second end node and the sub-network device group with connectable ports in the first end node, wherein the number of connectable ports of the sub-network device group is equal to the number of network devices in its sub-group. If the number of connectable ports is consistent, the server device can be first connected to the connectable port of the first sub-network device group. When the connectable ports of the first sub-network device group are used up, the remaining server devices can be connected to the connectable ports of the second sub-network device group until all server devices in the second end node are connected. The current sub-network device group can also be split into a corresponding number of devices based on the number of devices marked in the current sub-network device group, and a link connection can be established between the port of the current device in the current sub-network group and the first server device set, where the first server device set is all server devices that have established a link connection with the current sub-network device group, for example only.
[0065] In an optional embodiment, when the target drawing type is the fourth drawing type, the number of groups and / or the number of devices respectively marked in the two end nodes are consistent, and based on the target drawing type, the target network topology diagram is parsed and processed, including: based on the number of devices marked by the current device, the current devices in the two end nodes are respectively split into a corresponding number of devices, and a one-to-one correspondence link connection is established between the two end devices, and / or, based on the number of groups marked by the current group in the first end node, the current group is split into a corresponding number of sub-groups, and based on the number of devices marked by the current device in the second end node, the current device is split into a corresponding number of devices, and a one-to-one correspondence link connection is established between the sub-groups and the devices; based on the number of devices marked by the current sub-group in the first end node, the current sub-group is split into a corresponding number of devices, and each device after the split of the first end node is established with the second end node. A link connection of a device, wherein the first device is a device in the second end node that establishes a one-to-one connection with the current sub-group, and / or, based on the number of groups marked by the current group in the first end node, the current group is split into a corresponding number of sub-groups, and based on the number of groups marked by the current group in the second end node, the current group is split into a corresponding number of sub-groups, and a one-to-one correspondence link is established between the sub-groups in the first end node and the sub-groups in the second end node; based on the number of devices marked by the current first sub-group in the first end node, the current first sub-group is split into a corresponding number of devices, and based on the number of devices marked by the current second sub-group in the second end node, the current second sub-group is split into a corresponding number of devices, wherein the first sub-group and the second sub-group are in a link connection relationship; a link connection is established between each device in the current first sub-group and all devices in the current second sub-group.
[0066] The fourth drawing type designed in the embodiment of the present invention is applied in the scenario where the number of groups and / or the number of devices marked by the two end nodes are the same, that is, the two end nodes of the line are connected in a one-to-one corresponding link connection relationship, which includes at least three drawing scenarios. The first drawing scenario is as follows: Figure 17 As shown, the first end and the second end are both aggregation nodes of the same device, that is, the number of devices marked by the current device in the first end node is consistent with the number of devices marked by the current device in the second end node. First, the current device can be split into a corresponding number of devices based on the number of devices marked by the current device in the first end node, and the current device in the second end node can be split into a corresponding number of devices, and then a link connection between the two end devices is established based on a one-to-one connection method; the second scenario is as follows Figure 18As shown, the first end node is a device group, and the second end node is an aggregation of devices. First, based on the number of groups marked by the current group in the first end node, the current group can be split into a corresponding number of sub-groups, and based on the number of devices marked by the current device in the second end node, the current device can be split into a corresponding number of devices, wherein the number of sub-groups is consistent with the number of devices in the second end node. Then, based on a one-to-one connection method, a link connection device can be established between each sub-group and each device in the second end node. Subsequently, based on the number of devices marked by the current sub-group, the current sub-group can be split into a preset number of devices, and a link connection between each device split by the first end node and the first device can be established respectively, wherein the first device is a device in the second end node that establishes a one-to-one corresponding connection with the current sub-group, for example only.
[0067] The third drawing scene is as follows Figure 19 As shown, the first end node and the second end node are both groups of devices, and the number of groups marked in the group at both end nodes is the same. First, based on the number of groups marked by the current group in the first end node, the current group can be split into a corresponding number of sub-groups, and the current group in the second end node can be split into a corresponding number of sub-groups. Then, a one-to-one link connection can be established between the sub-groups in the two end nodes. Subsequently, based on the number of devices marked by the current first sub-group in the first end node, the current first sub-group can be split into a corresponding number of devices, and based on the number of devices marked by the current second sub-group in the second end node, the current second sub-group can be split into a corresponding number of devices, wherein the first sub-group and the second sub-group are in a link connection relationship. Finally, a link connection can be established between each device in the current first sub-group and all devices in the current second sub-group, for example only.
[0068] Step S403: Generate a device link table based on the topology analysis result. Please refer to step S103 in the above embodiment and will not be repeated here.
[0069] In a specific embodiment, the target network topology diagram designed by the user is as follows: Figure 20 As shown, the corresponding target drawing type is the first drawing type (including at least five drawing scenes, aggregating and grouping devices), and the computer device analyzes the target network topology diagram based on the first drawing type to obtain the following: Figure 21 The link connection topology diagram between single devices shown in the figure includes a line connecting each service access switch to two out-of-band management access switches, a peer line connecting each two service access switches, each server connected to two service access switches, and a peer line between the two service switches. Each spy access switch can connect to 6 cloud computer-computing servers. Alternatively, the target network topology designed by the user is shown in the figure below. Figure 22As shown, the corresponding target drawing type is the third drawing type, that is, it is obtained by drawing the link connection relationship of the device ports in the nodes at both ends of the line. Then, the computer device can parse and process the target network topology based on the third drawing type, and obtain the following: Figure 21 The link connection topology diagram between the single devices shown in the figure, and the specific method of parsing the network topology diagram can be found in the above embodiment, which will not be repeated here. Comparing the simplified topology diagram with the parsed topology diagram, it can be seen that the number of nodes and links in the simplified topology diagram has been greatly reduced, which greatly simplifies the workload of drawing the topology diagram. Moreover, by using the designed drawing type on the computer, the simplified topology diagram can be restored to the link connection relationship between the single devices, and it is convenient to subsequently display the connection relationship between the nodes in the restored topology diagram in the form of a table.
[0070] In this embodiment, a network topology processing device is also provided. The device is used to implement the above-mentioned embodiments and preferred embodiments. The details already described will not be repeated here. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0071] This embodiment provides a network topology processing device, such as Figure 23 As shown, it includes: a topology map acquisition module 2301, which is used to obtain a target network topology map drawn by a user and a target drawing type applied to draw the target network topology map, wherein the target drawing type is one of multiple drawing types, the first drawing type indicates the grouping or aggregation relationship between devices, the second drawing type indicates the link connection relationship of the nodes at both ends of the connection being fully interconnected, the third drawing type indicates the link connection relationship of the device ports in the nodes at both ends of the connection being interconnected, and the fourth drawing type indicates the link connection relationship of the nodes at both ends of the connection being interconnected in a one-to-one manner, and the nodes include single devices, and / or groups of the same devices, and / or aggregations of the same devices; a topology parsing module 2302, which is used to parse the target network topology map based on the target drawing type to obtain a topology parsing result; and a device link table generation module 2303, which is used to generate a device link table according to the topology parsing result.
[0072] In some optional embodiments, when the target drawing type is the first drawing type, the topology parsing module 2302 includes: a first device splitting unit, used to split the current group into a corresponding number of devices based on the number of devices marked in the current group, and / or, a second device splitting unit, used to split the current group into a corresponding number of sub-groups based on the number of groups and the number of devices marked in the current group, and split each sub-group into a corresponding number of devices, wherein the device content of the sub-group is consistent with the device content of the current group, and / or, a third device splitting unit, used to split the current device into a corresponding number of devices based on the number of devices marked in the current device.
[0073] In some optional embodiments, when the target drawing type is the second drawing type, the topology parsing module 2302 includes: a third device splitting unit, used to split the current device into a corresponding number of devices based on the number of devices marked by the current device, and / or, a first device splitting unit, used to split the current group into a corresponding number of devices based on the number of devices marked by the current group, and / or, a second device splitting unit, used to split the current group into a corresponding number of sub-groups based on the number of groups and the number of devices marked by the current group, and split each sub-group into a corresponding number of devices, wherein the device content of the sub-group is consistent with the device content of the current group; a link connection unit, used to establish a link connection in which all devices in the first end and the second end are fully interconnected according to the link connection relationship in which the nodes at both ends of the line are fully interconnected and the link type of the nodes at both ends in the target network topology diagram.
[0074] In some optional embodiments, when the target drawing type is the third drawing type, the first end node includes multiple network device ends, and the second end node includes multiple server device ends, the topology parsing module 2302 includes: based on the number of devices marked by the current network device in the first end node, splitting the current network device into a corresponding number of network devices, and based on the number of devices marked by the current server device in the second end node, splitting the current server device into a corresponding number of server devices; based on the link type of the port connection of the two end devices, establishing a link connection between the server device with an unconnected port in the second end node and the port of the network device with a connectable port in the first end node, and / or, based on the number of groups marked by the current network group in the first end node, splitting the current network group into a corresponding number of sub-networks Device grouping, and based on the number of devices marked by the current server device in the second end node, splitting the current server device into a corresponding number of server devices; based on the link type of the link connection between the ports of the devices at both ends, establishing a link connection between the server devices with unconnected ports in the second end node and the sub-network device group with connectable ports in the first end node, wherein the number of connection ports of the sub-network device group is consistent with the number of connectable ports of any network device in the sub-network device group; based on the number of devices marked in the current sub-network device group, splitting the current sub-network device group into a corresponding number of devices; establishing a link connection between the ports of the current device in the current sub-network device group and the first server device set, the first server device set being all server devices that have established link connections with the current sub-network device group.
[0075] In some optional embodiments, when the target drawing type is the fourth drawing type, the number of groups and / or the number of devices respectively marked in the two end nodes are consistent, and the topology parsing module 2302 includes: based on the number of devices marked by the current device, splitting the current devices in the two end nodes into a corresponding number of devices, and establishing a one-to-one correspondence between the two end devices. Link connections, and / or, based on the number of groups marked by the current group in the first end node, splitting the current group into a corresponding number of sub-groups, and based on the number of devices marked by the current device in the second end node, splitting the current device into a corresponding number of devices, and establishing a one-to-one correspondence between the sub-groups and the devices; based on the number of devices marked by the current sub-group in the first end node, splitting the current sub-group into a corresponding number of devices, and establishing a link connection between each device after the first end node is split and the first device. Then, the first device is a device in the second end node that establishes a one-to-one connection with the current sub-group, and / or, based on the number of groups marked by the current group in the first end node, the current group is split into a corresponding number of sub-groups, and based on the number of groups marked by the current group in the second end node, the current group is split into a corresponding number of sub-groups, and a one-to-one correspondence link is established between the sub-groups in the first end node and the sub-groups in the second end node; based on the number of devices marked by the current first sub-group in the first end node, the current first sub-group is split into a corresponding number of devices, and based on the number of devices marked by the current second sub-group in the second end node, the current second sub-group is split into a corresponding number of devices, wherein the first sub-group and the second sub-group are in a link connection relationship; each device in the current first sub-group is connected to all devices in the current second sub-group.
[0076] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0077] The network topology processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0078] The embodiment of the present invention also provides a computer device having the above Figure 23 The network topology diagram processing device shown.
[0079] See also Figure 24 , Figure 24 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 24As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 24 A processor 10 is taken as an example.
[0080] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0081] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0082] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0083] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0084] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0085] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0086] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0087] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A network topology processing method, characterized in that: The method comprises: Obtaining a target network topology map drawn by a user and a target drawing type used for drawing the target network topology map, wherein the target drawing type is one of multiple drawing types: a first drawing type indicates a grouping or aggregation relationship between devices; a second drawing type indicates a link connection relationship in which nodes at both ends of a connection are fully interconnected; a third drawing type indicates a link connection relationship in which device ports in nodes at both ends of a connection are interconnected; and a fourth drawing type indicates a link connection relationship in which nodes at both ends of a connection are interconnected in a one-to-one manner. The nodes include single devices, and / or groups of identical devices, and / or aggregations of identical devices; Based on the target drawing type, the target network topology graph is parsed to obtain a topology parsing result; A device link table is generated according to the topology analysis result.
2. The method according to claim 1, characterized in that When the target drawing type is the first drawing type, the parsing process of the target network topology graph based on the target drawing type includes: Split the current group into a corresponding number of devices based on the number of devices marked in the current group, and / or Based on the number of groups and the number of devices marked in the current group, split the current group into a corresponding number of subgroups, and split each subgroup into a corresponding number of devices, wherein the device content of the subgroups is consistent with the device content of the current group, and / or, Based on the number of devices marked by the current device, the current device is split into a corresponding number of devices.
3. The method according to claim 1, characterized in that When the target drawing type is the second drawing type, the parsing process of the target network topology graph based on the target drawing type includes: Based on the number of devices marked by the current device, split the current device into a corresponding number of devices, and / or, Split the current group into a corresponding number of devices based on the number of devices marked in the current group, and / or Based on the number of groups and the number of devices marked in the current group, split the current group into a corresponding number of subgroups, and split each subgroup into a corresponding number of devices, wherein the device content of the subgroups is consistent with the device content of the current group; According to the link connection relationship of the fully interconnected nodes at both ends of the connection and the link type of the nodes at both ends in the target network topology diagram, a link connection is established in which all devices at the first end and the second end are fully interconnected.
4. The method according to claim 1, wherein When the target drawing type is the third drawing type, the first end node includes a plurality of network device ends, and the second end node includes a plurality of server device ends. The parsing process of the target network topology diagram based on the target drawing type includes: Splitting the current network device into a corresponding number of network devices based on the number of devices marked by the current network device in the first end node, and splitting the current server device into a corresponding number of server devices based on the number of devices marked by the current server device in the second end node; Based on the link type of the port connection of the devices at both ends, a link connection is established between the server device with an unconnected port in the second end node and a port of the network device with a connectable port in the first end node, and / or Splitting the current network group into a corresponding number of sub-network device groups based on the number of groups marked by the current network group in the first end node, and splitting the current server device into a corresponding number of server devices based on the number of devices marked by the current server device in the second end node; Based on the link type of the port connection between the devices at both ends, establish a link connection between the server device with no connected ports in the second end node and the sub-network device group with connectable ports in the first end node, wherein the number of connected ports in the sub-network device group is consistent with the number of connectable ports of any network device in the sub-network device group; Based on the number of devices marked in the current sub-network device group, split the current sub-network device group into a corresponding number of devices; A link connection is established between the port of the current device in the current sub-network device group and a first set of server devices, where the first set of server devices is all server devices that have established link connections with the current sub-network device group.
5. The method according to claim 1, wherein When the target drawing type is the fourth drawing type, the number of groups and / or the number of devices marked in the two end nodes are consistent. The parsing process of the target network topology diagram based on the target drawing type includes: Based on the number of devices marked by the current device, the current devices in the nodes at both ends are split into a corresponding number of devices, and a one-to-one link connection is established between the devices at both ends, and / or, Splitting the current group into a corresponding number of subgroups based on the number of groups marked by the current group in the first end node, and splitting the current device into a corresponding number of devices based on the number of devices marked by the current device in the second end node, and establishing a one-to-one correspondence link connection between the subgroups and the devices; Based on the number of devices marked in the current subgroup in the first end node, the current subgroup is split into a corresponding number of devices, and a link connection is established between each device after the first end node is split and the first device, where the first device is a device in the second end node that has a one-to-one connection with the current subgroup, and / or Splitting the current packet into a corresponding number of sub-packets based on the number of packets marked by the current packet in the first end node, and splitting the current packet into a corresponding number of sub-packets based on the number of packets marked by the current packet in the second end node, and establishing a one-to-one correspondence between the sub-packets in the first end node and the sub-packets in the second end node; Splitting the current first subgroup into a corresponding number of devices based on the number of devices marked in the current first subgroup in the first end node, and splitting the current second subgroup into a corresponding number of devices based on the number of devices marked in the current second subgroup in the second end node, wherein the first subgroup and the second subgroup are in a link connection relationship; Establish a link connection between each device in the current first subgroup and all devices in the current second subgroup.
6. A network topology processing device, characterized in that: The device comprises: a topology map acquisition module, configured to acquire a target network topology map drawn by a user and a target drawing type used for drawing the target network topology map, wherein the target drawing type is one of multiple drawing types: a first drawing type indicating a grouping or aggregation relationship between devices; a second drawing type indicating a link connection relationship in which nodes at both ends of a connection are fully interconnected; a third drawing type indicating a link connection relationship in which device ports in nodes at both ends of a connection are interconnected; and a fourth drawing type indicating a link connection relationship in which nodes at both ends of a connection are interconnected in a one-to-one manner. The nodes include single devices, and / or groups of identical devices, and / or aggregations of identical devices; A topology parsing module is used to parse the target network topology map based on the target drawing type to obtain a topology parsing result; The device link table generating module is used to generate a device link table according to the topology analysis result.
7. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the network topology graph processing method according to any one of claims 1 to 5 by executing the computer instructions.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the network topology graph processing method according to any one of claims 1 to 5.
9. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the network topology graph processing method according to any one of claims 1 to 5.