A method, device and electronic device for generating network routing links
By building and updating the network routing link set, the problem of network routing link accuracy caused by inconsistent NetFlow data is solved, the integrity and accuracy of the network topology is improved, and the reliability of routing link generation between network devices is ensured. .
Patent Information
- Application Number
- CN202310199248.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2043-02-28
AI Technical Summary
When the existing technology generates network routing links, due to the inconsistency and incompleteness of NetFlow data, the accuracy and integrity of network topology generation are affected, and it is difficult to cope with the problem of insufficient data reliability and integrity.
By constructing a network routing link set based on the NetFlow data under the network topology architecture according to the order of data flow time and link node information, determining the next hop node of the routing node, traversing the node sets of other routing nodes, and updating the target route links until all routing nodes are determined to improve the integrity and accuracy of network routing links.
It achieves the accurate determination and supplement of network routing links between network devices, improves the integrity and accuracy of network routing links, and ensures the reliability and comprehensiveness of the generated network topology.
Smart Images

Figure CN116192723B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device and electronic device for generating a network routing link. Background Art
[0002] NetFlow data shows the network traffic information collected by each network device. Generally, the independent NetFlow data collected by multiple network devices are integrated to generate network routing links between devices, and then generate network topology, presenting information such as the topological status and network traffic trend between network devices.
[0003] However, due to the time dimension of data collection and the data collection capabilities, status and unknowns of the actual network environment, the NetFlow data information collected by network devices often contains inconsistent or incomplete information, which will directly affect the accuracy of the generation of network routing links between network devices, and thus affect the actual effect of network topology generation.
[0004] Therefore, how to improve the accuracy of network routing links is a question worth discussing. Summary of the invention
[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for generating a network routing link, which are used to improve the accuracy and integrity of the network routing link.
[0006] In a first aspect, an embodiment of the present application provides a method for generating a network routing link, comprising:
[0007] According to the NetFlow data under the network topology, a network routing link set is constructed according to the sequence of data flow time and link node information. The source IP address and destination IP address of any network routing link in the network routing link set are the same, and the link node information includes the next hop node of the routing node under the network topology;
[0008] According to the network routing link set, a routing set and multiple node sets are constructed, wherein the routing set includes multiple routing nodes in the network routing link set, each routing node corresponds to a node set, and each node set includes a corresponding routing node and a next hop node of the routing node;
[0009] Select any routing node from the determined target routing link as the target node, determine a sub-target node according to the node set of the target node, the target routing link is a network routing link with the largest number of nodes among multiple network routing links determined with each routing node in the network routing link set as the first hop node, and the sub-target node includes a next hop node of the target node;
[0010] When there are other routing nodes besides the target node and the sub-target node in the routing set, the node sets of other routing nodes are traversed, and when the node sets of other routing nodes meet the preset conditions, the target routing link is updated until all routing nodes in the target routing link are determined as target nodes.
[0011] In the above method, a network routing link set is generated through NetFlow data, and the network routing links between network devices can be accurately determined. Then, by analyzing the network routing link set, the routing node of the target routing link is used as the target node, and it is determined whether there are other routing nodes that meet the preset conditions, and the target routing link is updated to supplement the target routing link, thereby updating the target routing link, making the routing nodes included in the target routing link more complete and comprehensive, and improving the integrity and accuracy of the network routing link.
[0012] Optionally, based on the NetFlow data in the network topology architecture, a network routing link set is constructed according to the sequence of data flow time and the next hop IP information, including:
[0013] Get NetFlow data;
[0014] Parse NetFlow data to obtain link node information;
[0015] According to the sequence of data flow time and the next hop IP information, a sub-network routing link set is constructed, and the source IP address and the destination IP address corresponding to each network routing link in the sub-network routing link set are the same or opposite;
[0016] A network routing link set is constructed according to the sub-network routing link set.
[0017] In the above method, by parsing NetFlow data, a sub-network routing link set is obtained, which can have a higher analysis pertinence, and facilitate the subsequent generation of a network routing link set based on the sub-network routing link set.
[0018] Optionally, a network routing link set is constructed according to the sub-network routing link set, specifically including:
[0019] Compare the routing directions of the network routing links in the sub-network routing link set with the preset routing directions, and determine the network routing links that do not conform to the preset routing directions;
[0020] Reversing the routing direction of network routing links that do not conform to the preset routing direction;
[0021] The network routing links that conform to the preset routing direction are combined with the network routing links after the routing direction is reversed to obtain a network routing link set.
[0022] In the above method, by unifying the routing direction, a set of network routing links with the same routing direction is obtained, thereby ensuring the consistency of the routing directions of the network routing links and further ensuring the correctness and comprehensiveness of the subsequently generated network routing links.
[0023] Optionally, a routing set and multiple node sets are constructed according to the network routing link set, specifically including:
[0024] According to the network routing link set, the next hop node of the routing node is determined, and a routing set and multiple node sets are constructed.
[0025] In the above method, since the routing direction of each network routing link in the network routing link set is the same, constructing a node set for each routing node based on the next hop node of each routing node in the network routing link set can further ensure the accuracy of the subsequent generation of network routing links.
[0026] Optionally, any routing node is selected from the determined target routing link as the target node, and a sub-target node is determined according to the node set of the target node, specifically including:
[0027] Select any routing node from the target routing link as the target node and store it in a preset first sequence;
[0028] Determine the child target node according to the node set of the target node;
[0029] When there are other routing nodes in the routing set besides the target node and the sub-target node, the node sets of other routing nodes are traversed, specifically including:
[0030] When there are other routing nodes other than the target node and the sub-target node in the routing set, traverse the node sets of other routing nodes;
[0031] When the node sets of other routing nodes meet the preset conditions, the other routing nodes are stored in the elements of the first sequence of the target node.
[0032] In the above method, by storing other routing nodes that meet the preset conditions into the elements of the target node in the first sequence, the first sequence can collect the routing nodes that are missed in the network routing link, making the routing nodes included in the first sequence more complete. It is convenient to arrange the node information through the first sequence in the future to generate a more accurate and comprehensive network routing link.
[0033] Optionally, when the node set of other routing nodes meets a preset condition, the other routing nodes are stored in the elements of the first sequence of the target node, and after the target routing link is updated, the method further includes:
[0034] Arrange all the elements in the first sequence to obtain the second sequence;
[0035] Starting from the first element of the second sequence, the next elements in the second sequence are traversed in sequence until there is no more readable element in the next element, and one or more network routing links that are possible from the source IP address to the destination IP address are generated.
[0036] In the above method, the second sequence is obtained by fully arranging the elements in the first sequence. This facilitates the subsequent faster generation of the target routing link and saves resources. By traversing the elements in the second sequence in sequence, all possible network routing links from the source IP address to the destination IP address are obtained, which can prevent the omission of routing nodes, thereby generating a complete and comprehensive network routing link, greatly improving the integrity and accuracy of the network routing link generation.
[0037] In a second aspect, an embodiment of the present application provides a device for generating a network routing link, including:
[0038] The processing module is used to construct a network routing link set according to the NetFlow data under the network topology architecture, in accordance with the sequence of data flow time and link node information, wherein the source IP address and the destination IP address of any network routing link in the network routing link set are the same, and the link node information includes the next hop node of the routing node under the network topology architecture;
[0039] The processing module is further used to construct a routing set and multiple node sets according to the network routing link set, the routing set includes multiple routing nodes in the network routing link set, each routing node corresponds to a node set, and each node set includes a corresponding routing node and a next hop node of the routing node;
[0040] A determination module is used to select any routing node from the determined target routing link as the target node, and determine a sub-target node according to the node set of the target node, the target routing link being the network routing link with the largest number of nodes among multiple network routing links determined with each routing node in the network routing link set as the first hop node, and the sub-target node includes the next hop node of the target node;
[0041] The processing module is also used to traverse the node sets of other routing nodes when there are other routing nodes besides the target node and the sub-target node in the routing set, and update the target routing link when the node sets of other routing nodes meet the preset conditions, until all routing nodes in the target routing link are determined as target nodes.
[0042] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the processor implements any one of the methods for generating a network routing link in the first aspect described above.
[0043] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method for generating a network routing link of the first aspect is implemented.
[0044] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, which is executed by a processor to implement a method for generating a network routing link as described in any one of the first aspects above.
[0045] The technical effects brought about by any one of the implementation methods in the second to fifth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of an application scenario of a method for generating a network routing link provided in an embodiment of the present application;
[0047] Figure 2 A flow chart of a method for generating a network routing link provided in an embodiment of the present application;
[0048] Figure 3a A schematic diagram of a network routing link provided in an embodiment of the present application;
[0049] Figure 3b A schematic diagram of another network routing link provided in an embodiment of the present application;
[0050] Figure 3c A schematic diagram of another network routing link provided in an embodiment of the present application;
[0051] Figure 4 A flowchart of another method for generating a network routing link provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of a device for generating a network routing link provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0055] The application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems. In the description of the present application, unless otherwise specified, the meaning of "multiple" is two or more.
[0056] NetFlow is a network monitoring function that can collect the number and information of Internet Protocol (IP) packets entering and leaving the network interface. It was first developed by Cisco and applied to products such as routers and switches. By analyzing the information collected by NetFlow, network administrators can know such things as the source and destination of traffic, the types of network services, and the causes of network congestion.
[0057] NetFlow data shows the network traffic information collected by each routing device. Generally, the independent NetFlow data collected by multiple routing devices are integrated to generate network routing links between devices, and then generate network topology, presenting information such as the topological status and network traffic trend between network devices.
[0058] At present, as a key step in network topology generation, the existing methods for generating network routing links between devices are mostly based on NetFlow data information, or Simple Network Management Protocol (SNMP), Address Resolution Protocol (ARP) or Internet Control Message Protocol (ICMP) and other protocols. These existing methods usually build routing links and generate network topology based on single and specific data between devices, but there is little research on the reliability and integrity of current data.
[0059] Due to the time dimension of data collection and the data collection capabilities, status and unknowns of the actual network environment, the NetFlow data information collected by multiple network devices often has inconsistent or incomplete information. These situations will directly affect the accuracy of routing link generation between network devices, and thus lead to the actual effect of network topology generation. Conventional network link generation and network topology generation methods are difficult to cope with these objective situations.
[0060] If the reliability and integrity of the current data are not considered and necessary data research is not carried out, the accuracy of the generated routing links will be greatly reduced when the data reliability or integrity is insufficient, which will lead to a significant decrease in the integrity and reliability of the generated network topology. How to improve the integrity and accuracy of network routing link generation is a question worth discussing.
[0061] In order to solve the above problems, the embodiments of the present application provide a network routing link generation method, device and electronic device. For example, according to the NetFlow data under the network topology architecture, a network routing link set is constructed according to the sequence of data flow time and link node information. Among them, the source IP address and destination IP address of any network routing link in the network routing link set are the same. The link node information includes the next hop node of the routing node under the network topology architecture. According to the network routing link set, a routing set and multiple node sets are constructed. Among them, the routing set includes multiple routing nodes in the network routing link set. Each routing node corresponds to a node set. Each node set includes a corresponding routing node and the next hop node of the routing node. Select any routing node as the target node from the determined target routing link, and determine the sub-target node according to the node set of the target node. Among them, the target routing link is the network routing link with the largest number of nodes among the multiple network routing links determined with each routing node in the network routing link set as the first hop node. The sub-target node includes the next hop node of the target node. When there are other routing nodes besides the target node and the sub-target node in the routing set, the node sets of other routing nodes are traversed, and when the node sets of other routing nodes meet the preset conditions, the target routing link is updated until all routing nodes in the target routing link are determined as target nodes.
[0062] In this way, based on the NetFlow data collected in the current network environment, a network routing link set is generated. The network routing links between network devices can be accurately determined. Even if the deployment of the NetFlow collection equipment is not complete and the reliability and integrity of the NetFlow data are unknown. By analyzing the network routing link set, the arrangement planning of routing nodes can be realized and the target routing link can be updated. In this way, a complete and comprehensive network routing link is generated, which greatly improves the integrity and accuracy of the network routing link generation.
[0063] like Figure 1 As shown, a schematic diagram of an application scenario of an optional network routing link generation method of an embodiment of the present application includes a server 100 and a terminal 101. The server 100 and the terminal 101 can be communicably connected through a network to implement the network routing link generation method of the present application.
[0064] The user can use the server 100 to interact with the terminal 101 through the network, such as receiving or sending messages, etc. Various client applications can be installed on the terminal 101, such as program writing applications, web browser applications, search applications, etc.
[0065] It is understandable that the network routing link generation method provided in the embodiment of the present application can be executed by the server 100 or by the terminal 101. In the embodiment of the present application, the server 100 can be implemented as an independent server or a server cluster composed of multiple servers. The terminal 101 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, desktop computers, etc.
[0066] like Figure 2 As shown, a flow chart of a network routing link generation method provided in an embodiment of the present application may specifically include the following steps. Figure 2 In the illustrated embodiment, the network routing link generation method described above is performed by taking the server as an example.
[0067] S201. Construct a network routing link set according to NetFlow data in a network topology architecture, in accordance with the sequence of data flow time and link node information.
[0068] The source IP address and the destination IP address of any network routing link in the network routing link set are the same. The link node information includes the next hop node of the routing node in the network topology.
[0069] In an optional embodiment, the server may obtain NetFlow data from multiple network devices in a network topology architecture, wherein the network devices may be switches, routing devices, and gateway firewalls.
[0070] For example, by deploying a NetFlow data collector on a network device, the NetFlow data passing through the network device can be collected.
[0071] In a possible situation, the NetFlow data collected by the network device can also be sent to the NetFlow data collection device at a regular interval. The server obtains the NetFlow data from the NetFlow data collection device.
[0072] In an optional embodiment, after obtaining NetFlow data, the server can obtain link node information by parsing the NetFlow data. Optionally, the server can also obtain binary information by parsing the NetFlow data. The binary information includes a source IP address and a destination IP address.
[0073] Since the network routing links between network devices are usually only directly related to the source IP address and the destination IP network address, this application can determine multiple network routing links between two network devices by parsing NetFlow data to obtain tuple information and link node information.
[0074] Compared with the prior art method of obtaining five-tuple information and next-hop IP information by parsing NetFlow data, the present application can determine the method of multiple network routing links between two network devices by parsing NetFlow data to obtain two-tuple information, saving resources, preventing resource waste, and improving the efficiency of generating network routing links.
[0075] Optionally, after obtaining the link node information, the server can construct a sub-network routing link set according to the time sequence of the data flow and the next hop node included in the link node information, wherein the source IP address of each network routing link in the sub-network routing link set is the same as or opposite to the destination IP address.
[0076] Due to the time division dimension of data collection, device characteristics, device interaction, and network environment, the network routing link generated based on the binary usually contains two directions. Therefore, the server can unify the routing direction of the network routing link to ensure the consistency of the routing direction of the network routing link, and further ensure the correctness and comprehensiveness of the subsequent generation of the network routing link.
[0077] It is understandable that the preset routing direction in the embodiment of the present application may be preset by those skilled in the art, and the preset routing direction may be reasonably set according to a specific application scenario.
[0078] In an optional embodiment, the server can determine the routing direction of the network routing link by the source IP address and the destination IP address of the network routing link. The server can compare the routing direction of the network routing link in the sub-network routing link set with the preset routing direction to determine the network routing link that does not conform to the preset routing direction. Determine the network routing link that does not conform to the preset routing direction in the sub-network main routing link set. The server turns the above-mentioned network routing link that does not conform to the preset routing direction. Then merge the network routing link that conforms to the preset routing direction and the turned network routing link to obtain a network routing link set. Among them, the source IP address and the destination IP address of each network routing link in the network routing link set are the same.
[0079] For example, Figure 3a As shown in FIG. 1 , assuming that there is communication traffic between device A and device B, the sub-network routing link set constructed by the server includes two cases: the network routing link from device A to device B and the network routing link from device B to device A. Figure 3b As shown in the figure, it is assumed that the route direction from device A to device B is the preset route direction. For the network route link Rm numbered m, it is assumed that the route direction of the network route link information Rm is from device B to device A. The route devices along which Rm passes include E1, E2, E3, and E4 in sequence. After the route direction is reversed according to the preset direction, the arrangement order of the route devices recorded in the network route link information Rm will be inverted, and the inverted order is recorded as -Rm. Figure 3c As shown, the routing devices in the Rm path include E4, E3, E2, and E1 in sequence.
[0080] In the above method, the network routing links that do not conform to the preset direction are turned so that the routing directions of the network routing links in the network routing link set are the same, thereby ensuring the direction consistency of the network routing links. This facilitates the subsequent faster update of the target network routing link according to the network routing link set, thereby ensuring the correctness and comprehensiveness of the network routing link prediction.
[0081] S202: Construct a routing set and multiple node sets according to the network routing link set.
[0082] The routing set includes multiple routing nodes in the network routing link set, each routing node corresponds to a node set, and each node set includes the corresponding routing node and the next hop node of the routing node.
[0083] In a possible embodiment, the server can determine multiple routing nodes in the network routing link set according to the network routing link set, and construct a routing set. For example, the N network routing link information generated between device A and device B are R1, R2...Rn respectively. Rn can be a sequential arrangement of any multiple routing nodes in the routing set E. Assume that the routing nodes between device A and device B include E1, E2, E3, E4, E5, E6, E7, that is, the routing set E = {E1, E2, E3, E4, E5, E6, E7}. Then the network routing link information R1, R2, R3 can be R1 = {E1, E2, E3, E4, E5}, R2 = {E6, E2, E3, E4}, R2 = {E2, E3, E7, E4}.
[0084] In a possible embodiment, the server can construct a node set of each routing node according to the next hop node of each routing node in the above network routing link set. It is understandable that a routing node without a next hop node is the routing node in the destination IP address.
[0085] For example, the server can store the node set of the routing node in the form of a key-value pair. The key is the routing node, and the value is the next hop node of the routing node. Assuming E1: [E2], the next hop node of E1 includes E2. Assuming E2: [E3], the next hop node of E2 includes E3. Assuming E3: [E4, E7], the next hop node of E3 includes E4 and E7. Assuming E4: [E5], the next hop node of E4 includes E5. Assuming E5: [], E5 does not include a next hop node. Assuming E6: [E2], the next hop node of E6 includes E2. Assuming E7: [E4], the next hop node of E7 includes E4.
[0086] In the above method, since the routing direction of each network routing link in the network routing link set is the same, constructing a node set for each routing node based on the next hop node of each routing node in the network routing link set can further ensure the accuracy of the subsequent generation of network routing links.
[0087] In another possible embodiment, the server may also construct a node list based on a set of network routing links. The node list includes multiple node sets. The node sets may be stored in the node list in the form of key-value pairs. The key is the routing node, and the value is the next hop node of the routing node. For example, assume that the node list may be {E1:[E2], E2:[E3], E3:[E4, E7], E4:[E5], E5:[], E6:[E2], E7:[E4]}. The next hop node of E1 includes E2. The next hop node of E2 includes E3. The next hop node of E3 includes E4 and E7. The next hop node of E4 includes E5. E5 does not include a next hop node. The next hop node of E6 includes E2. The next hop node of E7 includes E4.
[0088] S203: Select any routing node from the determined target routing link as the target node, and determine a sub-target node according to the node set of the target node.
[0089] The target routing link is a network routing link with the largest number of nodes among multiple network routing links determined by taking each routing node in the network routing link set as the first hop node. The sub-target node includes the next hop node of the target node.
[0090] Optionally, among multiple network routing links determined with each routing node in the network routing link set as the first hop node, if there are multiple network routing links with the largest number of nodes, the server may select any one of the network routing links as the target routing link.
[0091] In a possible embodiment, after obtaining the above-mentioned multiple node sets, the server may determine multiple network routing links based on the above-mentioned multiple node sets, using each routing node as a first hop node in the network routing link.
[0092] It is understandable that, since the above multiple node sets are determined based on the network routing link set, and the routing direction of each network routing link in the network routing link set is the same, the routing directions of the multiple network routing links determined by using each routing node as the first hop node in the network routing link are the same.
[0093] For example, the server can use each routing node as the first hop node, and build multiple network routing links according to the node next hop node set of each routing node. Assume that the node list can be {E1: [E2], E2: [E3], E3: [E4, E7], E4: [E5], E5: [], E6: [E2], E7: [E4]}. Among them, the next hop node of E1 includes E2. The next hop node of E2 includes E3. The next hop node of E3 includes E4 and E7. The next hop node of E4 includes E5. E5 does not include a next hop node. The next hop node of E6 includes E2. The next hop node of E7 includes E4. Then the server can use E1 as the first hop node, and traverse the next hop node E2, the next hop node E3 of E2, the next hop node E4 of E3, and the next hop node E5 of E4 in sequence. Since E5 has no next hop node, the traversal stops at E5. Get the network routing links [E1, E2, E3, E4, E5].
[0094] In the above method, based on the node set of the routing node, the next hop node of the routing node is traversed to generate multiple network routing links with each routing node as the first hop node. The network routing link with the largest number of nodes is selected from the above multiple network routing links as the target routing link as the basis for prediction, so as to facilitate the subsequent faster prediction of the network routing link between the source IP address and the destination IP address.
[0095] In an optional embodiment, the server may store the target node in a first sequence. It is understandable that the sequence may be an ordered sequence such as a list, a tuple, a string, etc. This application does not specifically limit this. For example, the server may store the nodes included in the target routing link as target nodes in a preset first list.
[0096] In the above method, by storing the target node in the first sequence, it is convenient to subsequently arrange the node information through the first sequence to generate a new network routing link.
[0097] After determining the target node, the server can determine the node set of the target node. The server determines the sub-target node corresponding to the target node based on the node set of the target node.
[0098] S204. When there are other routing nodes besides the target node and the sub-target node in the routing set, traverse the node sets of other routing nodes, and when the node sets of other routing nodes meet the preset conditions, update the target routing link until all routing nodes in the target routing link are determined as target nodes.
[0099] In an optional embodiment, the server may store the target node in the first sequence. In the case where there are other routing nodes other than the sub-target node in the routing set, the server may determine the node set of the other routing nodes. In the case where the node set of the other routing nodes does not meet the preset conditions, the server may use the other routing nodes in the target routing link as the target nodes, and return to execute to store the target nodes in the first list. In the case where the node set of the other routing nodes meets the preset conditions, the other routing nodes are stored in the elements of the first sequence of the target node, and the target routing link is updated.
[0100] The preset conditions may include the following conditions:
[0101] Condition 1. When and and
[0102] Condition 2. When and
[0103] Wherein, L0[i] represents the node set of i in the node list L0. i represents the target node. j represents other routing nodes in the routing set except the sub-target node. L0[j] represents the node set of other routing nodes in the node list L0.
[0104] Optionally, the server may also determine sub-target nodes by taking the routing nodes as target nodes in turn according to the order of the routing nodes in the target routing link, and determine whether there are other routing nodes that meet the preset conditions.
[0105] Optionally, since the node list can store routing nodes and node sets of routing nodes in the form of key-value pairs. Therefore, the key in the key-value pair in the node list includes multiple routing nodes in the network routing link set. Therefore, the server can also determine the node set of the above-mentioned other routing nodes when there are other routing nodes other than the sub-target node in the key included in the node list. In the case that the node set of other routing nodes does not meet the preset conditions, the server can use other routing nodes in the target routing link as target nodes, and return to execute to store the target node in the first list. In the case that the node set of other routing nodes meets the preset conditions, the above-mentioned other routing nodes are stored in the elements of the first sequence of the target node, and the target routing link is updated.
[0106] For example, assuming that the preconditions include 1. and and Condition 2. When and The node list can be {E1:[E2], E2:[E3], E3:[E4, E7], E4:[E5], E5:[], E6:[E2], E7:[E4]}. When E1 is the target node, the sub-target node corresponding to E1 is E2. Since the other routing nodes in the keys in the node list except the target node E1 and the sub-target node E2 include E3, E4, E5, E6, and E7. Therefore, the server can traverse the node sets of E3, E4, E5, E6, and E7 respectively. Determine whether the node sets of E3, E4, E5, E6, and E7 meet the preset conditions. Since the sub-target nodes E2 of E4 and E7 included in the E3 node set are different, it does not meet the requirements. Therefore, E3 does not meet the preset condition. Since E5 included in the E4 node set is different from the child target node E2 of E1, it does not meet Therefore, E4 does not meet the preset condition. Since the E5 node set does not include the child target node, it does not meet the Therefore, E5 does not meet the preset condition. Since E4 included in the E7 node set is different from the child target node E2 of E1, it does not meet Therefore, E7 does not meet the preset condition. Since the sub-target node E2 included in the E6 node set is the same as the sub-target node E2, and E6 does not belong to the sub-target node E2. Preset condition 1 is met, so E6 meets preset condition 1. The server can store E6 in the element of the first sequence of the target node E1 to obtain {[E1, E6]}.
[0107] In the above method, by storing other routing nodes that meet the preset conditions into the elements of the first sequence, the first sequence can collect the routing nodes that are missing in the network routing link, making the routing nodes included in the first sequence more complete. It is convenient to arrange the node information through the first sequence in the future to generate a more accurate and comprehensive network routing link.
[0108] After the target routing link is updated, some elements in the first sequence include not only the routing nodes in the target routing link, but also other routing nodes that meet the preset conditions when the routing node is used as the target node. That is, in the first sequence, some elements include multiple routing nodes. Therefore, in order to generate the target routing link more quickly and save resources later, the server can fully arrange the elements in the first sequence to obtain the second sequence.
[0109] For example, the server can perform a full permutation of all elements in the first sequence. Assume that the first sequence includes {[(E1), (E6)], [(E2)], [(E3)], [(E7)], [(E4)], [(E5)]}. Full permutation of [(E1), (E6)] can yield [(E1, E6), (E6, E1)]. Full permutation of [(E2)] can yield [(E2)]. All elements in the first sequence are permuted in turn until there is no readable element in the next element, resulting in a second sequence of {[(E1, E6), (E6, E1)], [(E2)], [(E3)], [(E7)], [(E4)], [(E5)]}.
[0110] Optionally, when the number of routing nodes included in an element is equal to 1, since the full permutation of one routing node is itself, in order to save computing resources, the server can determine whether full permutation is required based on the number of routing nodes included in the element. When the number of routing nodes included in an element is greater than 1, the server can perform full permutation on the element. When the number of routing nodes included in an element is equal to 1, the server may not perform full permutation.
[0111] For example, assume that the first sequence includes {[(E1), (E6)], [(E2)], [(E3)], [(E7)], [(E4)], [(E5)]}. The element [(E1), (E6)] exists in the form of a list and contains multiple routing nodes. Then, a full permutation of the element containing multiple routing nodes can be obtained to obtain [(E1, E6), (E6, E1)]. Since the number of routing nodes included in other elements is 1, the server does not need to perform a full permutation. Finally, the second sequence that the server can obtain is {[(E1, E6), (E6, E1)], [(E2)], [(E3)], [(E7)], [(E4)], [(E5)]}.
[0112] Since some elements in the second sequence contain multiple routing nodes, in order to prevent missing routing nodes, the server can start from the first element of the second sequence, traverse the next elements in the second sequence in sequence, and end when there is no readable element in the next element, and generate one or more possible network routing links from the source IP address to the destination IP address.
[0113] In an optional embodiment, when the server traverses each element in the second sequence, the server can perform a corresponding full permutation expansion. That is, assuming that the number of routing nodes of a certain element in the first sequence is K. Since the second sequence is obtained by performing a full permutation on the first sequence, the number of full permutations of the element in the second sequence is K!. The server can generate K! new sequences based on the above-mentioned number of full permutations K!, where K is a positive integer. Each full permutation of different orders in the K! full permutations corresponds to a new sequence.
[0114] For example, suppose the element in the first sequence is [(E1, E2, E3)]. The server performs a full permutation of the element, and in the second sequence the element becomes [(E1, E2, E3), (E1, E3, E2), (E2, E1, E3), (E2, E3, E1), (E3, E1, E2), (E3, E2, E1)]. When the server traverses the second sequence to the element, it determines that the number of full permutations of the above element is 3! It is 6. Six new sequences can be generated.
[0115] For another example, suppose the element in the first sequence is [(E1)], then the server performs a full permutation of the element, and the element in the second sequence is [(E1)]. When the server traverses the second sequence to the element, it determines that the full permutation of the element includes [(E1)]. That is, the number of full permutations of the element is 1! The server can generate a new sequence.
[0116] Assuming that the current number of sequences is M, the server can concatenate the elements in the M sequences with the routing nodes in the above K! new sequences to obtain M*K! generated new sequences. After obtaining M*K! generated new sequences, the server continues to traverse the next element in the second sequence in sequence until there is no readable element in the next element, and obtains multiple network routing links. Among them, the current number of sequences refers to the number of generated new sequences that the server has obtained in the process of traversing each element in the second sequence.
[0117] It can be understood that when the current sequence number M is 0, the number of new sequences generated is K!. For example, when traversing the first element in the second sequence, the current sequence number M is 0. Assume that the first element in the second sequence is [(E1, E2, E3)]. The total number of permutations of this element is 3!, which is 6. Then the server can generate 6 new sequences. After traversing the first sequence, K!, that is, 6 new sequences are generated.
[0118] The following example illustrates how to traverse the elements in the second sequence:
[0119] For example, suppose the first sequence includes {[(E1), (E6)], [(E2)], [(E3)], [(E7, (E8)], [(E4)], [(E5)]}. The server then arranges all elements in the first sequence to obtain a second sequence of {[(E1, E6), (E6, E1)], [(E2)], [(E3)], [(E8, E7), (E7, E8)], [(E4)], [(E5)]}. The server traverses the first element [(E1, E6), (E6, E1)], generating 2! new sequences, including [E1, E6] and [E6, E1]. The server traverses the next element [(E2)], generating 1! new sequence including [E2], and concatenates the two existing sequences [E1, E6] and [E6, E1] with [E2], respectively, to obtain the generated new sequences [E1, E6, E2] and [E6, E1, E2]. The server traverses the elements in the second sequence in turn until [(E3)], and obtains the generated new sequences [E1, E6, E2, E3] and [E6, E1, E2]. [E6, E1, E2, E3]. When the server traverses [(E8, E7), (E7, E8)], it generates 2 new sequences, including [E8, E7] and [E7, E8]. It also concatenates the two existing sequences [E1, E6, E2, E3] and [E6, E1, E2, E3] with the sequences [E8, E7] and [E7, E8] respectively. The generated sequences are [E1, E6, E2, E3, E8, E7, E4], [E1, E6, E2, E3, E7, E8, E4], The server continues to traverse the elements in the second sequence until there is no more readable elements in the next element, and obtains [E1, E6, E2, E3, E8, E7, E4, E5], [E1, E6, E2, E3, E7, E8, E4, E5], [E6, E1, E2, E3, E8, E7, E4, E5], and [E6, E1, E2, E3, E7, E8, E4, E5].
[0120] Optionally, after obtaining the network routing link, in order to facilitate subsequent analysis of the network routing link and construct the network topology, the server can also unify the generated one or more network routing links into the same format and store them in the third sequence. For example, the server can unify the above network routing links into other formats such as a data storage language that can be automatically read by a script.
[0121] The following is the application Figure 2 The embodiments in are given as examples:
[0122] For example, assuming that by parsing the NetFlow data under the network topology architecture, according to the order of data flow time and link node information, the node list in the network routing link set constructed is {E1: [E2], E2: [E3], E3: [E4, E7], E4: [E5], E5: [], E6: [E2], E7: [E4]}. The multiple network routing links determined by the server with each routing node in the network routing link set as the first hop node may include {[E1, E2, E3, E7, E4, E5], [E6, E2, E3, E7, E4, E5], [E1, E2, E3, E4, E5], ..., [E4, E5], [E5]}. The network routing links with the largest number of nodes include {[E1, E2, E3, E7, E4, E5], [E6, E2, E3, E7, E4, E5]}. The server can select any network routing link in the network routing link with the largest number of nodes, such as [E1, E2, E3, E7, E4, E5] as the target routing link. The server can store the routing nodes as target nodes in the first list in sequence according to the positions of the routing nodes in the target routing link. The server first stores E1 as the target node in the first list, and determines that the sub-target nodes of E1 include E2 through the node set of E1. In addition to E1 and E2, the keys included in the node list also include other routing nodes E3, E4, E5, E6, and E7. The server traverses the node sets of the above-mentioned other routing nodes E3, E4, E5, E6, and E7. When the node set of E6 meets the preset conditions, the server can store E6 in the elements of the target node E1 in the first list to obtain {[E1, E6]}.
[0123] The server then uses E2 as the new target node. Return to execute and store E2 in the first list. The server determines that the sub-target node of E2 includes E3 through the node list. In addition to E2 and E3, the keys included in the node list also include other routing nodes E1, E4, E5, E6, and E7. The server traverses the node set of E1, E4, E5, E6, and E7. When the server determines that the node set of E1, E4, E5, E6, and E7 does not meet the preset conditions, the server can use E3 as the new target routing node. Return to execute and store E3 in the first list. Until the routing node in the target routing link is determined as the target node. Get the first list {[(E1), (E6)], [(E2)], [(E3)], [(E7)], [(E4)], [(E5)]}.
[0124] The server can arrange all the elements in the first list to obtain the second list {[(E1, E6), (E6, E1)], [(E2)], [(E3)], [(E7)], [(E4)], [(E5)]}. After determining the second list, the server traverses the first element [(E1, E6), (E6, E1)] in the second list, stores (E1, E6) in the third list, and stores (E6, E1) in the fourth list. The server traverses the second element (E2) in the second list. The server stores (E2) in the third list and concatenates it with (E1, E6) to obtain (E1, E6, E2). The server stores (E2) in the fourth list and concatenates it with (E6, E1) to obtain (E6, E1, E2). The server traverses the third element (E3) in the second list. The server stores (E3) in the third list and concatenates it with (E1, E6, E2) to obtain (E1, E6, E2, E3). The server stores (E3) in the fourth list and concatenates it with (E6, E1, E2) to obtain (E6, E1, E2, E3). According to the above steps, the server traverses each element in the second list in turn until all elements in the second list are traversed. The new target routing links [E1, E6, E2, E3, E7, E4, E5] and [E6, E1, E2, E3, E7, E4, E5,] are obtained.
[0125] like Figure 4 As shown, the present application provides a flowchart of network routing link generation, including the following steps:
[0126] S401, obtaining NetFlow data;
[0127] S402, parsing NetFlow data to obtain link node information;
[0128] S403, constructing a sub-network routing link set according to the time sequence of the data streams and the next hop IP information;
[0129] S404, comparing the routing directions of the network routing links in the sub-network routing link set with the preset routing directions, and determining the network routing links that do not conform to the preset routing directions;
[0130] S405, changing the routing direction of the network routing link that does not conform to the preset routing direction;
[0131] S406, merging the network routing links that conform to the preset routing direction with the network routing links after the routing direction is changed to obtain a network routing link set;
[0132] S407, determining the next hop node of the routing node according to the network routing link set, and constructing a routing set and multiple node sets;
[0133] S408, multiple network routing links determined as first hop nodes by each routing node in the network routing link set;
[0134] S409, selecting a routing node as a target node from the determined target routing link in the order of the routing nodes, and storing the target node in the first sequence, wherein the target routing link is a network routing link with the largest number of nodes among a plurality of network routing links determined with each routing node in the network routing link set as a first hop node;
[0135] S410, determining a sub-target node according to the node set of the target node;
[0136] S411, determine whether there are other routing nodes other than the target node and the sub-target node in the routing set, if yes, execute step S412, if no, execute step S414;
[0137] S412, traversing node sets of other routing nodes;
[0138] S413. When the node set of other routing nodes meets the preset condition, the other routing nodes meeting the preset condition are stored in the elements of the first sequence of the target node;
[0139] S414, determining whether all routing nodes in the target routing link have been determined as target nodes, if so, executing step S415, if not, executing step S409;
[0140] S415, performing full permutation of the elements in the first sequence to obtain a second sequence;
[0141] S416, starting from the first element of the second sequence, traverse the next element in the second sequence in sequence until there is no readable element in the next element, and generate one or more possible network routing links from the source IP address to the destination IP address.
[0142] Figure 5 A schematic diagram of a network routing link generation device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the device includes: a processing module 501 and a determining module 502.
[0143] The processing module 501 is used to construct a network routing link set according to the NetFlow data under the network topology architecture, in accordance with the sequence of data flow time and the link node information, wherein the source IP address and the destination IP address of any network routing link in the network routing link set are the same, and the link node information includes the next hop node of the routing node under the network topology architecture;
[0144] The processing module 501 is further used to construct a routing set and multiple node sets according to the network routing link set, the routing set includes multiple routing nodes in the network routing link set, each routing node corresponds to a node set, and each node set includes a corresponding routing node and a next hop node of the routing node;
[0145] The determination module 502 is used to select any routing node from the determined target routing link as the target node, and determine the sub-target node according to the node set of the target node, the target routing link is the network routing link with the largest number of nodes among the multiple network routing links determined with each routing node in the network routing link set as the first hop node, and the sub-target node includes the next hop node of the target node;
[0146] The processing module 501 is also used to traverse the node sets of other routing nodes when there are other routing nodes besides the target node and the sub-target node in the routing set, and to update the target routing link when the node sets of other routing nodes meet preset conditions, until all routing nodes in the target routing link are determined as target nodes.
[0147] Optionally, according to the NetFlow data under the network topology architecture, a network routing link set is constructed according to the sequence of data flow time and the next hop IP information, and the processing module 501 is specifically used to:
[0148] Get NetFlow data;
[0149] Parse NetFlow data to obtain link node information;
[0150] According to the sequence of data flow time and the next hop IP information, a sub-network routing link set is constructed, and the source IP address and the destination IP address corresponding to each network routing link in the sub-network routing link set are the same or opposite;
[0151] A network routing link set is constructed according to the sub-network routing link set.
[0152] Optionally, a network routing link set is constructed according to the sub-network routing link set, and the processing module 501 is specifically used to:
[0153] Compare the routing directions of the network routing links in the sub-network routing link set with the preset routing directions, and determine the network routing links that do not conform to the preset routing directions;
[0154] Reversing the routing direction of network routing links that do not conform to the preset routing direction;
[0155] The network routing links that conform to the preset routing direction are combined with the network routing links after the routing direction is reversed to obtain a network routing link set.
[0156] Optionally, a routing set and a plurality of node sets are constructed according to a network routing link set, and the processing module 501 is specifically used to:
[0157] According to the network routing link set, the next hop node of the routing node is determined, and a routing set and multiple node sets are constructed.
[0158] Optionally, any routing node is selected from the determined target routing link as the target node, and a sub-target node is determined according to the node set of the target node. The processing module 501 is specifically used for:
[0159] Select any routing node from the target routing link as the target node and store it in a preset first sequence;
[0160] The determination module 502 is specifically used for:
[0161] Determine the child target node according to the node set of the target node;
[0162] When there are other routing nodes other than the target node and the sub-target node in the routing set, the node sets of other routing nodes are traversed, and the processing module 501 is specifically used to:
[0163] When there are other routing nodes other than the target node and the sub-target node in the routing set, traverse the node sets of other routing nodes;
[0164] When the node sets of other routing nodes meet the preset conditions, the other routing nodes are stored in the elements of the first sequence of the target node, and the target routing link is updated.
[0165] Optionally, when the node set of other routing nodes meets a preset condition, the other routing nodes are stored in the elements of the first sequence of the target node, and after the target routing link is updated, the processing module 501 is further used to:
[0166] Arrange all the elements in the first sequence to obtain the second sequence;
[0167] Starting from the first element of the second sequence, the next elements in the second sequence are traversed in sequence until there is no more readable element in the next element, and one or more network routing links that are possible from the source IP address to the destination IP address are generated.
[0168] Based on the same technical concept, an electronic device is also provided in an embodiment of the present application, and the electronic device can realize the function of the aforementioned network routing link generation device.
[0169] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0170] At least one processor 601, and a memory 602 connected to the at least one processor 601. The specific connection medium between the processor 601 and the memory 602 is not limited in the embodiment of the present application. Figure 6 In the example, the processor 601 and the memory 602 are connected via a bus 600. Figure 6 The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 600 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 601 can also be called a controller, and there is no limitation on the name.
[0171] In the embodiment of the present application, the memory 602 stores instructions that can be executed by at least one processor 601. The at least one processor 601 can execute the method for generating a network routing link discussed above by executing the instructions stored in the memory 602. The processor 601 can implement Figure 6 or Figure 6 The functions of each module in the device shown.
[0172] Among them, the processor 601 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 602 and calling the data stored in the memory 602, the various functions of the device and processing data, the device can be monitored as a whole.
[0173] In one possible design, the processor 601 may include one or more processing units, and the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a driver interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0174] Processor 601 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method for generating a network routing link disclosed in the embodiments of the present application can be directly embodied as a hardware processor execution, or a combination of hardware and software modules in the processor.
[0175] The memory 602 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 602 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 602 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 602 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0176] By designing and programming the processor 601, the code corresponding to the method for generating the network routing link described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 2 The method for generating a network routing link in the embodiment shown is as follows: How to design and program the processor 601 is a technology well known to those skilled in the art and will not be described in detail here.
[0177] It should be noted here that the above-mentioned electronic device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0178] The embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method for generating a network routing link in the above embodiment.
[0179] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0180] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 Flow or flows and / or boxes Figure 1 A device that performs the functions specified in a box or multiple boxes.
[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 Flow or flows and / or boxes Figure 1 The functions specified in one or more boxes.
[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 Flow or flows and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0183] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for generating a network routing link, characterized in that: The method comprises: According to the NetFlow data under the network topology architecture, a network routing link set is constructed according to the sequence of data flow time and link node information, wherein the source IP address and the destination IP address of any network routing link in the network routing link set are the same, and the link node information includes the next hop node of the routing node under the network topology architecture; According to the network routing link set, a routing set and a plurality of node sets are constructed, wherein the routing set includes a plurality of routing nodes in the network routing link set, each routing node corresponds to a node set, and each node set includes a corresponding routing node and a next hop node of the routing node; Select any routing node from the determined target routing link as the target node, and determine a sub-target node according to the node set of the target node, wherein the target routing link is a network routing link with the largest number of nodes among multiple network routing links determined with each routing node in the network routing link set as a first hop node, and the sub-target node includes a next hop node of the target node; In the case where there are other routing nodes besides the target node and the sub-target node in the routing set, the node set of the other routing nodes is traversed, and in the case where the node set of the other routing nodes meets a preset condition, the target routing link is updated until all routing nodes in the target routing link are determined as target nodes.
2. The method according to claim 1, characterized in that: The method of constructing a network routing link set according to the NetFlow data under the network topology architecture and the sequence of data flow time and the next hop IP information specifically includes: Obtain the NetFlow data; Parsing the NetFlow data to obtain the link node information; According to the time sequence of the data streams and the next hop IP information, a sub-network routing link set is constructed, wherein the source IP address and the destination IP address corresponding to each network routing link in the sub-network routing link set are the same or opposite; The network routing link set is constructed according to the sub-network routing link set.
3. The method according to claim 2, characterized in that The constructing the network routing link set according to the sub-network routing link set specifically includes: Comparing the routing directions of the network routing links in the sub-network routing link set with the preset routing directions, and determining the network routing links that do not conform to the preset routing directions; Reversing the routing direction of the network routing link that does not conform to the preset routing direction; The network routing links that conform to the preset routing direction are combined with the network routing links after the routing direction is reversed to obtain the network routing link set.
4. The method according to claim 1, characterized in that: The constructing a routing set and a plurality of node sets according to the network routing link set specifically includes: According to the network routing link set, the next hop node of the routing node is determined, and the routing set and the multiple node sets are constructed.
5. The method according to claim 1, characterized in that The step of selecting any routing node from the determined target routing link as the target node and determining a sub-target node according to the node set of the target node specifically includes: Select any routing node from the target routing link as the target node and store it in a preset first sequence; Determine the sub-target node according to the node set of the target node; When there are other routing nodes other than the target node and the sub-target node in the routing set, traversing the node set of the other routing nodes specifically includes: In the case where other routing nodes other than the target node and the sub-target node exist in the routing set, traversing the node set of the other routing nodes; In the case that the node set of the other routing nodes meets a preset condition, the other routing nodes are stored in the elements of the target node in the first sequence, and the target routing link is updated.
6. The method according to claim 5, characterized in that When the node set of the other routing nodes meets the preset condition, the other routing nodes are stored in the elements of the target node in the first sequence, and after the target routing link is updated, the method further includes: Arrange all the elements in the first sequence to obtain the second sequence; Starting from the first element of the second sequence, the next elements in the second sequence are traversed in sequence until there is no readable element in the next element, and one or more network routing links that are possible from the source IP address to the destination IP address are generated.
7. A device for generating a network routing link, characterized in that: include: A processing module, configured to construct a network routing link set according to the NetFlow data under the network topology architecture, in accordance with the sequence of data flow time and link node information, wherein the source IP address and the destination IP address of any network routing link in the network routing link set are the same, and the link node information includes the next hop node of the routing node under the network topology architecture; The processing module is further used to construct a routing set and a plurality of node sets according to the network routing link set, wherein the routing set includes a plurality of routing nodes in the network routing link set, each routing node corresponds to a node set, and each node set includes a corresponding routing node and a next hop node of the routing node; A determination module, configured to select any routing node from the determined target routing link as a target node, and determine a sub-target node according to a node set of the target node, wherein the target routing link is a network routing link with the largest number of nodes among a plurality of network routing links determined with each routing node in the network routing link set as a first hop node, and the sub-target node includes a next hop node of the target node; The processing module is further used to traverse the node set of other routing nodes when there are other routing nodes other than the target node and the sub-target node in the routing set, and update the target routing link when the node set of other routing nodes meets a preset condition until all routing nodes in the target routing link are determined as target nodes.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that When the computer program product is called by a computer, the computer executes the steps of any one of the methods of claims 1 to 6.
Citation Information
Patent Citations
Traffic scheduling method for guaranteeing service quality in SDN environment
CN111245735A
Route selection method and device, electronic equipment and storage medium
CN113489654A
