Method and device for configuring threshold of weighted early detection algorithm

By dynamically configuring the threshold value of the weighted random early detection algorithm at the application layer of the switch and determining an appropriate threshold value based on the data type of traffic, the problem of inconsistent data congestion tolerance for different types of data in the queue is solved, thereby improving the data congestion control effect and network performance.

CN119603238BActive Publication Date: 2026-01-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311161173.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-08
Publication Date
2026-01-27
Estimated Expiration
2043-09-08

AI Technical Summary

Technical Problem

In existing technologies, the threshold value of the weighted random early detection algorithm configured for each queue is fixed, which cannot meet the requirements of different types of data in the same queue to tolerate data congestion, resulting in an insignificant data congestion control effect.

Method used

By acquiring target traffic data at the application layer of the switch, determining the data type based on the data's traffic parameters, and dynamically configuring the high and low threshold values ​​of the weighted random early detection algorithm using the preset mapping relationship between types and threshold values, it ensures that different types of data are configured with corresponding threshold values ​​in the queue to meet their tolerance for data congestion.

Benefits of technology

It improves the control of data congestion, meets the tolerance requirements of different types of data in the same queue for data congestion, and enhances network performance and service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603238B_ABST
    Figure CN119603238B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a configuration method and device of a weighted random early detection algorithm threshold value, wherein the method comprises the following steps: obtaining target traffic data; determining whether a target type exists according to the target traffic data; in the case 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 a first mapping relationship; 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 messages in a target queue according to the first target high threshold value and the first target low threshold value. Through the application, the problem that the threshold value of the weighted random early detection algorithm configured for each queue is fixed and cannot meet the requirement of the tolerance degree of different types of data in the same queue to data congestion is solved, and the control effect of data congestion is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method for configuring threshold values ​​for a weighted random early detection algorithm, a device for configuring threshold values ​​for a weighted random early detection algorithm, a computer-readable storage medium, and a switch. Background Technology

[0002] Unlike traditional packet loss mechanisms (such as tail drop), Weighted Random Early Detection (WRED) uses a probabilistic packet loss strategy. It determines the probability of dropping packets based on the number of packets in the queue or the relationship between the queue length and a threshold. Using WRED can help avoid network congestion, reduce queuing delays, and improve overall network performance and quality of service.

[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 existing technology is fixed, which can only meet the tolerance level of data congestion for the same type of data, but cannot meet the tolerance level of data congestion for different types of data in the same queue, resulting in an insignificant data congestion control effect. Summary of the Invention

[0004] This 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, to at least solve the problem in the prior art where the threshold value of the weighted random early detection algorithm configured for each queue is fixed, which cannot meet the requirements of the tolerance level of different types of data in the same queue for data congestion.

[0005] According to one embodiment of this application, a method for configuring a threshold value for a weighted random early detection algorithm is provided. The method is applied to the application layer of a switch, and the application layer of the switch is communicatively connected to the switch's forwarding chip. The method includes: acquiring target traffic data, wherein the target traffic data is traffic data of a target queue at a target port, the target port is one of multiple ports of the forwarding chip, and the target queue is one of multiple queues at the target port; the traffic data includes parameters related to data flow; and determining whether a target type exists based on the target traffic data, wherein the target traffic data is within a preset range corresponding to the target type, the target type is one of multiple preset types, and each preset type corresponds to a preset range. The data type in the target queue within the preset range is the target type. If the target type exists, a first target high threshold and a first target low threshold are determined based on the target type and a first mapping relationship. The first mapping relationship is the mapping relationship between the preset type and the high threshold and low threshold of the weighted random early detection algorithm. The first target high threshold is the high threshold corresponding to the target type in the first mapping relationship, and the first target low threshold is the low threshold corresponding to the target type in the first mapping relationship. The first target high threshold and the first target low threshold are sent to the forwarding chip, causing the forwarding chip to discard packets in the target queue according to the first target high threshold and the first target low threshold.

[0006] In one exemplary embodiment, acquiring target traffic data includes: detecting whether the acquisition time is greater than a first preset time, wherein the acquisition time is the difference between the current time and the start time of the last acquisition of the target traffic data; and acquiring the target traffic data if the acquisition time is greater than the first preset time.

[0007] In an exemplary embodiment, the parameters include bandwidth utilization, traffic rate, and traffic percentage. The preset range includes a first preset range, a second preset range, and a third preset range. Determining whether a target type exists based on the target traffic data includes: a first acquisition step, acquiring a backup type, wherein the backup type is one of a plurality of preset types; a second acquisition step, acquiring a first target preset range, a second target preset range, and a third target preset range based on the backup type, wherein 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 percentage 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 third target preset range. If 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 percentage 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 percentage of the target traffic data is within the third target preset range, or until all preset types are determined; in the second determination step, if 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 percentage 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; in the third determination step, if all preset types are determined, determine that the target type does not exist.

[0008] In an exemplary embodiment, after determining whether a 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 a preset low threshold value as the first target low threshold value.

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

[0010] In an exemplary embodiment, the parameters include bandwidth utilization. After sending the first target high threshold and the first target low threshold to the forwarding chip, the method further includes: acquiring the target traffic data again to obtain the current target traffic data; determining whether the bandwidth utilization of the current target traffic data is greater than the bandwidth utilization of the previous target traffic data; and, at least if the bandwidth utilization of the current target traffic data is greater than the bandwidth utilization of the previously acquired target traffic data, sending the second target high threshold and the second target low threshold to the forwarding chip, causing the forwarding chip to discard packets in the target queue according to the second target high threshold and the second target low threshold, wherein the second target high threshold is the high threshold value used by the forwarding chip before the first target high threshold and the first target low threshold are sent to the forwarding chip, and the second target low threshold is the low threshold value used by the forwarding chip before the first target low threshold and the first target low threshold are sent to the forwarding chip.

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

[0012] According to another embodiment of this application, a configuration device for a threshold value of a weighted random early detection algorithm is provided. The device is applied to the application layer of a switch, and the application layer of the switch is communicatively connected to the forwarding chip of the switch. The device includes: a first acquisition module, configured to acquire target traffic data, wherein the target traffic data is traffic data of a target queue at a target port, the target port is one of multiple ports of the forwarding chip, and the target queue is one of multiple queues at the target port; the traffic data includes parameters related to data flow. A first determination module, configured to determine whether a target type exists based on the target traffic data, wherein the target traffic data is within a preset range corresponding to the target type, the target type is one of multiple preset types, and each preset type corresponds to a preset range. The data type in the target queue within the preset range is the target type; the second determining module is used to determine a first target high threshold and a first target low threshold based on the target type and a first mapping relationship when the target type exists. The first mapping relationship is the mapping relationship between the preset type and the high threshold and low threshold of the weighted random early detection algorithm. The first target high threshold is the high threshold corresponding to the target type in the first mapping relationship, and the first target low threshold is the low threshold corresponding to the target type in the first mapping relationship; the second sending module is used to send the first target high threshold and the first target low threshold to the forwarding chip, so that the forwarding chip discards the packets in the target queue according to the first target high threshold and the first target low threshold.

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

[0014] According to yet another embodiment of this application, a switch is also 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 perform the steps in the embodiment of the configuration method for the weighted random early detection algorithm threshold value.

[0015] This application first obtains the traffic parameters of the data in the queue, then determines the data type in the queue based on the traffic parameters, and then determines the high and low threshold values ​​corresponding to the data type in the queue. Finally, the high and low threshold values ​​corresponding to the data type in the queue are sent to the forwarding chip. When different types of data are transmitted in the queue, corresponding threshold values ​​are configured for the queue to meet the data congestion tolerance requirements of different types of data, thereby improving the data congestion control effect. This solves the problem in the prior art where the threshold value of the weighted random early detection algorithm configured for each queue is fixed, which cannot meet the data congestion tolerance requirements of different types of data in the same queue, thus improving the data congestion control effect. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of a threshold configuration method according to an embodiment of this application;

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

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

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

[0020] Figure 5 This is a schematic diagram of a configuration device for a weighted random early detection algorithm threshold value according to an embodiment of this application. Detailed Implementation

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

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

[0023] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0024] Weighted random early detection algorithm: This is a congestion avoidance mechanism commonly used in queue management in network devices. Its main goal is to randomly drop some data packets before network congestion occurs.

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

[0026] Decision Trees (DTs): In decision theory, a decision tree consists of a decision graph and possible outcomes, used to create plans to reach a goal. Decision trees are built and used to assist in decision-making; they are a special type of tree structure. A decision tree is a decision support tool that utilizes a tree-like graph or decision model, including the outcomes of random events, resource costs, and practicality. It is a method of algorithmic visualization. Decision trees are frequently used in operations research, especially in decision analysis, where they help determine a strategy that is most likely to achieve a goal. In practice, if decisions must be made online without complete knowledge, a decision tree should be used in parallel with a probability model as the optimal choice model or online choice model algorithm. Another use of decision trees is as a descriptive means of calculating conditional probabilities.

[0027] In existing technologies, such as Figure 1 As shown, the relationship between the high and low threshold values ​​and the discard probability of the weighted random early detection algorithm is as follows:

[0028] If the current queue length is less than the low threshold value Min_th, the probability of dropping messages is 0%, meaning no messages are dropped.

[0029] If the current queue length is greater than the high threshold Max_th, the discard probability is 100%, meaning all newly received packets are discarded.

[0030] When the length of the queue is between the low threshold value Min_th and the high threshold value Max_th, the drop probability is between 0% and the maximum drop probability x%. The specific method is as follows: start randomly dropping newly received packets. Assign a random number to each newly received packet and compare the random number with the drop probability of the current queue. If it is greater than the drop probability, the packet is dropped. The longer the queue, the higher the probability of the packet being dropped.

[0031] In existing technologies, weighted random early detection algorithms set fixed high and low threshold values ​​for each queue length. Assume a switch with ports for queues A and B, where both queues A and B use the weighted random early detection algorithm to prevent data congestion. Figure 2As shown, the high threshold of queue A is 80% of the queue length, and the low threshold is 50%. The high threshold of queue B is 20% of the queue length, and the low threshold is 30%. Queue A is suitable for transmitting data with a high tolerance for data congestion and is suitable for 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 slow response. If queue B transmits file transfer data, the maximum drop probability will be reached quickly, and all data will be dropped. Insufficient bandwidth will cause high latency and cannot effectively avoid congestion.

[0032] As can be seen from the above, 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 level of different types of data in the same queue for data congestion, resulting in an insignificant data congestion control effect. Therefore, the embodiments of this application provide a method for configuring the threshold value of the weighted random early detection algorithm, a device for configuring the threshold value of the 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 and cannot meet the requirements of the tolerance level of different types of data in the same queue for data congestion.

[0033] This embodiment provides a method running at the application layer of a switch, wherein the application layer of the switch is communicatively connected to the switch's forwarding chip. Figure 3 According to the flowchart of the embodiment of this application, as follows Figure 3 As shown, the process includes the following steps:

[0034] Step S102: Obtain target traffic data;

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

[0036] Specifically, the magnitude of the flow parameter of data in the queue reflects the type of data in the queue.

[0037] Step S104: Based on the above target traffic data, determine whether the target type exists;

[0038] Wherein, the target traffic data is located within the preset range corresponding to the target type, the target type is one of multiple preset types, one preset type corresponds to one preset range, and the target traffic data being located within the preset range corresponding to the target type indicates that the type of data in the target queue is the target type;

[0039] Specifically, if the flow parameters of the data in the queue are within a certain preset range, the type of the data in this queue can be determined to be the preset type corresponding to this preset range.

[0040] Step S106: If the above target type exists, determine the first target high threshold value and the first target low threshold value according to the above target type and the first mapping relationship;

[0041] Wherein, the first mapping relationship is the mapping relationship between the preset type and the high threshold value and the low threshold value of the weighted random early detection algorithm, the first target high threshold value is the target type corresponding to the high threshold value in the first mapping relationship, and the first target low threshold value is the target type corresponding to the low threshold value in the first mapping relationship.

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

[0043] Step S108: The first target high threshold and the first target low threshold are sent to the forwarding chip, so that the forwarding chip discards the packets in the target queue according to the first target high threshold and the first target low threshold.

[0044] Through the above embodiments, firstly, the flow parameters of the data in the queue are obtained. Then, the type of data in the queue is determined based on the flow parameters. Next, based on the type of data in the queue, the high threshold and low threshold corresponding to the type of data in the queue are determined. Finally, the high threshold and low threshold corresponding to the type of data in the queue are sent to the forwarding chip. When different types of data are transmitted in the queue, corresponding threshold values ​​are configured for the queue to meet the requirements of different types of data to tolerate data congestion, thereby improving the control effect of data congestion. This solves the problem in the prior art where the threshold value of the weighted random early detection algorithm configured for each queue is fixed, which cannot meet the requirements of different types of data to tolerate data congestion in the same queue, thus improving the control effect of data congestion.

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

[0046] The detection 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 traffic data.

[0047] If the acquisition time is longer than the first preset time, the target traffic data is acquired.

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

[0049] The above parameters include bandwidth utilization, traffic rate, and traffic percentage. The traffic percentage is the ratio of the queue's traffic to the total traffic of the queue within a second preset time period. The preset range includes a first preset range, a second preset range, and a third preset range. Step S104 can be implemented as follows:

[0050] The first acquisition step is to acquire the backup type, where the backup type is one of the multiple preset types mentioned above.

[0051] The second acquisition step involves acquiring a first target preset range, a second target preset range, and a third target preset range based on the aforementioned backup type. The first target preset range is the first preset range corresponding to the aforementioned backup type, the second target preset range is the second preset range corresponding to the aforementioned backup type, and the third target preset range is the third preset range corresponding to the aforementioned backup type.

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

[0053] Repeat the steps as follows: if the bandwidth utilization rate 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 percentage 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 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 percentage of the target traffic data is within the third target preset range, or until all the preset types are determined.

[0054] The second determining step is to determine that the target type exists and the backup type is the target type 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.

[0055] The third step is to determine that the target type does not exist after all the above preset types have been determined.

[0056] In this embodiment, if the bandwidth utilization rate is within a first preset range corresponding to a certain preset type, the traffic rate is within a second preset range corresponding to this preset type, and the traffic percentage 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 bandwidth utilization rate, traffic rate, and traffic percentage to determine the type of data in the queue, so as to ensure accurate determination of the type of data in the queue, realize the precise configuration of the high threshold and low threshold of the weighted random early detection algorithm, and further improve the control effect of data congestion.

[0057] In an alternative embodiment, after step S104, the method further includes:

[0058] Step S201: If the above 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.

[0059] In this embodiment, if the flow parameters of the data in the queue are 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 alternative embodiment, prior to step S106, the method further includes:

[0061] Based on the above preset type and the corresponding demand information, the above high threshold value and the above low threshold value corresponding to the above preset type are determined. Each above preset type corresponds to one above demand information. The demand information represents the tolerance of the data of the corresponding above preset type to data congestion.

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

[0063] In this embodiment, based on the tolerance of different types of data to data congestion, corresponding high and low threshold values ​​are configured for each type of data to meet the requirements of different types of data to tolerate 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 video stream data has a certain tolerance to data congestion, that is, a certain tolerance to latency, the high threshold value is set to a relatively high value, such as 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 relatively low value, such as 40% of the queue length. If the preset type is... For file download data, considering that file downloads are typically large-scale data transfers at once, the tolerance for data congestion is relatively high, i.e., the tolerance for queuing is relatively high. Therefore, a high threshold is set, for example, 80% of the queue length, to promptly discard some data packets and prevent excessive queue congestion, thus improving file download speed. The low threshold is set relatively low, for example, 50% of the queue length. If the preset type is real-time game data, considering that real-time games have a very low tolerance for data congestion and require low latency and fast response, it is necessary to minimize data congestion in the queue. Therefore, a low high threshold is set, for example, 20% of the queue length, to ensure early control of data congestion and avoid impacting game performance. To mitigate excessive impact, set a relatively high threshold and a lower low threshold, such as 10% of the queue length. If the preset data type is video conferencing data, considering that video conferencing data has a certain tolerance for data congestion (i.e., a certain tolerance for latency), the high threshold can be set to a higher value, such as 60% of the queue length. To maintain short queuing times and promptly control data congestion to ensure good video conferencing quality, set a relatively low high threshold, such as 30% of the queue length. If the preset data type is P2P file-sharing data, considering that P2P file-sharing data typically exhibits burstiness and volatility, a higher high threshold can accommodate this characteristic. The high threshold can be set to a higher value, such as 10% of the queue length. The threshold is set to 70% of the queue length to control congestion and prevent excessive bandwidth consumption from file sharing. The lower threshold is set to a lower value, such as 40% of the queue length. If the default type is email data transmission, considering that email data transmission has a certain tolerance for data congestion (i.e., a certain tolerance for latency), the high threshold can be set to a higher value, such as 70% of the queue length. To avoid excessive queue congestion and maintain a faster email transmission speed, the higher threshold is set to a lower value, such as 50% of the queue length. If the default type is file backup data, considering the large amount of data transferred at once, the high threshold can be set to a higher value, such as 80% of the queue length, to control congestion in a timely manner.And ensure timely backups are completed. Set relatively high thresholds, and lower thresholds to lower values, such as 60% of the queue length.

[0064] Table 1

[0065]

[0066]

[0067] In an alternative embodiment, after step S106 and before step S108, the method further includes:

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

[0069] In this embodiment, an optimized model trained by a neural network is used to optimize the configured high and low threshold values. Then, the optimized high and low threshold values ​​are sent to the forwarding chip. By optimizing the configured high and low threshold values, the high and low threshold values ​​of the weighted random early detection algorithm are accurately configured, further improving the control effect of data congestion. In some implementations, the neural network can be a decision tree model.

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

[0071] Step S301: Obtain the target traffic data mentioned above to obtain the target traffic data for this transaction.

[0072] Step S302: Determine whether the bandwidth utilization rate of the target traffic data in this instance is greater than the bandwidth utilization rate of the target traffic data in the previous instance.

[0073] Step S303: At least if the bandwidth utilization rate of the target traffic data in this instance is greater than the bandwidth utilization rate of the target traffic data obtained previously, the second target high threshold and the second target low threshold are sent to the forwarding chip, causing the forwarding chip to discard packets in the target queue according to the second target high threshold and the second target low threshold. The second target high threshold is the high threshold value used by the forwarding chip before the first target high threshold and the first target low threshold are sent to the forwarding chip, and the second target low threshold is the low threshold value used by the forwarding chip before the first target low threshold and the first target low threshold are sent to the forwarding chip.

[0074] In this embodiment, after the forwarding chip discards packets in the queue according to the reconfigured high and low threshold values, it reacquires traffic data and determines whether the bandwidth utilization rate at this time is greater than the bandwidth utilization rate before the high and low threshold values ​​were not configured. If it is greater, it means that the data congestion control effect has not been improved after the forwarding chip discards packets in the queue according to the reconfigured high and low threshold values, and the network performance is poor. At this time, the forwarding chip is controlled to re-adopt the previous high and low threshold values ​​to discard packets in the queue.

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

[0076] If the bandwidth utilization of the current target traffic data is greater than the bandwidth utilization of the previously acquired target traffic data, the traffic rate of the current target traffic data is greater than the traffic rate of the previously acquired target traffic data, and the traffic proportion of the current target traffic data is greater than the traffic proportion of the previously acquired target traffic data, then the second target high threshold and the second target low threshold are sent to the forwarding chip. The forwarding chip then discards packets in the target queue according to the second target high threshold and the second target low threshold. The second target high threshold is the high threshold value used by the forwarding chip before the first target high threshold and the first target low threshold are sent to the forwarding chip, and the second target low threshold is the low threshold value used by the forwarding chip before the first target low threshold and the first target low threshold are sent to the forwarding chip.

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

[0078] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the weighted random early detection algorithm threshold configuration method of this application will be described in detail below with reference to specific embodiments.

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

[0080] Step S1: Obtain target traffic data;

[0081] Step S2: Based on the target traffic data above, determine whether the target type exists;

[0082] Step S3:

[0083] If the above target types exist, determine the first target high threshold and the first target low threshold based on the above target types and the first mapping relationship; input the above target traffic data, the above first target high threshold and the above first target low threshold into the optimization model to obtain the optimized above first target high threshold and the optimized above first target low threshold.

[0084] or,

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

[0086] Step S4: Send the first target high threshold and the first target low threshold to the forwarding chip, so that the forwarding chip discards the packets in the target queue according to the first target high threshold and the first target low threshold;

[0087] Step S5: Obtain the target traffic data mentioned above to obtain the target traffic data for this transaction;

[0088] Step S6: Determine whether the bandwidth utilization rate of the target traffic data in this instance is greater than the bandwidth utilization rate of the target traffic data in the previous instance;

[0089] Step S7: At least when the bandwidth utilization of the target traffic data in this instance is greater than the bandwidth utilization of the target traffic data obtained in the previous instance, the second target high threshold and the second target low threshold are sent to the forwarding chip, so that the forwarding chip discards the packets in the target queue according to the second target high threshold and the second target low threshold.

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

[0091] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0092] This embodiment also provides an apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

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

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

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

[0096] Specifically, the magnitude of the flow parameter of data in the queue reflects the type of data in the queue.

[0097] The first determining module 24 is used to determine whether the target type exists based on the aforementioned target traffic data.

[0098] Wherein, the target traffic data is located within the preset range corresponding to the target type, the target type is one of multiple preset types, one preset type corresponds to one preset range, and the target traffic data being located within the preset range corresponding to the target type indicates that the type of data in the target queue is the target type;

[0099] Specifically, if the flow parameters of the data in the queue are within a certain preset range, the type of the data in this queue can be determined to be the preset type corresponding to this preset range.

[0100] The second determining module 26 is used to determine the first target high threshold value and the first target low threshold value according to the target type and the first mapping relationship when the above target type exists.

[0101] Wherein, the first mapping relationship is the mapping relationship between the preset type and the high threshold value and the low threshold value of the weighted random early detection algorithm, the first target high threshold value is the target type corresponding to the high threshold value in the first mapping relationship, and the first target low threshold value is the target type corresponding to the low threshold value in the first mapping relationship.

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

[0103] The first sending module 28 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 packets in the target queue according to the first target high threshold value and the first target low threshold value.

[0104] Through the above embodiments, firstly, the flow parameters of the data in the queue are obtained. Then, the type of data in the queue is determined based on the flow parameters. Next, based on the type of data in the queue, the high threshold and low threshold corresponding to the type of data in the queue are determined. Finally, the high threshold and low threshold corresponding to the type of data in the queue are sent to the forwarding chip. When different types of data are transmitted in the queue, corresponding threshold values ​​are configured for the queue to meet the requirements of different types of data to tolerate data congestion, thereby improving the control effect of data congestion. This solves the problem in the prior art where the threshold value of the weighted random early detection algorithm configured for each queue is fixed, which cannot meet the requirements of different types of data to tolerate data congestion in the same queue, thus improving the control effect of data congestion.

[0105] The above-mentioned acquisition module includes:

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

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

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

[0109] The above parameters include bandwidth utilization, traffic rate, and traffic percentage; the above preset ranges include a first preset range, a second preset range, and a third preset range; the above first determining module includes:

[0110] The second acquisition submodule is used to acquire the backup type, which is one of the multiple preset types mentioned above.

[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 above-mentioned backup type. The first target preset range is the first preset range corresponding to the above-mentioned backup type, the second target preset range is the second preset range corresponding to the above-mentioned backup type and the third target preset range is the third preset range corresponding to the above-mentioned backup type.

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

[0113] The repeat submodule is used to repeat the first acquisition step, the second acquisition step, and the first determination step at least once when the bandwidth utilization rate 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 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, or until all the preset types are determined.

[0114] The second determining submodule is used to determine that the target type exists and the backup type is the target type 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.

[0115] The third determining submodule is used to determine that the target type does not exist after all the above preset types have been determined.

[0116] In this embodiment, if the bandwidth utilization rate is within a first preset range corresponding to a certain preset type, the traffic rate is within a second preset range corresponding to this preset type, and the traffic percentage 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 bandwidth utilization rate, traffic rate, and traffic percentage to determine the type of data in the queue, so as to ensure accurate determination of the type of data in the queue, realize the precise configuration of the high threshold and low threshold of the weighted random early detection algorithm, and further improve the control effect of data congestion.

[0117] In one alternative embodiment, the above-mentioned apparatus further includes:

[0118] The third determining 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 above target type does not exist.

[0119] In this embodiment, if the flow parameters of the data in the queue are 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 one alternative embodiment, the above-mentioned apparatus further includes:

[0121] The fourth determining module is used to determine the high threshold value and the low threshold value corresponding to the preset type based on the preset type and the corresponding demand information. Each preset type corresponds to one set of demand information, and the demand information represents the tolerance of the corresponding preset type of data to data congestion.

[0122] The fifth determining module is used to determine the first mapping relationship based on 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, based on the tolerance of different types of data to data congestion, corresponding high and low threshold values ​​are configured for each type of data to meet the requirements of different types of data to tolerate 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 video stream data has a certain tolerance to data congestion, that is, a certain tolerance to latency, the high threshold value is set to a relatively high value, such as 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 relatively low value, such as 40% of the queue length. If the preset type is... For file download data, considering that file downloads are typically large-scale data transfers at once, the tolerance for data congestion is relatively high, i.e., the tolerance for queuing is relatively high. Therefore, a high threshold is set, for example, 80% of the queue length, to promptly discard some data packets and prevent excessive queue congestion, thus improving file download speed. The low threshold is set relatively low, for example, 50% of the queue length. If the preset type is real-time game data, considering that real-time games have a very low tolerance for data congestion and require low latency and fast response, it is necessary to minimize data congestion in the queue. Therefore, a low high threshold is set, for example, 20% of the queue length, to ensure early control of data congestion and avoid impacting game performance. To mitigate excessive impact, set a relatively high threshold and a lower low threshold, such as 10% of the queue length. If the preset data type is video conferencing data, considering that video conferencing data has a certain tolerance for data congestion (i.e., a certain tolerance for latency), the high threshold can be set to a higher value, such as 60% of the queue length. To maintain short queuing times and promptly control data congestion to ensure good video conferencing quality, set a relatively low high threshold, such as 30% of the queue length. If the preset data type is P2P file-sharing data, considering that P2P file-sharing data typically exhibits burstiness and volatility, a higher high threshold can accommodate this characteristic. The high threshold can be set to a higher value, such as 10% of the queue length. The threshold is set to 70% of the queue length to control congestion and prevent excessive bandwidth consumption from file sharing. The lower threshold is set to a lower value, such as 40% of the queue length. If the default type is email data transmission, considering that email data transmission has a certain tolerance for data congestion (i.e., a certain tolerance for latency), the high threshold can be set to a higher value, such as 70% of the queue length. To avoid excessive queue congestion and maintain a faster email transmission speed, the higher threshold is set to a lower value, such as 50% of the queue length. If the default type is file backup data, considering the large amount of data transferred at once, the high threshold can be set to a higher value, such as 80% of the queue length, to control congestion in a timely manner.And ensure timely backups are completed. Set relatively high thresholds, and lower thresholds to lower values, such as 60% of the queue length.

[0124] Table 1

[0125]

[0126]

[0127] The above-mentioned device also includes:

[0128] An optimization module is used to input the target traffic data, the first target high threshold, and the first target low threshold into an optimization model to obtain optimized first target high threshold and optimized first target low threshold. The optimization model is obtained by training a neural network using multiple sets of training data. Each set of training data includes at least the traffic data, the high threshold, and the low threshold. The absolute value of the difference between the optimized first target high threshold and the first target high threshold is less than a preset value, and the absolute value of the difference between the optimized first target low threshold and the first target low threshold is less than the preset value.

[0129] In this embodiment, an optimized model trained by a neural network is used to optimize the configured high and low threshold values. Then, the optimized high and low threshold values ​​are sent to the forwarding chip. By optimizing the configured high and low threshold values, the high and low threshold values ​​of the weighted random early detection algorithm are accurately configured, further improving the control effect of data congestion. In some implementations, the neural network can be a decision tree model.

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

[0131] The second acquisition module is used to acquire the aforementioned target traffic data to obtain the aforementioned target traffic data for this purpose;

[0132] The sixth determining module is used to determine whether the bandwidth utilization rate of the target traffic data in this instance is greater than the bandwidth utilization rate of the target traffic data in the previous instance.

[0133] The second sending module is configured to send a second target high threshold and a second target low threshold to the forwarding chip at least when the bandwidth utilization of the current target traffic data is greater than the bandwidth utilization of the previously acquired target traffic data. This causes the forwarding chip to discard packets in the target queue according to the second target high threshold and the second target low threshold. The second target high threshold is the high threshold value used by the forwarding chip before the first target high threshold and the first target low threshold are sent to the forwarding chip, and the second target low threshold is the low threshold value used by the forwarding chip before the first target low threshold and the first target low threshold are sent to the forwarding chip.

[0134] In this embodiment, after the forwarding chip discards packets in the queue according to the reconfigured high and low threshold values, it reacquires traffic data and determines whether the bandwidth utilization rate at this time is greater than the bandwidth utilization rate before the high and low threshold values ​​were not configured. If it is greater, it means that the data congestion control effect has not been improved after the forwarding chip discards packets in the queue according to the reconfigured high and low threshold values, and the network performance is poor. At this time, the forwarding chip is controlled to re-adopt the previous high and low threshold values ​​to discard packets in the queue.

[0135] The aforementioned parameters also include traffic rate and traffic percentage. The second sending module is used to send a second target high threshold and a second target low threshold to the forwarding chip when the bandwidth utilization of the current target traffic data is greater than the bandwidth utilization of the previously acquired target traffic data, the traffic rate of the current target traffic data is greater than the traffic rate of the previously acquired target traffic data, and the traffic percentage of the current target traffic data is greater than the traffic percentage of the previously acquired target traffic data. This causes the forwarding chip to discard packets in the target queue according to the second target high threshold and the second target low threshold. The second target high threshold is the high threshold value used by the forwarding chip before the first target high threshold and the first target low threshold are sent to the forwarding chip, and the second target low threshold is the low threshold value used by the forwarding chip before the first target low threshold and the first target low threshold are sent to the forwarding chip.

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

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

[0138] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in the above method embodiments when it is run.

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

[0140] Embodiments of this application also provide a switch, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in the above method embodiments.

[0141] In one 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] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0143] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0144] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for configuring threshold values ​​in a weighted random early detection algorithm, characterized in that, The method is applied to the application layer of a switch, wherein the application layer of the switch is communicatively connected to the forwarding chip of the switch, and the method includes: Acquire target traffic data, wherein the target traffic data is the traffic data of the target queue of the target port, the target port is one of the multiple ports of the forwarding chip, the target queue is one of the multiple queues of the target port, and the traffic data includes parameters of the data traffic. Based on the target traffic data, it is determined whether a target type exists. The target traffic data is located within a preset range corresponding to the target type. The target type is one of multiple preset types, and each preset type corresponds to a preset range. The fact that the target traffic data is located within the preset range corresponding to the target type indicates that the type of data in the target queue is the target type. When the target type exists, a first target high threshold and a first target low threshold are determined according to the target type and the first mapping relationship. The first mapping relationship is the mapping relationship between the preset type and the high threshold and low threshold of the weighted random early detection algorithm. The first target high threshold is the high threshold corresponding to the target type in the first mapping relationship, and the first target low threshold is the low threshold corresponding to the target type in the first mapping relationship. The first target high threshold and the first target low threshold are sent to the forwarding chip, causing the forwarding chip to discard packets in the target queue according to the first target high threshold and the first target low threshold. The parameters include bandwidth utilization. After sending the first target high threshold and the first target low threshold to the forwarding chip, the method further includes: acquiring the target traffic data to obtain the target traffic data for the current time; determining whether the bandwidth utilization of the current target traffic data is greater than the bandwidth utilization of the previous target traffic data; and, at least if the bandwidth utilization of the current target traffic data is greater than the bandwidth utilization of the previously acquired target traffic data, sending the second target high threshold and the second target low threshold to the forwarding chip, causing the forwarding chip to discard packets in the target queue according to the second target high threshold and the second target low threshold, wherein the second target high threshold is the high threshold value used by the forwarding chip before the first target high threshold and the first target low threshold are sent to the forwarding chip, and the second target low threshold is the low threshold value used by the forwarding chip before the first target low threshold and the first target low threshold are sent to the forwarding chip.

2. The method according to claim 1, characterized in that, Obtain target traffic data, including: The detection 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 traffic data; If the acquisition time is greater than the first preset time, the target traffic data is acquired.

3. The method according to claim 1, characterized in that, The parameters include bandwidth utilization, traffic rate, and traffic percentage. The preset ranges include a first preset range, a second preset range, and a third preset range. Based on the target traffic data, determining whether a target type exists includes: The first acquisition step involves acquiring a backup type, wherein the backup type is one of a plurality of preset types; The second acquisition step involves acquiring a first target preset range, a second target preset range, and a third target preset range based on 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. The first determining step involves determining whether the bandwidth utilization rate of the target traffic data is within the first target preset range, whether the traffic rate of the target traffic data is within the second target preset range, and whether the traffic percentage of the target traffic data is within the third target preset range. Repeat the steps as follows: if 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 percentage 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 percentage of the target traffic data is within the third target preset range, or until all the preset types are determined; The second determining step involves determining that the target type exists and the backup type is the target type 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. The third determination step is to determine that the target type does not exist after all the preset types have been determined.

4. The method according to claim 1, characterized in that, After determining whether a target type exists based on the target traffic data, the method further includes: 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.

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

6. The method according to claim 1, characterized in that, Before determining the first target high threshold and the first target low threshold based on the target type and the first mapping relationship, the method further includes: Based on the preset type and the corresponding demand information, the high threshold value and the low threshold value corresponding to the preset type are determined. Each preset type corresponds to a 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 based on the preset type, the high threshold value corresponding to the preset type, and the low threshold value corresponding to the preset type.

7. A device for configuring threshold values ​​in a weighted random early detection algorithm, characterized in that, The device is applied to the application layer of a switch, and the application layer of the switch is communicatively connected to the forwarding chip of the switch. The device includes: The first acquisition module is used to acquire target traffic data, wherein the target traffic data is traffic data of the target queue of the target port, the target port is one of the multiple ports of the forwarding chip, the target queue is one of the multiple queues of the target port, and the traffic data includes parameters of the data traffic. The first determining module is used to determine whether a target type exists based on the target traffic data, wherein the target traffic data is located 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 traffic data being located within the preset range corresponding to the target type indicates that the type of data in the target queue is the target type; The second determining module is used to determine a first target high threshold and a first target low threshold based on the target type and a first mapping relationship when the target type exists. The first mapping relationship is the mapping relationship between the preset type and the high threshold and low threshold of the weighted random early detection algorithm. The first target high threshold is the high threshold corresponding to the target type in the first mapping relationship, and the first target low threshold is the low threshold corresponding to the target type in the first mapping relationship. The second sending module is configured 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 packets in the target queue according to the first target high threshold value and the first target low threshold value. The parameters include bandwidth utilization. The device further includes: a second acquisition module, configured to acquire the target traffic data after sending the first target high threshold and the first target low threshold to the forwarding chip, to obtain the target traffic data for the current time; a sixth determination module, configured to determine whether the bandwidth utilization of the target traffic data for the current time is greater than the bandwidth utilization of the target traffic data for the previous time; and a second sending module, configured to send the second target high threshold and the second target low threshold to the forwarding chip at least if the bandwidth utilization of the target traffic data for the current time is greater than the bandwidth utilization of the target traffic data for the previous time, so that the forwarding chip discards packets in the target queue according to the second target high threshold and the second target low threshold, wherein the second target high threshold is the high threshold value used by the forwarding chip before the first target high threshold and the first target low threshold are sent to the forwarding chip, and the second target low threshold is the low threshold value used by the forwarding chip before the first target low threshold and the first target low threshold are sent to the forwarding chip.

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

9. 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, it implements the steps of the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Congestion control method and device based on improved WRED

    CN105721332A

  • Data transmission method and network equipment

    CN111131061A