Network device
Through artificial intelligence-assisted flow identification and queue-free flow control based on packet loss, the problems of low bandwidth utilization and increased costs of network devices in different types of flow control are solved, and efficient traffic management and QoS are achieved.
Patent Information
- Application Number
- CN202510294525.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-01-03
- Filing Date
- 2025-03-13
- Publication Date
- 2025-09-16
AI Technical Summary
When implementing Quality of Service (QoS), existing network devices find it difficult to effectively distinguish and control different types of flows without priority queues, especially when transmitting between local area networks and wide area networks, resulting in low bandwidth utilization and increased costs.
It uses artificial intelligence-assisted flow identification circuits and a queue-free flow control solution based on packet loss. It uses machine learning to identify some flow types and dynamically adjusts the packet loss rate to achieve flow control, avoiding the cost increase brought by complex models.
Without increasing implementation costs, it achieves accurate identification and control of different flow types, improves network bandwidth utilization, and provides good user quality of experience (QOE).
Smart Images

Figure CN120658685A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to forwarding network data packets from one network to another, and more particularly to a network device having flow identification and / or drop-based queue-less traffic control using artificial intelligence (AI). Background Art
[0002] Quality of service (QoS) addresses the diverse needs of various network applications. Generally, network devices (such as gateways or switches) classify upstream flows at the ingress stage, map different flow types to different priority queues at the egress stage, and implement QoS through queue scheduling, which determines how packets in the different priority queues are forwarded. Specifically, when network congestion occurs, queue scheduling is often used to address the problem of multiple flows competing for limited resources. However, for downstream applications, priority queues are not available because the bandwidth of local area networks (LANs) is much greater than that of wide area networks (WANs). Therefore, an innovative queue-free flow control scheme is needed that can implement flow control (i.e., rate control) for different types of flows without priority queues. In addition, the performance of the flow control stage is highly dependent on the previous flow classification stage. Therefore, an innovative flow classification scheme is also needed that can accurately distinguish low-priority flows (e.g., file transfer flows) from high-priority flows (e.g., low-latency flows and video streams) without significantly increasing the implementation cost. Summary of the Invention
[0003] One of the objectives of the present invention is to provide a network device with artificial intelligence-based flow identification and / or queue-free flow control based on packet loss.
[0004] In one embodiment of the present invention, a network device is disclosed. The network device includes artificial intelligence-based flow identification circuitry and flow classification circuitry. The artificial intelligence-based flow identification circuitry is configured to, through machine learning, identify only a plurality of specific flows from a subset of a plurality of predetermined flow types and generate a flow type coverage indicator for each of the specific flows from a plurality of flows received by the network device. The flow classification circuitry is configured to classify each of the plurality of flows into one of the plurality of predetermined flow types. The artificial intelligence-based flow identification circuitry generates a flow type coverage indicator for a first flow from the plurality of flows; and in response to the first flow type coverage indicator for the first flow, the flow classification circuitry classifies the first flow into the first flow type from the plurality of predetermined flow types, regardless of the flow rate of the first flow. The artificial intelligence-based flow identification circuitry does not generate a flow type coverage indicator for a second flow from the plurality of flows; and the flow classification circuitry classifies the second flow into either the first flow type or the second flow type from the plurality of predetermined flow types based on the flow rate of the second flow.
[0005] In one embodiment of the present invention, a network device is disclosed. The network device includes flow classification circuitry and flow control circuitry. The flow classification circuitry is configured to classify each of a plurality of flows received by the network device into one of a plurality of predetermined flow types. The flow control circuitry is configured to apply packet loss-based queue-free flow control to at least one of the plurality of flows after the at least one flow in the plurality of flows is classified into at least one of the plurality of predetermined flow types.
[0006] The AI-powered flow identification circuit proposed in this invention does not need to identify flows of the predetermined Type_0 and Type_1 types. This eliminates the need for complex machine learning models to identify flows of the predetermined Type_2 type. This allows accurate identification of Type_2 flows without significantly increasing implementation costs. Furthermore, to achieve high network bandwidth utilization during traffic control, the present invention proposes using a control circuit to dynamically adjust the packet loss rate assigned to the predetermined Type_2 flow type. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 FIG. 4 is a schematic diagram of a network device according to an embodiment of the present invention.
[0008] Figure 2 4 is a schematic diagram of a packet loss-based rate control solution supported by a flow control circuit operating without a QoS priority queue according to an embodiment of the present invention.
[0009] Figure 3 FIG. 4 is a schematic diagram of a meter-based rate control scheme supported by a flow control circuit operating without a QoS priority queue according to an embodiment of the present invention.
[0010] Figure 4 FIG. 4 is a schematic diagram of a modified differential cyclic rate control scheme supported by a flow control circuit operating without a QoS priority queue according to an embodiment of the present invention.
[0011] Figure 5 FIG. 1 is a schematic diagram illustrating the operation of a modified differential cycle rate control scheme according to an embodiment of the present invention.
[0012] Figure 6 Schematic diagram of the relationship between the difference value, the refill count value and the average refill count value according to an embodiment of the present invention.
[0013] Figure 7 A schematic diagram of the first collaborative working design according to an embodiment of the present invention.
[0014] Figure 8 This is a schematic diagram of a second collaborative working design according to an embodiment of the present invention.
[0015]
Explanation of symbols
[0016] 100: Network device
[0017] 102: Flow table
[0018] 104: Flow recognition circuit with the help of artificial intelligence
[0019] 106: Flow classification circuit
[0020] 108: Flow control circuit
[0021] 110: Control circuit
[0022] 112: Selective queuing and scheduling circuits
[0023] 114: Stream-by-stream rate estimation circuit
[0024] 116: Flow Scheduling Circuit
[0025] 502: Decision Logic
[0026] 504, 506: Multitasker
[0027] 702, 704, 706, 802, 804: output queues
[0028] PKT_IN: input data packet
[0029] PKT_OUT: output data packet
[0030] flow[k]: flow
[0031] flow[k].rate: flow rate
[0032] force_to_type_n: Stream type override indication
[0033] Type_0, Type_1, Type_2: Predetermined flow types
[0034] Type0_TH, Type2_TH: Threshold
[0035] Drop_P, Drop_P0, Drop_P1, Drop_P2: packet loss rate
[0036] trTCM: Dual-Rate Three-Color Marking
[0037] RS_0, RS_1, RS_2, RS_3, RS_4: Rate setting
[0038] W_0, W_1, W_2: weighted quantitative values DETAILED DESCRIPTION
[0039] Certain words are used in the specification and the scope of the patent application to refer to specific components. It should be understood by those with ordinary knowledge in the art that hardware manufacturers may use different terms to refer to the same component. This specification and the scope of the patent application do not use the difference in name as a way to distinguish components, but use the difference in function of the components as the criterion for distinction. The terms "including" and "comprising" mentioned throughout the specification and the scope of the patent application are open-ended terms and should be interpreted as "including but not limited to". In addition, the term "coupling" or "coupling" herein includes any direct and indirect electrical connection means. Therefore, if the text describes a first device coupled to a second device, it means that the first device can be directly electrically connected to the second device, or indirectly electrically connected to the second device through other devices and connection means.
[0040] Figure 11 is a schematic diagram of a network device according to an embodiment of the present invention. For example (but the present invention is not limited thereto), network device 100 may be a home gateway, configured to forward data packets from a first network to a second network, wherein one of the first and second networks may be a wide area network (WAN), and the other may be a local area network (LAN). For example, for downlink applications, network device 100 may receive ingress packets from the WAN and transmit egress packets to the LAN. For another example, for uplink applications, network device 100 may receive ingress packets from the LAN and transmit egress packets to the WAN. However, these examples are provided for illustrative purposes only and are not intended to limit the present invention. In practice, any network device utilizing the AI-based flow identification solution and / or the packet loss-based queue-free flow control solution proposed in the present invention falls within the scope of the present invention.
[0041] In this embodiment, network device 100 may include a flow table 102, AI-aided flow identification circuitry 104, flow classification circuitry 106, traffic control circuitry 108, control circuitry 110, and optional queuing and scheduling circuitry 112. Flow classification circuitry 106 may include per-flow rate estimation circuitry 114 and flow dispatcher circuitry 116. Network device 100 is configured to receive input packets PKT_IN from a first network and transmit output packets PKT_OUT to a second network. For example, the input packets PKT_IN may be generated by an upstream application, the first network may be a local area network, and the second network may be a wide area network. For another example, the input packets PKT_IN may be generated by a downstream application, the first network may be a wide area network, and the second network may be a local area network. The queuing and scheduling circuit 112 may include multiple priority queues and may support traditional QoS queue scheduling algorithms, including strict priority (hereinafter referred to as "SP"), weighted round-robin (hereinafter referred to as "WRR"), etc. In the case where the input data packet PKT_IN is generated by an uplink application, the queuing and scheduling circuit 112 may be enabled or disabled (or bypassed) based on actual design considerations. In another case where the input data packet PKT_IN is generated by a downlink application, the queuing and scheduling circuit 112 may be disabled (or bypassed). Since the focus of the present invention is on the proposed AI-assisted flow identification scheme and the proposed packet loss-based queue-free flow control scheme, for the sake of brevity, further description of the selective queuing and scheduling circuit 112 is omitted here. Please note that Figure 1 Only components related to the present invention are shown. In practice, the network device 100 may include additional components to implement other specified functions.
[0042] Flow table 102 may include multiple flow entries. Each flow entry records identification information for a specific flow. For example, the identification information may include a port number, source address, and destination address. Therefore, an input packet PKT_IN that matches the identification information recorded in a flow entry may be considered a packet belonging to the flow associated with that flow entry. Flow table 102 may be used to distinguish between different flows received by network device 100.
[0043] The AI-enabled flow identification circuit 104 is configured to identify, through machine learning (ML), only a plurality of specific flows of a portion of flow types (e.g., Type_2) among a plurality of predetermined flow types (e.g., Type_0, Type_1, and Type_2), and generate a flow-type override indication (force_to_type_n) for each of the plurality of specific flows among the plurality of flows received by the network device 100. For example, the predetermined flow type Type_0 may be a low-latency flow type with the highest priority (i.e., Type_0=LL), the predetermined flow type Type_1 may be a video flow type with the second highest priority (i.e., Type_1=BW), and the predetermined flow type Type_2 may be a file transfer flow type with the lowest priority (i.e., Type_2=BK). Therefore, the multiple flows classified into the predetermined flow type Type_0 may be generated by latency-sensitive applications, the multiple flows classified into the predetermined flow type Type_1 may be generated by bandwidth-sensitive applications, and the multiple flows classified into the predetermined flow type Type_2 may be background traffic. However, these are merely examples and are not intended to be limiting of the present invention. In practice, the setting of the predetermined flow types may be adjusted according to actual design considerations. For example, the predetermined flow types may include sub-types of the LL flow type, sub-types of the BW flow type, and / or sub-types of the BK flow type. In order to better understand the technical features of the present invention, it is assumed below that the predetermined stream types include Type_0=LL, Type_1=BW, and Type_2=BK.
[0044] The first N packets of each flow may be copied and provided to the AI-powered flow identification circuit 104 for Type-2 flow identification. In some embodiments of the present invention, the AI-powered flow identification circuit 104 may be implemented by a central processing unit (CPU), which serves as the reinforcement learning (RL) agent for Type-2 flow identification. However, these examples are provided for illustrative purposes only and are not intended to limit the present invention. In practice, the present invention imposes no restrictions on the number of predetermined flow types supported by the flow classification circuit 106 or the number of specific flow types to be identified by the AI-powered flow identification circuit 104. Furthermore, there is no restriction on the type of machine learning employed by the AI-powered flow identification circuit 104.
[0045] It should be noted that the AI-powered flow identification circuit 104 does not need to identify flows of the predetermined flow types Type_0 and Type_1. In this way, the AI-powered flow identification circuit 104 can be used to identify flows of the predetermined flow type Type_2 without using a complex machine learning model, thereby providing accurate identification of Type_2 flows without significantly increasing implementation costs.
[0046] The flow classification circuitry 106 is configured to classify each flow received by the network device 100 into one of a plurality of predetermined flow types (e.g., Type_0, Type_1, and Type_2). For each flow (labeled as flow[k]), the flow-by-flow rate estimation circuitry 114 of the flow classification circuitry 106 is configured to estimate a flow rate (labeled as flow[k].rate), and the flow scheduling circuitry 116 of the flow classification circuitry 106 is configured to classify the flow (labeled as flow[k]) into one of the plurality of predetermined flow types (e.g., Type_0, Type_1, and Type_2). For example, when the AI-based flow identification circuit 104 generates a flow type override indication force_to_type_n for a first flow received by the network device 100, the flow classification circuit 106 (in particular, the flow scheduling circuit 116 of the flow classification circuit 106) will classify the first flow as a predetermined flow type Type_n (for example, Type_n=Type_2=BK), regardless of the flow rate of the first flow. Specifically, in response to the flow type override indication force_to_type_n, the flow classification circuit 106 (in particular, the flow scheduling circuit 116 of the flow classification circuit 106) will directly classify the first flow as a predetermined flow type Type_n (for example, Type_n=Type_2=BK), regardless of the flow rate of the first flow. For another example, when the AI-based flow identification circuit 104 does not generate the flow type override indication force_to_type_n for the second flow received by the network device 100, the flow classification circuit 106 (in particular, the flow scheduling circuit 116 of the flow classification circuit 106) will classify the second flow into one of a predetermined flow type Type_0 (e.g., Type_0=LL), a predetermined flow type Type_1 (e.g., Type_1=BW), or a predetermined flow type Type_2 (e.g., Type_2=BK) based on the flow rate of the second flow.
[0047] The scheduling logic of the stream scheduling circuit 116 can be represented by the following pseudo code.
[0048] if flow[k] is force_to_type_n
[0049] flow[k] is Type_n
[0050] else if flow[k].rate < Type0_TH
[0051] flow[k] is Type_0
[0052] else if flow[k].rate > Type2_TH && Type2_dispatch_by_rate
[0053] flow[k] is Type_2
[0054] else
[0055] flow[k] is Type_1
[0056] If the AI-based flow identification circuit 104 generates the flow type override indicator force_to_type_n for the input flow flow[k], the flow scheduling circuit 116 directly classifies the input flow flow[k] as the flow type Type_n (e.g., Type_n = Type_2). If the AI-based flow identification circuit 104 does not generate the flow type override indicator force_to_type_n for the input flow[k], the flow scheduling circuit 116 compares the flow rate flow[k].rate of the input flow[k] with the threshold Type0_TH. If the flow rate flow[k].rate of the input flow[k] is lower than the threshold Type0_TH, the input flow[k] is classified as the predetermined flow type Type_0.
[0057] If the flow rate flow[k].rate of the input flow[k] is not lower than the threshold Type0_TH, the flow scheduling circuit 116 compares the flow rate flow[k].rate of the input flow[k] with another threshold Type2_TH (Type2_TH > Type0_TH). If the flow rate flow[k].rate of the input flow[k] is higher than the threshold Type2_TH, the flow scheduling circuit 116 classifies the input flow[k] into the predetermined flow type Type_2.
[0058] In some embodiments of the present invention, the flow scheduling circuit 116 may consider additional information when performing flow classification decisions. For example, the flow scheduling circuit 116 may also check a user-defined setting Type2_dispatch_by_rate, which is manually set to indicate whether to enable the flow rate of the flow itself to classify this flow into the flow type Type_2. Therefore, when the flow rate flow[k].rate of the input flow[k] is higher than the threshold Type2_TH and the user-defined setting Type2_dispatch_by_rate indicates that the flow rate of the flow itself is to be enabled to classify this flow into the flow type Type_2 (for example, Type2_dispatch_by_rate==1), the flow scheduling circuit 116 will classify the input flow[k] into the predetermined flow type Type_2.
[0059] If the user-defined setting Type2_dispatch_by_rate indicates that the flow is to be classified into the flow type Type_2 by using the flow rate of the flow itself (e.g., Type2_dispatch_by_rate == 1), and the flow rate flow[k].rate of the input flow[k] is not higher than the threshold Type2_TH, the stream scheduling circuit 116 will classify the input flow[k] into the predetermined flow type Type_1. Specifically, because the user-defined setting Type2_dispatch_by_rate indicates that the flow is to be classified into the flow type Type_2 by using the flow rate of the flow itself (e.g., Type2_dispatch_by_rate == 1), the stream scheduling circuit 116 compares the flow rate flow[k].rate of the input flow[k] with two thresholds Type0_TH and Type2_TH (Type0_TH < Type2_TH), and classifies the input flow[k] into the predetermined flow type Type_1 if the flow rate flow[k].rate of the input flow[k] is neither lower than the threshold Type0_Th nor higher than the threshold Type2_TH.
[0060] If the user-defined setting Type2_dispatch_by_rate indicates that the flow classification into the flow type Type_2 by the flow rate of the flow itself is disabled (for example, Type2_dispatch_by_rate == 0), when the flow rate flow[k].rate of the input flow[k] is not lower than the threshold Type0_TH, the flow scheduling circuit 116 will classify the input flow[k] into the predetermined flow type Type_1.
[0061] In some embodiments of the present invention, the Type0_TH threshold can be a user-defined value and fixed during the flow classification process, while the Type2_TH threshold can be dynamically adjusted during the flow classification process. In this embodiment, the control circuit 110 is responsible for dynamically adjusting the Type2_TH threshold. In one design example, the Type2_TH threshold can be set using an adaptive algorithm. In another design example, the Type2_TH threshold can be inferred through machine learning. For example, the control circuit 110 can be implemented by a central processing unit (CPU), which acts as a reinforcement learning agent to set the Type2_TH threshold. The current value of R01 (i.e., the sum of the Type_0 and Type_1 flow rates), the previous value of R01, the current value of R (i.e., the sum of the Type_0, Type_1, and Type_2 flow rates), and the previous value of R can serve as the agent's state, and the operation of adjusting the Type2_TH threshold can serve as the agent's action.
[0062] As described above, the flow classification circuit 106 classifies each flow received by the network device 100 into one of a plurality of predetermined flow types (e.g., Type_0, Type_1, and Type_2). After classifying at least one flow (e.g., a Type_2 flow) into at least one predetermined flow type (e.g., Type_2), the flow control circuit 108 applies loss-based queue-free flow control to the at least one flow. For example, the predetermined flow type Type_0 may be a low-latency flow type with the highest priority (i.e., Type_0 = LL), the predetermined flow type Type_1 may be a video flow type with the next highest priority (i.e., Type_1 = BW), and the predetermined flow type Type_2 may be a file transfer flow type with the lowest priority (i.e., Type_2 = BK). In this embodiment, the flow control circuit 108 can provide uplink or downlink QoS without using QoS priority queuing, thereby ensuring a good quality of experience (QOE) for users. For example, loss-based queueless flow control can drop packets from each flow classified as Type_2 (e.g., Type_2 = BK) based on a drop rate (also known as a drop probability) Drop_P assigned to that flow. The drop rate (drop probability) Drop_P indicates the number of packets in a flow that are proactively dropped for every larger number of packets received. For example, when the drop rate (drop probability) is set to 0.01 (1%), network device 100 drops one packet for every 100 packets received from a flow. However, reducing the flow rate may result in lower network bandwidth utilization. It is desirable to maximize network bandwidth utilization. To achieve high network bandwidth utilization during flow control, the present invention proposes using control circuit 110 to dynamically adjust the drop rate Drop_P assigned to the flow type Type_2 (e.g., Type_2 = BK).
[0063] In one design example, the packet loss rate Drop_P can be inferred by machine learning. For example, the control circuit 110 can be implemented by a central processing unit, and the central processing unit serves as a reinforcement learning agent to set the packet loss rate Drop_P. The current value of R01 (i.e., the sum of the flow rates of Type_0 and Type_1), the previous value of R01, the current value of R (i.e., the sum of the flow rates of Type_0, Type_1, and Type_2), and the previous value of R can serve as the states of the reinforcement learning agent, and the operation of adjusting the packet loss rate Drop_P can be an action of the reinforcement learning agent.
[0064] In another design example, the packet loss rate Drop_P can be set by the following adaptive algorithm, where R1 is the flow rate of Type_2, and R is the sum of the flow rates of Type_0, Type_1, and Type_2.
[0065] Start::
[0066] If (R1 > 0.5M and R >99M)
[0067] Drop_P+=0.001
[0068] else if (R1 > 0.5M)
[0069] Drop_P=min(0, Drop_P-0.001)
[0070] else Drop_P=0
[0071] Wait (10ms) goto Start::
[0072] Assume that network device 100 is configured to transmit outgoing data packets to a network with a bandwidth of 100 Mbps. When R1 exceeds a predetermined threshold TH1 (e.g., TH1 = 0.5 Mbps), control circuit 110 determines that a Type_2 flow has sufficient traffic to be serviced. When R1 exceeds a predetermined threshold TH2 (e.g., TH2 = 99 Mbps), control circuit 110 determines that network congestion is imminent. Therefore, when R1 exceeds TH1 and R exceeds TH2, control circuit 110 increases the packet loss rate (Drop_P) of the Type_2 flow by an incremental value INC (e.g., INC = 0.001 or another user-defined value). This allows both the Type_0 and Type_1 flows to have their respective rates increased. When R1 is greater than TH1 and R is not greater than TH2, it indicates that one or both of the Type_0 and Type_1 flows may not have sufficient traffic. Therefore, the control circuit 110 reduces the current packet loss rate Drop_P of the Type_2 flow by a decrement value DEC (e.g., DEC = 0.001 or another user-defined value). This allows the Type_2 flow to have a higher flow rate, thereby improving the utilization of the network's 100 Mbps bandwidth. Notably, if the value of (Drop_P - DEC) is less than zero, the control circuit 108 forces the packet loss rate Drop_P to zero (indicating no packet loss). When R1 is not greater than the predetermined threshold TH1, the flow control circuit 108 determines that the Type_2 flow has no impact on the flow rates of the Type_0 and Type_1 flows and resets the current packet loss rate Drop_P to zero (indicating no packet loss).
[0073] The queue-free flow control scheme based on packet loss can provide downlink QoS for non-congested downlinks or uplink QoS for non-congested uplinks, such as Figure 1 As shown, the flow control circuit 108 applies loss-based queue-free flow control only to Type_2 flows (which are flows with the lowest priority). However, this is for illustrative purposes only and is not intended to be limiting of the present invention. In some embodiments of the present invention, the flow control circuit 108 with loss-based queue-free flow control can provide scheduling effects similar to those of traditional QoS queue scheduling algorithms (e.g., SP and WRR).
[0074] Figure 2 Figure 1 is a schematic diagram of a packet loss-based rate control scheme supported by flow control circuitry 108 operating without QoS priority queuing, according to an embodiment of the present invention. Network device 100 supports multiple predefined flow types: Type_0, Type_1, and Type_2. For example, Type_0 may be a low-latency flow type with the highest priority (i.e., Type_0 = LL), Type_1 may be a video flow type with the next highest priority (i.e., Type_1 = BW), and Type_2 may be a file transfer flow type with the lowest priority (i.e., Type_2 = BK). Control circuitry 110 may set packet loss rates (Drop_P0, Drop_P1, and Drop_P2) for each of Type_0, Type_1, and Type_2, respectively. For example, these packet loss rates may be set using reinforcement learning or an adaptive algorithm. In one design example, the packet loss rate Drop_P0 can be set to zero, while the packet loss rates Drop_P1 and Drop_P2 can be set to non-zero values. Flow type Type_0 has a higher priority than flow types Type_1 and Type_2. Because packets from the highest-priority flow type Type_0 are not dropped, SP scheduling can be achieved. By dropping packets from flows Type_1 and Type_2, WRR scheduling can be achieved. The packet loss rates Drop_P1 and Drop_P2 can be dynamically adjusted based on the rate ratio of the flow rates of Type_1 and Type_2.
[0075] Figure 3Figure 1 is a diagram illustrating a meter-based rate control scheme supported by flow control circuitry 108 operating without a QoS priority queue according to an embodiment of the present invention. Network device 100 supports multiple predefined flow types, Type_0, Type_1, and Type_2. For example, Type_0 may be a low-latency flow type with the highest priority (i.e., Type_0 = LL), Type_1 may be a video flow type with the next highest priority (i.e., Type_1 = BW), and Type_2 may be a file transfer flow type with the lowest priority (i.e., Type_2 = BK). The control circuit 110 can set multiple rate settings RS_0, RS_1, RS_2, RS_3, and RS_4 for multiple hierarchical two-rate, three-color markers (trTCMs). Each rate setting RS_0-RS_4 can include a peak information rate (PIR) and a committed information rate (CIR). Each trTCM measures a packet stream and marks its packets as green, yellow, or red. If a packet exceeds the PIR, it is marked red; otherwise, it is marked yellow or green, depending on whether it exceeds the CIR. Rate settings RS_0-RS_4 can be set using reinforcement learning or an adaptive algorithm. According to the rate settings RS_0 to RS_4 appropriately set by the control circuit 110, multiple hierarchical trTCMs may not discard data packets classified into the flow type Type_0 with the highest priority to achieve the effect of SP scheduling, but may discard data packets classified into the flow types Type_1 and Type_2 to achieve the effect of WRR scheduling. The flow rate settings RS_0 to RS_4 can be dynamically adjusted according to the rate ratio of the flow rates of flow types Type_0, Type_1, and Type_2.
[0076] Figure 4This diagram illustrates a modified deficit round robin (DRR) rate control scheme supported by flow control circuitry 108 operating without QoS priority queuing, according to an embodiment of the present invention. Network device 100 supports multiple predetermined flow types: Type_0, Type_1, and Type_2. For example, Type_0 may be a low-latency flow type with the highest priority (i.e., Type_0 = LL), Type_1 may be a video flow type with the next highest priority (i.e., Type_1 = BW), and Type_2 may be a file transfer flow type with the lowest priority (i.e., Type_2 = BK). Control circuitry 110 may set packet loss rates (Drop_P0, Drop_P1, and Drop_P2) for each of Type_0, Type_1, and Type_2, respectively. For example, these packet loss rates may be set using reinforcement learning or an adaptive algorithm. Furthermore, the flow control circuit 108 may add weighted quantum values W_0, W_1, and W_2 to the token buckets of flow types Type_0, Type_1, and Type_2, respectively. In one exemplary design, the packet loss rate Drop_P0 may be set to zero, the token bucket for flow type Type_0 may be omitted, and the packet loss rates Drop_P1 and Drop_P2 may be set to non-zero values. Because flow type Type_0 has a higher priority than flow types Type_1 and Type_2, packets classified as flows of flow type Type_0 are not dropped, achieving SP scheduling. By dropping packets for flows of flow types Type_1 and Type_2, WRR scheduling can be achieved. The packet loss rates Drop_P1 and Drop_P2 can be dynamically adjusted based on the refill count of the token buckets for flow types Type_1 and Type_2. The following will describe further details of the modified DRR rate control scheme supported by the flow control circuit 108 in conjunction with the accompanying drawings.
[0077] Figure 5This diagram illustrates the operation of a modified DRR rate control scheme according to an embodiment of the present invention. Two token buckets, BKTa and BKTb, are defined for two flows, Ra and Rb, respectively. Flows Ra and Rb are classified into flow types r2a and r2b, respectively. Forwarding outgoing packets for a particular flow Ra / Rb consumes tokens from the specific token buckets BKTa / BKTb defined for that flow Ra / Rb. For example, flow Ra may be of the aforementioned flow type Type_1 (e.g., Type_1 = BW), and flow Rb may be of the aforementioned flow type Type_2 (e.g., Type_2 = BK). The modified DRR rate control scheme aims to control the flow rate ratio between flows Ra and Rb to be w1:w2. Therefore, the weighted quantity added to token bucket BKTa for each refill event can be set to quantum*w1, while the weighted quantity added to token bucket BKTb for each refill event can be set to quantum*w2. The number of bytes accumulated in token bucket BKTa can be represented by the bucket capacity (bucket size) r2a_bkt_size. When the bucket capacity r2a_bkt_size reaches the threshold bkt_full, token bucket BKTa is full. Similarly, the number of bytes accumulated in token bucket BKTb can be represented by the bucket capacity r2b_bkt_size. When the bucket capacity r2b_bkt_size reaches the threshold bkt_full, token bucket BKTb is full. Unless r2a_bkt_size + quantum*w1 ≤ bkt_full, the weighted quantity value quantum*w1 is not allowed to be added to token bucket BKTa. When the weighted quantity quantum*w1 is successfully added to the token bucket BKTa, the refill count R2a_refill_cnt is incremented by one (i.e., R2a_refill_cnt = R2a_refill_cnt + 1), and the bucket capacity r2a_bkt_size is increased by the weighted quantity quantum*w1 (i.e., r2a_bkt_size = r2a_bkt_size + quantum*w1). Similarly, the weighted quantity quantum*w2 is not allowed to be added to the token bucket BKTb unless r2b_bkt_size + quantum*w2 ≤ bkt_full.When the weighted quantity quantum*w2 is successfully added to the token bucket BKTb, the refill count R2b_refill_cnt is incremented by one value (i.e., R2b_refill_cnt = R2b_refill_cnt + 1), and the bucket capacity r2b_bkt_size is increased by the weighted quantity quantum*w2 (i.e., r2b_bkt_size = r2b_bkt_size + quantum*w2). Generally speaking, the increment value of the refill count R2a_refill_cnt is the same as the increment value of the refill count R2b_refill_cnt, and both are equal to 1. In addition, after the output data packet of flow Ra is successfully forwarded by the network device 100, the bucket capacity r2a_bkt_size will be reduced by the packet length pkt.len of the output data packet forwarded in flow Ra (i.e., r2a_bkt_size=r2a_bkt_size-pkt.len); similarly, when the output data packet of flow Rb is successfully forwarded by the network device 100, the bucket capacity r2b_bkt_size will be reduced by the packet length pkt.len of the output data packet forwarded in flow Rb (i.e., r2b_bkt_size=r2b_bkt_size-pkt.len).
[0078] Whenever the packet length pkt.len of a packet in flow Ra is greater than the bucket capacity r2a_bkt_size of token bucket BKTa or the packet length pkt.len of a packet in flow Rb is greater than the bucket capacity r2b_bkt_size of token bucket BKTb, a refill event is triggered. Therefore, the decision logic 502 compares the packet length pkt.len with the bucket capacity output from the multiplexer 504. When the flow type of the packet is r2a (i.e., pkt.flow_type=r2a), the multiplexer 504 outputs the bucket capacity r2a_bkt_size. When the flow type of the packet is r2b (i.e., pkt.flow_type=r2b), the multiplexer 504 outputs the bucket capacity r2b_bkt_size. Since the ratio between the weighted quantitative value quantum*w1 and the weighted quantitative value quantum*w2 is equal to w1:w2, if the ratio of the flow rates of flows Ra and Rb is equal to w1:w2, the refill count value R2a_refill_cnt will be equal to the refill count value R2b_refill_cnt. Unfortunately, however, the flow rates of flows Ra and Rb may change over time. If the refill count value R2a_refill_cnt is not equal to the refill count value R2b_refill_cnt, this means that the ratio of the flow rates of flows Ra and Rb is not equal to w1:w2. Therefore, the control circuit 110 can adjust the packet loss rate r2a_drop% of flow type r2a and the packet loss rate r2b_drop% of flow type r2b, so that by appropriately discarding data packets of flow Ra and data packets of flow Rb, the difference between the refill count value R2a_refill_cnt and the refill count value R2b_refill_cnt can be effectively reduced. For example, the control circuit 110 adjusts the packet loss rate r2a_drop% and the packet loss rate r2b_drop% based on the difference diff_r2a between the refill count value R2a_refill_cnt and the average refill count value mean_refill_cnt, and the difference diff_r2b between the refill count value R2b_refill_cnt and the average refill count value mean_refill_cnt, where the average refill count value mean_refill_cnt may be equal to (R2a_refill_cnt+R2b_refill_cnt) / 2. The relationship between the differences diff_r2a, diff_r2b, the refill count values R2a_refill_cnt, R2b_refill_cnt, and the average refill count value mean_refill_cnt is shown in FIG. Figure 6In this embodiment, the packet loss rates r2a_drop% and r2b_drop% can be inferred by reinforcement learning, and the queue-free flow control scheme based on packet loss selects and uses one of the packet loss rates r2a_drop% and r2b_drop% according to the flow type of the input data packet. Specifically, when the flow type of the input data packet is r2a (i.e., pkt.flow_type=r2a), the multiplexer 506 outputs the packet loss rate r2a_drop%, and when the flow type of the input data packet is r2b (i.e., pkt.flow_type=r2b), the multiplexer 506 outputs the packet loss rate r2b_drop%.
[0079] For upstream applications, the packet output stream from the flow control circuit 108 can be provided to the subsequent queuing and scheduling circuit 112 for traditional QoS queue scheduling. In some embodiments of the present invention, the proposed traffic classification and flow control scheme can work in conjunction with low-latency, low-loss, and scalable throughput (L4S) network technologies.
[0080] Figure 7 Schematic diagram of the first cooperative working design of an embodiment of the present invention. The queuing and scheduling circuit 112 may include multiple output queues 702, 704, and 706, wherein the priority of the output queue (labeled as "Q0") 702 is higher than the priority of the output queue (labeled as "L4S Q") 704, and the priority of the output queue (labeled as "L4S Q") 704 is higher than the priority of the output queue (labeled as "Q1") 706. When the input traffic is not L4S traffic, the data packets of the input traffic are Figure 1The input packet PKT_IN is shown and is processed by the flow table 102, the flow-by-flow rate estimation circuit 116, the flow scheduling circuit 116, and the flow control circuit 108. Flows classified as flow type Type_0 (e.g., Type_0 = LL) and output from the flow control circuit 108 (which has a queue-free flow control capability based on packet loss) are placed in the output queue 702. Flows classified as flow type Type_1 (e.g., Type_1 = BW) and output from the flow control circuit 108 (which has a queue-free flow control capability based on packet loss) are placed in the output queue 706. Flows classified as flow type Type_2 (e.g., Type_2 = BK) and output from the flow control circuit 108 (which has a queue-free flow control capability based on packet loss) are placed in the output queue 706. In this embodiment, output queue 702 is specifically used to store packets classified into multiple flows of flow type 0, and output queue 706 is shared by packets classified into multiple flows of flow types 1 and 2. When the input traffic is L4S traffic, network device 100 stores the L4S traffic in output queue 704. In this embodiment, output queue 704 is specifically used to store L4S traffic packets.
[0081] Figure 8 This is a diagram of the second collaborative design of an embodiment of the present invention. The queuing and scheduling circuit 112 may include multiple output queues 802 and 804, wherein the priority of the output queue (labeled as "Q0, L4S Q") 802 is higher than the priority of the output queue (labeled as "Q1") 804. When the input traffic is not L4S traffic, the data packets of the input traffic are used as Figure 1The input packet PKT_IN is shown and is processed by the flow table 102, the flow-by-flow rate estimation circuit 116, the flow scheduling circuit 116, and the flow control circuit 108. Flows classified as flow type Type_0 (e.g., Type_0 = LL) and output from the flow control circuit 108 (which has packet loss-based queue-free flow control capabilities) are placed in output queue 802. Flows classified as flow type Type_1 (e.g., Type_1 = BW) and output from the flow control circuit 108 (which has packet loss-based queue-free flow control capabilities) are placed in output queue 804. Flows classified as flow type Type_2 (e.g., Type_2 = BK) and output from the flow control circuit 108 (which has packet loss-based queue-free flow control capabilities) are placed in output queue 804. In this embodiment, output queue 804 is shared by packets from multiple flows classified as flow types Type_1 and Type_2. When the input traffic is L4S traffic, the network device 100 stores the L4S traffic in the output queue 802 . In this embodiment, the output queue 802 is shared by packets of multiple flows classified as flow type Type_0 and packets of multiple L4S flows.
[0082] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A network device comprising: an artificial intelligence-based flow identification circuit configured to identify, through machine learning, only a plurality of specific flows of a portion of a plurality of predetermined flow types, and generate a flow type coverage indication for each of the plurality of specific flows among a plurality of flows received by the network device; and flow classification circuitry to classify each of the plurality of flows into one of the plurality of predetermined flow types; wherein the artificial intelligence-based flow identification circuit generates a flow type coverage indication for a first flow among the plurality of flows; and in response to the first flow type coverage indication of the first flow, the flow classification circuit classifies the first flow into a first flow type among the plurality of predetermined flow types, regardless of a flow rate of the first flow; and The artificial intelligence-assisted flow identification circuit does not generate a flow type override indication for a second flow among the multiple flows; and the flow classification circuit classifies the second flow into the first flow type or the second flow type among the multiple predetermined flow types based on a flow rate of the second flow. 2 . The network device of claim 1 , wherein the first stream type is a file transfer stream type, and the second stream type is a low-latency stream type or a video stream type. 3 . The network device of claim 1 , wherein the flow classification circuit is configured to compare the flow rate of the second flow with a threshold, and classify the second flow into the second flow type when the flow rate of the second flow is lower than the threshold. 4 . The network device of claim 1 , wherein the flow classification circuit is configured to compare the flow rate of the second flow with a threshold, and classify the second flow into the first flow type when the flow rate of the second flow is higher than the threshold.
5. The network device according to claim 4, further comprising: The control circuit is used to dynamically adjust the threshold. 6 . The network device of claim 4 , wherein the flow classification circuit is further configured to check a user-defined setting, wherein the user-defined setting indicates that the flow rate of the flow itself should be enabled to classify the flow into the first flow type.
7. A network device as described in claim 1, wherein the flow classification circuit is also used to check user-defined settings, and the user-defined settings indicate that the flow rate of the flow itself is to be enabled to classify the flow into the first flow type; and the flow classification circuit is also used to compare the flow rate of the second flow with a first threshold and a second threshold, and when the flow rate of the second flow is not lower than the first threshold and not higher than the second threshold, classify the second flow into the second flow type.
8. The network device of claim 1 , wherein the flow classification circuit is further configured to check a user-defined setting, and the user-defined setting indicates that the flow classification into the first flow type is to be disabled based on the flow rate of the flow itself; and the flow classification circuit is further configured to compare the flow rate of the second flow with a threshold, and classify the second flow into the second flow type when the flow rate of the second flow is not lower than the threshold.
9. A network device comprising: flow classification circuitry for classifying each of a plurality of flows received by the network device into one of a plurality of predetermined flow types; and The flow control circuit is configured to apply packet loss-based queue-free flow control to the at least one flow among the plurality of flows after the at least one flow among the plurality of flows is classified into at least one flow type among the plurality of predetermined flow types.
10. The network device of claim 9, wherein the plurality of flows includes a first flow, the first flow is classified into a first flow type among the plurality of predetermined flow types, and the loss-based queue-free flow control comprises: discarding packets in the first flow according to a packet loss rate assigned to the first flow type; and The network device further comprises: A control circuit is configured to dynamically adjust the packet loss rate assigned to the first flow type.
11. The network device of claim 10, wherein the plurality of flows further comprises a second flow, the second flow being classified into a second flow type among the plurality of predetermined flow types, and the loss-based queue-free flow control further comprises: Data packets in the second flow are not discarded.
12. The network device of claim 10, wherein the plurality of flows further include a second flow, the second flow being classified into a second flow type among the plurality of predetermined flow types, the packet loss-based queue-free flow control further comprising: discarding packets in the second flow according to a packet loss rate assigned to the second flow type; and The control circuit is further configured to dynamically adjust the packet loss rate assigned to the second flow type.
13. The network device of claim 9, wherein the plurality of flows include a first flow, the first flow being classified into a first flow type among the plurality of predetermined flow types, and the loss-based queue-free flow control comprises: discarding data packets in the first flow using the plurality of hierarchical dual-rate three-color tags according to a plurality of rate settings of the plurality of hierarchical dual-rate three-color tags; and The network device further comprises: The control circuit is used to dynamically adjust the rate settings of the hierarchical dual-rate three-color labels.
14. The network device of claim 13 , wherein the plurality of flows further comprises a second flow, the second flow being classified into a second flow type among the plurality of predetermined flow types, and the loss-based queue-free flow control further comprises: According to the rate settings of the hierarchical dual-rate three-color markings, packets in the second flow are discarded without using the hierarchical dual-rate three-color markings.
15. The network device of claim 13 , wherein the plurality of flows further comprises a second flow, the second flow being classified into a second flow type among the plurality of predetermined flow types, and the loss-based queue-free flow control further comprises: Data packets in the second flow are discarded by the hierarchical dual-rate three-color tags according to the rate settings of the hierarchical dual-rate three-color tags.
16. The network device of claim 9, wherein the plurality of flows includes a first flow, the first flow is classified into a first flow type among the plurality of predetermined flow types, and the loss-based queue-free flow control comprises: discarding data packets of the first flow according to a packet loss rate assigned to the first flow type; and The network device further comprises: The control circuit is configured to dynamically adjust the packet loss rate assigned to the first flow type, wherein the packet loss rate of the first flow type is set based on at least a token bucket refill count value corresponding to the first flow type.
17. The network device of claim 16, wherein the plurality of flows further comprises a second flow, the second flow being classified into a second flow type among the plurality of predetermined flow types, and the loss-based queue-free flow control further comprises: Data packets of the second flow type are not discarded.
18. The network device of claim 16, wherein the plurality of flows further include a second flow, the second flow being classified into a second flow type among the plurality of predetermined flow types, the packet loss-based queue-free flow control further comprising: discarding data packets of the second flow according to a packet loss rate assigned to the second flow type; and The control circuit is further configured to dynamically adjust the packet loss rate assigned to the second flow type, wherein the packet loss rate of the second flow type is set based on at least a token bucket refill count value corresponding to the second flow type.
19. The network device of claim 9 , wherein the flow control circuit is further configured to output the first flow to a first output queue and output the second flow to a second output queue; and the network device is further configured to receive a plurality of low-latency, low-loss, and scalable throughput flows and store the plurality of low-latency, low-loss, and scalable throughput flows in a third output queue, wherein a priority of the third output queue is lower than a priority of the second output queue and higher than a priority of the first output queue.
20. The network device of claim 9 , wherein the flow control circuit is further configured to output the first flow to a first output queue and output the second flow to a second output queue; and the network device is further configured to receive a plurality of low-latency, low-loss, and scalable throughput flows and store the plurality of low-latency, low-loss, and scalable throughput flows in the second output queue, wherein the priority of the second output queue is higher than the priority of the first output queue.