Weighted random early detection algorithm threshold value configuration method and device

By dynamically configuring the threshold values ​​of the weighted random early detection algorithm, the problem that the fixed threshold values ​​in the prior art cannot meet the tolerance requirements of different types of data to data congestion, and improve the control effect of data congestion.

CN119603238AActive Publication Date: 2025-03-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311161173.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-08
Publication Date
2025-03-11
Estimated Expiration
2043-09-08

AI Technical Summary

Technical Problem

The threshold value of the weighted random early detection algorithm configured for each queue in the prior art is fixed, which cannot meet the requirements of the tolerance of different types of data in the same queue for data congestion, resulting in the insignificant effect of data congestion control.

Method used

By obtaining target traffic data, determining the target type, and determining the corresponding high and low thresholds based on the target type and preset mapping relationship, the threshold values ​​of the weighted random early detection algorithm are dynamically configured.

Benefits of technology

It realizes dynamic configuration of threshold values ​​according to different types of data, meets the tolerance requirements of different types of data to data congestion, and improves the control effect of data congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603238A_ABST
    Figure CN119603238A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a weighted random early detection algorithm threshold value configuration method and device, and the method comprises the steps: obtaining target traffic data; determining whether a target type exists according to the target traffic data; under the condition that the target type exists, determining a first target high threshold value and a first target low threshold value according to the target type and the first mapping relation; and sending the first target high threshold value and the first target low threshold value to a forwarding chip, so that the forwarding chip discards the message in the target queue according to the first target high threshold value and the first target low threshold value. Through the data congestion control method and device, the problem that in the prior art, the threshold value of a weighted random early detection algorithm configured for each queue is fixed, and the requirement of different types of data in the same queue for the tolerance degree of data congestion cannot be met is solved, and the data congestion control effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the computer field, and in particular, to a method for configuring a weighted random early detection algorithm threshold value, a device for configuring a weighted random early detection algorithm threshold value, a computer-readable storage medium, and a switch. Background Art

[0002] Different from traditional packet loss mechanisms (for example, tail drop), the Weighted Random Early Detection (WRED) algorithm uses a probabilistic packet loss strategy to determine the drop probability (the probability of dropping a packet) based on the number of packets in the queue or the relationship between the queue length and the threshold value. Using weighted random early detection can help avoid network congestion, reduce queuing delays, and improve overall network performance and service quality.

[0003] The same queue may transmit different types of data, but different types of data have different tolerance levels for data congestion. The threshold value of the weighted random early detection algorithm configured for each queue in the prior art is fixed, which can only meet the tolerance level of the same type of data for data congestion, but cannot meet the tolerance level requirements of different types of data in the same queue for data congestion, resulting in unclear data congestion control effect. Summary of the invention

[0004] The embodiments of the present application provide a method for configuring a weighted random early detection algorithm threshold value, a device for configuring a weighted random early detection algorithm threshold value, a computer-readable storage medium, and a switch, so as to at least solve the problem in the prior art that the threshold value of the weighted random early detection algorithm configured for each queue is fixed and cannot meet the requirements of the tolerance degree of different types of data in the same queue to data congestion.

[0005] According to an embodiment of the present application, a method for configuring a threshold value of a weighted random early detection algorithm is provided, the method being applied to an application layer of a switch, the application layer of the switch being communicatively connected to a forwarding chip of the switch, the method comprising: obtaining target traffic data, the target traffic data being traffic data of a target queue of a target port, the target port being one of a plurality of ports of the forwarding chip, the target queue being one of a plurality of queues of the target port, the traffic data comprising parameters of data traffic; determining whether a target type exists based on the target traffic data, the target traffic data being within a preset range corresponding to the target type, the target type being one of a plurality of preset types, one of the preset types corresponding to one of the preset ranges, and the target traffic data being within the preset range corresponding to the target type The type of data in the target queue that is characterized within the preset range is the target type; when the target type exists, a first target high threshold value and a first target low threshold value are determined according to the target type and a first mapping relationship, the first mapping relationship being a mapping relationship between the preset type and the high threshold value of the weighted random early detection algorithm and the low threshold value of the weighted random early detection algorithm, the first target high threshold value being the high threshold value corresponding to the target type in the first mapping relationship, and the first target low threshold value being the low threshold value corresponding to the target type in the first mapping relationship; the first target high threshold value and the first target low threshold value are sent to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the first target high threshold value and the first target low threshold value.

[0006] In an exemplary embodiment, obtaining target flow data includes: detecting whether an acquisition time is greater than a first preset time, wherein the acquisition time is the difference between the current moment and the start moment of the last acquisition of the target flow data; and obtaining the target flow data when the acquisition time is greater than the first preset time.

[0007] In an exemplary embodiment, the parameters include bandwidth utilization, traffic rate and traffic proportion, the preset range includes a first preset range, a second preset range and a third preset range, and determining whether the target type exists according to the target traffic data includes: a first acquisition step, acquiring a backup type, the backup type is one of the multiple preset types; a second acquisition step, acquiring a first target preset range, a second target preset range and a third target preset range according to the backup type, the first target preset range is the first preset range corresponding to the backup type, the second target preset range is the second preset range corresponding to the backup type, and the third target preset range is the third preset range corresponding to the backup type; a first determination step, determining whether the bandwidth utilization of the target traffic data is within the first target preset range, determining whether the traffic rate of the target traffic data is within the second target preset range, and determining whether the traffic proportion of the target traffic data is within the third target preset range; repeating the steps, determining whether the bandwidth utilization of the target traffic data is within the first target preset range, determining whether the traffic rate of the target traffic data is within the second target preset range, and determining whether the traffic proportion of the target traffic data is within the third target preset range; and repeating the steps, determining whether the bandwidth utilization of the target traffic data is within the first target preset range. When the target traffic data is not within the first target preset range, the traffic rate of the target traffic data is not within the second target preset range, or the traffic proportion of the target traffic data is not within the third target preset range, repeat the first acquisition step, the second acquisition step, and the first determination step at least once until the bandwidth utilization of the target traffic data is within the first target preset range, the traffic rate of the target traffic data is within the second target preset range, and the traffic proportion of the target traffic data is within the third target preset range, or until all the preset types are determined; a second determination step, when the bandwidth utilization of the target traffic data is within the first target preset range, the traffic rate of the target traffic data is within the second target preset range, and the traffic proportion of the target traffic data is within the third target preset range, determine that the target type exists and the backup type is the target type; a third determination step, when all the preset types are determined, determine that the target type does not exist.

[0008] In an exemplary embodiment, after determining whether the target type exists based on the target traffic data, the method further includes: if the target type does not exist, determining a preset high threshold value as the first target high threshold value, and determining a preset low threshold value as the first target low threshold value.

[0009] In an exemplary embodiment, after determining a first target high threshold value and a first target low threshold value according to the target type and the first mapping relationship, and before sending the first target high threshold value and the first target low threshold value to the forwarding chip, the method further includes: inputting the target traffic data, the first target high threshold value and the first target low threshold value into an optimization model to obtain an optimized first target high threshold value and an optimized first target low threshold value, the optimization model being obtained by training a neural network with multiple sets of training data, each set of the training data in the multiple sets of training data including at least: the traffic data, the high threshold value and the low threshold value, the absolute value of the difference between the optimized first target high threshold value and the first target high threshold value being less than a preset value, and the absolute value of the difference between the optimized first target low threshold value and the first target low threshold value being less than the preset value.

[0010] In an exemplary embodiment, the parameter includes bandwidth utilization. After sending the first target high threshold value and the first target low threshold value to the forwarding chip, the method further includes: acquiring the target traffic data again to obtain the target traffic data this time; determining whether the bandwidth utilization of the target traffic data this time is greater than the bandwidth utilization of the target traffic data last time; at least when the bandwidth utilization of the target traffic data this time is greater than the bandwidth utilization of the target traffic data acquired last time, sending a second target high threshold value and a second target low threshold value to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the second target high threshold value and the second target low threshold value, the second target high threshold value being the high threshold value adopted by the forwarding chip before the first target high threshold value and the first target low threshold value are sent to the forwarding chip, and the second target low threshold value is the low threshold value adopted by the forwarding chip before the first target low threshold value and the first target low threshold value are sent to the forwarding chip.

[0011] In an exemplary embodiment, before determining the first target high threshold value and the first target low threshold value according to the target type and the first mapping relationship, the method further includes: determining the high threshold value corresponding to the preset type and the low threshold value corresponding to the preset type according to the preset type and the demand information corresponding to the preset type, one preset type corresponds to one demand information, and the demand information characterizes the tolerance of the corresponding preset type of data to data congestion; determining the first mapping relationship according to the preset type, the high threshold value corresponding to the preset type, and the low threshold value corresponding to the preset type.

[0012] According to another embodiment of the present application, a device for configuring a threshold value of a weighted random early detection algorithm is provided, the device being applied to an application layer of a switch, the application layer of the switch being communicatively connected to a forwarding chip of the switch, the device comprising: a first acquisition module, for acquiring target traffic data, the target traffic data being traffic data of a target queue of a target port, the target port being one of a plurality of ports of the forwarding chip, the target queue being one of a plurality of queues of the target port, the traffic data comprising parameters of the traffic of the data; a first determination module, for determining whether a target type exists according to the target traffic data, the target traffic data being within a preset range corresponding to the target type, the target type being one of a plurality of preset types, one of the preset types corresponding to one of the preset ranges, and the target traffic data being within the preset range corresponding to the target type The type of data in the target queue that is characterized within the preset range is the target type; a second determination module is used to determine a first target high threshold value and a first target low threshold value according to the target type and a first mapping relationship when the target type exists, the first mapping relationship being a mapping relationship between the preset type and the high threshold value of the weighted random early detection algorithm and the low threshold value of the weighted random early detection algorithm, the first target high threshold value being the high threshold value corresponding to the target type in the first mapping relationship, and the first target low threshold value being the low threshold value corresponding to the target type in the first mapping relationship; a second sending module is used to send the first target high threshold value and the first target low threshold value to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the first target high threshold value and the first target low threshold value.

[0013] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps in the embodiment of the method for configuring the weighted random early detection algorithm threshold value when running.

[0014] According to another embodiment of the present application, a switch is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in the embodiment of the method for configuring the weighted random early detection algorithm threshold value.

[0015] Through the present application, first, the flow parameters of the data in the queue are obtained, and then the type of the data in the queue is determined according to the flow parameters of the data in the queue. After that, according to the type of the data in the queue, the high threshold value and the low threshold value corresponding to the type of the data in the queue are determined. Finally, the high threshold value and the low threshold value corresponding to the type of the data in the queue are sent to the forwarding chip. When the queue transmits different types of data, the queue is configured with a corresponding threshold value to meet the requirements of the tolerance degree of different types of data to data congestion, thereby improving the control effect of data congestion. This solves the problem in the prior art that the threshold value of the weighted random early detection algorithm configured for each queue is fixed and cannot meet the requirements of the tolerance degree of different types of data in the same queue to data congestion, thereby improving the control effect of data congestion. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a schematic diagram of a threshold value configuration method according to an embodiment of the present application;

[0017] Figure 2 is a schematic diagram of another threshold value configuration method according to an embodiment of the present application;

[0018] Figure 3 is a flow chart of a method for configuring a weighted random early detection algorithm threshold value according to an embodiment of the present application;

[0019] Figure 4 is a flowchart of another method for configuring a weighted random early detection algorithm threshold value according to an embodiment of the present application;

[0020] Figure 5 It is a structural diagram of a device for configuring a threshold value of a weighted random early detection algorithm according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0023] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0024] Weighted Random Early Detection Algorithm: It is a congestion avoidance mechanism, commonly used in queue management in network devices. Its main goal is to randomly discard some data packets before network congestion occurs.

[0025] Tail Drop: The traditional drop strategy uses the tail drop method, which treats all packets equally without distinguishing the service levels of the packets. When congestion occurs, the data packets at the tail of the queue will be discarded until the congestion is relieved.

[0026] Decision Tree (DTs): In decision theory, a decision tree consists of a decision diagram and possible outcomes, used to create a plan to reach a goal. Decision trees are built and used to assist decision making. They are a special tree structure. Decision trees are a decision support tool that uses tree-like graphics or decision models, including random event results, resource costs and practicality. It is a method of algorithm display. Decision trees are often used in operations research, especially in decision analysis, where they help determine a strategy that is most likely to achieve a goal. If in practice, decisions have to be made online without complete knowledge, a decision tree should be used in parallel with probability models as the best choice model or online choice model algorithm. Another use of decision trees is as a descriptive means of calculating conditional probabilities.

[0027] In the prior art, such as Figure 1 As shown in FIG. 1 , the relationship between the upper threshold value and the lower threshold value of the weighted random early detection algorithm and the discard probability is as follows:

[0028] If the current queue length is less than the lower threshold value Min_th, the discard probability is 0%, that is, no message is discarded;

[0029] If the current queue length is greater than the upper threshold Max_th, the discard probability is 100%, that is, all newly received messages are discarded;

[0030] When the queue length is between the lower threshold value Min_th and the upper threshold value Max_th, the discard probability is between 0% and the maximum discard probability x%. The specific method is: start to randomly discard newly received messages, assign a random number to each newly received message, and compare the random number with the discard probability of the current queue. If it is greater than the discard probability, the message is discarded. The longer the queue, the higher the probability of the message being discarded.

[0031] In the prior art, the weighted random early detection algorithm sets a fixed upper threshold value and a fixed lower threshold value for each queue length. Assume that there is a switch whose ports include queue A and queue B. Both queue A and queue B use the weighted random early detection algorithm to avoid data congestion in the queues. Figure 2As shown, the high threshold value of queue A is 80% of the queue length, the low threshold value of queue A is 50%, the high threshold value of queue B is 20% of the queue length, and the low threshold value of queue B is 30%. Queue A is suitable for transmitting data with a high tolerance for data congestion and data that requires more bandwidth, such as file transfer data. Queue B is suitable for transmitting data with a low tolerance for data congestion, such as web browsing data. If queue A transmits web browsing data, excessive bandwidth will cause a slow response. If queue B transmits file transfer data, the maximum discard probability will be reached soon and all data will be discarded. Insufficient bandwidth will cause high latency and congestion cannot be effectively avoided.

[0032] It can be seen from the above that the threshold value of the weighted random early detection algorithm configured for each queue in the prior art is fixed, which cannot meet the requirements of the tolerance degree of different types of data in the same queue to data congestion, resulting in that the data congestion control effect is not obvious. Therefore, the embodiment of the present application provides a method for configuring the threshold value of a weighted random early detection algorithm, a device for configuring the threshold value of a weighted random early detection algorithm, a computer-readable storage medium and a switch, so as to at least solve the problem that the threshold value of the weighted random early detection algorithm configured for each queue in the prior art is fixed, which cannot meet the requirements of the tolerance degree of different types of data in the same queue to data congestion.

[0033] In this embodiment, a method running on an application layer of a switch is provided, wherein the application layer of the switch is communicatively connected with a forwarding chip of the switch. Figure 3 According to the flowchart of the embodiment of the present application, Figure 3 As shown, the process includes the following steps:

[0034] Step S102, obtaining target flow data;

[0035] The target traffic data is traffic data of a target queue of a target port, the target port is one of multiple ports of the forwarding chip, the target queue is one of multiple queues of the target port, and the traffic data includes parameters of data traffic;

[0036] Specifically, the size of the traffic parameter of the data in the queue reflects the type of the data in the queue.

[0037] Step S104, determining whether the target type exists according to the target flow data;

[0038] The target flow data is located within the preset range corresponding to the target type, the target type is one of a plurality of preset types, one preset type corresponds to one preset range, and the target flow data is located within the preset range corresponding to the target type, indicating that the type of data in the target queue is the target type;

[0039] Specifically, if the traffic parameter of the data in the queue is within a certain preset range, it can be determined that the type of the data in the queue is a preset type corresponding to the preset range.

[0040] Step S106, when the target type exists, determining a first target upper threshold value and a first target lower threshold value according to the target type and the first mapping relationship;

[0041] Among them, the above-mentioned first mapping relationship is a mapping relationship between the above-mentioned preset type and the high threshold value of the weighted random early detection algorithm and the low threshold value of the weighted random early detection algorithm, the above-mentioned first target high threshold value is the above-mentioned target type corresponding to the above-mentioned high threshold value in the above-mentioned first mapping relationship, and the above-mentioned first target low threshold value is the above-mentioned target type corresponding to the above-mentioned low threshold value in the above-mentioned first mapping relationship;

[0042] Specifically, after determining that the type of data in the queue corresponds to a preset type, a high threshold value and a low threshold value corresponding to the preset type are determined.

[0043] Step S108: sending the first target upper threshold value and the first target lower threshold value to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the first target upper threshold value and the first target lower threshold value.

[0044] Through the above embodiment, first, the flow parameters of the data in the queue are obtained, and then the type of the data in the queue is determined according to the flow parameters of the data in the queue. Thereafter, according to the type of the data in the queue, the high threshold value and the low threshold value corresponding to the type of the data in the queue are determined. Finally, the high threshold value and the low threshold value corresponding to the type of the data in the queue are sent to the forwarding chip. When the queue transmits different types of data, the queue is configured with a corresponding threshold value to meet the requirements of the tolerance degree of different types of data to data congestion, thereby improving the control effect of data congestion. This solves the problem in the prior art that the threshold value of the weighted random early detection algorithm configured for each queue is fixed and cannot meet the requirements of the tolerance degree of different types of data in the same queue to data congestion, thereby improving the control effect of data congestion.

[0045] The above step S102 can be implemented as follows:

[0046] Detecting whether the acquisition time is greater than a first preset time, the acquisition time being the difference between the current time and the start time of the last acquisition of the target flow data;

[0047] When the acquisition time is greater than the first preset time, the target flow data is acquired.

[0048] In this embodiment, a timer is started, and when the acquisition time reaches a first preset time, the flow data is collected again to achieve automatic collection of the flow data.

[0049] The above parameters include bandwidth utilization, traffic rate and traffic proportion, wherein the traffic proportion is the ratio of the traffic in the queue within the second preset time to the total traffic in the queue, the above preset range includes a first preset range, a second preset range and a third preset range, and the above step S104 can be implemented as follows:

[0050] A first acquisition step is to acquire a backup type, where the backup type is one of the plurality of preset types;

[0051] A second acquisition step, according to the standby type, acquiring a first target preset range, a second target preset range and a third target preset range, wherein the first target preset range is the first preset range corresponding to the standby type, the second target preset range is the second preset range corresponding to the standby type, and the third target preset range is the third preset range corresponding to the standby type;

[0052] The first determination step is to determine whether the bandwidth utilization rate of the target traffic data is within the first target preset range, determine whether the traffic rate of the target traffic data is within the second target preset range, and determine whether the traffic proportion of the target traffic data is within the third target preset range;

[0053] Repeating the steps, when the bandwidth utilization of the target traffic data is not within the first target preset range, the traffic rate of the target traffic data is not within the second target preset range, or the traffic proportion of the target traffic data is not within the third target preset range, repeating the first acquisition step, the second acquisition step, and the first determination step at least once until the bandwidth utilization of the target traffic data is within the first target preset range, the traffic rate of the target traffic data is within the second target preset range, and the traffic proportion of the target traffic data is within the third target preset range, or until all of the preset types are determined;

[0054] In a second determination step, when the bandwidth utilization rate of the target traffic data is within the first target preset range, the traffic rate of the target traffic data is within the second target preset range, and the traffic proportion of the target traffic data is within the third target preset range, it is determined that the target type exists and the backup type is the target type;

[0055] The third determination step is to determine that the target type does not exist when all the preset types are determined.

[0056] In this embodiment, if the bandwidth utilization is within a first preset range corresponding to a preset type, the traffic rate is within a second preset range corresponding to this preset type, and the traffic proportion is within a third preset range corresponding to this preset type, the type of data in the queue is determined to be this preset type. This application combines the bandwidth utilization, traffic rate and traffic proportion to determine the type of data in the queue to ensure that the type of data in the queue is accurately determined, and to achieve accurate configuration of the high threshold value and the low threshold value of the weighted random early detection algorithm, thereby further improving the control effect of data congestion.

[0057] In an optional solution, after the above step S104, the above method further includes:

[0058] Step S201: when the target type does not exist, the preset high threshold is determined as the first target high threshold, and the preset low threshold is determined as the first target low threshold.

[0059] In this embodiment, if the traffic parameter of the data in the queue is not included in any preset range, a preset high threshold value and a preset low threshold value are set and sent to the forwarding chip.

[0060] In an optional solution, before the above step S106, the above method further includes:

[0061] According to the preset type and the demand information corresponding to the preset type, determine the upper threshold value corresponding to the preset type and the lower threshold value corresponding to the preset type, one preset type corresponds to one demand information, and the demand information represents the tolerance of the corresponding preset type of data to data congestion;

[0062] The first mapping relationship is determined according to the preset type, the high threshold corresponding to the preset type, and the low threshold corresponding to the preset type.

[0063] In this embodiment, according to the tolerance of different types of data to data congestion, corresponding high threshold limits and low threshold values ​​are configured for each type of data to meet the requirements of the tolerance of different types of data to data congestion, thereby improving the control effect of data congestion. The first mapping relationship is shown in Table 1. In some implementations, if the preset type is video stream data, considering that the video stream data has a certain tolerance to data congestion, that is, it has a certain tolerance to delay, the high threshold value is set to a higher value, for example, 70% of the queue length. In order to reduce the impact of data congestion on video stream data transmission and provide a better viewing experience, the low threshold value is set to a lower value relative to the high threshold value, for example, 40% of the queue length. If the preset type is For file download data, considering that file download data is usually a large amount of data transmitted at one time, it has a high tolerance for data congestion, that is, a high tolerance for queuing. The high threshold is set to a high value, for example, 80% of the queue length. In order to discard some data packets in time to avoid excessive congestion of queue data and improve the file download speed, the low threshold is set to a lower value relative to the high threshold, such as 50% of the queue length. If the preset type is real-time game data, considering that real-time games have a low tolerance for data congestion and require low latency and fast response, it is necessary to avoid data congestion in the queue as much as possible. The high threshold is set to a lower value, for example, 20% of the queue length. In order to ensure that data congestion is controlled as early as possible to avoid affecting game performance Too large an impact, relative to the high threshold, the low threshold is set to a lower value, such as 10% of the queue length. If the preset type is video conferencing data, considering that video conferencing data has a certain tolerance for data congestion, that is, a certain tolerance for delay, the high threshold can be set to a higher value, for example, 60% of the queue length. In order to keep the queuing time short and control data congestion in time to ensure good video conferencing quality, the relative high threshold is set to a lower value, such as 30% of the queue length. If the preset type is P2P file sharing data, considering that P2P file sharing data is usually bursty and volatile, a higher high threshold can adapt to this feature. The high threshold can be set to a higher value, for example, the queue 70% of the queue length. In order to control congestion and prevent file sharing traffic from occupying too much bandwidth, the low threshold value is set to a lower value relative to the high threshold value, such as 40% of the queue length. If the preset type is email transmission data, considering that email transmission data has a certain tolerance for data congestion, that is, a certain tolerance for delay, the high threshold value can be set to a higher value, such as 70% of the queue length. In order to avoid excessive congestion of the queue and maintain a faster email transmission speed, the high threshold value is set to a lower value, such as 50% of the queue length. If the preset type is file backup data, considering the one-time large amount of data transmission, the high threshold value can be set to a higher value, such as 80% of the queue length. In order to control congestion in time,To ensure timely backup completion, the low threshold is set to a lower value relative to the high threshold, such as 60% of the queue length.

[0064] Table 1

[0065]

[0066]

[0067] In an optional solution, after the above step S106 and before the above step S108, the above method further includes:

[0068] The target flow data, the first target high threshold value and the first target low threshold value are input into the optimization model to obtain the optimized first target high threshold value and the optimized first target low threshold value. The optimization model is obtained by training a neural network with multiple sets of training data. Each set of the training data in the multiple sets of training data at least includes: the flow data, the high threshold value and the low threshold value. The absolute value of the difference between the optimized first target high threshold value and the first target high threshold value is less than a preset value, and the absolute value of the difference between the optimized first target low threshold value and the first target low threshold value is less than the preset value.

[0069] In this embodiment, an optimization model obtained by neural network training is used to optimize the configured high threshold value and low threshold value, and then the optimized high threshold value and low threshold value are sent to the forwarding chip. By optimizing the configured high threshold value and low threshold value, the high threshold value and low threshold value of the weighted random early detection algorithm are accurately configured, thereby further improving the control effect of data congestion. In some implementation methods, the neural network can be a decision tree model.

[0070] The above parameters include bandwidth utilization. After the above step S108, the above method further includes:

[0071] Step S301, obtaining the target flow data, and obtaining the target flow data of this time;

[0072] Step S302, determining whether the bandwidth utilization rate of the target flow data this time is greater than the bandwidth utilization rate of the target flow data last time;

[0073] Step S303, at least when the bandwidth utilization rate of the target traffic data this time is greater than the bandwidth utilization rate of the target traffic data obtained last time, the second target high threshold value and the second target low threshold value are sent to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the second target high threshold value and the second target low threshold value, the second target high threshold value is the high threshold value adopted by the forwarding chip before the first target high threshold value and the first target low threshold value are sent to the forwarding chip, and the second target low threshold value is the low threshold value adopted by the forwarding chip before the first target low threshold value and the first target low threshold value are sent to the forwarding chip.

[0074] In this embodiment, after the forwarding chip discards the messages in the queue according to the reconfigured high threshold value and low threshold value, the traffic data is reacquired to determine whether the bandwidth utilization at this time is greater than the bandwidth utilization before the high threshold value and low threshold value are not configured. If it is greater, it means that after the forwarding chip discards the messages in the queue according to the reconfigured high threshold value and low threshold value, the data congestion control effect is not improved, and the network performance is poor. At this time, the forwarding chip is controlled to re-adopt the previous high threshold value and low threshold value to discard the messages in the queue.

[0075] The above parameters also include flow rate and flow ratio. The above step S303 can be implemented as follows:

[0076] When the bandwidth utilization of the target traffic data this time is greater than the bandwidth utilization of the target traffic data obtained last time, the traffic rate of the target traffic data this time is greater than the traffic rate of the target traffic data obtained last time, and the traffic proportion of the target traffic data this time is greater than the traffic proportion of the target traffic data obtained last time, the second target high threshold value and the second target low threshold value are sent to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the second target high threshold value and the second target low threshold value, the second target high threshold value is the high threshold value adopted by the forwarding chip before the first target high threshold value and the first target low threshold value are sent to the forwarding chip, and the second target low threshold value is the low threshold value adopted by the forwarding chip before the first target low threshold value and the first target low threshold value are sent to the forwarding chip.

[0077] In this embodiment, combining bandwidth utilization, traffic rate and traffic proportion can more accurately determine whether the data congestion control effect is improved.

[0078] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for configuring the threshold value of the weighted random early detection algorithm of the present application will be described in detail below in combination with specific embodiments.

[0079] This embodiment relates to a specific method for configuring a threshold value of a weighted random early detection algorithm, such as Figure 4 As shown, the following steps are included:

[0080] Step S1: Obtain target flow data;

[0081] Step S2: Determine whether the target type exists according to the target flow data;

[0082] Step S3:

[0083] In the case where the above target type exists, determining the first target high threshold value and the first target low threshold value according to the above target type and the first mapping relationship; inputting the above target flow data, the above first target high threshold value and the above first target low threshold value into the optimization model to obtain the optimized above first target high threshold value and the optimized above first target low threshold value;

[0084] or,

[0085] If the target type does not exist, the preset high threshold value is determined as the first target high threshold value, and the preset low threshold value is determined as the first target low threshold value;

[0086] Step S4: sending the first target upper threshold value and the first target lower threshold value to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the first target upper threshold value and the first target lower threshold value;

[0087] Step S5: Obtain the target flow data to obtain the target flow data for this time;

[0088] Step S6: determining whether the bandwidth utilization rate of the target flow data this time is greater than the bandwidth utilization rate of the target flow data last time;

[0089] Step S7: At least when the bandwidth utilization rate of the target traffic data this time is greater than the bandwidth utilization rate of the target traffic data acquired last time, the second target high threshold value and the second target low threshold value are sent to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the second target high threshold value and the second target low threshold value.

[0090] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0091] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the above methods of each embodiment of the present application.

[0092] In the present embodiment, a device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0093] Figure 5 is a structural block diagram of a device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0094] The first acquisition module 22 is used to acquire target flow data.

[0095] The target traffic data is traffic data of a target queue of a target port, the target port is one of multiple ports of the forwarding chip, the target queue is one of multiple queues of the target port, and the traffic data includes parameters of data traffic;

[0096] Specifically, the size of the traffic parameter of the data in the queue reflects the type of the data in the queue.

[0097] The first determination module 24 is used to determine whether the target type exists according to the target flow data.

[0098] The target flow data is located within the preset range corresponding to the target type, the target type is one of a plurality of preset types, one preset type corresponds to one preset range, and the target flow data is located within the preset range corresponding to the target type, indicating that the type of data in the target queue is the target type;

[0099] Specifically, if the traffic parameter of the data in the queue is within a certain preset range, it can be determined that the type of the data in the queue is a preset type corresponding to the preset range.

[0100] The second determination module 26 is used to determine a first target upper threshold value and a first target lower threshold value according to the target type and the first mapping relationship when the target type exists.

[0101] Among them, the above-mentioned first mapping relationship is a mapping relationship between the above-mentioned preset type and the high threshold value of the weighted random early detection algorithm and the low threshold value of the weighted random early detection algorithm, the above-mentioned first target high threshold value is the above-mentioned target type corresponding to the above-mentioned high threshold value in the above-mentioned first mapping relationship, and the above-mentioned first target low threshold value is the above-mentioned target type corresponding to the above-mentioned low threshold value in the above-mentioned first mapping relationship;

[0102] Specifically, after determining that the type of data in the queue corresponds to a preset type, a high threshold value and a low threshold value corresponding to the preset type are determined.

[0103] The first sending module 28 is used to send the first target upper threshold value and the first target lower threshold value to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the first target upper threshold value and the first target lower threshold value.

[0104] Through the above embodiment, first, the flow parameters of the data in the queue are obtained, and then the type of the data in the queue is determined according to the flow parameters of the data in the queue. Thereafter, according to the type of the data in the queue, the high threshold value and the low threshold value corresponding to the type of the data in the queue are determined. Finally, the high threshold value and the low threshold value corresponding to the type of the data in the queue are sent to the forwarding chip. When the queue transmits different types of data, the queue is configured with a corresponding threshold value to meet the requirements of the tolerance degree of different types of data to data congestion, thereby improving the control effect of data congestion. This solves the problem in the prior art that the threshold value of the weighted random early detection algorithm configured for each queue is fixed and cannot meet the requirements of the tolerance degree of different types of data in the same queue to data congestion, thereby improving the control effect of data congestion.

[0105] The above acquisition module includes:

[0106] The detection submodule is used to detect whether the acquisition time is greater than a first preset time, where the acquisition time is the difference between the current time and the start time of the last acquisition of the target flow data;

[0107] The first acquisition submodule is used to acquire the target flow data when the acquisition time is greater than the first preset time.

[0108] In this embodiment, a timer is started, and when the acquisition time reaches a first preset time, the flow data is collected again to achieve automatic collection of the flow data.

[0109] The above parameters include bandwidth utilization, traffic rate and traffic proportion, the above preset range includes a first preset range, a second preset range and a third preset range, and the above first determination module includes:

[0110] The second acquisition submodule is used to acquire a backup type, where the backup type is one of the plurality of preset types;

[0111] The third acquisition submodule is used to acquire a first target preset range, a second target preset range and a third target preset range according to the standby type, wherein the first target preset range is the first preset range corresponding to the standby type, the second target preset range is the second preset range corresponding to the standby type, and the third target preset range is the third preset range corresponding to the standby type;

[0112] The first determination submodule is used to determine whether the bandwidth utilization rate of the target traffic data is within the first target preset range, determine whether the traffic rate of the target traffic data is within the second target preset range, and determine whether the traffic proportion of the target traffic data is within the third target preset range;

[0113] The repeating submodule is used for repeating the first acquisition step, the second acquisition step, and the first determination step at least once when the bandwidth utilization of the target traffic data is not within the first target preset range, the traffic rate of the target traffic data is not within the second target preset range, or the traffic proportion of the target traffic data is not within the third target preset range, until the bandwidth utilization of the target traffic data is within the first target preset range, the traffic rate of the target traffic data is within the second target preset range, and the traffic proportion of the target traffic data is within the third target preset range, or until all of the preset types are determined;

[0114] The second determination submodule is used to determine that the target type exists and the backup type is the target type when the bandwidth utilization of the target traffic data is within the first target preset range, the traffic rate of the target traffic data is within the second target preset range, and the traffic proportion of the target traffic data is within the third target preset range;

[0115] The third determination submodule is used for determining that the target type does not exist when all the preset types are determined.

[0116] In this embodiment, if the bandwidth utilization is within a first preset range corresponding to a preset type, the traffic rate is within a second preset range corresponding to this preset type, and the traffic proportion is within a third preset range corresponding to this preset type, the type of data in the queue is determined to be this preset type. This application combines the bandwidth utilization, traffic rate and traffic proportion to determine the type of data in the queue to ensure that the type of data in the queue is accurately determined, and to achieve accurate configuration of the high threshold value and the low threshold value of the weighted random early detection algorithm, thereby further improving the control effect of data congestion.

[0117] In an optional solution, the above device also includes:

[0118] The third determination module is used to determine the preset high threshold value as the first target high threshold value and the preset low threshold value as the first target low threshold value when the target type does not exist.

[0119] In this embodiment, if the traffic parameter of the data in the queue is not included in any preset range, a preset high threshold value and a preset low threshold value are set and sent to the forwarding chip.

[0120] In an optional solution, the above device also includes:

[0121] The fourth determination module is used to determine the upper threshold value corresponding to the preset type and the lower threshold value corresponding to the preset type according to the preset type and the demand information corresponding to the preset type, one preset type corresponds to one demand information, and the demand information represents the tolerance of the corresponding preset type of data to data congestion;

[0122] The fifth determination module is used to determine the first mapping relationship according to the preset type, the high threshold value corresponding to the preset type, and the low threshold value corresponding to the preset type.

[0123] In this embodiment, according to the tolerance of different types of data to data congestion, corresponding high threshold limits and low threshold values ​​are configured for each type of data to meet the requirements of the tolerance of different types of data to data congestion, thereby improving the control effect of data congestion. The first mapping relationship is shown in Table 1. In some implementations, if the preset type is video stream data, considering that the video stream data has a certain tolerance to data congestion, that is, it has a certain tolerance to delay, the high threshold value is set to a higher value, for example, 70% of the queue length. In order to reduce the impact of data congestion on video stream data transmission and provide a better viewing experience, the low threshold value is set to a lower value relative to the high threshold value, for example, 40% of the queue length. If the preset type is For file download data, considering that file download data is usually a large amount of data transmitted at one time, it has a high tolerance for data congestion, that is, a high tolerance for queuing. The high threshold is set to a high value, for example, 80% of the queue length. In order to discard some data packets in time to avoid excessive congestion of queue data and improve the file download speed, the low threshold is set to a lower value relative to the high threshold, such as 50% of the queue length. If the preset type is real-time game data, considering that real-time games have a low tolerance for data congestion and require low latency and fast response, it is necessary to avoid data congestion in the queue as much as possible. The high threshold is set to a lower value, for example, 20% of the queue length. In order to ensure that data congestion is controlled as early as possible to avoid affecting game performance Too large an impact, relative to the high threshold, the low threshold is set to a lower value, such as 10% of the queue length. If the preset type is video conferencing data, considering that video conferencing data has a certain tolerance for data congestion, that is, a certain tolerance for delay, the high threshold can be set to a higher value, for example, 60% of the queue length. In order to keep the queuing time short and control data congestion in time to ensure good video conferencing quality, the relative high threshold is set to a lower value, such as 30% of the queue length. If the preset type is P2P file sharing data, considering that P2P file sharing data is usually bursty and volatile, a higher high threshold can adapt to this feature. The high threshold can be set to a higher value, for example, the queue 70% of the queue length. In order to control congestion and prevent file sharing traffic from occupying too much bandwidth, the low threshold value is set to a lower value relative to the high threshold value, such as 40% of the queue length. If the preset type is email transmission data, considering that email transmission data has a certain tolerance for data congestion, that is, a certain tolerance for delay, the high threshold value can be set to a higher value, such as 70% of the queue length. In order to avoid excessive congestion of the queue and maintain a faster email transmission speed, the high threshold value is set to a lower value, such as 50% of the queue length. If the preset type is file backup data, considering the one-time large amount of data transmission, the high threshold value can be set to a higher value, such as 80% of the queue length. In order to control congestion in time,To ensure timely backup completion, the low threshold is set to a lower value relative to the high threshold, such as 60% of the queue length.

[0124] Table 1

[0125]

[0126]

[0127] The above device also includes:

[0128] The optimization module is used to input the above-mentioned target flow data, the above-mentioned first target high threshold value and the above-mentioned first target low threshold value into the optimization model to obtain the optimized above-mentioned first target high threshold value and the optimized above-mentioned first target low threshold value. The above-mentioned optimization model is obtained by training a neural network with multiple sets of training data. Each set of the above-mentioned training data in the above-mentioned multiple sets of training data at least includes: the above-mentioned flow data, the above-mentioned high threshold value and the above-mentioned low threshold value. The absolute value of the difference between the above-mentioned first target high threshold value and the above-mentioned first target high threshold value after optimization is less than a preset value, and the absolute value of the difference between the above-mentioned first target low threshold value and the above-mentioned first target low threshold value after optimization is less than the above-mentioned preset value.

[0129] In this embodiment, an optimization model obtained by neural network training is used to optimize the configured high threshold value and low threshold value, and then the optimized high threshold value and low threshold value are sent to the forwarding chip. By optimizing the configured high threshold value and low threshold value, the high threshold value and low threshold value of the weighted random early detection algorithm are accurately configured, thereby further improving the control effect of data congestion. In some implementation methods, the neural network can be a decision tree model.

[0130] The above parameters include bandwidth utilization, and the above device further includes:

[0131] The second acquisition module is used to acquire the target flow data, and obtain the target flow data of this time;

[0132] The sixth determination module is used to determine whether the bandwidth utilization rate of the target flow data this time is greater than the bandwidth utilization rate of the target flow data last time;

[0133] The second sending module is used to send the second target high threshold value and the second target low threshold value to the forwarding chip, at least when the bandwidth utilization rate of the target traffic data this time is greater than the bandwidth utilization rate of the target traffic data obtained last time, so that the forwarding chip discards the message in the target queue according to the second target high threshold value and the second target low threshold value, the second target high threshold value is the high threshold value adopted by the forwarding chip before the first target high threshold value and the first target low threshold value are sent to the forwarding chip, and the second target low threshold value is the low threshold value adopted by the forwarding chip before the first target low threshold value and the first target low threshold value are sent to the forwarding chip.

[0134] In this embodiment, after the forwarding chip discards the messages in the queue according to the reconfigured high threshold value and low threshold value, the traffic data is reacquired to determine whether the bandwidth utilization at this time is greater than the bandwidth utilization before the high threshold value and low threshold value are not configured. If it is greater, it means that after the forwarding chip discards the messages in the queue according to the reconfigured high threshold value and low threshold value, the data congestion control effect is not improved, and the network performance is poor. At this time, the forwarding chip is controlled to re-adopt the previous high threshold value and low threshold value to discard the messages in the queue.

[0135] The above parameters also include traffic rate and traffic proportion. The above second sending module is used to send the second target high threshold value and the second target low threshold value to the above forwarding chip when the above bandwidth utilization rate of the above target traffic data this time is greater than the above bandwidth utilization rate of the above target traffic data obtained last time, the above traffic rate of the above target traffic data this time is greater than the above traffic rate of the above target traffic data obtained last time, and the above traffic proportion of the above target traffic data this time is greater than the above traffic proportion of the above target traffic data obtained last time, so that the above forwarding chip discards the message in the above target queue according to the above second target high threshold value and the above second target low threshold value. The above second target high threshold value is the above high threshold value adopted by the above forwarding chip before the above first target high threshold value and the above first target low threshold value are sent to the above forwarding chip, and the above second target low threshold value is the above low threshold value adopted by the above forwarding chip before the above first target low threshold value and the above first target low threshold value are sent to the above forwarding chip.

[0136] In this embodiment, combining bandwidth utilization, traffic rate and traffic proportion can more accurately determine whether the data congestion control effect is improved.

[0137] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0138] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in the above method embodiment when running.

[0139] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0140] An embodiment of the present application further provides a switch, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in the above method embodiment.

[0141] In an exemplary embodiment, the switch may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0142] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0143] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0144] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for configuring a threshold value of a weighted random early detection algorithm, characterized in that: The method is applied to the application layer of a switch, the application layer of the switch is communicatively connected with the forwarding chip of the switch, and the method includes: Acquire target traffic data, where the target traffic data is traffic data of a target queue of a target port, where the target port is one of multiple ports of the forwarding chip, where the target queue is one of multiple queues of the target port, and where the traffic data includes parameters of data traffic; Determine, according to the target flow data, whether a target type exists; the target flow data is within a preset range corresponding to the target type; the target type is one of a plurality of preset types, one preset type corresponds to one preset range; the target flow data is within the preset range corresponding to the target type, indicating that the type of data in the target queue is the target type; In the case where the target type exists, determining a first target high threshold value and a first target low threshold value according to the target type and a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the preset type and a high threshold value of a weighted random early detection algorithm and a low threshold value of a weighted random early detection algorithm, the first target high threshold value is the high threshold value corresponding to the target type in the first mapping relationship, and the first target low threshold value is the low threshold value corresponding to the target type in the first mapping relationship; The first target upper threshold value and the first target lower threshold value are sent to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the first target upper threshold value and the first target lower threshold value.

2. The method according to claim 1, characterized in that Obtain target traffic data, including: Detecting whether the acquisition time is greater than a first preset time, the acquisition time being the difference between the current time and the start time of the last acquisition of the target flow data; When the acquisition time is greater than the first preset time, the target flow data is acquired.

3. The method according to claim 1, characterized in that The parameters include bandwidth utilization, traffic rate and traffic proportion, the preset range includes a first preset range, a second preset range and a third preset range, and determining whether a target type exists according to the target traffic data includes: A first acquisition step is to acquire a backup type, where the backup type is one of the plurality of preset types; A second acquisition step, according to the standby type, acquiring a first target preset range, a second target preset range and a third target preset range, wherein the first target preset range is the first preset range corresponding to the standby type, the second target preset range is the second preset range corresponding to the standby type, and the third target preset range is the third preset range corresponding to the standby type; A first determination step is to determine whether the bandwidth utilization of the target traffic data is within the first target preset range, determine whether the traffic rate of the target traffic data is within the second target preset range, and determine whether the traffic proportion of the target traffic data is within the third target preset range; Repeating step, when the bandwidth utilization of the target traffic data is not within the first target preset range, the traffic rate of the target traffic data is not within the second target preset range, or the traffic proportion of the target traffic data is not within the third target preset range, repeating the first acquisition step, the second acquisition step, and the first determination step at least once until the bandwidth utilization of the target traffic data is within the first target preset range, the traffic rate of the target traffic data is within the second target preset range, and the traffic proportion of the target traffic data is within the third target preset range, or until all the preset types are determined; In a second determination step, when the bandwidth utilization of the target traffic data is within the first target preset range, the traffic rate of the target traffic data is within the second target preset range, and the traffic proportion of the target traffic data is within the third target preset range, it is determined that the target type exists and the backup type is the target type; The third determination step is to determine that the target type does not exist when all the preset types have been determined.

4. The method according to claim 1, characterized in that: After determining whether the target type exists according to the target traffic data, the method further includes: In a case where the target type does not exist, a preset high threshold value is determined as the first target high threshold value, and a preset low threshold value is determined as the first target low threshold value.

5. The method according to claim 1, characterized in that After determining a first target upper threshold and a first target lower threshold according to the target type and the first mapping relationship, and before sending the first target upper threshold and the first target lower threshold to the forwarding chip, the method further includes: The target flow data, the first target high threshold value and the first target low threshold value are input into an optimization model to obtain an optimized first target high threshold value and an optimized first target low threshold value, wherein the optimization model is obtained by training a neural network with multiple sets of training data, wherein each set of training data in the multiple sets of training data includes at least: the flow data, the high threshold value and the low threshold value, and the absolute value of the difference between the optimized first target high threshold value and the first target high threshold value is less than a preset value, and the absolute value of the difference between the optimized first target low threshold value and the first target low threshold value is less than the preset value.

6. The method according to claim 1, characterized in that The parameter includes bandwidth utilization. After sending the first target upper threshold value and the first target lower threshold value to the forwarding chip, the method further includes: Acquire the target flow data, and obtain the target flow data of this time; Determine whether the bandwidth utilization rate of the target flow data this time is greater than the bandwidth utilization rate of the target flow data last time; At least when the bandwidth utilization of the target traffic data this time is greater than the bandwidth utilization of the target traffic data obtained last time, the second target high threshold value and the second target low threshold value are sent to the forwarding chip, so that the forwarding chip discards the messages in the target queue according to the second target high threshold value and the second target low threshold value, the second target high threshold value is the high threshold value adopted by the forwarding chip before the first target high threshold value and the first target low threshold value are sent to the forwarding chip, and the second target low threshold value is the low threshold value adopted by the forwarding chip before the first target low threshold value and the first target low threshold value are sent to the forwarding chip.

7. The method according to claim 1, characterized in that Before determining a first target upper threshold value and a first target lower threshold value according to the target type and the first mapping relationship, the method further includes: According to the preset type and the demand information corresponding to the preset type, determine the upper threshold value corresponding to the preset type and the lower threshold value corresponding to the preset type, one preset type corresponds to one demand information, and the demand information represents the tolerance of the corresponding preset type of data to data congestion; The first mapping relationship is determined according to the preset type, the upper threshold value corresponding to the preset type, and the lower threshold value corresponding to the preset type.

8. A device for configuring a threshold value of a weighted random early detection algorithm, characterized in that: The device is applied to the application layer of the switch, the application layer of the switch is communicatively connected with the forwarding chip of the switch, and the device includes: A first acquisition module is used to acquire target traffic data, wherein the target traffic data is traffic data of a target queue of a target port, the target port is one of multiple ports of the forwarding chip, the target queue is one of multiple queues of the target port, and the traffic data includes parameters of data traffic; A first determination module is used to determine whether a target type exists according to the target flow data, the target flow data is within a preset range corresponding to the target type, the target type is one of a plurality of preset types, one preset type corresponds to one preset range, and the target flow data is within the preset range corresponding to the target type, indicating that the type of data in the target queue is the target type; A second determination module is used to determine, when the target type exists, a first target high threshold value and a first target low threshold value according to the target type and a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the preset type and a high threshold value of a weighted random early detection algorithm and a low threshold value of a weighted random early detection algorithm, the first target high threshold value is the high threshold value corresponding to the target type in the first mapping relationship, and the first target low threshold value is the low threshold value corresponding to the target type in the first mapping relationship; The second sending module is used to send the first target high threshold value and the first target low threshold value to the forwarding chip, so that the forwarding chip discards the message in the target queue according to the first target high threshold value and the first target low threshold value.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. A switch comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Congestion control method and device based on improved WRED

    CN105721332A

  • Data transmission method and network equipment

    CN111131061A

  • Fair WRED for TCP and UDP traffic mix

    US20050276221A1