A switch congestion control method, device, medium and computer program product
By calculating the current average queue length and queue length change parameters of the switch port target queue, the packet loss probability threshold is dynamically determined, and a nonlinear function is used to express the packet loss probability distribution function, which solves the problem that the fixed packet loss parameters in the existing technology cannot adapt to the complexity The problem of network environment realizes the flexibility of adaptive update of switch queue parameters and congestion control.
Patent Information
- Application Number
- CN202411767437.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The existing switch active queue management solution relies on manually configuring fixed packet loss parameters, and cannot adapt to complex and changeable network environments and traffic patterns, increasing work complexity and burden.
By obtaining the instantaneous and historical average queue length of the target queue of the switch port, calculate the current average queue length and queue length change parameters, dynamically determine the packet loss probability threshold, and use a nonlinear function to express the packet loss probability distribution function, and output the packet loss probability for processing .
It realizes adaptive update of switch queue parameters, adapts to changes in the network environment, improves the flexibility and adaptability of congestion control, and reduces the complexity of parameter configuration.
Smart Images

Figure CN119254701B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of switches, and in particular to a switch congestion control method, device, medium and computer program product. Background Art
[0002] As the scale of data center networks continues to expand, the link congestion problem between switches is becoming increasingly serious. To solve the switch link congestion problem, many switch-based active queue management solutions have been proposed in the relevant technical field, such as the Random Early Drop (RED) algorithm and the Weighted Random Early Detection (WRED) technology. Both of them form a linear function of the packet loss probability by setting a lower limit, an upper limit, and a packet loss probability threshold (such as the maximum packet loss probability, and the default minimum packet loss probability is 0) for the queue, thereby determining the packet loss probability of the newly arrived data packet according to the queue length at the current moment.
[0003] However, the current active queue management scheme for switches still relies on experts to manually configure the lower limit, upper limit and probability threshold of packet loss. During the operation of the switch, the fixed parameter configuration cannot adapt to the complex and changing network environment and traffic pattern. In addition, when using WRED, different parameters need to be set for each queue, which increases the complexity and burden of the work.
[0004] Therefore, how to update the packet loss parameters of the switch queue to adapt to changes in the network environment is a technical problem that those skilled in the art need to solve. Summary of the invention
[0005] The object of the present invention is to provide a switch congestion control method, device, medium and computer program product, which can adapt to changes in the network environment and update the packet loss parameters of the switch queue.
[0006] In order to solve the above technical problems, the present invention provides a switch congestion control method, comprising:
[0007] Obtaining the instantaneous queue length of the target queue of the switch port at the current moment and the historical average queue length of the target queue, and calculating the current average queue length according to the historical average queue length and the instantaneous queue length;
[0008] Calculating a queue length variation parameter according to the historical average queue length and the current average queue length, and determining a packet loss probability threshold of the target queue according to the queue length variation parameter;
[0009] Obtaining a packet loss probability distribution function corresponding to the target queue according to the packet loss lower limit, the packet loss upper limit, and the packet loss probability threshold of the target queue;
[0010] Substituting at least one of the current average queue length, the historical average queue length and the instantaneous queue length into the packet loss probability distribution function, and outputting the packet loss probability;
[0011] Performing packet loss processing on newly arrived data packets in the target queue according to the packet loss probability;
[0012] Wherein, the packet loss probability distribution function is a nonlinear function.
[0013] On the one hand, calculating the current average queue length according to the historical average queue length and the instantaneous queue length includes:
[0014] Calculate the weighted sum of the historical average queue length and the instantaneous queue length to obtain the current average queue length;
[0015] The first weight corresponding to the historical average queue length and the second weight corresponding to the instantaneous queue length are determined according to the buffer size provided by the switch for the target queue.
[0016] On the other hand, determining a first weight corresponding to the historical average queue length and a second weight corresponding to the instantaneous queue length according to a cache size provided by the switch for the target queue includes:
[0017] The first weight is 1 minus the second weight;
[0018] Determine the corresponding number of data packets according to the cache size corresponding to the target queue, and record it as the data packet number threshold;
[0019] The queue length at which the current average queue length reaches the packet quantity threshold is recorded as the current average queue length threshold, and a first equation of the current average queue length threshold, the second weight and the packet quantity threshold is generated;
[0020] Determine the range of the current average queue length threshold according to the packet loss lower limit;
[0021] Determine a range of the second weight according to a range of the current average queue length threshold and the first equation;
[0022] The second weight is determined within the scope of the second weight.
[0023] On the other hand, determining the range of the current average queue length threshold according to the packet loss lower limit includes:
[0024] The packet loss lower limit is used as the upper limit of the range of the current average queue length threshold.
[0025] On the other hand, determining the second weight within the range of the second weight includes:
[0026] The upper limit of the range of the second weight is set as the second weight.
[0027] On the other hand, calculating a queue length change parameter according to the historical average queue length and the current average queue length, and determining a packet loss probability threshold of the target queue according to the queue length change parameter, including:
[0028] If the current average queue length is less than the packet loss lower limit for a first number of consecutive moments, lowering the packet loss probability threshold;
[0029] If the current average queue length is greater than the packet loss upper limit for a second number of consecutive moments, increasing the packet loss probability threshold;
[0030] Otherwise, the packet loss probability threshold at the previous moment is used as the packet loss probability threshold at the current moment.
[0031] On the other hand, the first number and the second number are both 2.
[0032] On the other hand, calculating a queue length change parameter according to the historical average queue length and the current average queue length, and determining a packet loss probability threshold of the target queue according to the queue length change parameter, including:
[0033] If the current average queue length is less than or equal to the packet loss lower limit, setting the queue state value of the target queue at the current moment to a first state value;
[0034] If the current average queue length is greater than the packet loss lower limit and the current average queue length is less than or equal to the packet loss upper limit, setting the queue state value of the target queue at the current moment to a second state value;
[0035] If the current average queue length is greater than the packet loss upper limit, setting the queue state value of the target queue at the current moment to a third state value;
[0036] Get the queue status value at a historical moment;
[0037] If the queue state values at a first number of consecutive moments are all the first state values, lowering the packet loss probability threshold;
[0038] If the queue state values at a second number of consecutive moments are all the third state values, increasing the packet loss probability threshold;
[0039] Otherwise, the packet loss probability threshold at the previous moment is used as the packet loss probability threshold at the current moment.
[0040] On the other hand, lowering the packet loss probability threshold includes:
[0041] Calculating a first ratio of the current average queue length to the packet loss lower limit;
[0042] The product of the packet loss probability threshold at a previous moment and the first ratio is the packet loss probability threshold at a current moment.
[0043] On the other hand, increasing the packet loss probability threshold includes:
[0044] Calculate a first difference between the current average queue length and the packet loss upper limit;
[0045] Calculate a first product of the packet loss lower limit and the packet loss upper limit;
[0046] Calculate a second difference between the number of data packets corresponding to the buffer size provided by the switch for the target queue and the first product;
[0047] calculating a second ratio of the first difference to the second difference;
[0048] The product of 1 plus the second ratio and the packet loss probability threshold at the previous moment is calculated as the packet loss probability threshold at the current moment.
[0049] On the other hand, according to the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold of the target queue, a packet loss probability distribution function corresponding to the target queue is obtained, including:
[0050] Substituting the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold into the Cauchy distribution function, the packet loss probability distribution function is obtained.
[0051] On the other hand, substituting the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold into the Cauchy distribution function to obtain the packet loss probability distribution function includes:
[0052] Setting the second parameter in the Cauchy distribution function to the packet loss lower limit;
[0053] Calculate a third difference value of the packet loss upper limit minus the packet loss lower limit;
[0054] Calculate a fourth difference of 1 minus the maximum packet loss probability;
[0055] Calculate the product of the square of the third difference and the fourth difference and divide it by the maximum packet loss probability to obtain a first parameter in the Cauchy distribution function;
[0056] The first parameter is a parameter used to determine the shape of the Cauchy distribution function, and the second parameter is a parameter used to determine the range of the independent variable in the Cauchy distribution function.
[0057] In order to solve the above technical problems, the present invention also provides a switch congestion control device, comprising:
[0058] Memory for storing computer programs;
[0059] The processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of any one of the above switch congestion control methods are implemented.
[0060] In order to solve the above technical problem, the present invention further provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the switch congestion control method as described in any one of the above items are implemented.
[0061] In order to solve the above technical problem, the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the switch congestion control method as described in any one of the above items are implemented.
[0062] The switch congestion control method provided by the present invention has the beneficial effect of calculating the current average queue length according to the historical average queue length of the target queue of the switch port and the instantaneous queue length at the current moment, and then calculating the queue length change parameter to determine the packet loss probability threshold of the target queue, instead of using a pre-configured fixed parameter. At the same time, a nonlinear function is used to express the packet loss probability distribution function corresponding to the target queue, and at least one of the current average queue length, the historical average queue length, and the instantaneous queue length is substituted into the packet loss probability distribution function, and the packet loss probability is output. According to the packet loss probability, the newly arrived data packets of the target queue are subjected to packet loss processing, which is more adaptable to the burstiness and randomness of the current data flow in the data center network than the traditional linear packet loss probability function.
[0063] The switch congestion control device, non-volatile storage medium and computer program product provided by the present invention have the above-mentioned beneficial effects, which will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.
[0065] Figure 1 A flow chart of a switch congestion control method provided by an embodiment of the present invention;
[0066] Figure 2 A schematic diagram of the structure of a switch congestion control device provided by an embodiment of the present invention;
[0067] Figure 3 A schematic diagram of the structure of a switch congestion control device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The core of the present invention is to provide a switch congestion control method, device, medium and computer program product, which can adapt to changes in the network environment and update the packet loss parameters of the switch queue.
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0070] To facilitate understanding of the technical solution provided by the embodiment of the present invention, some key terms used in the embodiment of the present invention are first explained here.
[0071] As a core component of modern information technology architecture, data center networks carry a variety of complex and diverse application types. These application types have put forward diverse requirements for data center networks due to their unique business logic and functional requirements. In particular, with the continuous emergence of new network applications in recent years, especially the increase in traffic such as big data mining and machine learning, network information traffic has shown explosive growth, bandwidth resources have become more scarce, and congestion problems have become more serious.
[0072] A switch port is an interface on a network switch that is used to connect devices such as computers, printers, servers, etc. Switch ports can be of different types to accommodate different network devices and transmission rates.
[0073] On a switch, each port usually has multiple queues, and each queue can be configured with different priorities and weights. Packets are assigned to the corresponding queues according to their quality of service requirements. Switch port queues are a mechanism used in network switches to manage the order of packet transmission, especially when the network is congested, it can ensure that critical packets are processed and transmitted first. Port queues are usually closely related to Quality of Service (QoS), and different queue scheduling algorithms are used to implement the priority sorting and transmission of packets.
[0074] In order to avoid network problems such as congestion and global synchronization, active queue management has always received close attention from experts and scholars, and many active queue management algorithms have been proposed. Among them, the Random Early Drop (RED) algorithm is widely used in network devices such as routers and switches due to its simplicity and good performance. Although the RED algorithm has achieved great success in congestion control, it still has defects, such as parameter sensitivity. The optimal set of parameters in terms of service throughput often fails to meet expectations in terms of packet loss rate and queuing delay. A single set of parameters cannot be applied to complex and changing network traffic environments.
[0075] Weighted Random Early Detection (WRED) technology sets different lower and upper packet loss limits and packet loss probability thresholds (such as the maximum packet loss probability, and the default minimum packet loss probability is 0) for packets in different queues. This allows packets of different priorities to be processed according to different drop rules. That is, packets with lower priorities are dropped first, and packets with higher priorities are gradually dropped when network congestion increases.
[0076] In the current switch congestion control scheme, when congestion is detected, the discard algorithm used for the newly arrived data packets needs to manually set at least the lower limit, upper limit and maximum probability of packet loss to form a linear control function of the packet loss probability, which will not be changed during the operation of the switch. The manually set packet loss parameters are subjective and prone to errors, and cannot achieve the best performance and effect. Moreover, with the complex changes in network environment and traffic patterns, fixed packet loss parameters lack timeliness and adaptability, and cannot track and respond to dynamically changing network conditions in a timely manner. When using the WRED algorithm, the packet loss parameters of multiple switch queues need to be manually configured in advance, which also increases the complexity and burden of the work.
[0077] To this end, an embodiment of the present invention provides a new packet loss solution applicable to switch congestion control, which is intended to update the packet loss parameters of the switch queue to adapt to changes in the network environment.
[0078] In an embodiment of the present invention, the packet loss parameters at least include a packet loss lower limit, a packet loss upper limit, and a packet loss probability threshold. Among them, the packet loss lower limit is also called the packet loss start point (DropStartPoint). When the queue length reaches the corresponding packet loss lower limit, the switch starts to execute packet loss for the newly arrived data packets. The packet loss upper limit is also called the packet loss end point (DropEndPoint). When the queue length reaches the corresponding packet loss upper limit, the switch will discard the newly arrived data packets according to the maximum packet loss probability. When the queue length is less than the packet loss lower limit, the newly arrived data packets are usually not discarded. After the queue length exceeds the packet loss upper limit, all newly arrived data packets are usually discarded. The packet loss probability threshold usually only needs to set the maximum packet loss probability, and the default minimum packet loss probability is 0.
[0079] This packet loss processing is probabilistic discarding. In the above traditional solution, after determining the lower limit of packet loss, the upper limit of packet loss and the maximum packet loss probability, the linear function between the lower limit of packet loss and the upper limit of packet loss is used as the corresponding function between the queue length and the packet loss probability. When the queue length is between the lower limit of packet loss and the upper limit of packet loss, the packet loss probability is determined according to the linear function.
[0080] However, due to the burstiness and randomness of data flows, the increase in queue length is not always proportional to the increase in congestion level, so there should not be a linear relationship between queue length and the required packet loss probability.
[0081] Therefore, the switch congestion control scheme provided by the embodiment of the present invention provides a new switch packet loss parameter determination method, by monitoring the current average queue length of the target queue targeted by the method, the current average queue length is calculated according to the historical average queue length of the target queue and the instantaneous queue length at the current moment, the queue length change parameter is calculated according to the current average queue length, and the packet loss probability threshold of the target queue is determined according to the queue length change parameter, so as to achieve the link congestion situation determined by the queue length change during the operation of the switch, and adjust the packet loss probability threshold accordingly. At the same time, the packet loss probability distribution function corresponding to the target queue is expressed in the form of a nonlinear function, at least one of the current average queue length, the historical average queue length and the instantaneous queue length is substituted into the packet loss probability distribution function, and the packet loss probability is output. Compared with the traditional linear packet loss probability function, it can better reflect the relationship between the packet loss probability and the queue length, so that it can quickly respond to congestion at each stage of the link. Therefore, the switch congestion control scheme provided by the embodiment of the present invention can use the average queue length to adjust the packet loss probability threshold, and dynamically adjust the packet loss probability threshold to adapt to the change of network traffic load, so as to achieve the effect of both congestion control and improving link utilization.
[0082] The switch congestion control method provided by the embodiment of the present invention is described below with reference to the accompanying drawings.
[0083] Figure 1 A flow chart of a switch congestion control method provided by an embodiment of the present invention.
[0084] like Figure 1 As shown, the switch congestion control method provided by the embodiment of the present invention includes:
[0085] S101: Obtain the instantaneous queue length of the target queue of the switch port at the current moment and the historical average queue length of the target queue, and calculate the current average queue length according to the historical average queue length and the instantaneous queue length;
[0086] S102: Calculating a queue length change parameter according to a historical average queue length and a current average queue length, and determining a packet loss probability threshold of a target queue according to the queue length change parameter;
[0087] S103: Obtaining a packet loss probability distribution function corresponding to the target queue according to the packet loss lower limit, the packet loss upper limit, and the packet loss probability threshold of the target queue;
[0088] S104: Substitute at least one of the current average queue length, the historical average queue length, and the instantaneous queue length into a packet loss probability distribution function, and output a packet loss probability;
[0089] S105: performing packet loss processing on the newly arrived data packets in the target queue according to the packet loss probability;
[0090] Among them, the packet loss probability distribution function is a nonlinear function.
[0091] In some optional implementations of the embodiments of the present invention, the packet loss probability threshold value updated as the average queue length changes may only include the maximum packet loss probability, and the minimum packet loss probability may be defaulted to 0 or other default values. In some other optional implementations of the embodiments of the present invention, the packet loss probability threshold value updated as the average queue length changes may also include the maximum packet loss probability and the minimum packet loss probability, the maximum packet loss probability corresponding to the packet loss probability adopted when the queue length reaches the upper limit of packet loss, and the minimum packet loss probability corresponding to the packet loss probability adopted when the queue length is at the lower limit of packet loss. When the queue length is between the lower limit of packet loss and the upper limit of packet loss, a value between the minimum packet loss probability and the maximum packet loss probability is selected as the packet loss probability.
[0092] In some optional implementations of the embodiments of the present invention, when the queue length is less than the packet loss lower limit, the newly arrived data packets may not be discarded. When the queue length exceeds the packet loss upper limit, all newly arrived data packets may be discarded. It is understood that in other optional implementations of the embodiments of the present invention, when the queue length is less than the packet loss lower limit or when the queue length exceeds the packet loss upper limit, other packet loss processing methods may also be adopted.
[0093] For S101, in the embodiment of the present invention, a queue used to execute the switch congestion control method provided by the present invention is defined as a target queue, that is, all queues of each port of the switch can be set as the target queue, or some queues can be selected as the target queue.
[0094] In some optional implementations of the embodiments of the present invention, the historical average queue length may be the average of the queue lengths at each monitoring time point since the switch was started or the last update time point of the target queue, and the current average queue length may be calculated based on the historical average queue length and the instantaneous queue length, or the average of the historical average queue length and the instantaneous queue length may be used as the current average queue length. It should be noted that the last update time point of the target queue refers to the starting time point for measuring the historical average queue length.
[0095] In some other optional implementations of the embodiments of the present invention, considering the situations such as burst traffic and traffic fluctuation, the current average queue length may not be obtained by directly calculating the average value. That is, the current average queue length is calculated according to the historical average queue length and the instantaneous queue length in S101, and it may also include: the historical average queue length and the instantaneous queue length are weighted and calculated to obtain the current average queue length; wherein the first weight corresponding to the historical average queue length and the second weight corresponding to the instantaneous queue length are determined according to the cache size provided by the switch for the target queue. That is to say, the influence of the instantaneous queue length on the current average queue length can be adjusted by setting the first weight of the historical average queue length and the second weight corresponding to the instantaneous queue length, so that the current average queue length can reflect the average queue length of the target queue and avoid being greatly affected by the burst traffic. The factors for setting the first weight of the historical average queue length and the second weight corresponding to the instantaneous queue length can consider the cache size provided by the switch for the target queue to select a suitable weight.
[0096] For S102, based on the historical average queue length and the current average queue length, the change of the average queue length of the target queue at the current moment compared with the average queue length at the previous moment can be seen. At this time, the queue length change parameter can be calculated, such as whether the average queue length increases, decreases, or remains unchanged, and in which interval between the lower and upper packet loss limits, so as to determine whether the packet loss probability threshold needs to be updated. As described above, the updated packet loss probability threshold can be only the maximum packet loss probability, that is, the minimum packet loss probability adopts the default value set initially.
[0097] For S103, before executing the monitoring of the target queue, the initial value of each packet loss parameter is set. The packet loss parameter includes a packet loss lower limit, a packet loss upper limit, and a packet loss probability threshold. In some optional implementations of the embodiments of the present invention, the initial value of the packet loss parameter of the target queue can be set by a staff member. In other optional implementations of the embodiments of the present invention, the initial value of the packet loss parameter can also be generated according to a pre-deployed packet loss parameter initialization script. The packet loss parameter initialization script can be used to set the same initial value of the packet loss parameter for all target queues; it can also be used to set the initial value of the corresponding packet loss parameter according to the priority of the target queue. The higher the priority of the target queue, the higher the packet loss lower limit, the packet loss upper limit, and the lower maximum packet loss upper limit can be set to reduce the packet loss processing of important data packets; the lower the priority of the target queue, the opposite is true. Thus, the initialization of the packet loss parameter can be completed to adapt to the situation of the target queue, reducing the work pressure of the staff to configure the packet loss parameter.
[0098] During the operation of the switch, the upper and lower packet loss limits can use the initial values, and the packet loss probability threshold can be adjusted as the queue length changes, thereby reducing the control difficulty.
[0099] Due to the burstiness and randomness of data flow, the increase in queue length is not always proportional to the increase in congestion, so the queue length and the required packet loss probability should not be in a linear relationship. In the embodiment of the present invention, a nonlinear function is used to replace the linear queue management method in the related art.
[0100] In some optional implementations of the embodiments of the present invention, the nonlinear function may be a nonlinear membership function in fuzzy mathematics, such as a Cauchy distribution function.
[0101] The fuzzy mathematical model is a mathematical model built based on fuzzy set theory. The difference between it and the traditional mathematical model is that the membership of an element to a set is not either this or that, but a membership degree between 0 and 1 is used to indicate that an element belongs to a certain set to a certain extent, so as to deal with the problem of fuzziness and uncertainty. Considering the relationship between the queue length and the required packet loss probability, in an embodiment of the present invention, the packet loss parameters, i.e., the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold (at the current moment) of the target queue can be substituted into the fuzzy mathematical nonlinear membership function to obtain the packet loss probability distribution function corresponding to the target queue, so as to calculate the corresponding packet loss probability according to the packet loss probability distribution function and the queue length at the current moment, so as to better control the corresponding relationship between the packet loss probability and the queue length.
[0102] For S104, the queue length parameter is substituted into the packet loss probability distribution function, and the packet loss probability is output. In the embodiment of the present invention, the queue length parameters involved include the current average queue length, the historical average queue length, and the instantaneous queue length, etc., which can express the queue length of the target queue. Therefore, a combination of one or more of these parameters can be substituted into the packet loss probability distribution function to calculate the packet loss probability. A simple and effective approach is to simply substitute the current average queue length into the packet loss probability distribution function to obtain the packet loss probability.
[0103] For S105, after the packet loss probability corresponding to the target queue at the current moment is calculated, in some optional implementations of the embodiment of the present invention, for the time period between the current moment and the next moment, the newly arrived data packets can be discarded according to the probability of packet loss. In other optional implementations of the embodiment of the present invention, other processing can also be performed according to the calculated packet loss probability corresponding to the target queue at the current moment.
[0104] The switch congestion control method provided by the embodiment of the present invention calculates the current average queue length according to the historical average queue length of the target queue of the switch port and the instantaneous queue length at the current moment, and then calculates the queue length change parameter to determine the packet loss probability threshold of the target queue, instead of using a pre-configured fixed parameter. At the same time, a nonlinear function is used to express the packet loss probability distribution function corresponding to the target queue, and at least one of the current average queue length, the historical average queue length, and the instantaneous queue length is substituted into the packet loss probability distribution function, and the packet loss probability is output. According to the packet loss probability, the newly arrived data packets of the target queue are subjected to packet loss processing, which is more adaptable to the burstiness and randomness of the current data flow in the data center network than the traditional linear packet loss probability function.
[0105] On the basis of the above embodiment, the embodiment of the present invention further describes a method for determining a first weight of a historical average queue length and a second weight corresponding to an instantaneous queue length.
[0106] In the above embodiment, it is introduced that calculating the current average queue length according to the historical average queue length and the instantaneous queue length in S101 may include: performing weighted sum calculation on the historical average queue length and the instantaneous queue length to obtain the current average queue length; wherein the first weight corresponding to the historical average queue length and the second weight corresponding to the instantaneous queue length are determined according to the cache size provided by the switch for the target queue.
[0107] In some optional implementations of the embodiments of the present invention, a first weight corresponding to the historical average queue length and a second weight corresponding to the instantaneous queue length are determined according to the cache size provided by the switch for the target queue, including: recording the first weight as 1 minus the second weight; determining the corresponding number of data packets according to the cache size corresponding to the target queue, recorded as the data packet number threshold; recording the queue length at which the current average queue length reaches the data packet number threshold as the current average queue length threshold, generating a first equation of the current average queue length threshold, the second weight and the data packet number threshold; determining the range of the current average queue length threshold according to the packet loss lower limit; determining the range of the second weight according to the range of the current average queue length threshold and the first equation; and determining the second weight within the range of the second weight.
[0108] To simplify the calculation, the second weight can be recorded as , the first weight is . Then the current average queue length can be expressed as follows:
[0109] .
[0110] in, Indicates the current moment (i.e. The current average queue length at a certain moment; Indicates the historical average queue length, that is, the last moment (i.e. The average queue length calculated at each time point; Indicates the current moment (i.e. The instantaneous queue length at a certain moment can be obtained by the switch through sampling measurement.
[0111] for If the value is too large, the change of average queue length is easily affected by burst traffic and cannot effectively reflect the long-term congestion changes. If it is too small, it is not flexible enough and cannot effectively reflect the current link congestion in the control. Restrictions are placed on the value of .
[0112] In this regard, in an embodiment of the present invention, the initial queue length of the target queue can be set to 0, and the queue length is increased by 1 each time a data packet arrives until packets arrive, the queue length increases to , record the average queue length at this time for:
[0113] .
[0114] in, Indicates Data packets, .
[0115] That is, if the number of packets in the target queue reaches the packet number threshold at a certain moment, the packet number threshold Determined by the cache size provided by the switch for the target queue. The current average queue length at this time is the current average queue length threshold, that is, Thus, the second weight is established The corresponding relationship with the cache size of the target queue.
[0116] In the packet loss algorithm, when the queue length reaches or is below the packet loss lower limit, the packet loss probability is minimal. The packet loss is minimized during the forwarding process, and you can set The value of satisfies Less than , that is, satisfy .in, Indicates the lower packet loss limit of the target queue.
[0117] at this time, It can be regarded as the cache size corresponding to the target queue, which is determined by the device itself. , you can determine To ensure that the average queue length can reasonably reflect the congestion situation, in an embodiment of the present invention, the range of the current average queue length threshold is determined according to the packet loss lower limit, which may include: taking the packet loss lower limit as the upper limit of the range of the current average queue length threshold.
[0118] Determining the second weight within the range of the second weight may include: taking the upper limit of the range of the second weight as the second weight. The value of is the maximum value.
[0119] At this time, the average queue length can be used to determine the adjustment range of the maximum packet loss probability without adding any additional parameters. The larger the average queue length, the greater the increase in the maximum packet loss probability; conversely, the more it decreases. By dynamically adjusting the maximum packet loss probability to adapt to changes in network traffic load, the link utilization is improved.
[0120] On the basis of the above embodiment, if different target queues are used to forward different types of data packets, that is, different target queues have different priorities, a more conservative or more aggressive strategy can be selected according to the priority when setting relevant parameters. The range of the current average queue length threshold is determined according to the packet loss lower limit, which may include: determining the first redundant parameter of the target queue according to the priority of the target queue, and taking the sum of the packet loss lower limit and the first redundant parameter as the upper limit of the range of the current average queue length threshold of the target queue. A target queue of a class of priority can be used as a benchmark, and its first redundant parameter is set to 0. The target queue with a higher priority than the benchmark target queue has a smaller first redundant parameter, and the target queue with a lower priority than the benchmark target queue has a larger first redundant parameter. Thereby, a conservative strategy is adopted for a target queue with a higher priority and a lower packet loss tolerance to minimize active packet loss, and an aggressive strategy is adopted for a target queue with a lower priority and a higher packet loss tolerance to make full use of link resources.
[0121] Determining the second weight within the range of the second weight may include: determining the second redundancy parameter of the target queue according to the priority of the target queue, and taking the sum of the upper limit of the range of the second weight and the second redundancy parameter as the second weight. A target queue of a class of priority may be used as a benchmark, and its second redundancy parameter may be set to 0. The higher the priority of the target queue compared to the benchmark target queue, the smaller its second redundancy parameter, and the lower the priority of the target queue compared to the benchmark target queue, the larger its second redundancy parameter. This allows a conservative strategy to be adopted for a target queue with a higher priority and a lower packet loss tolerance to minimize active packet loss, and an aggressive strategy to be adopted for a target queue with a lower priority and a higher packet loss tolerance to fully utilize link resources.
[0122] Based on the above embodiment, the embodiment of the present invention continues to explain the updating process of the packet loss probability threshold.
[0123] In an embodiment of the present invention, in S102, a queue length change parameter is calculated based on the historical average queue length and the current average queue length, and a packet loss probability threshold of the target queue is determined based on the queue length change parameter, which may include: if the current average queue length is less than the packet loss lower limit for a first number of consecutive moments, then the packet loss probability threshold is lowered; if the current average queue length is greater than the packet loss upper limit for a second number of consecutive moments, then the packet loss probability threshold is increased; otherwise, the packet loss probability threshold at the previous moment is used as the packet loss probability threshold at the current moment.
[0124] In the embodiment of the present invention, whether the packet loss probability threshold needs to be updated and how to update the packet loss probability threshold are determined by continuously monitoring the relationship between the average queue length at multiple moments and the packet loss upper limit and the packet loss lower limit.
[0125] In some optional implementations of the embodiments of the present invention, the first number and the second number may both be 2, that is, two moments are continuously monitored to determine whether the packet loss probability threshold needs to be updated and how the packet loss probability threshold needs to be updated.
[0126] In some optional implementations of the embodiments of the present invention, the queue state at each moment can be tracked by setting a queue state value for the target queue. Then, the queue length change parameter is calculated according to the historical average queue length and the current average queue length, and the packet loss probability threshold of the target queue is determined according to the queue length change parameter, which may include: if the current average queue length is less than or equal to the packet loss lower limit, the queue state value of the target queue at the current moment is set to the first state value; if the current average queue length is greater than the packet loss lower limit and the current average queue length is less than or equal to the packet loss upper limit, the queue state value of the target queue at the current moment is set to the second state value; if the current average queue length is greater than the packet loss upper limit, the queue state value of the target queue at the current moment is set to the third state value; the queue state value of the historical moment is obtained; if the queue state values of the first number of consecutive moments are all the first state value, the packet loss probability threshold is reduced; if the queue state values of the second number of consecutive moments are all the third state value, the packet loss probability threshold is increased; otherwise, the packet loss probability threshold of the previous moment is used as the packet loss probability threshold of the current moment.
[0127] For example, if the first number and the second number are both 2, the first status value can be set to -1, the second status value to 0, and the third status value to 1. Two variables, status1 and status2, can be set to represent the queue status of the target queue. The initial value is 0, indicating that the average queue length of the target queue changes relatively steadily. Status1 is the queue status value of the target queue at the previous moment, and status2 is the queue status value of the target queue at the current moment.
[0128] After determining the current average queue length, compare the current average queue length with the packet loss lower limit and the packet loss upper limit. If the current average queue length is between the packet loss lower limit and the packet loss upper limit, the link corresponding to the target queue is considered to be relatively stable, and the value of status2 (current queue status) is assigned to 0. If the current average queue length is less than the packet loss lower limit, the value of status2 (current queue status) is assigned to -1. If the current average queue length is greater than the packet loss upper limit, the value of status2 (current queue status) is assigned to 1.
[0129] Then, based on status1 (previous moment status) and status2 (current moment queue status), determine whether the target queue needs to adjust the maximum packet loss probability. The link condition is good or bad cannot be determined by a single comparison. Therefore, only when the values of status1 and status2 are both -1, it is considered that the link condition is very good and the link utilization is low. At this time, the maximum packet loss probability should be appropriately reduced; on the contrary, if the values of status1 and status2 are both 1, it is considered that the link condition is poor and the link is too crowded, so the maximum packet loss probability should be appropriately increased.
[0130] If the maximum packet loss probability does not need to be adjusted, the value of status2 is assigned to status1.
[0131] In the embodiment of the present invention, lowering the packet loss probability threshold may include: calculating a first ratio of the current average queue length to the packet loss lower limit; and taking the product of the packet loss probability threshold at the previous moment and the first ratio as the packet loss probability threshold at the current moment. The above process can be expressed as follows:
[0132] ;
[0133] in, Indicates the maximum packet loss probability at the current moment, Indicates the maximum packet loss probability used previously (not necessarily the maximum packet loss probability updated at the last moment). Indicates the current moment (i.e. The current average queue length at a certain time (time), Indicates the lower packet loss limit of the target queue.
[0134] In the embodiment of the present invention, increasing the packet loss probability threshold may include: calculating a first difference between the current average queue length and the packet loss upper limit; calculating a first product between the packet loss lower limit and the packet loss upper limit; calculating a second difference between the number of data packets corresponding to the cache size provided by the switch for the target queue and the first product; calculating a second ratio between the first difference and the second difference; calculating the product of 1 plus the second ratio and the packet loss probability threshold at the previous moment as the packet loss probability threshold at the current moment. The above process can be expressed as follows:
[0135] ;
[0136] in, Indicates the maximum packet loss probability at the current moment, Indicates the maximum packet loss probability used previously (not necessarily the maximum packet loss probability updated at the last moment). Indicates the current moment (i.e. The current average queue length at a certain time (time), Indicates the lower limit of packet loss of the target queue. Indicates the upper limit of packet loss of the target queue. Indicates the buffer size of the target queue.
[0137] It should be noted that the maximum value of the maximum packet loss probability is 1.
[0138] After updating the packet loss probability threshold, status1 is set to 0.
[0139] Based on the above embodiment, the embodiment of the present invention continues to explain the step of determining the packet loss probability after determining the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold.
[0140] Due to the burstiness and randomness of data flow, the increase in queue length is not always proportional to the increase in congestion, so the queue length should not be linearly related to the required packet loss probability. Since fuzzy mathematics has good adaptability to model uncertainty, and the probability function of the RED algorithm can be regarded as a large-scale trapezoidal distribution in the fuzzy mathematics membership function. Combining these two points, in the embodiment of the present invention, the Cauchy distribution function can be selected to replace the original linear piecewise function to calculate the packet loss probability.
[0141] In an embodiment of the present invention, obtaining a packet loss probability distribution function corresponding to the target queue according to the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold of the target queue in S103 may include: substituting the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold into the Cauchy distribution function to obtain the packet loss probability distribution function.
[0142] In a specific implementation, substituting the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold into the Cauchy distribution function to obtain the packet loss probability distribution function may include: setting the second parameter in the Cauchy distribution function as the packet loss lower limit; calculating the third difference of the packet loss upper limit minus the packet loss lower limit; calculating the fourth difference of 1 minus the maximum packet loss probability; calculating the product of the third difference and the fourth difference divided by the maximum packet loss probability to obtain the first parameter in the Cauchy distribution function; wherein the first parameter is a parameter for determining the shape of the Cauchy distribution function, which is usually used to control the width of the distribution, also known as the scale parameter; the second parameter is a parameter for determining the range of the independent variable in the Cauchy distribution function, which is used to represent the center position of the independent variable, also known as the position parameter.
[0143] In some optional implementations of the embodiments of the present invention, the large-scale Cauchy distribution in the fuzzy mathematical membership function can also be used to replace the original linear piecewise function to calculate the packet loss probability. Then, in S103, according to the packet loss lower limit, packet loss upper limit and packet loss probability threshold of the target queue, the packet loss probability distribution function corresponding to the target queue is obtained, and it can also include: substituting the packet loss lower limit, packet loss upper limit and packet loss probability threshold into the large-scale Cauchy distribution function to obtain the packet loss probability distribution function.
[0144] The oversized Cauchy distribution function is a type of Cauchy distribution function that adjusts the distribution shape to make it more consistent with the characteristics of actual data.
[0145] In the embodiment of the present invention, the selected large-scale Cauchy distribution formula may be:
[0146] ;
[0147] in, represents the large Cauchy distribution function, Represents the first parameter, Indicates the second parameter.
[0148] It should be noted that there are many forms of expression of the oversized Cauchy distribution formula. In the embodiment of the present invention, the oversized Cauchy distribution formula in the above form is selected in consideration of the parameter characteristics of the queue length, the parameter characteristics of the packet loss probability, and the relationship between the queue length and the packet loss probability. Among them, A and B are parameters in the oversized Cauchy distribution formula selected by the present invention, which are used to control the shape of the function and the position of the function. In order to ensure that the distribution function can replace the linear function in the RED algorithm, A and B need to be confirmed, and the specific confirmation method is shown below.
[0149] In combination with the RED algorithm, in an embodiment of the present invention, substituting the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold into the large-scale Cauchy distribution function to obtain the packet loss probability distribution function may include: setting the second parameter in the large-scale Cauchy distribution function as the packet loss lower limit; calculating the third difference between the packet loss upper limit and the packet loss lower limit; calculating the fourth difference between 1 and the maximum packet loss probability; calculating the product of the square of the third difference and the fourth difference and dividing it by the maximum packet loss probability to obtain the first parameter in the large-scale Cauchy distribution function; wherein the first parameter is a parameter for determining the shape of the large-scale Cauchy distribution function, which is usually used to control the width of the distribution, also known as the scale parameter; the second parameter is a parameter for determining the range of the independent variable in the large-scale Cauchy distribution function, which is used to represent the center position of the independent variable, also known as the position parameter.
[0150] That is to say, for the determination of A, when the current average queue length is the upper limit of packet loss When , the packet loss probability is the maximum packet loss probability ,Will Substituting into the large Cauchy distribution formula, we get:
[0151] .
[0152] Substituting the first parameter A into the large Cauchy distribution formula, we can get a new probability calculation formula, that is, the packet loss probability distribution function of the target queue:
[0153] = ;
[0154] in, represents the packet loss probability, Indicates the maximum packet loss probability at the current moment, Indicates the current moment (i.e. The current average queue length at a certain time (time), Indicates the lower limit of packet loss of the target queue. Indicates the upper limit of packet loss of the target queue.
[0155] The switch congestion control method provided by the embodiment of the present invention calculates the packet loss probability by replacing the original linear piecewise function with a larger Cauchy distribution function, so that the finally calculated packet loss probability is more consistent with the load of the current link queue, thereby improving the utilization rate of the link and the overall performance of the network.
[0156] In summary, the switch congestion control method introduced in the embodiments of the present invention can make the packet loss parameters of the packet loss algorithm adaptive to the current network traffic situation without adding additional parameters like other RED improved algorithms. On the contrary, due to the adaptive adjustment of the maximum packet loss probability parameter, the parameter sensitivity is reduced and the stability of the algorithm is improved.
[0157] It should be noted that in the embodiments of the switch congestion control method of the present invention, some of the steps or features can be ignored or not executed. The hardware or software functional modules divided for the convenience of description are not the only implementation form of the switch congestion control method provided by the embodiment of the present invention.
[0158] The above describes in detail various embodiments corresponding to the switch congestion control method. On this basis, the present invention also discloses a switch congestion control device, equipment, non-volatile storage medium and computer program product corresponding to the above method.
[0159] Figure 2 A schematic diagram of the structure of a switch congestion control device provided by an embodiment of the present invention.
[0160] like Figure 2 As shown, the switch congestion control device provided by the embodiment of the present invention includes:
[0161] The average queue length calculation module 201 is used to obtain the instantaneous queue length of the target queue of the switch port at the current moment and the historical average queue length of the target queue, and calculate the current average queue length according to the historical average queue length and the instantaneous queue length;
[0162] An adaptive adjustment module 202, configured to calculate a queue length variation parameter according to a historical average queue length and a current average queue length, and determine a packet loss probability threshold of a target queue according to the queue length variation parameter;
[0163] The probability calculation module 203 is used to obtain a packet loss probability distribution function corresponding to the target queue according to the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold of the target queue; substitute at least one of the current average queue length, the historical average queue length and the instantaneous queue length into the packet loss probability distribution function, and output the packet loss probability;
[0164] The control module 204 is used to perform packet loss processing on the newly arrived data packets in the target queue according to the packet loss probability;
[0165] Among them, the packet loss probability distribution function is a nonlinear function.
[0166] It should be noted that in each implementation of the switch congestion control device provided by the embodiment of the present invention, the division of units is only a logical functional division, and other division methods can be used. The connection method between different units can be electrical, mechanical or other connection methods. The separated units can be located in the same physical location or distributed on multiple network nodes. Each unit can be implemented in the form of hardware or in the form of a software functional unit. That is, part or all of the units provided by the embodiment of the present invention can be selected according to actual needs and the corresponding connection method or integration method can be adopted to achieve the purpose of the embodiment of the present invention.
[0167] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0168] Figure 3 A schematic diagram of the structure of a switch congestion control device provided by an embodiment of the present invention.
[0169] like Figure 3 As shown, the switch congestion control device provided by the embodiment of the present invention includes: a memory 310, used to store a computer program 311; a processor 320, used to execute the computer program 311, and when the computer program 311 is executed by the processor 320, the steps of the switch congestion control method provided by any of the above embodiments are implemented.
[0170] Among them, the processor 320 may include one or more processing cores, such as a 3-core processor, an 8-core processor, etc. The processor 320 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 320 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 320 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 320 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0171] The memory 310 may include one or more non-volatile storage media, which may be non-transitory. The memory 310 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 310 is at least used to store the following computer program 311, wherein the computer program 311, after being loaded and executed by the processor 320, can implement the relevant steps in the switch congestion control method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 310 may also include an operating system 312 and data 313, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 312 may be Windows or other types of operating systems. The data 313 may include, but is not limited to, the data involved in the above method.
[0172] In some embodiments, the switch congestion control device may further include a display screen 330 , a power supply 340 , a communication interface 350 , an input / output interface 360 , a sensor 370 , and a communication bus 380 .
[0173] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the switch congestion control device, and may include more or less components than those shown in the figure.
[0174] The switch congestion control device provided in the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the steps of the switch congestion control method provided in the above embodiment, and the effect is the same as above.
[0175] An embodiment of the present invention provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the switch congestion control method provided in any one of the above embodiments can be implemented.
[0176] The non-volatile storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0177] For the introduction of the non-volatile storage medium provided in the embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the switch congestion control method provided in the embodiment of the present invention, and the present invention will not elaborate on it here.
[0178] An embodiment of the present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the switch congestion control method provided in any one of the above embodiments are implemented.
[0179] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the switch congestion control method provided by the embodiment of the present invention, and the present invention will not elaborate on it here.
[0180] The above is a detailed introduction to a switch congestion control method, device, medium and computer program product provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other. For the devices, equipment, non-volatile storage media and computer program products disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.
[0181] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A switch congestion control method, characterized in that: include: Obtaining the instantaneous queue length of the target queue of the switch port at the current moment and the historical average queue length of the target queue, and calculating the current average queue length according to the historical average queue length and the instantaneous queue length; If the current average queue length is less than the packet loss lower limit of the target queue for a first number of consecutive moments, lowering the packet loss probability threshold of the target queue; If the current average queue length is greater than the packet loss upper limit of the target queue for a second number of consecutive moments, increasing the packet loss probability threshold; Otherwise, the packet loss probability threshold at the previous moment is used as the packet loss probability threshold at the current moment; Obtaining a packet loss probability distribution function corresponding to the target queue according to the packet loss lower limit, the packet loss upper limit, and the packet loss probability threshold; Substituting at least one of the current average queue length, the historical average queue length and the instantaneous queue length into the packet loss probability distribution function, and outputting the packet loss probability; Performing packet loss processing on newly arrived data packets in the target queue according to the packet loss probability; Wherein, the packet loss probability distribution function is a nonlinear function; Obtaining a packet loss probability distribution function corresponding to the target queue according to a packet loss lower limit, a packet loss upper limit, and the packet loss probability threshold of the target queue, including: substituting the packet loss lower limit, the packet loss upper limit, and the packet loss probability threshold into a Cauchy distribution function to obtain the packet loss probability distribution function.
2. The switch congestion control method according to claim 1, characterized in that: Calculating a current average queue length according to the historical average queue length and the instantaneous queue length includes: Calculate the weighted sum of the historical average queue length and the instantaneous queue length to obtain the current average queue length; The first weight corresponding to the historical average queue length and the second weight corresponding to the instantaneous queue length are determined according to the buffer size provided by the switch for the target queue.
3. The switch congestion control method according to claim 2, characterized in that: Determining a first weight corresponding to the historical average queue length and a second weight corresponding to the instantaneous queue length according to a cache size provided by the switch for the target queue includes: The first weight is 1 minus the second weight; Determine the corresponding number of data packets according to the cache size corresponding to the target queue, and record it as the data packet number threshold; The queue length at which the current average queue length reaches the packet quantity threshold is recorded as the current average queue length threshold, and a first equation of the current average queue length threshold, the second weight and the packet quantity threshold is generated; Determine the range of the current average queue length threshold according to the packet loss lower limit; Determine a range of the second weight according to a range of the current average queue length threshold and the first equation; determining the second weight within a range of the second weight; Wherein, the first equation is: ; in, represents the current average queue length threshold, Indicates Data packets, , represents the data packet quantity threshold, represents the second weight.
4. The switch congestion control method according to claim 3, characterized in that: Determining a range of the current average queue length threshold according to the packet loss lower limit includes: The packet loss lower limit is used as the upper limit of the range of the current average queue length threshold.
5. The switch congestion control method according to claim 3, characterized in that: Determining the second weight within the range of the second weight includes: The upper limit of the range of the second weight is set as the second weight.
6. The switch congestion control method according to claim 1, characterized in that: The first number and the second number are both 2.
7. The switch congestion control method according to claim 1, characterized in that: If the current average queue length is less than the packet loss lower limit of the target queue for a first number of consecutive moments, lowering the packet loss probability threshold of the target queue; If the current average queue length is greater than the packet loss upper limit of the target queue for a second number of consecutive moments, increasing the packet loss probability threshold; Otherwise, the packet loss probability threshold at the previous moment is used as the packet loss probability threshold at the current moment, including: If the current average queue length is less than or equal to the packet loss lower limit, setting the queue state value of the target queue at the current moment to a first state value; If the current average queue length is greater than the packet loss lower limit and the current average queue length is less than or equal to the packet loss upper limit, setting the queue state value of the target queue at the current moment to a second state value; If the current average queue length is greater than the packet loss upper limit, setting the queue state value of the target queue at the current moment to a third state value; Get the queue status value at a historical moment; If the queue state values at a first number of consecutive moments are all the first state values, lowering the packet loss probability threshold; If the queue state values at a second number of consecutive moments are all the third state values, increasing the packet loss probability threshold; Otherwise, the packet loss probability threshold at the previous moment is used as the packet loss probability threshold at the current moment.
8. The switch congestion control method according to claim 1, characterized in that: Reducing the packet loss probability threshold includes: Calculating a first ratio of the current average queue length to the packet loss lower limit; The product of the packet loss probability threshold at a previous moment and the first ratio is the packet loss probability threshold at a current moment.
9. The switch congestion control method according to claim 1, characterized in that: Increasing the packet loss probability threshold includes: Calculate a first difference between the current average queue length and the packet loss upper limit; Calculate a first product of the packet loss lower limit and the packet loss upper limit; Calculate a second difference between the number of data packets corresponding to the buffer size provided by the switch for the target queue and the first product; calculating a second ratio of the first difference to the second difference; The product of 1 plus the second ratio and the packet loss probability threshold at the previous moment is calculated as the packet loss probability threshold at the current moment.
10. The switch congestion control method according to claim 1, characterized in that: Substituting the packet loss lower limit, the packet loss upper limit and the packet loss probability threshold into the Cauchy distribution function to obtain the packet loss probability distribution function includes: Setting the second parameter in the Cauchy distribution function to the packet loss lower limit; Calculate a third difference value of the packet loss upper limit minus the packet loss lower limit; Calculate a fourth difference of 1 minus the maximum packet loss probability; Calculate the product of the square of the third difference and the fourth difference and divide it by the maximum packet loss probability to obtain a first parameter in the Cauchy distribution function; The first parameter is a parameter used to determine the shape of the Cauchy distribution function, and the second parameter is a parameter used to determine the range of the independent variable in the Cauchy distribution function.
11. A switch congestion control device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the switch congestion control method according to any one of claims 1 to 10 are implemented.
12. A non-volatile storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the switch congestion control method according to any one of claims 1 to 10 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the switch congestion control method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Active queue management algorithm for enhancing RED stability
CN114785743A
Packet forwarding control system, method for the same, program for the same, recording medium, and communication equipment
JP2003249953A