Traffic determination method and apparatus, electronic device, and storage medium

By constructing a traffic distribution map based on routing information, determining the traffic distribution on the transmission link in a complex network, the problem of difficulty in efficiently and accurately determining traffic in the prior art is solved, and network stability is improved.

WO2025050814A1PCT designated stage expired Publication Date: 2025-03-13HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/104378
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-05
Filing Date
2024-07-09
Publication Date
2025-03-13

AI Technical Summary

Technical Problem

In complex networks, it is difficult for the prior art to efficiently and accurately determine the traffic distribution on the transmission link, making it difficult to prevent network stability problems.

Method used

By constructing a traffic distribution map based on the routing information of the target network, the traffic on the connection edge between each node in the figure is determined on the transmission link between each routing device. This method supports multi-dimensional routing information, including routing table entries, SR tunnel information, etc., which can accurately reflect fine-grained information forwarded by data streams.

Benefits of technology

It realizes efficient and accurate determination of traffic distribution of complex networks, provides a data basis for network traffic verification, and improves network stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024104378_13032025_PF_FP_ABST
    Figure CN2024104378_13032025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of networks, and provides a traffic determination method and apparatus, a system, an electronic device, and a storage medium. The method comprises: on the basis of routing information of a target network, constructing a traffic distribution diagram for multiple target data streams flowing into the target network, wherein the routing information comprises information used for determining a data stream forwarding state, one node in the traffic distribution diagram represents one forwarding state of one target data stream, and the forwarding state comprises a current address and next-hop information; and using the traffic on connection edges between nodes in the traffic distribution diagram to determine the traffic on transmission links between routing devices in the target network. According to the technical solution provided in the embodiments of the present application, the traffic level distribution of transmission links in a network topology can be quickly and accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Flow determination method, device, electronic device, and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 5, 2023, with application number 202311143177.2 and application name “Flow determination method, device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of network technology, and in particular to a flow determination method, device, electronic device, and storage medium. Background Art

[0003] The traffic flow on network transmission links meets expected requirements and is a core requirement for ensuring the normal provision of upper-layer services based on the network. For example, the link water level cannot exceed 80% of the bandwidth, otherwise it will affect upper-layer services. Therefore, network traffic needs to be verified based on the traffic flow on the transmission links. Network traffic verification aims to accurately and quickly simulate and verify the traffic flow on the transmission links through mathematical modeling and reasoning. This allows for early detection of traffic anomalies caused by network configuration errors, network topology errors (for example, multiple link failures), etc. during network maintenance processes (for example, operations and changes), thereby effectively preventing network stability issues.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a traffic determination method, device, electronic device, and storage medium, which can efficiently and accurately determine the traffic distribution on the transmission link of a complex network, thereby efficiently and accurately verifying whether the traffic is expected.

[0006] In the first aspect, an embodiment of the present application provides a traffic determination method, comprising: constructing a traffic distribution graph for multiple target data flows flowing into the target network based on the routing information of the target network; wherein the routing information includes information for determining the forwarding state of the data flow; a node in the traffic distribution graph represents a forwarding state of a target data flow; the forwarding state includes the current address and next hop information; and utilizing the traffic on the connection edges between the nodes in the traffic distribution graph to determine the traffic on the transmission links between the routing devices in the target network.

[0007] In the second aspect, an embodiment of the present application provides a traffic verification device, including: a traffic distribution map construction module, which is used to construct a traffic distribution map for multiple target data flows flowing into the target network based on the routing information of the target network; wherein the routing information includes information for determining the forwarding state of the data flow; a node in the traffic distribution map represents a forwarding state of a target data flow; the forwarding state includes the current address and next hop information; a transmission link traffic determination module, which is used to use the traffic on the connection edges between the nodes in the traffic distribution map to determine the traffic on the transmission link between the routing devices in the target network.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method provided in any embodiment of the present application when executing the computer program.

[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method provided in any embodiment of the present application is implemented.

[0010] Compared with the prior art, this application has the following advantages:

[0011] The technical solution of the embodiment of the present application can reflect the multi-dimensional routing information of various protocols and policies in the network through routing table entries, SR tunnel information, etc., determine the forwarding status of data flows at different nodes in large-scale complex networks, and then efficiently construct a traffic distribution map, so as to efficiently and accurately determine the traffic distribution of large-scale complex networks, and provide a data basis for efficient and accurate network traffic verification, thereby improving network stability.

[0012] In one embodiment, the determined forwarding state is not limited to the state between routing devices, but also includes different ports or different logical state addresses of the same routing device. For example, the transmission link between routing device A and routing device B can correspond to multiple different nodes on the traffic distribution map, that is, the nodes on the traffic distribution map are fine-grained information that accurately reflects data flow forwarding, so the traffic distribution is more accurate.

[0013] In one embodiment, several target data flows can be screened out from multiple candidate data flows flowing into the target network, and the number of flows can be reasonably reduced. The total flow can be distributed to each target data flow according to a preset distribution ratio, thereby reducing the amount of calculation without affecting the calculation results, improving the efficiency of building the flow distribution, and further improving the efficiency of flow verification and reducing the requirements for machine performance.

[0014] In another embodiment, when a network change causes a change in routing information, only the traffic level change on the transmission link caused by the change can be calculated, thereby avoiding complex re-simulation calculation of the traffic level of the unchanged transmission link, greatly improving the simulation efficiency of the traffic level change under network changes.

[0015] The above description is only an overview of the technical solution of this application. In order to more clearly understand the technical means of this application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of this application more obvious and easy to understand, the specific implementation methods of this application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or storage objects. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to the present application and should not be regarded as limiting the scope of the present application.

[0017] FIG1 is an exemplary schematic diagram of a network topology for an application scenario of the present application;

[0018] FIG2 shows an exemplary scenario diagram of the flow determination technical solution of the present application;

[0019] FIG3 shows an exemplary schematic diagram of a traffic distribution map constructed based on the network topology and traffic snapshot shown in FIG1 ;

[0020] FIG4 is a flow chart of a method for determining flow rate according to the first embodiment of the present application;

[0021] FIG5 is a flow chart of a method for determining flow rate according to a second embodiment of the present application;

[0022] FIG6 is an application example diagram of the flow determination method according to the second embodiment of the present application;

[0023] FIG7 is a flow chart of a method for determining flow rate according to a third embodiment of the present application;

[0024] FIG8 , FIG9 and FIG10 are example diagrams of incremental simulation of Example 3 of the present application;

[0025] FIG11 is an application example diagram of the flow determination method according to the third embodiment of the present application;

[0026] FIG12 is a block diagram of a flow rate determination device according to a fourth embodiment of the present application;

[0027] FIG13 is a block diagram of an electronic device used to implement an embodiment of the present application. DETAILED DESCRIPTION

[0028] Hereinafter, only certain exemplary embodiments are briefly described. As will be appreciated by those skilled in the art, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and description are to be regarded as illustrative in nature and not restrictive.

[0029] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application.

[0030] Application Scenario

[0031] Network traffic verification is achieved by modeling the network to be verified and calculating and checking whether the traffic carried by each transmission link meets the verification rules. Network traffic verification technology relies on routing simulation technology to simulate routing devices under a given network topology and network configuration, and then simulate the traffic of data flows entering the network. Network configuration is the network administrator's management of the entire network by setting up the communication, organization, and control of routing devices within the network. However, as the scale of networks grows, the number and volume of data flows entering the network are also increasing, and the characteristics of network topology and configuration are becoming more and more complex. How to ensure the efficient and accurate determination of network traffic and thus network traffic verification has become a major challenge.

[0032] In one implementation, the Quantitative Abstract Representation for Control Planes (QARC) tool can be used for traffic verification. Its input is three elements: an abstract representation of the network's control plane, which controls and manages the operation of all network protocols on the router and provides various network information and forwarding queries required by the data plane for data processing and forwarding. This abstract representation is typically in the form of an extended topology graph, representing information such as routing nodes, links, and connection relationships within the network; a traffic matrix, which describes the traffic distribution within the network and represents the traffic between different routing nodes; and a maximum number of link failures, K, which limits the maximum number of link failures that can be tolerated during network verification. The output of QARC is either a verification result that all normal links will not exceed the specified water level in any scenario with no more than K link failures, or a verification result that some links in the network will exceed the specified water level in a failure scenario with no more than K link failures.

[0033] However, QARC does not support key features of the Internal Border Gateway Protocol (iBGP) or the External Border Gateway Protocol (eBGP), which are widely deployed in real-world networks, such as local preference and communities. Furthermore, QARC does not support other important protocols commonly deployed in real-world networks, such as Segment Routing (SR) and Policy-Based Routing (PBR). Furthermore, QARC can only verify traffic level expectations, such as exceeding the water level, but not other traffic level expectations, such as underflow.

[0034] FIG1 shows an exemplary schematic diagram of a network topology. As shown in FIG1 , in a network topology, a node generally represents a routing device, and the connection edges between nodes represent transmission links, which are used to carry the traffic of data flows. In an embodiment of the present application, routing devices include routers, switches, etc.; transmission links are links connecting routing devices. Data flows are generally forwarded in the form of data packets and have a flow direction. The network topology characterizes the connection relationship between routing devices in the network, and the routing device configuration information includes the configuration information of the communication protocol and the configuration information of the routing policy. The communication protocol can be a Border Gateway Protocol (BGP), such as iBGP and eBGP; or it can be an Intermediate System to Intermediate System (IS-IS) protocol, and routing policies such as PBR policy and SR policy. Therefore, the routing device configuration information includes but is not limited to at least one of BGP information, IS-IS protocol information, PBR information, and SR information.

[0035] In the network shown in Figure 1, there are two autonomous systems (ASs), namely, two subnets, AS100 and AS200. AS100 includes routing device G (Internet Protocol (IP) address: 10.0.0.7), while AS200 includes routing devices A (IP address: 10.0.0.1), B (IP address: 10.0.0.2), C (IP address: 10.0.0.3), D (IP address: 10.0.0.4), E (IP address: 10.0.0.5), and F (IP address: 10.0.0.6). G and A are connected via eBGP, while A, B, C, D, E, and F have established iBGP connections.

[0036] The configuration information of AS100 includes: (1) BGP information, the destination network is 30 / 8, where " / 8" is the subnet mask, indicating that the routing table entry applies to IP addresses with the same first 8 bits, and the next hop address is 11.0.0.5 (the routing device address), that is, packets destined for the destination network 30 / 8 are forwarded through this next hop address; (2) Directly connected network routing table entry, the destination network of this routing table entry is 11.0.0.4 / 30, and packets destined for this destination network are directly forwarded through the local device interface.

[0037] Routing device G's configuration includes PBR information: For packets entering interface "X," the DSCP (Differentiated Services Code Point) field is set to 5 for packets with a source address in the range 20.0.0.0 / 8. This marks the data stream with a specific source address so that it can be prioritized and processed accordingly during subsequent forwarding.

[0038] The configuration information of AS200 includes: (1) BGP information: the destination network is 30 / 8, and there are two forwarding paths, which forward the data packets to the destination network through the next-hop addresses 10.0.0.5 and 10.0.0.6 respectively; (2) IS-IS information: there are two routing table entries with destination networks 10.0.0.5 / 32 and 10.0.0.6 / 32, and both use SR technology, that is, forwarding to these two destination networks is based on SR tunnels.

[0039] The configuration information of routing device A includes: (1) SR information: For the destination network 10.0.0.5 / 32, packets with a DSCP field value of 5 are forwarded through the path 10.0.0.2-10.0.0.5, and the weight of the path 10.0.0.2-10.0.0.5 is 10. (2) SR information: For the destination network 10.0.0.6 / 32, packets with a DSCP field value of 5 are forwarded through two paths, of which the weight of the path 10.0.0.3-10.0.0.6 is 8, and the weight of the path 10.0.0.4-10.0.0.6 is 2. Traffic can be distributed on the two paths based on the weights; (3) Ingress interface address: 11.0.0.5.

[0040] As shown in Figure 1, within the current unit time, assume that there are two data flows, f1 and f2, entering the network consisting of AS100 and AS200D through routing devices A and G, respectively. The rate of f1 is stable at 8 Gigabits per second (Gbps), while the rate of f2 fluctuates between 2 Gbps and 12 Gbps. The core problem of traffic simulation is how to use this information to calculate the amount of traffic carried by each link in the network. The difficulties lie in: (1) how to support protocols such as BGP, PBR, and SR to calculate the actual forwarding path for each data flow; and (2) how to accurately model the distribution of traffic (for example, the ratio of traffic carried by ACF and ADF is 8:2).

[0041] Figure 2 illustrates an exemplary scenario for the traffic determination technology of the present application. As shown in Figure 2, for a network, routing simulation module 201 can be invoked to perform routing simulation based on the network topology and routing device configuration information of the network, outputting routing information used to determine the forwarding status of the data flow. This routing information can be routing table entries, SR tunnel information, or other related routing information such as the connection status between routing devices and the load of transmission links.

[0042] A routing table is a table stored in routing devices (such as routers and switches) that guides packet forwarding. It records the relationship between the destination network and the next hop to determine which interface the packet should be sent through. A routing table entry is a record in the routing table that contains the address of the destination network (such as 10.0.0.0 / 24), the next hop routing device identifier, the outgoing interface / port, and other relevant attributes. Each routing table entry describes how to forward a packet to the destination network.

[0043] SR tunnels are used to create a logical tunnel path in the network. In an SR tunnel, data packets are forwarded from the source node to the destination node through a series of intermediate nodes. These intermediate nodes can be routing devices or switches. SR tunnels indicate the forwarding path by adding a segment identifier (Segment Identifier) ​​to the packet header. Each segment identifier represents a node or link in the network, and data packets are forwarded according to the order of the segment identifiers. SR tunnels use predefined paths and segment identifiers to achieve precise control and directional forwarding of data packets. SR tunnel information typically includes: tunnel start and end points, indicating the starting and destination nodes of the SR tunnel; segment identifiers, which can be node identifiers, link identifiers, or any other identifiers; forwarding order, indicating the order in which data packets are forwarded through each segment identifier; tunnel attributes, including performance metrics such as bandwidth, latency, and availability, used to optimize data packet forwarding path selection; tunnel state, describing the current status of the tunnel, such as active, disabled, or faulty; and tunnel identifier, which uniquely identifies the SR tunnel for management and configuration.

[0044] For example, routing simulation module 201 can create a virtual network environment by collecting and analyzing network topology information and routing device configuration information, and configure the properties of routing devices and links. It then uses simulation algorithms to simulate protocol operation and information exchange between routing devices, simulating the transmission and forwarding process of data packets, thereby outputting routing information such as routing table entries and SR tunnel information. Taking the network shown in FIG1 as an example, the routing simulation for routing device A includes routing device A causing data flows forwarded to 10.0.0.5 (the device address of routing device E) to be forwarded via path ABE; and causing data flows forwarded to 10.0.0.6 (the device address of routing device F) to be forwarded via paths ACF and ADF, with the traffic carried by these two paths in a ratio of 8:2.

[0045] Furthermore, the forwarding state of the data flow may include the current address and next hop information. The next hop information may be the next hop routing device identifier, the next hop tunnel segment identifier, or the next hop identifier information to be found. As shown in FIG2 , the traffic distribution graph construction module 202 may construct a corresponding traffic distribution graph (TDG) based on the routing information output by the routing simulation module 201 and the traffic snapshot of the input network.

[0046] A traffic snapshot typically refers to the data flows entering the network and the traffic they carry within a unit of time. Therefore, a traffic distribution map is constructed for multiple data flows entering the network and can be automatically updated based on changes in routing information or updates to the traffic snapshot. A traffic distribution map can reflect the topological relationships between multiple nodes, with each node in the map representing the forwarding state of a target data flow.

[0047] FIG3 shows an exemplary schematic diagram of a traffic distribution diagram constructed based on the network topology and traffic snapshot shown in FIG1. ​​As shown in FIG3. Each node represents a forwarding state of a target data flow. That is, different data flows or different forwarding states of data flows will map to different nodes. Therefore, a node in the traffic distribution diagram can be represented by a node identifier and a triple. The node identifier is used to indicate the name of the node, such as n0, n1...n 18 The triplet includes data flow identifier, current address, and next information. The data flow identifier is used to indicate the data flow corresponding to the node, such as f1 and f2. The current address is, for example, the port of the routing device where the data flow is located, such as Indicates that the data flow is on the i0 port of routing device A, and is also the logical state address on the routing device, such as This indicates searching for the logical state address in the routing table of routing device A. Next-hop information includes, for example: the next-hop routing device identifier (e.g., A, E, F); the next-hop tunnel segment identifier (e.g., p1, p2, p3); and the next-hop identifier (e.g., ⊥). Therefore, if any of the information in the triplet is different, then the corresponding node will be different.

[0048] For example, as shown in FIG3 , the node Indicates that the node name is n0, and the data flow f1 is on the i0 port of routing device A (i.e. the ingress port numbered 0), and is in the next hop waiting state (marked as ⊥). Indicates that the node name is n1, and the data flow f1 is in the next hop waiting state in the routing table lookup logic state of routing device A. Indicates that the node name is n2, data flow f1 is in the routing table lookup logic state of routing device A, and the next hop is routing device E. Indicates that the node name is n3, data flow f1 is in the routing table lookup logic state of routing device A, and the next hop is routing device F. Indicates that the node name is n4, the data flow f1 is in the routing table lookup logic state of routing device A, and the next hop is tunnel segment p1. Indicates that the node name is n5, the data flow f1 is on the e1 port of routing device A (that is, the egress port numbered 1), and the next hop is the tunnel segment p1. This indicates that the node is named n6, data flow f1 is on port i0 of routing device B, and its next hop is tunnel segment p1. Therefore, nodes n0 to n6 represent the different forwarding states of data flow f1 along path AB. In the traffic distribution graph, the edges between nodes are directed, representing changes in forwarding state. For example, the directed edge between n0 and n1 indicates that flow f1 enters vrf0 on routing device A from port i0 and performs a next-hop lookup.

[0049] Please continue to refer to Figure 2. When the traffic distribution map is constructed, the traffic simulation module 203 can calculate the traffic distribution of each data flow on the traffic distribution map based on this, and then map and calculate the traffic distribution of the transmission link between each routing device in the network topology under the traffic snapshot, that is, obtain the traffic size on the transmission link, which can also be called the traffic water level.

[0050] For example, in the configuration information, the SR policy can configure different weights for different routing paths, so that in the routing information, different routing paths can be configured with different weights to determine the proportion of traffic allocated to the corresponding routing path, which is reflected in the traffic distribution graph, that is, the weight of the connecting edge between the nodes in the corresponding traffic distribution graph, and is used for the traffic ratio of the data flow from the previous node to the next node, that is, how much proportion of traffic will be forwarded through this edge. For example, n3 to n 10 The connection edge routing device has a weight of 0.8, n3 to n 11 The edge between n3 has a weight of 0.2, which means that 80% of the traffic on n3 goes to n4. 10 , 20% enter n 11 , corresponding to the SR policy configuration information on routing device A: the weight of the path 10.0.0.3-10.0.0.6 is 8, and the weight of the path 10.0.0.4-10.0.0.6 is 2.

[0051] For example, for the example in Figure 3, the traffic of f1 entering n0 is 8Gbps, and the weight of the connection edge between n0 and n1 is 1, so the traffic of f1 entering n1 is also 8Gbps. The weights of the connection edges from n1 to n2 and n3 are both 0.5, so the traffic of f1 entering these two connection edges is 4Gbps. Repeat this calculation until the traffic calculation of f1 on each connection edge is completed. Similarly, the traffic simulation module 203 also performs the same calculation on other data streams (such as f2). When the calculation of all data streams is completed, the traffic carried by each connection edge on the traffic forwarding graph will be obtained, where the connection edge corresponding to the transmission link in the network topology is the traffic water level of the transmission link under a given traffic snapshot, thereby quickly and accurately obtaining the traffic water level of each transmission link in the network topology, that is, the traffic distribution of each transmission link in the network.

[0052] For example, please continue to refer to Figure 2. The traffic verification module 204 can verify whether the traffic carried by each transmission link meets the verification rules based on the traffic distribution of each transmission link in the network. For example, based on the expected standard value of the traffic water level, it can verify multiple expected goals such as whether the water level exceeds the standard, whether the water level is too low, and whether the water level changes too much before and after the network change, and output verification results that meet or do not meet expectations, thereby improving network stability.

[0053] It should be noted that the above-mentioned application scenarios or application examples of the flow determination method provided in the embodiments of the present application are for ease of understanding, and the embodiments of the present application do not specifically limit the application of the flow determination method.

[0054] In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose or edit authorization or rejection.

[0055] The following specific embodiments are used to describe in detail the technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems. The several specific embodiments listed can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0056] Example 1

[0057] Fig. 4 shows a flow chart of a flow determination method according to an embodiment of the present application. As shown in Fig. 4 , the flow determination method includes step S401 and step S402.

[0058] Step S401: Based on the routing information of the target network, a traffic distribution map is constructed for multiple target data flows flowing into the target network; wherein the routing information includes information for determining the forwarding status of the data flow; a node in the traffic distribution map represents a forwarding status of a target data flow; the forwarding status includes the current address and next hop information.

[0059] In the embodiments of the present application, the target network is the network for which traffic distribution is to be determined, and includes a plurality of routing devices and a network topology. The routing devices may be network devices such as routers or switches, and the links between the routing devices are transmission links, which are used to transmit data streams and carry the traffic of the data streams. The traffic on each transmission link in the target network is the traffic distribution of the target network.

[0060] Routing information can be routing table entries, SR tunnel information, or other related routing information such as the connection status between routing devices, the load of the transmission link, etc., which is used to determine the forwarding status of the data flow. The forwarding status of a data flow can include the current address and next hop information, and the current address can be the port of the current device or the logical state location of the current device; the next hop information can be the routing device identifier of the next hop, the tunnel segment identifier of the next hop, or the identifier information of the next hop to be found. Therefore, different current addresses and / or next hop information will result in different forwarding states for the data flow, which will correspond to different nodes in the traffic distribution diagram. Therefore, the information used to determine the forwarding state of the data flow in the routing information can be used to determine multiple forwarding states for each target data flow; then, based on the forwarding states of each target data flow, each node in the traffic distribution diagram is constructed. Among them, the relevant introduction of the forwarding state and the node can be combined with Figure 3 and refer to the description of the application scenario part, which will not be repeated here.

[0061] In the embodiments of the present application, the target data flow refers to the data flow entering the target network in the current unit time. The current unit time can be preset and is not specifically limited here. The target data flow can be determined based on a traffic snapshot.

[0062] Routing information can reflect the forwarding status of data flows. Therefore, based on routing information and the traffic snapshot of the input target network, a traffic distribution map for the target network per unit time can be constructed. The traffic distribution map can also be automatically updated based on changes in routing information or updates to traffic snapshots. For details, please refer to Figure 3 and the description of the application scenario section, and will not be repeated here.

[0063] Step S402: using the traffic on the connection edges between the nodes in the traffic distribution graph, determine the traffic on the transmission links between the routing devices in the target network.

[0064] Once the traffic distribution graph is constructed, the traffic distribution of each data flow on the traffic distribution graph can be calculated based on it. Specifically, based on the traffic of each target data flow into the target network, as well as the target data flow and forwarding state represented by each node, the traffic on the connecting edges between each node can be determined, and the traffic distribution on the traffic distribution graph can be obtained. Furthermore, the traffic distribution on the traffic distribution graph is mapped to the traffic distribution of the transmission links between each routing device in the network topology under the traffic snapshot, that is, the traffic volume on the transmission link is obtained, which can also be called the traffic water level.

[0065] According to the method of the embodiment of the present application, multi-dimensional routing information such as routing table entries and SR tunnel information can reflect various protocols and policies in the network, and the forwarding status of data flows at different nodes in large-scale complex networks is determined, thereby efficiently constructing a traffic distribution map. The determined forwarding status is not limited to the status between routing devices, but also includes different ports or different logical states of the same routing device. For example, the transmission link between routing device A and routing device B can correspond to multiple different nodes on the traffic distribution map, that is, the nodes on the traffic distribution map are fine-grained information that accurately reflects the forwarding of data flows. Therefore, the traffic distribution is more accurate, thereby being able to efficiently and accurately determine the traffic distribution of large-scale complex networks, and provide a data basis for efficient and accurate network traffic verification to improve network stability.

[0066] In one embodiment, the routing information also includes information for determining the forwarding ratio of data flows; in step S401, based on the routing information of the target network, a traffic distribution graph is constructed for multiple target data flows flowing into the target network, which may include: determining multiple forwarding states of each target data flow according to the information used to determine the forwarding state of the data flow in the routing information; constructing each node in the traffic distribution graph according to each forwarding state of each target data flow; determining the traffic and weight on the connection edge between each node according to the traffic of each target data flow flowing into the target network, the information used to determine the forwarding ratio of the data flow in the routing information, and the target data flow and forwarding state represented by each node; wherein the connection edge is provided with a weight, which is used to determine the traffic ratio of the target data flow of the previous node identified by the connection edge forwarded to the next node.

[0067] Exemplarily, the forwarding state of a data flow may include the current address and next hop information. Different current addresses and / or next hop information will result in different forwarding states of the data flow, which will correspond to different nodes in the traffic distribution map. The information used to determine the forwarding state of the data flow in the routing information can be used to determine multiple forwarding states of each target data flow; then, based on the forwarding states of each target data flow, each node in the traffic distribution map is constructed.

[0068] In the routing information, different routing paths can be configured with different weights, which are reflected in the traffic distribution graph, that is, the weight of the connection edge between the nodes in the corresponding traffic distribution graph, which is used for the traffic ratio of the data flow from the previous node to the next node, that is, how much traffic will be forwarded through this edge. For example, the routing information of routing device A includes a weight of 8 for the path 10.0.0.3-10.0.0.6 and a weight of 2 for the path 10.0.0.4-10.0.0.6, which corresponds to the weight of n3 to n4 in the traffic distribution graph. 10 The connection edge between n3 and n 11The edge between n3 has a weight of 0.2, which means that 80% of the traffic on n3 goes to n4. 10 , 20% enter n 11 Therefore, based on the flow of each target data flow into the target network, the information used to determine the data flow forwarding ratio in the routing information, the target data flow and forwarding state represented by each node, the flow and weight of the connection edge between each node can be calculated.

[0069] Based on this, the traffic distribution map can truly simulate and reflect the path priority strategy in the real network, thereby improving the accuracy of the traffic distribution map.

[0070] In one embodiment, the method of the embodiment of the present application may also include: simulating the forwarding of data streams by each routing device based on the connection relationship and configuration information of the routing devices of the target network, and generating routing information; wherein the configuration information includes at least one of BGP information, IS-IS protocol information, PBR information and SR information.

[0071] BGP, the Border Gateway Protocol, is a protocol used to exchange routing information on the Internet. By exchanging routing information, it determines the optimal path for forwarding data packets. It uses a path vector algorithm to select the optimal path and supports the configuration of routing policies to meet specific network needs and policy requirements. BGP policies refer to routing policies configured within the BGP protocol. BGP policies are used to control and optimize the forwarding behavior of BGP routes to meet specific network needs and policy requirements. By configuring BGP policies, network administrators can achieve precise control over route selection, route filtering, route redistribution, and other aspects. BGP information can include one or more of the following: a route prefix, which indicates the IP address range of the destination network; a next hop, which indicates the IP address of the next-hop routing device to reach the destination network; an AS path, which indicates the autonomous system path that a packet traverses, thereby determining the optimal path and avoiding loops; and attribute and policy information, such as weight, local preference, and route tag, which influences route path selection and forwarding behavior.

[0072] The IS-IS protocol is an interior gateway protocol used to exchange routing information in computer networks. It primarily exchanges routing information between routing devices within an autonomous system (AS) to determine the forwarding path for data packets. IS-IS protocol information can include one or more of the following: routing device identifiers; neighbor relationships (IS-IS routing devices establish neighbor relationships with adjacent routing devices to exchange link state packets and routing information); and attribute and policy information, such as metrics, costs, and priorities, which influence route selection and forwarding behavior.

[0073] A PBR policy is a network routing strategy used to forward packets from a source address to a destination address based on specific conditions or policy rules (such as source address, port, protocol, DSCP, etc.). The forwarding path for packets can also be determined based on other factors. By configuring a PBR policy, you can select a specific forwarding path based on the packet's source address or source subnet, the packet's source or destination port, protocol type, or the packet's DSCP value or quality of service requirements. Different forwarding paths can also be prioritized. A PBR policy can include one or more of the following information: match conditions, which specify the conditions used to match packets, such as source address, destination address, port, protocol, DSCP, etc.; forwarding path, which specifies the path or next hop to which a packet should be forwarded after a successful match; policy rules, which define the rules for selecting a forwarding path based on the match conditions; and priority, which specifies the priority of different policy rules to determine which rule is applied to select the forwarding path.

[0074] SR policy is a routing strategy based on tunnel segmentation technology. It adds segmentation markers to packet headers to indicate the forwarding path, enabling precise control of packet forwarding. SR policies can define multiple paths and policy rules based on specific service requirements, flexibly adjusting and optimizing traffic forwarding paths. SR policy configuration can be dynamically managed through a programming interface to meet real-time network requirements. SR information refers to the information used in SR policies to indicate the forwarding path.

[0075] In large-scale complex networks, compatibility with multiple protocols and strategies is required. Routing simulation creates a virtual network environment by collecting and analyzing network topology information and routing device configuration information, and configures the properties of routing devices and links. It then uses simulation algorithms to simulate protocol operation and information exchange between routing devices, and simulates the transmission and forwarding process of data packets, thereby outputting accurate and multi-dimensional routing information and building an accurate traffic distribution map.

[0076] Example 2

[0077] The present application provides a method for determining flow rate, wherein at least part of the technical solutions and corresponding technical effects of the first embodiment can be incorporated into the present application. FIG5 shows a flow chart of the method for determining flow rate according to the embodiment of the present application. As shown in FIG5 , the method for determining flow rate includes:

[0078] Step S501: Filtering multiple target data flows from multiple candidate data flows flowing into the target network; wherein the number of target data flows is less than the number of candidate data flows;

[0079] Step S502: taking the total flow of the multiple candidate data flows as the total flow of the multiple target data flows, and allocating flow to each target data flow;

[0080] Step S503: Based on the routing information of the target network, a traffic distribution map is constructed for the multiple target data flows flowing into the target network; wherein the routing information includes information for determining the forwarding state of the data flow; a node in the traffic distribution map represents a forwarding state of a target data flow; the forwarding state includes the current address and next hop information; the current address includes the port of the current device or the logical state location of the current device; the next hop information includes the routing device identifier of the next hop, the tunnel segment identifier of the next hop, or the identifier information of the next hop to be found;

[0081] Step S504: using the traffic on the connection edges between the nodes in the traffic distribution graph, determine the traffic on the transmission links between the routing devices in the target network.

[0082] Among them, step S503 can adopt the same or similar implementation as step S401, and step S504 can adopt the same or similar implementation as step S402.

[0083] In real networks, the scale of input traffic snapshots is very large, with thousands or even hundreds of thousands of data streams input per second. If the traffic flow along the forwarding path is calculated for each data stream entering the target network, it will place very high demands on machine performance (such as CPU and memory), be very time-consuming, and affect efficiency. Therefore, it is possible to screen out several target data streams from the multiple candidate data streams flowing into the target network, perform a reasonable flow reduction, and allocate the total traffic to each target data stream according to a preset distribution ratio. This reduces the amount of computation without affecting the calculation results, improves the efficiency of constructing the traffic distribution, and thus improves the efficiency of traffic verification and reduces the requirements for machine performance.

[0084] For example, 500 target data flows can be selected from 1000 candidate data flows, and the total traffic of these 1000 candidate data flows (1000 Gps) can be evenly distributed to these 500 target data flows, with each target data flow having a traffic of 2 Gps. Alternatively, the total traffic can be distributed to each target data flow according to the distribution ratio set for each target data flow.

[0085] In one embodiment, in step S501, screening out multiple target data streams from multiple candidate data streams flowing into the target network may include: determining the probability of selecting the candidate data stream based on the proportion of the traffic of the candidate data stream in the total traffic of the multiple candidate data streams; wherein the probability of selecting is positively correlated with the proportion; and performing a preset number of random samplings among the multiple candidate data streams based on the probability of selecting each candidate data stream, to obtain a first preset number of target data streams.

[0086] Table 1 shows an example of a simple traffic snapshot. In this example, there are four candidate data flows, each corresponding to a row in the table. Each candidate data flow includes a source IP address, a destination IP address, and the traffic carried by the candidate data flow.

[0087] Table 1

[0088] This embodiment provides a flow sampling algorithm based on traffic proportion. In the example of Table 1, the preset number of random sampling is 2, that is, 2 random samplings will be performed. The number of target data flows, that is, the first preset number, is 2. Therefore, if the preset distribution ratio is equal distribution, then both target data flows will be assigned 1 / 2 of the total traffic. Specifically, in each sampling, the probability of each candidate data flow being selected is the proportion of its traffic to the total traffic. Therefore, the probability of the first candidate data flow being selected is 10 / (10+20+30+40)=10%, the probability of the second candidate data flow being selected is 20 / (10+20+30+40)=20%, and so on. Assuming that the flow selected in the first sampling is the second candidate data flow (that is, the candidate data flow with a source address of 10.0.0.2), it will be assigned 1 / 2 of the total traffic, that is, 50Gbps. Assuming the candidate data flow selected in the second sampling is the third candidate data flow, it will also be assigned 1 / 2 of the total traffic, that is, 50Gbps. After the two random samplings are completed, the traffic snapshot in Table 2 will be obtained:

[0089] Table 2

[0090] It can be seen that the total traffic flowing into the target network remains unchanged, while the number of data flows is reduced from 4 to 2, thereby reducing the size of the traffic snapshot while maintaining the accuracy of traffic verification.

[0091] In one embodiment, the routing information includes routing table entries. In step S501, multiple target data streams are screened out from multiple candidate data streams flowing into the target network, which may include: dividing the multiple candidate data streams into multiple groups based on the matching between the destination addresses of the candidate data streams and the routing table entries, wherein the candidate data streams matching the same routing table entry are in the same group; and screening a second preset number of target data streams from each group of candidate data streams.

[0092] In a real network, the forwarding behavior of data flows in a traffic snapshot may be completely consistent across the network. Therefore, repeatedly calculating the forwarding behavior of these data flows will significantly reduce simulation efficiency. Therefore, this embodiment provides an equivalence class optimization algorithm based on route equivalence. This algorithm merges or partially filters data flows with consistent forwarding behavior, thus avoiding repeated calculations.

[0093] A routing entry is a record in a routing table and is a type of routing information. It contains the destination network address (such as 10.0.0.0 / 24), the next-hop routing device identifier, and other related attributes. It guides routing devices (such as routers and switches) to determine the forwarding path for packets based on the destination network address.

[0094] Specifically, for each routing table entry, based on the destination address (destination IP address) of the candidate data stream, candidate data streams that match the address of the destination network of the routing table entry are determined and grouped together; a second preset number of target data streams are filtered from each group of candidate data streams, and the total number of target data streams obtained is the second preset number multiplied by the number of groups. The second preset number can be 1 or a value obtained by multiplying the number of data streams in the group by a preset ratio.

[0095] For example, the two data flows in Table 2 match the routing table entry for 20.0.0.0 / 24, so they belong to the same equivalence class and are grouped together. For each data flow in the same group, only one is selected and the traffic flow of all data flows in the group is assigned to it, thereby constructing a new traffic snapshot, as shown in Table 3. This reduces the size of the traffic snapshot while maintaining the accuracy of traffic verification.

[0096] Table 3

[0097] In one embodiment, based on the matching between the destination address of the candidate data flow and the routing table entry, multiple candidate data flows are divided into multiple groups, including: sorting the routing table entries in the target network from long to short according to the prefix length of the destination network address of the routing table entry; sequentially determining the candidate data flow that matches each routing table entry, and obtaining multiple groups of candidate data flows corresponding to each routing table entry.

[0098] The prefix length of the destination network address of a routing entry reflects the granularity of the routing entry. A longer prefix length, that is, a greater number of consecutive 1s in the subnet mask, indicates a smaller destination network range and a finer granularity for the routing entry. A shorter prefix length, that is, a fewer consecutive 1s in the subnet mask, indicates a larger destination network range and a coarser granularity for the routing entry. Therefore, routing entries in the target network are sorted from longest to shortest prefix length of their destination network addresses, that is, sorted from finest to coarser granularity.

[0099] For example, suppose there are three routes (routing table entries) injected into the network, namely 10.0.0.0 / 8, 10.0.0.0 / 24, and 20.0.0.0 / 24. These three routing table entries are sorted from the finest to the coarsest granularity. The order after sorting is 10.0.0.0 / 24, 20.0.0.0 / 24, and 10.0.0.0 / 8. Then, for the data flows in the traffic snapshot, these routing table entries are matched in order; data flows that match the same routing table entry are classified into the same equivalence class. Then, the target data flow is filtered out from each group of candidate data flows. This can improve the screening efficiency and thus improve the efficiency of building the traffic distribution map.

[0100] It should be noted that the flow sampling algorithm based on traffic proportion and the equivalence class optimization algorithm based on routing equivalence in the embodiments of the present application can both be used to reduce the number of input candidate data flows. One of the algorithms can be selected for execution according to actual needs, or both algorithms can be selected for execution. For example, the flow sampling algorithm is first executed to filter out the first target data flow, and then the equivalence class optimization algorithm is used to filter out the second target data flow from the first target data flow. The second target data flow is then used as the data flow for constructing the traffic distribution map. Of course, the embodiments of the present application do not limit the execution order and number of executions of the two algorithms.

[0101] In an application example, as shown in FIG6 , for a traffic snapshot of an input target network, i.e., a plurality of candidate data flows under the current unit time, the target data flow can be screened out from the plurality of candidate data flows according to the flow sampling algorithm based on flow proportion and the equivalence class optimization algorithm based on routing equivalence in the embodiment of the present application, thereby reducing the number of flows and the scale of the traffic snapshot, thereby providing a basis for improving the efficiency of traffic simulation and traffic verification; for the target data flow of the target network, routing simulation can be performed based on the method of embodiment 1, and a traffic distribution graph can be constructed for traffic simulation; then, the traffic distribution of each data flow on the traffic distribution graph is calculated, and the traffic distribution of the transmission links between each routing device in the network topology under the traffic snapshot is mapped and calculated, that is, the traffic on the transmission link is obtained; further, based on the traffic distribution of each transmission link in the network, it is verified whether the traffic carried by each transmission link meets the requirements of the traffic verification item, for example, according to the expected standard value of the traffic water level, multiple expected goals such as whether the water level exceeds the standard, whether the water level is too low, and whether the water level changes too much before and after the network change are verified, and a verification result of passing or failing the verification is output, thereby improving network stability.

[0102] Example 3

[0103] With the increasing frequency and scale of network changes, such as link failures, maintenance, equipment upgrades, and configuration changes, network administrators need timely and accurate information about traffic level changes on network transmission links to determine whether these changes meet expected (or preset) conditions. For example, after a transmission link fails, the traffic level on other transmission links must not exceed 80% of the bandwidth.

[0104] Existing network traffic verification technology requires re-simulating traffic on the network after the change, comparing traffic levels before and after the change to verify whether the change meets the change conditions preset by network administrators. With existing network traffic verification technology, even if the traffic level of only one transmission link changes, the traffic level of all transmission links must be re-simulated and calculated. Therefore, it is impossible to efficiently and timely determine the traffic level changes on network transmission links.

[0105] Refer to Figure 1. Suppose the transmission link between routing devices BE fails and cannot carry traffic properly, causing changes in routing information in the target network. In this scenario, the traffic originally traversing ABE will be shared by ADF and ACF. Consequently, the traffic on AC, AD, DF, and CF will increase accordingly. In a real network environment, how can we determine which transmission links will experience traffic changes and the magnitude of the changes? Existing solutions require re-simulating traffic on the changed network and then comparing traffic changes on each transmission link. This results in a significant amount of repeated calculations, significantly reducing the efficiency of traffic change verification. For example, traffic on GA will not change due to the BE failure, so there is no need to calculate its change.

[0106] The present application provides a method for determining flow rate, wherein at least part of the technical solutions and corresponding technical effects of the first embodiment and / or the second embodiment can be incorporated into the present application. FIG7 shows a flow chart of the method for determining flow rate according to the embodiment of the present application. As shown in FIG7 , the method for determining flow rate includes:

[0107] Step S701: Based on the routing information of the target network, a traffic distribution graph is constructed for multiple target data flows flowing into the target network; wherein the routing information includes information for determining the forwarding state of the data flow; a node in the traffic distribution graph represents a forwarding state of a target data flow; the forwarding state includes current address and next hop information;

[0108] Step S702: using the traffic on the connection edges between the nodes in the traffic distribution graph, determine the traffic on the transmission links between the routing devices in the target network.

[0109] Step S703: In response to a change in routing information of the target network, determining a changed target node in the traffic distribution graph;

[0110] Step S704: Update the flow on the target connection edge connected to the target node;

[0111] Step S705: Calculate the traffic on the transmission link corresponding to the target connection edge using the updated traffic on the target connection edge.

[0112] Among them, step S701 can adopt the same or similar implementation as step S401, and step S702 can adopt the same or similar implementation as step S402. For example, referring to Figure 1, in the current unit time, assume that there are two data flows f1 and f2, which enter the target network including AS100 and AS200D respectively through routing device A and routing device G, where the rate of f1 is stable at 8Gbps, while the rate of f2 fluctuates between 2Gbps and 12Gbps. Based on the methods of Example 1 and / or Example 2, a traffic distribution map can be constructed, as shown in Figure 3. Based on the traffic distribution map, the traffic on each transmission link in the target network can be determined.

[0113] For example, network changes such as transmission link failures, maintenance, equipment upgrades, and configuration changes can cause changes in the target network's routing information. For example, in the target network shown in Figure 1, assume that the transmission link between routing devices BE cannot carry traffic properly due to a failure, resulting in changes in the target network's routing information. The following, combined with Figures 8, 9, and 10, describes a specific example of determining a changed target node in a traffic distribution graph and updating the traffic on a target connection edge connected to the target node.

[0114] As shown in Figure 8, when the transmission link BE fails, the routing tables of routing devices A, B, and E will reconverge, thereby affecting the forwarding state of the data flow, which will affect some nodes of the traffic distribution graph, namely the target nodes: nodes n1, n2, n4-n9. Therefore, before performing the incremental simulation calculation of step S704, these target nodes can be marked to indicate that the connection edges connected to them will change, including connection state changes or weight changes. As shown in Figure 9, since the connection edge between n5 and n6 corresponds to the transmission link AB, and after the transmission link BE fails, routing device A will no longer forward the traffic of the data flow through the transmission link AB, so the traffic carried by the connection edge between n5 and n6 is reduced from 5G to 0G. As shown in Figure 10, since routing device A forwards the traffic originally on the transmission link ABE to the transmission links ACF and ADF, the traffic on the connection edge between n1 and n2 will be reduced to 0G, while the traffic on n1-n3 will increase to 10G. At the same time, the traffic entering n3 has changed, so n3-n 10 、n3-n 11 The traffic on the target node and subsequent connection edges will be updated, while the traffic on other connection edges will not change because they are not affected by the change of the target node. When the traffic updates of all target connection edges connected to the changed target node are completed, the traffic distribution map after the network change will be obtained, thus avoiding the repeated calculation of unnecessary nodes and traffic.

[0115] According to the method of the embodiment of the present application, when the network changes and causes the routing information to change, only the traffic water level changes on the transmission link caused by the change can be calculated, thereby avoiding complex re-simulation calculation of the traffic water level of the unchanged transmission link, greatly improving the simulation efficiency of the traffic water level changes under network changes.

[0116] In one embodiment, after step S705 , the method may further include: verifying whether there is a transmission link in the target network whose traffic change does not meet a preset change condition.

[0117] The preset change condition can be a network administrator's expected target for traffic level changes during network changes, such as the requirement that traffic levels on other transmission links cannot exceed 80% of the bandwidth after a transmission link fails. When a network change occurs, the method of the embodiment of the present application can directly determine the traffic level changes on the transmission links caused by the change, and then quickly verify whether the traffic level changes meet the expected targets, thereby effectively reducing and avoiding network stability issues that may arise during network changes.

[0118] In an application example, as shown in FIG11 , for a traffic snapshot of an input target network, that is, a plurality of candidate data flows under the current unit time, routing simulation can be performed based on the method of Example 1 or Example 2, and a traffic distribution graph can be constructed for traffic simulation; then, the traffic distribution of each data flow on the traffic distribution graph is calculated, and then the traffic distribution of the transmission link between each routing device in the network topology under the traffic snapshot is mapped and calculated, that is, the traffic on the transmission link is obtained; further, when the network changes and the routing information changes, only the traffic level change on the transmission link caused by the change is calculated, that is, incremental traffic simulation is performed; then, combined with the traffic level change expectations such as preset change conditions, whether the traffic level change meets expectations is quickly verified, and a verification result is output to determine whether it meets expectations or not, thereby improving network stability.

[0119] Example 4

[0120] Corresponding to the application scenario provided by the embodiment of the present application and the methods of embodiments one to three, the embodiment of the present application also provides a traffic processing device, as shown in Figure 12, the traffic processing device includes: a traffic distribution map construction module 1201, which is used to construct a traffic distribution map for multiple target data streams flowing into the target network based on the routing information of the target network; wherein the routing information includes information for determining the forwarding state of the data stream; a node in the traffic distribution map represents a forwarding state of a target data stream; the forwarding state includes the current address and next hop information; the next hop information includes the routing device identifier of the next hop, the tunnel segment identifier of the next hop, or the identifier information of the next hop to be searched; a transmission link traffic determination module 1202, which is used to use the traffic on the connection edges between the nodes in the traffic distribution map to determine the traffic on the transmission link between the routing devices in the target network.

[0121] In one embodiment, the routing information also includes information for determining a data flow forwarding ratio; the connection edge is provided with a weight for determining a flow ratio of a target data flow from a previous node forwarded to a next node.

[0122] In one embodiment, the traffic determination device also includes a routing information generation module, which is used to simulate the forwarding of data streams by each routing device based on the connection relationship and configuration information of the routing devices of the target network to generate routing information; wherein the configuration information includes at least one of Border Gateway Protocol BGP information, Intermediate System to Intermediate System IS-IS protocol information, Policy-Based Routing PBR information and Segment Routing SR information.

[0123] In one embodiment, the traffic determination device also includes a screening module for screening out multiple target data flows from multiple candidate data flows flowing into the target network; wherein the number of target data flows is less than the number of candidate data flows; and allocating the total traffic of the multiple candidate data flows to each target data flow.

[0124] In one embodiment, the screening module is further specifically used to perform a preset number of random samplings among multiple data streams to be selected to obtain a first preset number of target data streams; wherein the probability of selecting a data stream to be selected is positively correlated with the proportion of the traffic of the data stream to be selected in the total traffic of the multiple data streams to be selected.

[0125] In one embodiment, the routing information includes routing table entries, and the screening module is further specifically used to group the candidate data flows that match the same routing table entry into the same group based on the matching between the destination address of each candidate data flow and each routing table entry in the target network; and to screen a second preset number of target data flows from each group of candidate data flows.

[0126] In one embodiment, the screening module is further specifically used to sort the routing table entries in the target network according to the prefix length of the destination network address of the routing table entry from long to short; determine the candidate data flow matching each routing table entry in sequence, and obtain multiple groups of candidate data flows.

[0127] In one embodiment, the traffic determination device also includes an update module for: determining a changed target node in a traffic distribution graph in response to a change in routing information of a target network; updating the traffic on a target connection edge connected to the target node; and using the traffic on the target connection edge to calculate the traffic on the transmission link corresponding to the target connection edge.

[0128] In one embodiment, the traffic determination device further includes a verification module configured to verify whether there is a transmission link in the target network whose traffic change does not meet a preset change condition.

[0129] In one embodiment, the verification module is further configured to verify whether the traffic on the transmission link complies with preset traffic verification rules.

[0130] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.

[0131] Example 6

[0132] Figure 13 is a block diagram of an electronic routing device used to implement embodiments of the present application. As shown in Figure 13 , the electronic routing device includes a memory 1301 and a processor 1302. Memory 1301 stores a computer program that can be executed on processor 1302. Processor 1302 executes the computer program to implement the methods described in the above embodiments. Memory 1301 and processor 1302 may be present in one or more locations.

[0133] The electronic routing device further comprises:

[0134] The communication interface 1303 is used to communicate with external routing devices and perform data exchange transmission.

[0135] If the memory 1301, processor 1302, and communication interface 1303 are implemented independently, the memory 1301, processor 1302, and communication interface 1303 can be interconnected via a bus and communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG13 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0136] Optionally, in a specific implementation, if the memory 1301 , the processor 1302 , and the communication interface 1303 are integrated on a chip, the memory 1301 , the processor 1302 , and the communication interface 1303 may communicate with each other through an internal interface.

[0137] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.

[0138] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication routing device equipped with the chip executes the method provided in the embodiment of the present application.

[0139] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory. The input interface, the output interface, the processor and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0140] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.

[0141] Furthermore, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus random access memory (DR RAM).

[0142] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0143] In the description of this specification, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and integrate different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless they are mutually inconsistent.

[0144] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.

[0145] Any process or method described in the flowchart or otherwise described herein can be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process. The scope of the preferred embodiments of the present application includes other implementations in which the functions may be performed in a different order than shown or discussed, including performing the functions substantially simultaneously or in reverse order depending on the functions involved.

[0146] The logic and / or steps described in the flowchart or otherwise described herein may be considered, for example, as a sequenced list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or routing device (such as a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or routing device), or used in conjunction with such instruction execution systems, apparatuses, or routing devices.

[0147] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0148] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc. The above is only an exemplary embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or replacements within the technical scope recorded in this application, which should all be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.

Claims

1. A flow determination method, comprising: Based on the routing information of the target network, a traffic distribution graph is constructed for multiple target data flows flowing into the target network; wherein the routing information includes information for determining the forwarding state of the data flow; a node in the traffic distribution graph represents a forwarding state of a target data flow; the forwarding state includes current address and next hop information; The traffic on the connection edges between the nodes in the traffic distribution graph is used to determine the traffic on the transmission links between the routing devices in the target network.

2. The method according to claim 1, wherein: The routing information also includes information for determining a data flow forwarding ratio; Based on the routing information of the target network, a traffic distribution graph is constructed for multiple target data flows flowing into the target network, including: Determine multiple forwarding states of each target data flow according to the information used to determine the forwarding state of the data flow in the routing information; Constructing each node in the traffic distribution graph according to each forwarding state of each target data flow; The traffic and weight on the connection edge between each node are determined based on the traffic of each target data flow flowing into the target network, the information in the routing information used to determine the data flow forwarding ratio, the target data flow represented by each node and the forwarding status; wherein the weight on the connection edge is used to identify the traffic ratio of the target data flow from the previous node of the connection edge forwarded to the next node.

3. The method according to claim 1, further comprising: According to the connection relationship and configuration information of the routing devices of the target network, the forwarding of the data stream by each of the routing devices is simulated to generate the routing information; wherein the configuration information includes at least one of Border Gateway Protocol BGP information, Intermediate System to Intermediate System IS-IS protocol information, Policy-Based Routing PBR information and Segment Routing SR information.

4. The method according to claim 1, further comprising: Filtering the plurality of target data flows from the plurality of candidate data flows flowing into the target network; wherein the number of the target data flows is less than the number of the candidate data flows; The total flow of the multiple data flows to be selected is used as the total flow of the multiple target data flows, and the flow is allocated to each target data flow.

5. The method according to claim 4, wherein: The method further comprises: selecting the plurality of target data flows from the plurality of candidate data flows flowing into the target network, comprising: Determine the probability of selecting the data stream to be selected based on the proportion of the traffic of the data stream to be selected in the total traffic of the multiple data streams to be selected; wherein the probability of selecting is positively correlated with the proportion; According to the probability of each selected data stream being selected, a preset number of random draws are performed among the multiple selected data streams. In this way, a first preset number of target data streams are obtained.

6. The method according to claim 4, wherein: The routing information includes routing table entries, and the plurality of target data flows are screened out from the plurality of candidate data flows flowing into the target network, including: Based on the matching between the destination addresses of the candidate data flows and the routing table entries, the multiple candidate data flows are divided into multiple groups, wherein the candidate data flows matching the same routing table entry are in the same group; A second preset number of target data flows are screened from each group of candidate data flows.

7. The method according to claim 6, wherein: Based on the matching between the destination addresses of the candidate data flows and the routing table entries, the multiple candidate data flows are divided into multiple groups, including: Sort the routing table entries in the target network according to the prefix length of the destination network address of the routing table entry from long to short; The candidate data flows that match the respective routing table entries are determined in sequence, and a plurality of groups of candidate data flows that correspond one to one to the respective routing table entries are obtained.

8. The method according to any one of claims 1 to 7, further comprising: In response to a change in routing information of the target network, determining a changed target node in the traffic distribution graph; Updating the flow on the target connection edge connected to the target node; The updated flow on the target connection edge is used to calculate the flow on the transmission link corresponding to the target connection edge.

9. The method according to claim 8, further comprising: Verify whether there is a transmission link in the target network whose traffic change does not meet the preset change condition.

10. The method according to any one of claims 1 to 7, further comprising: Verify whether the traffic on the transmission link complies with preset traffic verification rules.

11. A flow verification device, comprising: A traffic distribution map construction module is used to construct a traffic distribution map for multiple target data flows flowing into the target network based on the routing information of the target network; wherein the routing information includes information for determining the forwarding state of the data flow; a node in the traffic distribution map represents a forwarding state of a target data flow; the forwarding state includes current address and next hop information; The transmission link flow determination module is used to determine the flow on the transmission link between each routing device in the target network by using the flow on the connection edge between each node in the flow distribution graph.

12. An electronic device comprising a memory, a processor and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 10 when executing the computer program.

13. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Real-time fault detection on network devices and circuits based on traffic volume statistics

    CN113454950A

  • Test data packet generation method and device based on Internet routing configuration

    CN116346647A

  • Traffic determination method and device, electronic equipment and storage medium

    CN117201365A

  • Flexible algorithm aware border gateway protocol (BGP) prefix segment routing identifiers (SIDS)

    EP3869751A1

  • Creating and maintaining segment routed traffic engineering policies via border gateway protocol

    US20180109450A1