Congestion control method and device for router, equipment, medium and program product

By calculating the network busyness and burstiness degree in the router and dynamically adjusting the discard probability, the problem of discard probability mutation in the prior art is solved, and effective congestion control and resource allocation of the router in complex network environments is realized.

CN119697127APending Publication Date: 2025-03-25INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411817108.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The prior art lacks prediction of network conditions in router queue management, which leads to the discard probability mutation at key nodes, which may lead to early arrival at the tail and instantly trigger the tail and discard, which will trigger global synchronization.

Method used

By obtaining the current queue length and historical queue length, combining the queue maximum threshold and minimum threshold, calculate the network busyness and burstiness degree, use the Logistic function to calculate the probability of discarding, and decide whether to discard the target group based on this probability.

Benefits of technology

Dynamically adjust the discard probability so that the router can adapt to network traffic changes, avoid excessive buffer congestion, and ensure the stability of overall network performance and the smooth development of key services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697127A_ABST
    Figure CN119697127A_ABST
Patent Text Reader

Abstract

The invention discloses a router congestion control method, device and equipment, a medium and a program product. The method comprises the following steps: when a router receives a target group, obtaining a current queue length; when it is determined that the current queue length is between a queue maximum threshold value and a queue minimum threshold value, determining the packet length of a target packet; obtaining a plurality of historical queue lengths in the target time period, and calculating a current discarding probability according to each historical queue length, the packet length of the target packet, the maximum queue threshold value and the minimum queue threshold value; and according to the current discarding probability, executing a discarding operation on the target group. According to the technical scheme, the method is suitable for the technical field of cloud computing, and the discarding probability of the router can be adaptively adjusted by considering the network load and the network burstiness at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a congestion control method, device, equipment, medium and program product for a router. Background Art

[0002] In TCP (Transmission Control Protocol) transmission, the router is located on the network path between the sender and the receiver, and is responsible for forwarding TCP packets from one subnet to another. Due to the limited hardware performance of the router itself, when the CPU processing speed of the router cannot keep up with the speed of receiving and forwarding packets, or the memory cannot cache enough packets, packet loss and congestion will occur.

[0003] The router's tail drop policy is a queue management policy. When the router's cache queue is full, newly arrived data packets will be discarded directly. However, the tail drop policy may cause the TCP connection to trigger congestion control and enter a slow start state, which is also a global synchronization phenomenon. Global synchronization will cause the network traffic to drop suddenly and significantly. After the network is restored, the traffic will suddenly increase significantly.

[0004] In order to avoid global synchronization, RED (Random Early Detection) is often used in the prior art to manage router queues to avoid network congestion. RED does not wait until the queue is completely full to start discarding data packets, but when the queue length reaches a certain threshold, it starts discarding data packets with a certain probability. However, the existing RED strategy lacks prediction of network conditions, so that the discard probability calculated by the existing technical solution will mutate at some key nodes, causing the router to reach tail discard in advance or trigger tail discard instantly. Summary of the invention

[0005] The present invention provides a congestion control method, device, equipment, medium and program product for a router, which can take into account network load and network burstiness at the same time and adaptively adjust the discard probability of the router.

[0006] According to one aspect of the present invention, there is provided a congestion control method for a router, comprising:

[0007] When the router receives the target packet, it obtains the current queue length;

[0008] When it is determined that the current queue length is between the maximum queue threshold and the minimum queue threshold, determining the packet length of the target packet;

[0009] Obtain multiple historical queue lengths within a target time period, and calculate the current drop probability based on each historical queue length, the packet length of the target packet, the maximum queue threshold, and the minimum queue threshold;

[0010] A discard operation is performed on the target packet according to the current discard probability.

[0011] Optionally, the current drop probability is calculated according to each historical queue length, the packet length of the target packet, the maximum threshold value of the queue, and the minimum threshold value of the queue, including:

[0012] Calculate the current network busyness and network burstiness based on the historical queue lengths, maximum queue thresholds, and minimum queue thresholds.

[0013] The current drop probability is calculated based on the packet length of the target packet, the network busyness, and the network burstiness.

[0014] The advantage of this setting is that by calculating the discard probability based on the real-time network busyness and network burstiness, the router can dynamically adapt to changes in network traffic and adjust the discard probability according to actual network conditions, thereby ensuring the overall performance and stability of the network and enabling the network to flexibly respond to various complex and changing network environments.

[0015] Optionally, the current network busyness and network burstiness are calculated based on the historical queue lengths, the maximum queue threshold, and the minimum queue threshold, including:

[0016] Calculate the average queue length in the target time period based on the historical queue lengths.

[0017] Calculate the network busyness at the current moment according to the queue length mean and the queue minimum threshold;

[0018] The queue length standard deviation is calculated according to each historical queue length, and the network burstiness degree at the current moment is calculated according to the queue length standard deviation and the queue maximum threshold.

[0019] The advantage of this setting is that calculating the current network busyness can help predict the possibility of network congestion, effectively prevent the occurrence of network congestion, and ensure the quality of network services. According to the network busyness, the router can achieve more reasonable load balancing, and calculate the network burstiness degree in combination with the queue maximum threshold value, which can help network devices better cope with burst traffic.

[0020] Optionally, the current drop probability is calculated based on the packet length of the target packet, the network busyness, and the network burstiness, including:

[0021] Calculating the packet discard probability in the form of a Logistic function according to the packet length of the target packet, the network busyness and the network burstiness;

[0022] The packet discard probability is normalized to calculate a current discard probability.

[0023] The advantage of this setting is that it uses the curve characteristics of the Logistic function to make the drop probability change smoothly at the end points, reduce the tail drop phenomenon, and adapt to the maximum threshold of the queue.

[0024] Optionally, performing a discard operation on the target packet according to the current discard probability includes:

[0025] Determine the target TCP link to which the target packet belongs, and obtain the historical packet discarding status of the target TCP link;

[0026] A discard operation is performed on the target packet according to the historical packet discard situation and the current discard probability.

[0027] The advantage of this setting is that it can prevent packets continuously sent by a TCP link from being discarded, which would lead to a significant reduction in the transmission speed of the TCP link, or even cause a series of problems such as TCP link interruption, thus ensuring the stability of network transmission.

[0028] Optionally, when the router receives the target packet, after obtaining the current queue length, it also includes:

[0029] When it is determined that the current queue length is less than the queue minimum threshold, placing the target packet into the queue of the router for queuing;

[0030] When it is determined that the current queue length is greater than the queue maximum threshold, the target packet is directly discarded.

[0031] The advantage of this setting is that through the maximum threshold and the minimum threshold, congestion control is only performed on individual TCP connections, thus avoiding global congestion control.

[0032] According to another aspect of the present invention, there is provided a congestion control device for a router, comprising:

[0033] The average queue length calculation module is used to obtain the current queue length when the router receives the target packet;

[0034] A packet length acquisition module, used to determine the packet length of the target packet when it is determined that the current queue length is between the maximum queue threshold and the minimum queue threshold;

[0035] A discard probability calculation module is used to obtain multiple historical queue lengths within a target time period, and calculate the current discard probability according to each historical queue length, the packet length of the target packet, the maximum threshold value of the queue, and the minimum threshold value of the queue;

[0036] The packet discarding operation module is used to perform a discarding operation on the target packet according to the current discarding probability.

[0037] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0038] at least one processor; and

[0039] a memory communicatively connected to the at least one processor; wherein,

[0040] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the congestion control method for a router described in any embodiment of the present invention.

[0041] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the congestion control method for a router described in any embodiment of the present invention when executed.

[0042] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the congestion control method for a router according to any embodiment of the present invention is implemented.

[0043] The technical solution of the embodiment of the present invention is to obtain the current queue length when the router receives the target packet, and when it is determined that the current queue length is between the maximum queue threshold value and the minimum queue threshold value, obtain multiple historical queue lengths within the target time period, and calculate the current discard probability according to each historical queue length, the packet length of the target packet, the maximum queue threshold value and the minimum queue threshold value. According to the current discard probability, the discard operation is performed on the target packet. The discard probability can be calculated according to the real-time network busyness and network burstiness, so that the router can dynamically adapt to changes in network traffic and perform the discard operation based on the current discard probability. In the face of complex and changeable network environments, network congestion can be effectively controlled, network resources can be reasonably allocated, and the normal operation of important services can be guaranteed. The processing pressure of the router can be alleviated to a certain extent, excessive congestion of the buffer can be avoided, and the stability of the overall network performance and the smooth development of key services can be ensured.

[0044] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 is a flow chart of a congestion control method for a router provided according to Embodiment 1 of the present invention;

[0047] Figure 2 is a flow chart of another congestion control method for a router provided according to Embodiment 2 of the present invention;

[0048] Figure 3 is a schematic diagram of the structure of a congestion control device for a router provided in Embodiment 3 of the present invention;

[0049] Figure 4 It is a structural schematic diagram of an electronic device for implementing the congestion control method for a router according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0052] Embodiment 1

[0053] Figure 1 This is a flowchart of a congestion control method for a router provided in the first embodiment of the present invention. This embodiment is applicable to the case where the discard probability of a router is adaptively updated according to the network status. The method can be executed by a congestion control device of a router. The congestion control device of the router can be implemented in the form of hardware and / or software, and can generally be configured in a computer or processor with data processing functions. Figure 1 As shown, the method includes:

[0054] S110. When the router receives the target packet, it obtains the current queue length.

[0055] Optionally, a router is a network device that connects two or more networks and can forward data packets between different networks based on the destination address information in the data packets, thereby achieving data communication and resource sharing between networks.

[0056] Optionally, the target packet may refer to the data packet currently received by the router. The target packet may include but is not limited to the source address, destination address, data content, and some control information. It is the basic carrier of information transmission in network communication. The main task of the router is to receive, process and forward the target packet to ensure that the data can reach the destination accurately.

[0057] Optionally, inside the router, a buffer is provided to process and temporarily store packets to be forwarded. The packets are queued in a certain order in the buffer and wait for processing. The current queue length may refer to the sum of the lengths of the packets in the buffer at the current moment.

[0058] S120: When it is determined that the current queue length is between the maximum queue threshold and the minimum queue threshold, determine the packet length of the target packet.

[0059] Optionally, the maximum queue threshold and the minimum queue threshold are pre-set values, which are used to define the upper limit and lower limit of the buffer queue length respectively. When the queue length reaches or exceeds the maximum queue threshold, it means that the buffer queue is about to be or has been overloaded. When the queue length is lower than the minimum queue threshold, it indicates that the buffer queue of the device is relatively idle.

[0060] Optionally, if the current queue length is greater than the maximum queue threshold, the target packet may be directly discarded; if the current queue length is less than the minimum queue threshold, the target packet may be directly added to the tail of the queue.

[0061] Optionally, the packet length of the target packet may refer to the amount of data contained in the target packet, which is usually measured in bytes.

[0062] S130 , obtaining multiple historical queue lengths within a target time period, and calculating a current discard probability according to each historical queue length, a packet length of a target packet, a maximum queue threshold, and a minimum queue threshold.

[0063] Optionally, the target time period may refer to a specified period of time before the current moment when the target packet is received, and the historical queue length may refer to the queue length recorded at different time points within the target time period. For example, the 1 minute before the current moment may be used as the target time period, the historical queue length may be recorded every 1 second within the target time period, and all queue lengths recorded within 1 minute may be used as the historical queue length.

[0064] Optionally, the current drop probability is calculated according to each historical queue length, the packet length of the target packet, the maximum threshold value of the queue, and the minimum threshold value of the queue, including:

[0065] Calculate the current network busyness and network burstiness based on the historical queue lengths, maximum queue thresholds, and minimum queue thresholds.

[0066] The current drop probability is calculated based on the packet length of the target packet, the network busyness, and the network burstiness.

[0067] The advantage of this setting is that by calculating the discard probability based on the real-time network busyness and network burstiness, the router can dynamically adapt to changes in network traffic and adjust the discard probability according to actual network conditions, thereby ensuring the overall performance and stability of the network and enabling the network to flexibly respond to various complex and changing network environments.

[0068] S140: Perform a discard operation on the target packet according to the current discard probability.

[0069] Optionally, after the current discard probability is determined, for each newly received target packet, the router will decide whether to perform a discard operation on it based on this probability.

[0070] It can be understood that the method of performing discard operations based on the current discard probability is an important means for network equipment to effectively control network congestion, reasonably allocate network resources, and ensure the normal operation of important services in the face of complex and changeable network environments. By selectively discarding some target packets, the processing pressure of network equipment can be alleviated to a certain extent, excessive congestion of the buffer can be avoided, and the stability of the overall network performance and the smooth development of key services can be ensured.

[0071] The technical solution of the embodiment of the present invention is to obtain the current queue length when the router receives the target packet, and when it is determined that the current queue length is between the maximum queue threshold value and the minimum queue threshold value, obtain multiple historical queue lengths within the target time period, and calculate the current discard probability according to each historical queue length, the packet length of the target packet, the maximum queue threshold value and the minimum queue threshold value. According to the current discard probability, the discard operation is performed on the target packet. The discard probability can be calculated according to the real-time network busyness and network burstiness, so that the router can dynamically adapt to changes in network traffic and perform the discard operation based on the current discard probability. In the face of complex and changeable network environments, network congestion can be effectively controlled, network resources can be reasonably allocated, and the normal operation of important services can be guaranteed. The processing pressure of the router can be alleviated to a certain extent, excessive congestion of the buffer can be avoided, and the stability of the overall network performance and the smooth development of key services can be ensured.

[0072] Embodiment 2

[0073] Figure 2 This is a flow chart of a congestion control method for a router provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment specifically describes a method for calculating the discard probability. Figure 2 As shown, the method includes:

[0074] S210. When the router receives the target packet, it obtains the current queue length.

[0075] S220: When it is determined that the current queue length is between the maximum queue threshold and the minimum queue threshold, determine the packet length of the target packet.

[0076] When the router receives the target packet, after obtaining the current queue length, the following steps may also be included:

[0077] When it is determined that the current queue length is less than the minimum queue threshold, the target packet is placed in the router's queue for queuing;

[0078] When it is determined that the current queue length is greater than the queue maximum threshold, the target packet is directly discarded.

[0079] S230: Obtain multiple historical queue lengths within the target time period, and calculate the network busyness and network burstiness at the current moment according to each historical queue length, the maximum queue threshold, and the minimum queue threshold.

[0080] Calculating the current network busyness and network burstiness according to the historical queue lengths, the maximum queue threshold, and the minimum queue threshold may include:

[0081] Calculate the average queue length in the target time period based on the historical queue lengths.

[0082] Calculate the current network busyness based on the average queue length and the minimum queue threshold;

[0083] The standard deviation of the queue length is calculated according to each historical queue length, and the network burstiness degree at the current moment is calculated according to the standard deviation of the queue length and the maximum threshold of the queue.

[0084] Optionally, the set S = {L1, L2, L3, ..., L n} represents the length of each historical queue in the target time period. The average value of the queue length in the target time period is obtained by calculating the average value of each historical queue length.

[0085] Furthermore, the mean queue length can be expressed as Indicates, where n is the number of historical queue lengths, It is the sum of the lengths of all historical queues.

[0086] Furthermore, we can use the formula Calculate the current network busyness μ, where TH min The minimum threshold of the queue.

[0087] Furthermore, we can use the formula Calculate the standard deviation of queue lengths.

[0088] Furthermore, according to the formula ξ=TH max / (TH max -2σ), calculate the network burstiness. Among them, TH max The maximum threshold of the queue.

[0089] S240: Calculate the current discard probability according to the packet length of the target packet, the network busyness, and the network burstiness.

[0090] Calculating the current drop probability according to the packet length of the target packet, the network busyness, and the network burstiness may include:

[0091] The packet discard probability is calculated in the form of a logistic function according to the packet length of the target packet, the network busyness and the network burstiness;

[0092] The packet drop probability is normalized and the current drop probability is calculated.

[0093] It can be understood that the characteristic of the Logistic function is that it can map the input value to a specific output range, usually between 0 and 1, and has an S-shaped curve shape.

[0094] Specifically, the formula Calculate the first probability value p temp , where count is the packet length of the target packet.

[0095] Furthermore, according to the formula The purpose of normalization is to process the discard probability to a value between 0 and 1 and obtain the current discard probability p. Among them, p0 is the first probability value p temp The minimum value of the logistic function, or the minimum value of the logistic function, p1 is the first probability value p temp , or the maximum value of the Logistic function.

[0096] The advantage of this setting is that when the network burst is large and the network traffic increases, the discard probability increases rapidly and the discard strategy becomes aggressive. On the contrary, the discard strategy becomes conservative. When the network load is large, the network performance depends on the processing speed of the router. The discard probability curve shifts to the left and the expected queue length decreases to avoid network oscillation caused by tail discard.

[0097] S250: Determine the target TCP link to which the target packet belongs, and obtain historical packet discarding status of the target TCP link.

[0098] Optionally, the historical packet discard situation of the target TCP link may refer to the number of packets discarded by the target TCP link within a specified time period, or may refer to the discard situation of a previous packet sent by the target TCP link before the target packet.

[0099] S260: Perform a discard operation on the target packet according to the historical packet discard situation and the current discard probability.

[0100] It is understandable that when packets sent by a TCP link are continuously discarded, the transmission speed of the TCP link may be greatly reduced, or even the TCP link may be interrupted. Therefore, the current discard probability can be corrected to a certain extent based on the historical packet discard situation.

[0101] In an optional example, when it is determined based on historical packet discarding conditions that a target number of packets continuously sent by the target TCP link have been discarded, the target packet discarding probability sent by the target TCP link may be dynamically adjusted to 0, which is only illustrative here.

[0102] In another optional example, the TCP link may be ignored, that is, the target packet is randomly discarded according to the discard probability.

[0103] The technical solution of the embodiment of the present invention is to obtain the current queue length when the router receives the target packet, and when it is determined that the current queue length is between the maximum queue threshold value and the minimum queue threshold value, obtain multiple historical queue lengths within the target time period, and calculate the current discard probability according to each historical queue length, the packet length of the target packet, the maximum queue threshold value and the minimum queue threshold value. According to the current discard probability, the discard operation is performed on the target packet. The discard probability can be calculated according to the real-time network busyness and network burstiness, so that the router can dynamically adapt to changes in network traffic and perform the discard operation based on the current discard probability. In the face of complex and changeable network environments, network congestion can be effectively controlled, network resources can be reasonably allocated, and the normal operation of important services can be guaranteed. The processing pressure of the router can be alleviated to a certain extent, excessive congestion of the buffer can be avoided, and the stability of the overall network performance and the smooth development of key services can be ensured.

[0104] Embodiment 3

[0105] Figure 3 This is a schematic diagram of the structure of a congestion control device for a router provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: an average queue length calculation module 310, a packet length acquisition module 320, a discard probability calculation module 330 and a packet discard operation module 340.

[0106] The average queue length calculation module 310 is used to obtain the current queue length when the router receives the target packet.

[0107] The packet length acquisition module 320 is used to determine the packet length of the target packet when it is determined that the current queue length is between the maximum queue threshold and the minimum queue threshold.

[0108] The discard probability calculation module 330 is used to obtain multiple historical queue lengths within a target time period, and calculate the current discard probability according to each historical queue length, the packet length of the target packet, the maximum queue threshold value, and the minimum queue threshold value.

[0109] The packet discarding operation module 340 is used to perform a discarding operation on the target packet according to the current discarding probability.

[0110] The technical solution of the embodiment of the present invention is to obtain the current queue length when the router receives the target packet, and when it is determined that the current queue length is between the maximum queue threshold value and the minimum queue threshold value, obtain multiple historical queue lengths within the target time period, and calculate the current discard probability according to each historical queue length, the packet length of the target packet, the maximum queue threshold value and the minimum queue threshold value. According to the current discard probability, the discard operation is performed on the target packet. The discard probability can be calculated according to the real-time network busyness and network burstiness, so that the router can dynamically adapt to changes in network traffic and perform the discard operation based on the current discard probability. In the face of complex and changeable network environments, network congestion can be effectively controlled, network resources can be reasonably allocated, and the normal operation of important services can be guaranteed. The processing pressure of the router can be alleviated to a certain extent, excessive congestion of the buffer can be avoided, and the stability of the overall network performance and the smooth development of key services can be ensured.

[0111] Based on the above embodiments, the discard probability calculation module 330 may include:

[0112] A network parameter calculation unit, used to calculate the current network busyness and network burstiness according to each historical queue length, the maximum queue threshold value and the minimum queue threshold value;

[0113] The probability calculation unit is used to calculate the current discard probability according to the packet length of the target packet, the network busyness and the network burstiness.

[0114] Based on the above embodiments, the network parameter calculation unit may be used to:

[0115] Calculate the average queue length in the target time period based on the historical queue lengths.

[0116] Calculate the network busyness at the current moment according to the queue length mean and the queue minimum threshold;

[0117] The queue length standard deviation is calculated according to each historical queue length, and the network burstiness degree at the current moment is calculated according to the queue length standard deviation and the queue maximum threshold.

[0118] Based on the above embodiments, the probability calculation unit can be specifically used for:

[0119] Calculating the packet discard probability in the form of a Logistic function according to the packet length of the target packet, the network busyness and the network burstiness;

[0120] The packet discard probability is normalized to calculate a current discard probability.

[0121] Based on the above embodiments, the packet discarding operation module 340 may be used to:

[0122] Determine the target TCP link to which the target packet belongs, and obtain the historical packet discarding status of the target TCP link;

[0123] A discard operation is performed on the target packet according to the historical packet discard situation and the current discard probability.

[0124] Based on the above embodiments, a group processing module may be further included, which is used to:

[0125] When it is determined that the current queue length is less than the queue minimum threshold, placing the target packet into the queue of the router for queuing;

[0126] When it is determined that the current queue length is greater than the queue maximum threshold, the target packet is directly discarded.

[0127] The congestion control device for a router provided in the embodiment of the present invention can execute the congestion control method for a router provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0128] Embodiment 4

[0129] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0130] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0131] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0132] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the congestion control method of the router described in the embodiment of the present invention. That is:

[0133] When the router receives the target packet, it obtains the current queue length;

[0134] When it is determined that the current queue length is between the maximum queue threshold and the minimum queue threshold, determining the packet length of the target packet;

[0135] Obtain multiple historical queue lengths within a target time period, and calculate the current drop probability based on each historical queue length, the packet length of the target packet, the maximum queue threshold, and the minimum queue threshold;

[0136] A discard operation is performed on the target packet according to the current discard probability.

[0137] In some embodiments, the congestion control method of the router may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the congestion control method of the router described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the congestion control method of the router in any other appropriate manner (e.g., by means of firmware).

[0138] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0139] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0140] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0142] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0143] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0144] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0145] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A congestion control method for a router, characterized in that: include: When the router receives the target packet, it obtains the current queue length; When it is determined that the current queue length is between the maximum queue threshold and the minimum queue threshold, determining the packet length of the target packet; Obtain multiple historical queue lengths within a target time period, and calculate the current drop probability based on each historical queue length, the packet length of the target packet, the maximum queue threshold, and the minimum queue threshold; A discard operation is performed on the target packet according to the current discard probability.

2. The method according to claim 1, characterized in that The current drop probability is calculated based on the historical queue lengths, the packet length of the target packet, the maximum threshold of the queue, and the minimum threshold of the queue, including: Calculate the current network busyness and network burstiness based on the historical queue lengths, maximum queue thresholds, and minimum queue thresholds. The current drop probability is calculated based on the packet length of the target packet, the network busyness, and the network burstiness.

3. The method according to claim 2, characterized in that The current network busyness and network burstiness are calculated based on the historical queue lengths, maximum queue thresholds, and minimum queue thresholds, including: Calculate the average queue length in the target time period based on the historical queue lengths. Calculate the network busyness at the current moment according to the queue length mean and the queue minimum threshold; The queue length standard deviation is calculated according to each historical queue length, and the network burstiness degree at the current moment is calculated according to the queue length standard deviation and the queue maximum threshold.

4. The method according to claim 2, characterized in that: The current drop probability is calculated based on the packet length of the target packet, the network busyness, and the network burstiness, including: Calculating the packet discard probability in the form of a Logistic function according to the packet length of the target packet, the network busyness and the network burstiness; The packet discard probability is normalized to calculate a current discard probability.

5. The method according to claim 1, characterized in that: According to the current discard probability, performing a discard operation on the target packet includes: Determine the target TCP link to which the target packet belongs, and obtain the historical packet discarding status of the target TCP link; A discard operation is performed on the target packet according to the historical packet discard situation and the current discard probability.

6. The method according to claim 1, characterized in that When the router receives the target packet, after obtaining the current queue length, it also includes: When it is determined that the current queue length is less than the queue minimum threshold, placing the target packet into the queue of the router for queuing; When it is determined that the current queue length is greater than the queue maximum threshold, the target packet is directly discarded.

7. A congestion control device for a router, characterized in that: include: The average queue length calculation module is used to obtain the current queue length when the router receives the target packet; A packet length acquisition module, used to determine the packet length of the target packet when it is determined that the current queue length is between the maximum queue threshold and the minimum queue threshold; A discard probability calculation module is used to obtain multiple historical queue lengths within a target time period, and calculate the current discard probability according to each historical queue length, the packet length of the target packet, the maximum threshold value of the queue, and the minimum threshold value of the queue; The packet discarding operation module is used to perform a discarding operation on the target packet according to the current discarding probability.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the congestion control method for a router according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the congestion control method for a router according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the congestion control method for a router according to any one of claims 1 to 6.