Data stream processing method and network equipment
By identifying and processing traffic loops in network devices, determining traffic loop characteristics using loop message rates or sum thresholds, and performing corresponding flow actions, the problem of traffic loops in cross-autonomous systems under the BGP protocol is solved, and network performance and bandwidth utilization are improved.
Patent Information
- Application Number
- CN202311580531.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2025-05-23
AI Technical Summary
In networks using the BGP protocol, data flows are prone to form traffic loops in cross-autonomous systems, resulting in repeated forwarding of data flows and exceeding the interface bandwidth, which is difficult to effectively prevent in the existing technology.
By obtaining traffic characteristics in the network device, including the loop message rate of the target data stream or the total loop message rate of multiple data streams, if it exceeds or is equal to the set threshold, it is determined as the traffic loop feature and performs corresponding flow actions, such as discarding or limiting the current to alleviate the impact of the traffic loop.
Effectively identify and process traffic loops in cross-autonomous systems, prevent repeated forwarding of data flows, avoid excessive interface bandwidth, and improve network performance.
Smart Images

Figure CN120034496A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a data stream processing method and a network device. Background Art
[0002] Border Gateway Protocol (BGP) is a dynamic routing protocol used between autonomous systems (AS). Traffic loops often occur in networks using BGP. Traffic loops refer to loops formed during the forwarding of data flows in the network. Once a traffic loop is formed, traffic will be repeatedly forwarded between two or more network devices. The time to live (TTL) value will be reduced by 1 each time it is forwarded until the TTL value of the message is reduced to 0. The initial value of TTL is generally 255. If a traffic loop is formed during the forwarding of data flows between two or more network devices, the number of data flows may increase to 128 times the original value, resulting in an interface bandwidth limit exceeded.
[0003] Currently, the autonomous system-path (AS-PATH) access list is used in the BGP protocol to prevent loops. Specifically, in a network using BGP, when a network device obtains a route containing the number of its own autonomous system (AS), it will discard the route to prevent traffic loops. However, in scenarios where data flows cross AS, traffic loops still often occur. Summary of the invention
[0004] The embodiments of the present application provide a data flow processing method and a network device for identifying traffic loops and reducing their impact.
[0005] The first aspect of the present application provides a traffic processing method, in which a network device obtains a traffic feature, and the traffic feature is the loop message rate of a target data stream or the sum of the loop message rates of one or more data streams, and the one or more data streams include the target data stream. Then, if the loop message rate is greater than or equal to the loop message rate threshold, or the sum of the loop message rates is greater than or equal to the sum of the loop message rates threshold, the network device determines that the traffic feature meets the loop feature, and performs the flow action corresponding to the loop feature on the target data stream. Thus, traffic loops can also be identified in cross-AS scenarios, and the data streams that form the traffic loops can be processed.
[0006] In some possible implementations, the network device receives a configured flow policy, where the flow policy includes the loop feature and the flow action. Then, the network device can execute the flow action on the data flow with the loop feature based on the configured flow policy.
[0007] In some possible implementations, the flow is used as a discard or flow restriction to alleviate the impact of the flow loop.
[0008] In some possible implementations, after the network device determines that the traffic characteristics meet the loop characteristics, the network device generates a suppression table entry, the suppression table entry includes the flow characteristics of the target data flow and the flow action, the flow characteristics are used to identify that the data packet belongs to the target data flow, and the flow action is used to execute on the data packet; the network device receives the data packet and obtains the flow characteristics of the data packet; thereby, the network device can determine the flow action corresponding to the flow characteristics based on the suppression table entry.
[0009] In some possible implementations, after the network device determines that the traffic characteristics meet the loop characteristics, the network device stores the routing table entry and the flow action accordingly, the routing table entry includes the flow characteristics of the target data flow, the flow characteristics are used to identify that the data packet belongs to the target data flow, and the flow action is used to execute on the data packet; the network device receives the data packet and obtains the flow characteristics of the data packet; then, the network device can determine the corresponding flow action based on the routing table entry.
[0010] In some possible implementations, before the network device performs the flow action corresponding to the loop characteristic on the target data flow, the network device obtains the traffic rate or traffic load of the input interface / output interface of the target data flow; the network device determines that the traffic rate is not less than the traffic rate threshold, or the traffic load is not less than a preset ratio, then, in the case where the traffic loop has a large impact, the impact of the traffic loop is alleviated.
[0011] In some possible implementations, after the network device determines that the traffic characteristics meet the loop characteristics, the network device sends a loop alarm message to allow relevant personnel to repair the network.
[0012] In some possible implementations, the flow strategy also includes a flow action execution duration. After the network device executes the flow action corresponding to the loop feature on the target data flow, the network device stops executing the flow action after the flow action execution duration, that is, after returning to normal, the data flow can be forwarded normally again.
[0013] A second aspect of the present application provides a network device, which is used to execute any one of the methods described in the first aspect.
[0014] A third aspect of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer, the computer executes the method provided by the first aspect or any possible implementation of the first aspect.
[0015] A fourth aspect of the present application provides a computer program product, which includes computer execution instructions, which are stored in a computer-readable storage medium; at least one processor of a device can read the computer execution instructions from the computer-readable storage medium, and at least one processor executes the computer execution instructions so that the device implements the method provided by the above-mentioned first aspect or any possible implementation of the first aspect.
[0016] In a fifth aspect, the present application provides a communication device, which may include at least one processor, a memory, and a communication interface. At least one processor is coupled to the memory and the communication interface. The memory is used to store instructions, at least one processor is used to execute the instructions, and the communication interface is used to communicate with other communication devices under the control of at least one processor. When the instructions are executed by at least one processor, the at least one processor executes the method in the first aspect or any possible implementation of the first aspect.
[0017] A sixth aspect of the present application provides a chip system, which includes a processor for supporting the implementation of the functions involved in the above-mentioned first aspect or any possible implementation method of the first aspect.
[0018] In a possible design, the chip system may also include a memory, which is used to store necessary program instructions and data. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0019] Among them, the technical effects brought about by the second to sixth aspects or any possible implementation methods thereof can refer to the technical effects brought about by the first aspect or different possible implementation methods of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1-1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0021] Figure 1-2 Another schematic diagram of the composition structure of a communication system provided in an embodiment of the present application;
[0022] Figure 1-3A schematic diagram of a loop formed by three network devices in an embodiment of the present application;
[0023] Figure 1-4 A schematic diagram of a loop formed by two network devices in an embodiment of the present application;
[0024] Figure 2 A flowchart of a data stream processing method provided in an embodiment of the present application;
[0025] Figure 3 Another flowchart of a data stream processing method provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of the structure of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The embodiments of the present application provide a data flow processing method and a network device for identifying traffic loops and reducing their impact.
[0029] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0030] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0031] like Figure 1-1 As shown, an embodiment of the present application can be used in a communication system, which includes a communication network 100, a first user device 200 and a second user device 300, the communication network 100 includes multiple network devices, and messages can be transmitted between the first user device 200 and the second user device 300 through the network devices in the communication network 100.
[0032] In some possible implementations, the first user device 200 or the second user device 300 may be a terminal device or a server. In some possible implementations, the first user device 200 or the second user device 300 may be a physical host, a virtual machine instance, or a container instance, which is not limited here. The first user device 200 and the second user device 300 may be the same type of communication devices (terminal device or server, physical device or virtual device or container instance), or different communication devices.
[0033] Among them, the terminal device can be called a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device can be a mobile phone, a tablet computer (pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
[0034] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, as well as big data and artificial intelligence platforms.
[0035] Since the server needs to respond to service requests and process them to provide reliable services, generally speaking, the server should have the ability to undertake and guarantee services. The server needs to have strong processing power, high stability, high reliability, high security, scalability and manageability. In the embodiment of the present application, the server can be an x86 server, which is also called a complex instruction set computer (CISC) architecture server, that is, a personal computer (PC) server, which is based on the PC architecture and uses Intel or other x86 instruction set compatible processor chips and Windows operating system.
[0036] For example, please refer to Figure 1-2 , the communication network 100 may include a controller 111 and a plurality of network devices, wherein the controller 111 may be respectively connected to each of the plurality of network devices for communication, and the plurality of network devices are used to forward messages between the first user device 200 and the second user device 300 under the control of the controller 111. The plurality of network devices include network devices 102 to 107 (that is, network device 102, network device 103, network device 104, network device 105, network device 106, network device 107).
[0037] In the embodiment of the present application, the controller 111 may be a functional module deployed in a server, or a server, or a server cluster consisting of several servers, or a cloud computing service center, which is not limited. It should be noted that in order to distinguish from the message forwarding path, Figure 1-2 The communication connection between the controller 111 and each network device is shown in the form of a dotted double arrow. The controller 111 is the brain of the future cloud network, integrating network management, service control, network analysis and other functions, and is the core enabling system for realizing network resource pooling, network connection automation and self-optimization, and operation and maintenance automation.
[0038] For example, in an example where the first user device 200 transmits a message to the second user device 300 through the communication network 100, the message forwarding path is: network device 102->network device 103->network device 104. For another example, the message forwarding path is: network device 102->network device 106->network device 107. Among them, the inlet network device is the network device 102, the transit network device is the network device 106, and the egress network device is the network device 107. Two adjacent network devices may be directly connected to each other or connected to each other through the Internet.
[0039] Each of the network devices 102 to 107 may be a switch (virtual switch or physical switch) or a router (virtual router or physical router) or other devices used to forward messages in the communication network 100. The network devices 102 to 107 may be network devices of the same type, for example, the network devices 102 to 107 may all be routers. Alternatively, the network devices 102 to 107 may be network devices of different types, for example, some of the network devices 102 to 107 may be routers, and the other may be switches.
[0040] Among them, a router is a hardware device that connects two or more user devices and acts as a gateway between user devices. A router is a dedicated intelligent network device that can read the destination address in a message and decide how to transmit the message according to the destination address. A router can understand different protocols, such as the Ethernet protocol used in a local area network, the transmission control protocol / internet protocol (TCP / IP) protocol used in the Internet, etc. In this way, a router can analyze the destination addresses of messages from various types of networks, convert non-TCP / IP addresses into TCP / IP addresses, or vice versa; and then transmit each message to the destination address along the best transmission path according to the routing algorithm, so a router can connect a non-TCP / IP network to the Internet.
[0041] It should be pointed out that the above Figure 1-1 , Figure 1-2 The communication system shown is only used as an example and is not used to limit the technical solution of the embodiment of the present application. In the specific implementation process, the communication network 100 may also include other devices, and the number of network devices can be configured as needed.
[0042] Border Gateway Protocol (BGP) is a dynamic routing protocol used between autonomous systems (AS). Traffic loops often occur in networks using BGP. Traffic loops refer to loops formed during the forwarding of data flows in the network.
[0043] For example, Figure 1-3 FIG. 1 is an example of a traffic loop formed by three network devices in an AS. The data flow forms a traffic loop between network device A, network device B, and network device C.
[0044] Another example is Figure 1-4 FIG. 1 is an example of a traffic loop formed between two network devices in an AS. The data flow forms a traffic loop between network device D and network device E.
[0045] Once a traffic loop is formed, the data stream will be repeatedly forwarded between two or more network devices, and the time to live (TTL) value will be reduced by 1 each time it is forwarded until the TTL value of the message is reduced to 0. The initial value of TTL is generally 255. If a traffic loop is formed in the forwarding of data streams between two or more network devices, the number of data streams may increase to 128 times the initial value, resulting in an interface bandwidth limit exceeded.
[0046] Currently, the autonomous system path information access list (AS-PATH) is used in the BGP protocol to prevent loops. Specifically, in a network using BGP, when a network device obtains a route containing the number of its own autonomous system (AS), it will discard the route to prevent traffic loops. However, in scenarios where data flows cross AS, routing loops still often occur. In addition, the current network is networked through multiple protocols, such as BGP, interior gateway protocol (IGP) (for example, open shortest path first (OSPF), routing information protocol (RIP) or IS-IS), static routing, etc. In other words, multiple network devices in the network are generally configured with multiple routing protocols, such as IGP, BGP or static routing, so when the anti-loop capability of some protocols themselves fails, it is easy to form a traffic loop.
[0047] In the present application, a network device obtains a traffic feature, and the traffic feature is the loop message rate of a target data stream or the sum of the loop message rates of one or more data streams, and the one or more data streams include the target data stream. Then, if the loop message rate is greater than or equal to the loop message rate threshold, or the sum of the loop message rates is greater than or equal to the loop message rate sum threshold, the network device determines that the traffic feature meets the loop feature, and performs the flow action corresponding to the loop feature on the target data stream. Thus, traffic loops can also be identified in cross-AS scenarios, and the data streams that form the traffic loops can be processed.
[0048] The following describes the two embodiments respectively.
[0049] For example, Figure 2 As shown, a data stream processing method provided in Embodiment 1 of the present application mainly includes the following steps:
[0050] 201. A network device receives a configured flow policy, where the flow policy includes loop characteristics and flow actions.
[0051] In some possible implementations, the flow policy includes loop characteristics and flow actions, wherein the loop characteristics are used to identify data flows that form traffic loops, and the flow actions are used to execute on the data flows to achieve purposes such as flow limiting.
[0052] In some possible implementations, the loop feature includes a loop message rate threshold, for example, the loop message rate threshold is 1000 per second, and if the loop message rate of a data flow is not less than the loop message rate threshold, it is determined that the data flow forms a traffic loop. The loop message rate is the number of data messages whose TTL value returns to zero in a single flow per unit time.
[0053] In some possible implementations, the loop feature may also include loop duration. The loop duration is a threshold value for the duration of a traffic feature of a data stream that satisfies the loop feature, such as 5 seconds. Then, when the traffic feature of a data stream satisfies the loop feature and the duration exceeds the loop duration, the data stream forms a traffic loop.
[0054] In some possible implementations, the flow action may be discarding or limiting, etc., which is not limited here. For example, limiting may be limiting the bandwidth to 1 megabyte / second (MB / S), or limiting the bandwidth to 1 / 128 of the original bandwidth, which is not limited here.
[0055] In some possible implementations, the flow strategy may include a plurality of loop features and a plurality of flow actions in one-to-one correspondence. For example, loop feature 1 corresponds to flow action 1, and loop feature 2 corresponds to flow action 2, which is not limited here. Exemplarily, loop feature 1 is loop message rate threshold 1 and loop duration 1, loop message rate threshold 1 is 1000 per second, corresponding to flow action 1, and flow action 1 is discard; loop feature 2 is loop message rate threshold 2 and loop duration 2, loop message rate threshold 2 is 1500 per second, and flow action 2 is flow limiting.
[0056] In some possible implementations, the controller may configure a flow policy on a network device so that the network device identifies a target data flow based on loop characteristics and performs a flow action on the data flow that forms a traffic loop.
[0057] In some possible implementations, the controller can configure loop characteristics on the network device so that the network device identifies the data flow that forms the loop based on the traffic characteristics of each data flow (such as the loop message rate) and the configured loop characteristics, and returns a message to the controller indicating that the data flow that forms the traffic loop has been determined. The controller then returns a flow action corresponding to the loop characteristic to the network device, and the network device can execute the flow action on the data flow to achieve purposes such as current limiting.
[0058] In some possible implementations, if the network device is only configured with loop characteristics but not flow actions, the controller may also send the traffic characteristics of the target data flow to the controller, allowing the controller to determine the corresponding flow action based on the traffic characteristics, and return the flow action information to the network device so that the network device can execute the flow action on the target data flow.
[0059] In some possible implementations, if the network device is only configured with an execution script but not with loop characteristics, the controller may also send the traffic characteristics of each data flow to the controller, allowing the controller to determine the target data flow that meets the loop characteristics based on the traffic characteristics of each data flow, and determine the flow action corresponding to the loop characteristics, and return the information of the flow action to the network device so that the network device can execute the flow action on the target data flow.
[0060] In some possible implementations, if the network device is only configured with an execution script but not with loop characteristics, the controller may also send the traffic characteristics of each data stream to the controller, allowing the controller to determine the data streams that meet the loop characteristics based on the traffic characteristics of each data stream, and return the information of these data streams to the network device.
[0061] In some possible implementations, the controller may configure an execution script on the network device so that the network device obtains the traffic characteristics of each data flow according to the execution script and uploads it to the controller. The controller determines the data flow and the corresponding flow action that form the traffic loop based on the traffic characteristics and loop characteristics of each data flow, and returns the traffic characteristics and the corresponding flow action to the network device. The network device can then execute the flow action on the traffic corresponding to the traffic characteristics to achieve the purpose of flow limiting, etc.
[0062] 202. The network device obtains traffic characteristics of the target data flow, where the traffic characteristics include a loop message rate.
[0063] In some possible implementations, the network device may receive data packets and obtain flow characteristics of the data packets. If two data packets have the same flow characteristics, the two data packets belong to the same data flow. If the two data packets do not have the same flow characteristics, the two data packets belong to different data flows.
[0064] It should be noted that data packets belonging to the same data flow have the same flow characteristics, and data packets not having the same flow characteristics belong to different data flows. In some possible implementations, the flow characteristics may include a five-tuple, and may also include a virtual native network (VPN), an inbound interface, an outbound interface, and / or other labels, which are not limited here.
[0065] In some possible implementations, the network device can obtain the traffic characteristics of each data flow, and the traffic characteristics can be the loop message rate of a data flow. Then, the network device can count the number of data messages whose TTL value of each data flow is zero within a unit time (for example, 1 second), thereby obtaining the loop message rate of each data flow.
[0066] 203. The network device determines that the traffic characteristics meet the loop characteristics, and the loop characteristics include a loop message rate threshold.
[0067] In some possible implementations, the network device may compare the traffic characteristics of the target data flow with various loop characteristics, and if the traffic characteristics of the target data flow satisfy one of the loop characteristics, it is determined that the target data flow forms a traffic loop.
[0068] In some possible implementations, when a network device receives a data message, if the TTL of the data message is 1, TTL = TTL-1 is executed to obtain TTL = 0. The flow characteristics of the data message are obtained, and the loop message rate of the data flow corresponding to the flow characteristics + 1 is counted. Then, the network device discards the data message and does not forward it.
[0069] In some possible implementations, when the TTL of the data message is 0, the network device still sends it to the next hop. When the next hop receives the data message with TTL = 0, it obtains the flow characteristics of the data message, and counts the loop message rate of the data flow corresponding to the flow characteristics + 1, and discards the data message instead of forwarding it.
[0070] Exemplarily, when the network device determines that the number of data packets whose TTL value returns to zero in data flow 1 within 1 second is 1000 (i.e., the traffic feature 1 of the data flow 1), and satisfies loop feature 1 (the loop message rate threshold is 1000 / second), and lasts for more than 5 seconds (loop duration), then the network device determines that data flow 1 forms a traffic loop.
[0071] 204. The network device determines that a trigger condition is met.
[0072] In some possible implementations, the flow strategy may also include a trigger condition. After the network device identifies the target data flow that forms a traffic loop based on the loop characteristics, it may perform a flow action corresponding to the loop characteristics on the target data flow when the trigger condition is met, which is not limited here. In some possible implementations, the flow strategy may also include a trigger duration. After the network device identifies the target data flow that forms a traffic loop based on the loop characteristics, it may perform a flow action corresponding to the loop characteristics on the target data flow when the trigger condition is met and the trigger duration is reached, which is not limited here.
[0073] For example, in a network device, the target data flow is data flow 1, the inbound interface of data flow 1 is interface 1, the flow rate 1 of interface 1 is 1000 / sec, and the flow rate threshold 1 is 1000 / sec, that is, the flow rate 1 of interface 1 meets the flow rate threshold 1 and lasts for 5 seconds, meeting the trigger duration 1. Then, the network device can execute the flow action 1 on data flow 1.
[0074] For example, the trigger condition is that the flow rate of the inbound interface / outbound interface of the traffic reaches the flow rate threshold (e.g., 100 megabytes / second), or the flow rate of the inbound interface / outbound interface of the traffic reaches the flow rate upper limit, or the flow load of the inbound interface / outbound interface of the target data flow reaches a preset proportion (e.g., 90% or 100%), which is not limited here. In some possible implementations, the inbound interface / outbound interface can be a physical interface, a sub-interface, a tunnel, or a slice, which is not limited here.
[0075] In some possible implementations, the flow policy also includes a trigger duration corresponding to the trigger condition, and when the trigger condition lasts for the trigger duration, the flow action is executed on the data flow. Exemplarily, the trigger duration is 5 seconds, then when the traffic meets the loop feature and the trigger condition is met and lasts for 5 seconds, the network device can execute the flow action on the data flow.
[0076] In some possible implementations, the flow strategy may include a one-to-one correspondence of multiple loop features, multiple trigger conditions, multiple trigger durations, and multiple flow actions. For example, loop feature 1, trigger condition 1, trigger duration 1, and flow action 1 correspond, and loop feature 2, trigger condition 2, trigger duration 2, and flow action 2 correspond, which are not limited here. Exemplarily, loop feature 1 is loop message rate threshold 1, loop message rate threshold 1 is 1000 / second, trigger condition 1 is that the flow rate of the inbound interface of the flow reaches a preset proportion 1 (for example, 90%), trigger duration 1 is 5 seconds, and flow action 1 is discard; loop feature 2 is loop message rate threshold 2, loop message rate threshold 2 is 1500 / second, trigger condition 2 is that the flow rate of the inbound interface of the flow reaches a preset proportion 2 (for example, 100%), trigger duration 1 is 10 seconds, and flow action 2 is flow limiting. This is not limited here.
[0077] 205. The network device performs a flow action on the target data flow.
[0078] In some possible implementations, after the network device determines a target data flow that meets the loop characteristics, it can determine a flow action corresponding to the loop characteristics of the target data flow, and execute the flow action on the target data flow.
[0079] In some possible implementations, when the network device determines a target data flow that meets the loop characteristics and meets the trigger conditions and trigger duration, it can determine the flow action corresponding to the loop characteristics of the target data flow and execute the flow action on the target data flow.
[0080] In some possible implementations, the network device may obtain the flow characteristics and flow actions of the target data flow, and write the flow characteristics and the flow actions into a corresponding suppression table as corresponding suppression table entries.
[0081] Exemplarily, the network device may generate a suppression table entry, the suppression table entry includes the flow feature of the target data flow and the flow action, the flow feature is used to identify that the data message belongs to the target data flow, and the flow action is used to execute on the data message. Then, when the network device receives the data message, it can obtain the flow feature of the data message and determine the flow action corresponding to the flow feature based on the suppression table entry.
[0082] In some possible implementations, after the target data flow is identified, the network device may start a flow suppression function. Only when the data flow suppression function is started will the flow action be queried in the suppression table and executed.
[0083] In some possible implementations, the suppression table may record multiple suppression entries, each of which may record different flow characteristics and flow actions. For example, suppression entry 1 records flow characteristic 1 and flow action 1, and suppression entry 2 records flow characteristic 2 and flow action 2.
[0084] Exemplarily, when data packet 1 is received, if the flow feature of data packet 1 meets the flow feature 1 of target data flow 1, it is determined that data packet 1 belongs to target data flow 1, and the flow action 1 corresponding to flow feature 1 is determined. If flow action 1 is discard, the network device discards data packet 1; if flow action 1 is flow limiting, the network device limits the flow of data packet 1.
[0085] In some possible implementations, when the flow is discarded, the network device can set the TTL of the data message of the target data flow to 0 and then discard it. For example, the network device receives a data message, obtains the flow characteristics of the data message, and if the flow characteristics meet the loop characteristics, it is determined that the data message belongs to the target data flow. Then the TTL of the data message is set to 0, for example, if the TTL of the data message is 30, it is set to TTL=0 and then discarded.
[0086] In some possible implementations, when the flow is used as a flow limiter, the network device can set the TTL of the data message of the target data flow to a value > 0. For example, the network device receives a data message and obtains the flow characteristics of the data message. If the flow characteristics meet the loop characteristics, it is determined that the data message belongs to the target data flow. For example, the TTL of the data message = 200, and the network device can set the TTL of the data message to 20. Then, if the target data flow has formed a traffic loop, the TTL of the data message will drop to 0 after 20 forwardings, and finally be discarded. Compared with being forwarded 200 times, the flow limiting effect is achieved.
[0087] In the embodiment of the present application, by executing a flow action on the target data flow, the congestion of the input interface / output interface is alleviated, so that normal data flows can be smoothly received and sent.
[0088] In some possible implementations, the network device may obtain the flow characteristics and flow actions of the target data flow, and correspond the flow characteristics and the flow actions to routing table entries.
[0089] Exemplarily, the network device may store routing table entries and the flow actions correspondingly, the routing table entries include flow features of the target data flow, the flow features are used to identify that the data message belongs to the target data flow, and the flow actions are used to execute on the data message. Then, when the network device receives the data message, it can obtain the flow features of the data message and determine the corresponding flow action based on the routing table entries.
[0090] In some possible implementations, if a routing table entry corresponding to the flow feature is queried in the routing table, the flow action corresponding to the routing table entry can be executed on the data packet. In some possible implementations, after the target data flow is identified, the network device can start the flow suppression function. Only when the data flow suppression function is started can the flow action corresponding to the routing table entry be determined and executed.
[0091] In some possible implementations, different routing table entries in the routing table may correspond to different flow actions. For example, routing table entry 1 corresponds to flow action 1, and routing table entry 2 corresponds to flow action 2.
[0092] 206. The network device sends a loop alarm message.
[0093] In some possible implementations, after the network device determines the target data flow that forms the traffic loop, the network device may generate a loop alarm message so that relevant personnel can troubleshoot and handle the situation where the traffic loop is formed. In some possible implementations, the loop alarm message may include flow characteristics and flow characteristics of the target data flow, as well as corresponding loop characteristics and / or flow action information.
[0094] In some possible implementations, when the network device determines the target data flow that forms a traffic loop and meets the triggering conditions, the network device can generate a loop alarm message so that relevant personnel can troubleshoot and handle the situation of forming a traffic loop. In some possible implementations, the loop alarm message may include the flow characteristics and flow characteristics of the target data flow, as well as the corresponding loop characteristics and / or flow action information, and may also include the triggering condition information. This is not limited here.
[0095] In some possible implementations, the network device may send the loop alarm information to the controller, or may send the loop alarm information to the source device of the target data flow, which is not limited here.
[0096] 207. The network device stops executing the flow action.
[0097] In some possible implementations, the flow policy may further include an end mechanism corresponding to the flow action. In some possible implementations, the end mechanism corresponding to the flow action may be a preset flow action execution duration of the flow action, that is, after executing the flow action execution duration of the flow, the flow action is terminated.
[0098] In some possible implementations, the end mechanism corresponding to the flow action can be written into the corresponding suppression table entry. Exemplarily, flow action 1 corresponds to end mechanism 1, and flow action 2 corresponds to end mechanism 2, where end mechanism 1 is flow action execution duration 2 = 5 minutes, and end mechanism 2 is flow action execution duration 2 = 10 minutes. This is not limited here.
[0099] In some possible implementations, when the network device executes the flow action, a timer is started, and the duration of the timer is the flow action execution duration. Then, after the flow action execution duration ends, the network device stops executing the corresponding flow action on the target data flow.
[0100] In some possible implementations, after the network device stops executing the flow action on the target data flow, the corresponding suppression table entry may be deleted, or the suppression table entry may be set to an inactive state. In some possible implementations, after the network device stops executing the flow action on the target data flow, the target data flow may continue to be monitored to determine whether the target data flow has a loop feature within a certain time period and / or whether the trigger condition is satisfied (the trigger duration is reached). If the target data flow does not have a loop feature within a certain time period and does not satisfy the trigger condition (or satisfies the trigger condition but does not reach the trigger duration), the suppression table entry corresponding to the target data flow may be deleted, or the suppression table entry may be set to an inactive state.
[0101] In the present application, the network device first obtains the traffic characteristics of the target data flow, and the traffic characteristics include the loop message rate. If the loop message rate is greater than or equal to the loop message rate threshold, the network device determines that the traffic characteristics meet the loop characteristics, and performs the flow action on the target data flow, so that the traffic loop can also be identified in the cross-AS scenario, and the data flow that forms the traffic loop is processed.
[0102] For example, Figure 3 As shown, a data stream processing method provided in Embodiment 2 of the present application mainly includes the following steps:
[0103] 301. A network device receives a configured flow policy, where the flow policy includes loop characteristics and flow actions.
[0104] In some possible implementations, the flow strategy includes loop characteristics and flow actions, wherein the loop characteristics are used to determine the formation of a flow loop, and the flow action is used to execute on the flow to achieve the purpose of flow limiting, etc.
[0105] In some possible implementations, the loop feature includes a loop message rate sum threshold, for example, the loop message rate sum threshold is 10,000 per second, and if the sum of the loop message rates of the various data streams received by the network device is not less than the loop message rate sum threshold, it is determined that a traffic loop is formed. The loop message rate sum is the sum of the number of data messages whose TTL values are zero in all data streams received by the network device within a unit time.
[0106] In some possible implementations, the loop feature may also include a total loop duration. The total loop duration is the duration during which the sum of the loop message rates of all data streams received in the network device is not less than the loop message rate sum threshold, for example, 50 seconds. Then, when the total loop duration of all data streams received in the network device is not less than the duration of the loop message rate sum threshold, and the duration exceeds the loop duration, it is determined that a traffic loop is formed.
[0107] In some possible implementations, the flow action may be discarding or limiting, etc., which is not limited here. For example, limiting may be limiting the bandwidth to 1 megabyte / second (MB / S), or limiting the bandwidth to 1 / 128 of the original bandwidth, which is not limited here.
[0108] In some possible implementations, the flow strategy may include a plurality of loop features and a plurality of flow actions in one-to-one correspondence. For example, loop feature 1 corresponds to flow action 1, and loop feature 2 corresponds to flow action 2, which is not limited here. Exemplarily, loop feature 1 is loop message rate sum threshold 1 and total loop duration 1, loop message rate sum threshold 1 is 10,000 per second, corresponding to flow action 1, flow action 1 is discard; loop feature 2 is loop message rate sum threshold 2 and total loop duration 2, loop message rate sum threshold 2 is 1,500 per second, and flow action 2 is flow limiting.
[0109] In some possible implementations, the controller may configure a flow policy on a network device so that the network device determines that a traffic loop has occurred based on loop characteristics and performs a flow action on the data flow.
[0110] In some possible implementations, the controller can configure loop characteristics on the network device so that the network device identifies the data flow that forms the loop based on the traffic characteristics of each data flow (such as the sum of the loop message rates) and the configured loop characteristics, and returns a message to the controller indicating that the data flow that forms the traffic loop has been determined. The controller then returns a flow action corresponding to the loop characteristic to the network device, and the network device can execute the flow action on the data flow to achieve purposes such as current limiting.
[0111] In some possible implementations, if the network device is only configured with loop characteristics but not flow actions, the controller may also send the traffic characteristics of the target data flow to the controller, allowing the controller to determine the corresponding flow action based on the traffic characteristics, and return the flow action information to the network device so that the network device can execute the flow action on the target data flow.
[0112] In some possible implementations, if the network device is only configured with an execution script but not with loop characteristics, the controller may also send the traffic characteristics of each data flow to the controller, allowing the controller to determine the target data flow that meets the loop characteristics based on the traffic characteristics of each data flow, and determine the flow action corresponding to the loop characteristics, and return the information of the flow action to the network device so that the network device can execute the flow action on the target data flow.
[0113] In some possible implementations, if the network device is only configured with an execution script but not with loop characteristics, the controller may also send the traffic characteristics of each data stream to the controller, allowing the controller to determine the data streams that meet the loop characteristics based on the traffic characteristics of each data stream, and return the information of these data streams to the network device.
[0114] In some possible implementations, the controller may configure an execution script on the network device so that the network device obtains the traffic characteristics of each data flow according to the execution script and uploads it to the controller. The controller determines the data flow and the corresponding flow action that form the traffic loop based on the traffic characteristics and loop characteristics of each data flow, and returns the traffic characteristics and the corresponding flow action to the network device. The network device can then execute the flow action on the traffic corresponding to the traffic characteristics to achieve the purpose of flow limiting, etc.
[0115] 302. The network device obtains a loop message rate of one or more data flows.
[0116] In some possible implementations, the network device may receive multiple data packets and obtain the flow characteristics of each of the multiple data packets. If two data packets have the same flow characteristics, the two data packets belong to the same data flow. If the two data packets do not have the same flow characteristics, the two data packets belong to different data flows.
[0117] It should be noted that data packets belonging to the same data flow have the same flow characteristics, and data packets not having the same flow characteristics belong to different data flows. In some possible implementations, the flow characteristics may include a five-tuple, and may also include a virtual native network (VPN), an inbound interface, an outbound interface, and / or other labels, which are not limited here.
[0118] 303. The network device determines that the traffic feature meets the loop feature, where the loop feature includes a loop message rate sum threshold, and the traffic feature is the sum of loop message rates of one or more data flows.
[0119] In some possible implementations, when a network device receives a data message, if the TTL of the data message is 1, TTL = TTL-1 is executed to obtain TTL = 0. The flow characteristics of the data message are obtained, and the loop message rate of the data flow corresponding to the flow characteristics + 1 is counted. Then, the network device discards the data message and does not forward it.
[0120] In some possible implementations, when the TTL of the data message is 0, the network device still sends it to the next hop. When the next hop receives the data message with TTL = 0, it obtains the flow characteristics of the data message, and counts the loop message rate of the data flow corresponding to the flow characteristics + 1, and discards the data message instead of forwarding it.
[0121] Exemplarily, when the network device determines that the total number of data packets whose TTL values return to zero in all received data streams within 1 second is 10,000, the loop characteristic is met (the total loop message rate threshold is 1,000 / second), and it lasts for more than 50 seconds (total loop duration), then the network device determines that a traffic loop has been formed.
[0122] In some possible implementations, the network device can obtain the traffic characteristics of each data flow, and the traffic characteristics can be the loop message rate of a data flow. Then, the network device can count the number of data messages whose TTL values of each data flow are reset to zero within a unit time (for example, 1 second), thereby obtaining the loop message rate of each data flow, and summing up the loop message rates of each data flow to obtain the sum of the loop message rates of one or more data flows.
[0123] 304. The network device determines that a trigger condition is met.
[0124] Please refer to step 204, which will not be described in detail here.
[0125] 305. The network device performs a flow action on the target data flow.
[0126] In some possible implementations, after the network device determines that a traffic loop is formed, all data flows can be sorted according to the size of the loop message rate, and a preset number of flows can be determined as target data flows to obtain one or more target data flows. In some possible implementations, the sum of the loop message rates of each target data flow in the one or more target data flows is not less than the loop message rate sum threshold.
[0127] In some possible implementations, after the network device determines one or more target data flows, it may determine a flow action corresponding to the loop feature and execute the flow action on the one or more target data flows.
[0128] In some possible implementations, the network device may obtain the flow characteristics and flow actions of the target data flow, and write the flow characteristics and the flow actions into a corresponding suppression table as corresponding suppression table entries.
[0129] Exemplarily, the network device may generate a suppression table entry, the suppression table entry includes the flow feature of the target data flow and the flow action, the flow feature is used to identify that the data message belongs to the target data flow, and the flow action is used to execute on the data message. Then, when the network device receives the data message, it can obtain the flow feature of the data message and determine the flow action corresponding to the flow feature based on the suppression table entry.
[0130] In some possible implementations, after the target data flow is identified, the network device may start a flow suppression function. Only when the data flow suppression function is started will the flow action be queried in the suppression table and executed.
[0131] In some possible implementations, the suppression table may record multiple suppression entries, each of which may record different flow characteristics and flow actions. For example, suppression entry 1 records flow characteristic 1 and flow action 1, and suppression entry 2 records flow characteristic 2 and flow action 2.
[0132] Exemplarily, when data packet 1 is received, if the flow feature of data packet 1 meets the flow feature 1 of target data flow 1, it is determined that data packet 1 belongs to target data flow 1, and the flow action 1 corresponding to flow feature 1 is determined. If flow action 1 is discard, the network device discards data packet 1; if flow action 1 is flow limiting, the network device limits the flow of data packet 1.
[0133] In some possible implementations, when the flow is discarded, the network device can set the TTL of the data message of the target data flow to 0 and then discard it. For example, the network device receives a data message, obtains the flow characteristics of the data message, and if the flow characteristics meet the loop characteristics, it is determined that the data message belongs to the target data flow. Then the TTL of the data message is set to 0, for example, if the TTL of the data message is 30, it is set to TTL=0 and then discarded.
[0134] In some possible implementations, when the flow is used as a flow limiter, the network device can set the TTL of the data message of the target data flow to a value > 0. For example, the network device receives a data message and obtains the flow characteristics of the data message. If the flow characteristics meet the loop characteristics, it is determined that the data message belongs to the target data flow. For example, the TTL of the data message = 200, and the network device can set the TTL of the data message to 20. Then, if the target data flow has formed a traffic loop, the TTL of the data message will drop to 0 after 20 forwardings, and finally be discarded. Compared with being forwarded 200 times, the flow limiting effect is achieved.
[0135] In the embodiment of the present application, by executing a flow action on the target data flow, the congestion of the input interface / output interface is alleviated, so that normal data flows can be smoothly received and sent.
[0136] In some possible implementations, the network device may obtain the flow characteristics and flow actions of the target data flow, and correspond the flow characteristics and the flow actions to routing table entries.
[0137] Exemplarily, the network device may store routing table entries and the flow actions correspondingly, the routing table entries include flow features of the target data flow, the flow features are used to identify that the data message belongs to the target data flow, and the flow actions are used to execute on the data message. Then, when the network device receives the data message, it can obtain the flow features of the data message and determine the corresponding flow action based on the routing table entries.
[0138] In some possible implementations, if a routing table entry corresponding to the flow feature is queried in the routing table, the flow action corresponding to the routing table entry can be executed on the data packet. In some possible implementations, after the target data flow is identified, the network device can start the flow suppression function. Only when the data flow suppression function is started can the flow action corresponding to the routing table entry be determined and executed.
[0139] In some possible implementations, different routing table entries in the routing table may correspond to different flow actions. For example, routing table entry 1 corresponds to flow action 1, and routing table entry 2 corresponds to flow action 2.
[0140] 306. The network device sends a loop alarm message.
[0141] Please refer to step 206, which is not limited here.
[0142] 307. The network device stops executing the flow action.
[0143] Please refer to step 207, which is not limited here.
[0144] In the present application, the network device first obtains the traffic characteristics of the target data flow, and the traffic characteristics include the sum of the loop message rates of one or more data flows. If the sum of the loop message rates is greater than or equal to the loop message rate sum threshold, the network device determines that the traffic characteristics meet the loop characteristics and performs a flow action on the target data flow, so that the traffic loop can also be identified in the cross-AS scenario, and the target data flow that forms the traffic loop can be processed.
[0145] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0146] In order to better implement the above-mentioned solution of the embodiment of the present application, relevant devices for implementing the above-mentioned solution are also provided below.
[0147] See also Figure 4 As shown, a network device 400 provided in an embodiment of the present application may include:
[0148] The transceiver module 401 is used to obtain traffic characteristics, where the traffic characteristics are the loop message rate of the target data flow or the sum of the loop message rates of one or more data flows, and the one or more data flows include the target data flow; the processing module 402 is used to determine that the traffic characteristics meet the loop characteristics if the loop message rate is greater than or equal to the loop message rate threshold, or the sum of the loop message rates is greater than or equal to the loop message rate sum threshold; the processing module 402 is also used to execute the flow action corresponding to the loop characteristic on the target data flow.
[0149] In some possible implementations, the transceiver module 401 is further configured to receive a configured flow strategy, where the flow strategy includes the loop feature and the flow action.
[0150] In some possible implementations, the processing module 402 is also used to generate a suppression table entry, the suppression table entry includes the flow characteristics of the target data flow and the flow action, the flow characteristics are used to identify that the data packet belongs to the target data flow, and the flow action is used to execute on the data packet; the transceiver module 401 is also used to receive the data packet and obtain the flow characteristics of the data packet; the processing module 402 is also used to determine the flow action corresponding to the flow characteristics based on the suppression table entry.
[0151] In some possible implementations, the processing module 402 is also used to store routing table entries and the flow actions correspondingly, the routing table entries include flow characteristics of the target data flow, the flow characteristics are used to identify that the data packet belongs to the target data flow, and the flow action is used to execute on the data packet; the transceiver module 401 is also used to receive the data packet and obtain the flow characteristics of the data packet; the processing module 402 is also used to determine the corresponding flow action based on the routing table entry.
[0152] In some possible implementations, the transceiver module 401 is also used to obtain the traffic rate or traffic load of the input interface / output interface of the target data flow; the processing module 402 is also used to determine that the traffic rate is not less than the traffic rate threshold, or that the traffic load is not less than a preset ratio.
[0153] In some possible implementations, the transceiver module 401 is further configured to send loop alarm information.
[0154] In some possible implementations, the flow strategy further includes a flow action execution time, and the processing module 402 is further configured to stop executing the flow action after the flow action execution time has elapsed.
[0155] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.
[0156] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a program, and the program executes some or all of the steps recorded in the above method embodiment.
[0157] Next, another communication device provided by the embodiment of the present application is introduced. Figure 5 As shown, the communication device 500 includes:
[0158] Receiver 501, transmitter 502, processor 503 and memory 504. In some embodiments of the present application, the receiver 501, transmitter 502, processor 503 and memory 504 may be connected via a bus or other means, wherein: Figure 5 The example of connecting through bus is taken in the following.
[0159] The memory 504 may include a read-only memory and a random access memory, and provides instructions and data to the processor 503. A portion of the memory 504 may also include a non-volatile random access memory (NVRAM). The memory 504 stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
[0160] The processor 503 controls the operation of the communication device 500, and the processor 503 may also be referred to as a central processing unit (CPU). In a specific application, the various components of the communication device 500 are coupled together through a bus system, wherein the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0161] The method disclosed in the above embodiment of the present application can be applied to the processor 503, or implemented by the processor 503. The processor 503 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 503. The above processor 503 can be a general processor, a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 504, and the processor 503 reads the information in the memory 504 and completes the steps of the above method in combination with its hardware.
[0162] The receiver 501 may be used to receive input digital or character information and generate signal input related to relevant settings and function control. The transmitter 502 may include a display device such as a display screen. The transmitter 502 may be used to output digital or character information through an external interface.
[0163] In the embodiment of the present application, the processor 503 is used to execute the aforementioned data stream processing method.
[0164] In another possible design, when the network device 400 or the communication device 500 is a chip, it includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit, etc. The processing unit may execute the computer execution instructions stored in the storage unit, so that the chip in the terminal executes the method for sending wireless report information of any one of the above-mentioned first aspects. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit in the terminal located outside the chip, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0165] The processor mentioned in any of the above places may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above method.
[0166] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0167] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0168] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0169] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A data stream processing method, It is characterized in that include: The network device acquires a traffic feature, where the traffic feature is a loop message rate of a target data flow or a sum of loop message rates of one or more data flows, where the one or more data flows include the target data flow; If the loop message rate is greater than or equal to the loop message rate threshold, or the loop message rate sum is greater than or equal to the loop message rate sum threshold, the network device determines that the traffic feature meets the loop feature; The network device executes a flow action corresponding to the loop feature on the target data flow.
2. The method according to claim 1, It is characterized in that The method further comprises: The network device receives a configured flow policy, where the flow policy includes the loop characteristic and the flow action.
3. The method according to claim 1 or 2, It is characterized in that The flow is used as a discard or restrictor.
4. The method according to any one of claims 1 to 3, It is characterized in that After the network device determines that the traffic feature meets the loop feature, the method includes: The network device generates a suppression table entry, the suppression table entry includes a flow feature of the target data flow and the flow action, the flow feature is used to identify that the data message belongs to the target data flow, and the flow action is used to be executed on the data message; The network device receives the data message and obtains the flow characteristics of the data message; The network device determines the flow action corresponding to the flow feature based on the suppression table entry.
5. The method according to any one of claims 1 to 3, It is characterized in that After the network device determines that the traffic feature meets the loop feature, the method includes: The network device stores a routing table entry and the flow action correspondingly, the routing table entry includes a flow feature of the target data flow, the flow feature is used to identify that the data message belongs to the target data flow, and the flow action is used to execute on the data message; The network device receives the data message and obtains the flow characteristics of the data message; The network device determines the corresponding flow action based on the routing table entry.
6. The method according to any one of claims 1 to 5, It is characterized in that Before the network device performs the flow action corresponding to the loop feature on the target data flow, the method further includes: The network device obtains the flow rate or flow load of the input interface / output interface of the target data flow; The network device determines that the traffic rate is not less than a traffic rate threshold, or that the traffic load is not less than a preset ratio.
7. The method according to any one of claims 1 to 6, It is characterized in that After the network device determines that the traffic feature meets the loop feature, the method further includes: The network device sends loop alarm information.
8. The method according to any one of claims 1 to 7, It is characterized in that The flow strategy also includes a flow action execution duration. After the network device executes the flow action corresponding to the loop feature on the target data flow, the method further includes: The network device stops executing the flow action after the flow action execution time has passed.
9. A network device, It is characterized in that include: A transceiver module, configured to obtain a traffic feature, wherein the traffic feature is a loop message rate of a target data flow or a sum of loop message rates of one or more data flows, wherein the one or more data flows include the target data flow; A processing module, configured to determine that the traffic feature meets the loop feature if the loop message rate is greater than or equal to the loop message rate threshold, or the loop message rate sum is greater than or equal to the loop message rate sum threshold; The processing module is further used to execute the flow action corresponding to the loop feature on the target data flow.
10. The network device according to claim 9, It is characterized in that The method further comprises: The transceiver module is further used to receive a configured flow strategy, where the flow strategy includes the loop feature and the flow action.
11. The network device according to claim 9 or 10, It is characterized in that The processing module is further used to generate a suppression table entry, wherein the suppression table entry includes a flow feature of the target data flow and the flow action, wherein the flow feature is used to identify that the data message belongs to the target data flow, and the flow action is used to be executed on the data message; The transceiver module is further used to receive the data message and obtain the flow characteristics of the data message; The processing module is further configured to determine the flow action corresponding to the flow feature based on the suppression table entry.
12. The network device according to any one of claims 9 or 10, It is characterized in that The processing module is further used to store routing table entries and the flow actions in correspondence, the routing table entries include flow features of the target data flow, the flow features are used to identify that the data message belongs to the target data flow, and the flow actions are used to be executed on the data message; The transceiver module is further used to receive the data message and obtain the flow characteristics of the data message; The processing module is further configured to determine the corresponding flow action based on the routing table entry.
13. The network device according to any one of claims 9 to 12, It is characterized in that The transceiver module is further used to obtain the flow rate or flow load of the input interface / output interface of the target data flow; The processing module is further configured to determine that the flow rate is not less than a flow rate threshold, or that the flow load is not less than a preset ratio.
14. The network device according to any one of claims 9 to 13, It is characterized in that The transceiver module is also used to send loop alarm information.
15. The network device according to any one of claims 9 to 14, It is characterized in that The flow strategy also includes the flow action execution time. The processing module is further configured to stop executing the flow action after the flow action has been executed for a certain period of time.
16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a program, and the program causes a computer device to execute the method according to any one of claims 1 to 8.
17. A computer program product, It is characterized in that The computer program product includes computer-executable instructions, which are stored in a computer-readable storage medium; at least one processor of a device reads the computer-executable instructions from the computer-readable storage medium, and the at least one processor executes the computer-executable instructions so that the device performs the method as described in any one of claims 1-8.
18. A communication device, It is characterized in that The communication device includes at least one processor, a memory and a communication interface; The at least one processor is coupled to the memory and the communication interface; The memory is used to store instructions, the processor is used to execute the instructions, and the communication interface is used to communicate with other communication devices under the control of the at least one processor; When the instructions are executed by the at least one processor, the at least one processor is caused to perform the method according to any one of claims 1 to 8.
19. A chip system, It is characterized in that The chip system includes a processor and a memory, the memory and the processor are interconnected via a line, instructions are stored in the memory, and the processor is used to execute the method as described in any one of claims 1-8.