Lossless network congestion control methods, devices, equipment, media, and switching systems

By using the congestion control reward function of the weighted sum of throughput parameters, congestion parameters and product term functions in the data center network, training the deep Q-learning network and optimizing the explicit congestion notification parameters, it solves the problem of both large throughput and low performance in the data center network. Delay problem improves the robustness and stability of the network.

CN118381765BActive Publication Date: 2024-10-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410835709.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-25
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

Existing data center networks have difficulties in balancing large throughput and low latency. Although the deep reinforcement learning model can intelligently select explicit congestion notification parameters, it is difficult to optimize throughput and latency at the same time.

Method used

A congestion control reward function that is a weighted sum of throughput parameters, congestion parameters, and product term functions is used to train a congestion control model through a deep Q-learning network and optimize explicit congestion notification marking parameters to achieve high bandwidth and low latency in data center networks. .

Benefits of technology

It implements a congestion control model that converges more quickly in complex data center network environments, taking into account the traffic requirements of large throughput and low latency, and improving the robustness and stability of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118381765B_ABST
    Figure CN118381765B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data center communication technology, and specifically discloses a lossless network congestion control method, device, equipment, medium and switch system. When training a congestion control model for executing a lossless network congestion control task of a target switch, a congestion control reward function of a weighted sum of a throughput parameter, a congestion parameter and a product term function is adopted to solve the problem that the previous congestion control model tuning could not take into account both the tuning of high throughput and low latency. The congestion control reward function of a product term function that is positively correlated with the product of the throughput parameter and the congestion parameter is used to control the optimization direction of the congestion control model, which is not only conducive to faster model convergence, but also can take into account the traffic requirements of the data center for high throughput and low latency. The congestion control model obtained by the training is used to execute the lossless network congestion control task of the target switch, and has stronger robustness and stability in a complex data center network environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data center communication technology, and in particular to a lossless network congestion control method, device, equipment, medium and switch system. Background Art

[0002] Data Center Quantized Congestion Notification (DCQCN) is a congestion control protocol in data center networks. It aims to solve the unfairness and head-of-line blocking problems faced by traditional priority-based flow control (PFC), improve network performance through an end-to-end congestion notification mechanism, and achieve low latency and high throughput in lossless networks. DCQCN works by setting congestion notification markers in data packets. When a node in the network detects congestion, it sets a congestion notification bit in the forwarded data packets. Devices that receive these congestion notifications can then reduce their sending rates, thereby alleviating congestion. This approach allows the network to respond to congestion more intelligently, rather than simply stopping sending data, which is a common practice in traditional flow control-based lossless data center networks.

[0003] The explicit congestion notification (ECN) in DCQCN uses many marking parameters. The technology in this field uses deep reinforcement learning to perceive the state of the data center network environment to achieve the best decision for the current environmental conditions.

[0004] However, due to the complexity and variability of the data center network environment, although the deep reinforcement learning model can make intelligent decisions on the explicit congestion notification configuration parameters of switches in the data center, it cannot achieve the effect of both high throughput and low latency. Summary of the invention

[0005] The purpose of the present invention is to provide a lossless network congestion control method, device, equipment, medium and switch system to achieve the effect of high throughput and low latency when forwarding data center messages.

[0006] In order to solve the above technical problems, the present invention provides a lossless network congestion control method, comprising:

[0007] Obtain a congestion control model, candidate explicit congestion notification marking parameters, and a congestion control reward function;

[0008] Collect congestion control samples of the target switch to construct a training dataset;

[0009] Iteratively training the congestion control model using the training data set to obtain the trained congestion control model;

[0010] Execute a lossless network congestion control task of the target switch based on the trained congestion control model;

[0011] Among them, the congestion control reward function is the weighted sum of the throughput parameter, the congestion parameter and the product term function; the product term function is a function of the product of the throughput parameter and the congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes the state parameters at the current moment, the explicit congestion notification marking parameters selected according to the state parameters at the current moment using the congestion control model, the state parameters at the next moment, and the environmental reward parameters calculated by substituting the state parameters at the next moment into the congestion control reward function; the types of state parameters include the throughput parameters of the switch port of the target switch and the congestion parameters of the switch port.

[0012] On the one hand, the congestion control reward function can be expressed as follows:

[0013] ;

[0014] in, r is the environmental reward parameter, T is the throughput parameter, is the weight of the throughput parameter, Q is the congestion parameter, is the weight of the congestion parameter, is the product term function, is the weight of the product term function.

[0015] On the other hand, the product term function can be expressed by the following formula:

[0016] ;

[0017] in, h >0.

[0018] On the other hand, the throughput parameter in the congestion control reward function is the normalized switch port packet sending rate, and the congestion parameter in the congestion control reward function is the normalized switch port congestion queue length.

[0019] On the other hand, the normalized switch port packet sending rate is calculated by the following formula:

[0020] ;

[0021] in, Tis the normalized switch port packet sending rate, is the packet sending rate of the switch port, is the bandwidth of the switch port.

[0022] On the other hand, the normalized switch port packet sending rate is calculated by the following formula:

[0023] ;

[0024] in, T is the normalized switch port packet sending rate, is the unit observation time of the packet sending rate of the switch port, is the switch port packet sending rate at the start time of the unit observation time, is the switch port packet sending rate at the end of the unit observation time, is the bandwidth of the switch port.

[0025] On the other hand, the normalized switch port congestion queue length is calculated by the following formula:

[0026] ;

[0027] in, is the normalized switch port congestion queue length, is the congestion queue length of the switch port, is the normalized function of the congestion queue length of the switch port, n is the actual order of the congestion queue length of the switch port, express The minimum m the index of the value, m is the normalized order of the congestion queue length of the switch port, and the normalized order is M Step, The length of the congestion queue on the switch port m The cut-off value of the order, is a constant coefficient, In kilobits.

[0028] On the other hand, in the congestion control reward function, the weight of the throughput parameter and the weight of the congestion parameter are both smaller than the weight of the product term function.

[0029] On the other hand, collecting congestion control samples of the target switch to construct a training data set includes:

[0030] Taking one switch port of the target switch as an intelligent agent, collecting the congestion control samples of all the intelligent agents in the target switch system where the target switch is located, and obtaining a group of congestion control samples;

[0031] Multiple groups of the congestion control samples are repeatedly collected to obtain the training data set.

[0032] On the other hand, collecting congestion control samples of the target switch to construct a training data set includes:

[0033] Obtaining the throughput parameter, congestion parameter and explicit congestion notification marking parameter of the switch port at the current moment; wherein the throughput parameter at the current moment is a result of normalized calculation based on the switch port packet sending rate of the switch port at the current moment, the congestion parameter at the current moment is a result of normalized calculation based on the switch port congestion queue length of the switch port at the current moment, and the explicit congestion notification marking parameter at the current moment is a result randomly selected from the candidate explicit congestion notification marking parameters;

[0034] After configuring the switch port with the explicit congestion notification marking parameter at the current moment, collecting the throughput parameter, congestion parameter and explicit congestion notification marking parameter of the switch port at the next moment; wherein the throughput parameter at the next moment is the result of normalized calculation based on the switch port packet sending rate at the next moment of the switch port, the congestion parameter at the next moment is the result of normalized calculation based on the switch port congestion queue length at the next moment of the switch port, and the explicit congestion notification marking parameter at the next moment is the result randomly selected from the candidate explicit congestion notification marking parameters;

[0035] Substituting the throughput parameter at the next moment and the congestion parameter at the next moment into the congestion control reward function, and calculating the environment reward parameter;

[0036] Taking one switch port of the target switch as an intelligent agent, using the above steps to collect the congestion control samples of all the intelligent agents in the target switch system where the target switch is located, and stacking them into a group of congestion control samples;

[0037] Multiple groups of the congestion control samples are repeatedly collected to obtain the training data set.

[0038] On the other hand, the congestion control model is a deep Q-learning network;

[0039] Iteratively training the congestion control model using the training data set to obtain the trained congestion control model includes:

[0040] The congestion control model is iteratively trained using a dual deep Q learning network training method to obtain the trained congestion control model.

[0041] On the other hand, the congestion control model is iteratively trained using a dual deep Q learning network training method to obtain the trained congestion control model, including:

[0042] Initialize the policy neural network and the target neural network;

[0043] Randomly sampling from the training data set to obtain batch training data to train the neural network;

[0044] The following formula is used to select actions and values ​​through the strategy neural network to calculate the optimal value under the input features at the current moment: :

[0045] ;

[0046] in, For the current moment t The input features of For the current moment t The optimal action under the input features, is the strategy neural network;

[0047] The following formula is used to select the optimal action under the input feature at the next moment through the target neural network, and the optimal value under the input feature at the next moment is calculated through the strategy neural network: :

[0048] ;

[0049] in, is the sampling time interval, For the next moment The input features of For the next moment The optimal action under the input features, represents the index of the action when the policy neural network outputs the maximum value, is the target neural network;

[0050] The average loss value of the current batch training data is calculated by the following formula :

[0051] ;

[0052] in, is the environmental reward parameter, is the discount factor, is the root mean square error function;

[0053] The average loss value Backpropagating and updating the weights of the strategy neural network using an adaptive moment estimation optimizer;

[0054] The following formula is used to update the target neural network once every S updates of the strategy neural network:

[0055] ;

[0056] in, is the average coefficient;

[0057] If the iteration end condition is met, the strategy neural network is used as the trained congestion control model; if the iteration end condition is not met, batch training data is obtained by random sampling from the training data set to train the neural network.

[0058] On the other hand, collecting congestion control samples of the target switch to construct a training data set includes:

[0059] A switch simulation system is built according to the target switch system where the target switch is located, and an offline training data set is collected from the switch simulation system.

[0060] On the other hand, collecting congestion control samples of the target switch to construct a training data set includes:

[0061] Deploying the congestion control model on the target switch;

[0062] When executing the congestion control task of the switch port by using the congestion control model, collecting the congestion control sample from the target switch;

[0063] Iteratively training the congestion control model using the training data set to obtain the trained congestion control model includes:

[0064] The congestion control model is iteratively trained using the congestion control samples collected from the target switch. If an iteration end condition is met, the trained congestion control model is obtained. If the iteration end condition is not met, the congestion control sample is collected from the target switch when the congestion control task of the switch port is executed using the congestion control model.

[0065] On the other hand, the congestion control model is a congestion control model pre-trained in a switch simulation system;

[0066] The collecting of congestion control samples of the target switch to construct a training data set includes:

[0067] Deploying the pre-trained congestion control model on the target switch;

[0068] When executing the congestion control task of the switch port using the pre-trained congestion control model, collecting the congestion control sample from the target switch;

[0069] Iteratively training the congestion control model using the training data set to obtain the trained congestion control model includes:

[0070] The congestion control samples collected from the target switch are used to fine-tune model parameters of the pre-trained congestion control model. If the iteration end condition is met, the trained congestion control model is obtained; if the iteration end condition is not met, the congestion control samples are collected from the target switch when the congestion control task of the switch port is performed using the pre-trained congestion control model.

[0071] On the other hand, the performing of the lossless network congestion control task of the target switch based on the trained congestion control model includes:

[0072] If the target switch network where the target switch is located satisfies the stability condition for both the network topology structure and the traffic pattern scenario, then selecting an explicit congestion notification marking parameter based on the congestion control model trained on the switch port of the target switch to perform the lossless network congestion control task;

[0073] If at least one of the network topology of the target switch network and the traffic pattern scenario of the target switch network does not meet the stability condition, an explicit congestion notification marking parameter is selected based on the congestion control model trained on the switch port of the target switch and the self-state information of the upstream switch of the target switch to perform the lossless network congestion control task.

[0074] In order to solve the above technical problems, the present invention also provides a switch system, comprising a plurality of target switches;

[0075] The switch port of the target switch is deployed with a congestion control model, a candidate explicit congestion notification marking parameter and a congestion control reward function; the target switch is used to collect the congestion control samples to construct a training data set when executing the congestion control task of the switch port, iteratively train the congestion control model using the training data set to obtain the trained congestion control model, and execute the lossless network congestion control task based on the trained congestion control model;

[0076] Among them, the congestion control reward function is the weighted sum of the throughput parameter, the congestion parameter and the product term function; the product term function is a function of the product of the throughput parameter and the congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes the state parameters at the current moment, the explicit congestion notification marking parameters selected according to the state parameters at the current moment using the congestion control model, the state parameters at the next moment, and the environmental reward parameters calculated by substituting the state parameters at the next moment into the congestion control reward function; the types of state parameters include the throughput parameters of the switch port of the target switch and the congestion parameters of the switch port.

[0077] In order to solve the above technical problems, the present invention also provides a lossless network congestion control device, comprising:

[0078] An acquisition unit, used for acquiring a congestion control model, candidate explicit congestion notification marking parameters and a congestion control reward function;

[0079] A sampling unit, used for collecting congestion control samples of a target switch to construct a training data set;

[0080] A model updating unit, configured to iteratively train the congestion control model using the training data set to obtain the trained congestion control model;

[0081] A control unit, configured to execute a lossless network congestion control task of the target switch based on the trained congestion control model;

[0082] Among them, the congestion control reward function is the weighted sum of the throughput parameter, the congestion parameter and the product term function; the product term function is a function of the product of the throughput parameter and the congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes the state parameters at the current moment, the explicit congestion notification marking parameters selected according to the state parameters at the current moment using the congestion control model, the state parameters at the next moment, and the environmental reward parameters calculated by substituting the state parameters at the next moment into the congestion control reward function; the types of state parameters include the throughput parameters of the switch port of the target switch and the congestion parameters of the switch port.

[0083] In order to solve the above technical problems, the present invention also provides a lossless network congestion control device, comprising:

[0084] Memory for storing computer programs;

[0085] A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the lossless network congestion control method as described in any one of the above items are implemented.

[0086] In order to solve the above technical problems, the present invention also provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the lossless network congestion control method as described in any one of the above items are implemented.

[0087] In order to solve the above technical problems, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the lossless network congestion control method as described in any one of the above items.

[0088] The lossless network congestion control method provided by the present invention has the beneficial effect that when training a congestion control model for executing a lossless network congestion control task of a target switch, a congestion control reward function of a weighted sum of a throughput parameter, a congestion parameter and a product term function is used, so as to solve the problem that it is difficult to achieve tuning that takes into account both high throughput and low latency because the reward function used in the previous training of the congestion control model is only the weighted sum of the throughput parameter and the congestion parameter. The optimization direction of the congestion control model is controlled by adding a product term function that is positively correlated with the product of the throughput parameter and the congestion parameter, which is not only conducive to faster convergence of the model, but also can take into account the traffic requirements of the data center for high throughput and low latency. The congestion control model trained in this way is used to execute the lossless network congestion control task of the target switch, and has stronger robustness and stability in a complex data center network environment.

[0089] The present invention also provides a lossless network congestion control device, equipment, non-volatile storage medium, computer program product and switch system, which have the above-mentioned beneficial effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0091] Figure 1 An architecture diagram of a lossless network congestion control system provided by an embodiment of the present invention;

[0092] Figure 2 A flowchart of a lossless network congestion control method provided by an embodiment of the present invention;

[0093] Figure 3 A schematic diagram of the structure of a lossless network congestion control device provided by an embodiment of the present invention;

[0094] Figure 4 A schematic diagram of the structure of a lossless network congestion control device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0095] The core of the present invention is to provide a lossless network congestion control method, device, equipment, medium and switch system to achieve the effect of high throughput and low latency when forwarding data center messages.

[0096] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0097] To facilitate understanding of the technical solution provided by the embodiment of the present invention, some key terms used in the embodiment of the present invention are explained here:

[0098] Data Center Quantized Congestion Notification (DCQCN) is a congestion control protocol in data center networks. It aims to solve the unfairness and head-of-line blocking problems faced by traditional priority-based flow control (PFC), improve network performance through an end-to-end congestion notification mechanism, and achieve low latency and high throughput in lossless networks. DCQCN works by setting congestion notification markers in data packets. When a node in the network detects congestion, it sets a congestion notification bit in the forwarded data packets. Devices that receive these congestion notifications can then reduce their sending rates, thereby alleviating congestion. This approach allows the network to respond to congestion more intelligently, rather than simply stopping sending data, which is a common practice in traditional PFC.

[0099] Explicit Congestion Notification (ECN) is a network congestion control mechanism used to explicitly notify the sender of network congestion in an IP network so that the sender can take appropriate measures to reduce the data sending rate and thus alleviate network congestion.

[0100] Deep reinforcement learning (DRL) is a machine learning method that combines deep learning and reinforcement learning. Deep learning is a technology that learns data representation by training multi-layer neural networks. It has achieved great success in image recognition, speech recognition and other fields. Reinforcement learning is a method that allows agents to learn optimal behavior strategies by interacting with the environment. It has a wide range of applications in games, robot control and other fields. Deep reinforcement learning combines the advantages of both. It uses deep neural networks to approximate the Q-value function or policy function in reinforcement learning to solve the problem of too large state space and action space in traditional reinforcement learning.

[0101] In deep reinforcement learning, an agent is an entity that can observe the state of the environment and make decisions based on these observations. The goal of the agent is to maximize the cumulative reward it obtains in the environment by learning a policy.

[0102] Single-Agent Deep Reinforcement Learning (SARL) and Multi-Agent Deep Reinforcement Learning (MARL) are two important branches of Deep Reinforcement Learning (DRL).

[0103] In single-agent deep reinforcement learning, only one agent interacts with the environment. The goal of the agent is to learn a strategy to maximize the cumulative reward it obtains in the environment. Since there is only one agent, the dynamics of the environment are relatively simple, and the agent can focus on learning the optimal strategy. Typical single-agent deep reinforcement learning algorithms include Deep Q-Network (DQN), Actor-Critic method, etc.

[0104] In multi-agent deep reinforcement learning, there are multiple agents that interact with each other and jointly influence the environment.

[0105] Deep Q-learning network is a key algorithm that combines deep learning and reinforcement learning. Its core idea is to use deep neural networks to approximate the Q function, that is, the action-value function. It can solve the problem that traditional Q-learning cannot be effectively applied in high-dimensional state space.

[0106] Throughput (Tx_rate), in the embodiment of the present invention, refers to the forwarding rate of a switch port of the switch in unit time.

[0107] The queue length (Que_length) in the embodiment of the present invention indicates the queue congestion length of a certain switch port of the switch, and is usually expressed in bytes.

[0108] The explicit congestion notification marking rate (Marking_rate) in the embodiment of the present invention indicates the explicit congestion notification marking rate of a certain switch port of the switch within a unit time.

[0109] Data center networks are responsible for the transmission and exchange of massive amounts of data in the modern information society. In this highly complex network, the congestion algorithm plays a vital role. It is like an accurate navigator that can perceive the network status in real time, flexibly adjust the data flow, effectively avoid network congestion, and ensure unimpeded data flow. The accuracy and efficiency of the congestion algorithm are directly related to the performance and stability of the data center network, and play an irreplaceable role in ensuring the continuity of enterprise business and the smoothness of user experience. Therefore, optimizing and improving the performance of the congestion algorithm is of great significance to improving the overall efficiency and security of the data center network.

[0110] In a network switch, network congestion occurs when the ingress traffic is larger than the bandwidth of the egress traffic. A typical example is multiple senders sending network data to the same destination at the same time. The switch's buffer can handle temporary congestion, but when congestion persists for too long, the switch's buffer becomes overloaded. When the switch buffer is overloaded, the next new packet received is dropped. Packet loss degrades application performance because of delays caused by retransmissions and the complexity of the transport protocol. Lossless networks implement flow control mechanisms that can pause ingress traffic before the buffer overflows, preventing packet loss. However, flow control itself can cause problems with congestion propagation.

[0111] In a lossless network, the goal of congestion control is to reduce the propagation of congestion, reduce the occupancy of the switch cache, and thus reduce latency and improve tolerance to burst traffic. As a congestion control algorithm widely used in data center networks, the DCQCN algorithm can effectively manage network traffic and avoid congestion in most scenarios. However, the DCQCN algorithm relies on the explicit congestion notification marking on the switch side to perceive the network congestion status. The explicit congestion notification marking parameters of the switch port have three parameters, namely, the low marking threshold Kmin, the high marking threshold Kmax, and the maximum marking probability Pmax. According to the set explicit congestion notification marking parameters, the congestion queue length of the switch port is x (usually in bytes), and the current marking probability is P (the probability of the switch port adding an explicit congestion notification mark to the data packet it forwards). When x<Kmin, P=0; when x>Kmax, P=1; when Kmin≤x≤Kmax, P=[(x-Kmin) / (Kmax-Kmin)]×Pmax.

[0112] Too many explicit congestion notification marking parameters also mean that there are a large number of combinations and possibilities in the tuning process, making it very difficult to determine the best parameter configuration. This requires not only a deep understanding of the working principle of the algorithm and the characteristics of the network, but also a lot of experiments and tests to verify the effects of different parameter combinations. In addition, even if a parameter configuration that performs well in the current network environment is found, as the network scale changes, business needs are adjusted, or new technologies are introduced, these parameters may no longer be applicable and need to be re-tuned. This increases the complexity and workload of network management, and also increases the risk of network instability.

[0113] By using deep reinforcement learning to solve the problem of selecting explicit congestion notification marking parameters, the entire data center network can be regarded as a large environment, and the switch can be regarded as an intelligent agent. As the switch perceives the data center network environment, the deep Q learning network is used to make the best decision for the current environmental conditions. For the training of deep reinforcement learning models, the setting of its reward function is particularly important. The intelligent agent always makes decisions in the direction of the maximum environmental reward. Therefore, the reward function is like a "lighthouse" for the data center network, providing a clear navigation direction for the selection of explicit congestion notification parameters in the switch. It defines which explicit congestion notification parameter configurations are more favorable and which explicit congestion notification parameter configurations are more harmful in the current environmental attributes, thereby guiding the intelligent agent to strike a balance between exploration and utilization and gradually optimize its own behavior strategy.

[0114] Data centers require high-bandwidth, low-latency networks. However, in many cases, the throughput and latency of the system present a contradictory relationship. High throughput means that the network can handle more data traffic and improve overall performance; however, as throughput increases, the transmission time of data packets in the network may be extended, resulting in increased latency. This contradictory relationship requires a trade-off in the design and optimization of the reward function of the deep reinforcement learning model, which must ensure sufficient data processing capabilities while controlling latency to provide efficient, stable and responsive network services. In scenarios with known traffic patterns, the reward function can be artificially set to be more friendly to latency-sensitive small flows or throughput-sensitive large flows. However, in scenarios with unknown traffic patterns or mixed traffic patterns, a reward function setting that can take into account both throughput and latency is more needed.

[0115] It can be seen that although the deep reinforcement learning model can already make intelligent decisions on the explicit congestion notification parameters of switches in data center networks, it is still necessary to set a reasonable reward function so that the intelligent decision of the explicit congestion notification configuration parameters is conducive to the development of data center networks towards high bandwidth and low latency.

[0116] In the existing schemes for selecting congestion control strategies for lossless networks using deep reinforcement learning, although the training and deployment methods used are different, the reward function they choose is basically expressed by the following formula:

[0117] ;

[0118] in, T and Q are the throughput parameter and congestion parameter respectively, is the weight of the throughput parameter, is the weight of the congestion parameter. Usually, the throughput parameter and congestion parameter are normalized so that T and Q are between 0 and 1, and set .

[0119] Analyzing from the actual situation, T and Q There is a negative correlation, but not a strict inverse relationship. When the switch port queue is congested, Q The value will be relatively small, indicating that there is congestion, so the delay reward given by the congestion parameter is small, and T The value is 1, which means that the maximum throughput of the switch port has been reached, so the throughput reward is larger. Q A value of 1 indicates that the delay reward is large because there is no congestion, while T≤1 means that the maximum packet sending rate of the switch port may not be reached at this time, that is, the bandwidth of the switch port is not fully utilized, so the delay reward is small. When , the choice of the switch explicit congestion notification parameters will tend to choose the option that makes the switch packet sending rate large enough; when When the switch explicit congestion notification parameter is set, it will tend to choose the option that makes the congestion queue length of the switch port 0, and the delay in the entire data center network will be very low. T and Q The expression of is more complicated, which leads to different traffic scenarios and network topologies. , it is also difficult to coordinate and balance the throughput and latency within the data center network at the same time.

[0120] In order to solve the defects of the current congestion control scheme based on deep reinforcement learning, the embodiment of the present invention provides a lossless network congestion control scheme and proposes a new congestion control reward function, which can be expressed by the following formula:

[0121] ; (1)

[0122] in, r is the environmental reward parameter, T is the throughput parameter, is the weight of the throughput parameter, Q is the congestion parameter, is the weight of the congestion parameter, is a product function and and Positively correlated, is the weight of the product term function.

[0123] It can be seen that the congestion control reward function provided in the embodiment of the present invention introduces the requirement of balancing throughput and delay into the environmental reward due to the addition of the product term function, thereby solving the defect that it is difficult to balance throughput and delay when optimizing the congestion control model based on traditional deep reinforcement learning. At the same time, it is also beneficial to increase the convergence rate of the congestion control model.

[0124] In some optional implementations of the embodiments of the present invention, the product term function may be a power of the product of the throughput parameter and the congestion parameter, that is, the product term function is expressed by the following formula:

[0125] ;

[0126] in, h> 0. Based on the above innovative congestion control reward function, the embodiment of the present invention also redesigns the training scheme and execution framework of the congestion control model, and its specific implementation will be shown in the following embodiments.

[0127] For ease of understanding, the system architecture applicable to the present invention is first introduced. The specific implementation provided by the embodiment of the present invention can be applicable to a single switch or a switch system with multiple switches.

[0128] Figure 1 An architectural diagram of a lossless network congestion control system provided by an embodiment of the present invention.

[0129] like Figure 1 As shown, an embodiment of the present invention provides a switch system, including multiple target switches;

[0130] The switch port of the target switch is deployed with a congestion control model, candidate explicit congestion notification marking parameters and a congestion control reward function; the target switch is used to collect congestion control samples to construct a training data set when executing the congestion control task of the switch port, and the congestion control model is iteratively trained using the training data set to obtain a trained congestion control model, and the lossless network congestion control task is performed based on the trained congestion control model;

[0131] Among them, the congestion control reward function is the weighted sum of the throughput parameter, the congestion parameter and the product term function; the product term function is a function of the product of the throughput parameter and the congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes the state parameters at the current moment, the explicit congestion notification marking parameters selected according to the state parameters at the current moment by the congestion control model, the state parameters at the next moment, and the environmental reward parameters calculated by substituting the state parameters at the next moment into the congestion control reward function; the types of state parameters include the throughput parameters of the switch port of the target switch and the congestion parameters of the switch port.

[0132] The target switch in the embodiment of the present invention is a switch that deploys the lossless network congestion control solution provided by the embodiment of the present invention, which can be all or part of the switches in a switch network, and each switch port of each switch can be used as an agent to perform single-agent deep reinforcement learning. The switch is used to forward the data packet of the sending node to the receiving node, and execute the congestion control algorithm during the forwarding process to mark the forwarded part of the data packet with an explicit congestion notification mark when the node where it is located is congested.

[0133] Based on the above architecture, the lossless network congestion control method provided by the embodiment of the present invention is described below with reference to the accompanying drawings.

[0134] Figure 2A flow chart of a lossless network congestion control method provided by an embodiment of the present invention.

[0135] like Figure 2 As shown, the lossless network congestion control method provided by the embodiment of the present invention includes:

[0136] S201: Obtain a congestion control model, candidate explicit congestion notification marking parameters, and a congestion control reward function.

[0137] S202: Collect congestion control samples of the target switch to construct a training data set.

[0138] S203: Iteratively train the congestion control model using the training data set to obtain a trained congestion control model.

[0139] S204: Execute a lossless network congestion control task of the target switch based on the trained congestion control model.

[0140] Among them, the congestion control reward function is the weighted sum of the throughput parameter, the congestion parameter and the product term function; the product term function is a function of the product of the throughput parameter and the congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes the state parameters at the current moment, the explicit congestion notification marking parameters selected according to the state parameters at the current moment by the congestion control model, the state parameters at the next moment, and the environmental reward parameters calculated by substituting the state parameters at the next moment into the congestion control reward function; the types of state parameters include the throughput parameters of the switch port of the target switch and the congestion parameters of the switch port.

[0141] As described in the above embodiment of the present invention, in order to solve the defects of the current congestion control scheme based on deep reinforcement learning, the embodiment of the present invention provides a lossless network congestion control scheme, which adopts the congestion control reward function in the form of formula (1), wherein the product term function can be adopted .

[0142] In some optional implementations of the embodiments of the present invention, the congestion control reward function can be expressed by the following formula:

[0143] ; (2)

[0144] in, r is the environmental reward parameter, T is the throughput parameter, is the weight of the throughput parameter, Q is the congestion parameter, is the weight of the congestion parameter, is the product term function, is the weight of the product term function.

[0145] In some other optional implementations of the embodiments of the present invention, the congestion control reward function can also be expressed by the following formula:

[0146] ; (3)

[0147] in, r is the environmental reward parameter, T is the throughput parameter, is the weight of the throughput parameter, Q is the congestion parameter, is the weight of the congestion parameter, is the product term function, is the weight of the product term function.

[0148] Based on the idea that the product term function is positively correlated with the product of the throughput parameter and the congestion parameter, in addition to equations (2) and (3), other product term function expressions can be set, which are not listed here one by one.

[0149] For the convenience of calculation, the throughput parameter and the congestion parameter are normalized. That is, in the embodiment of the present invention, the throughput parameter in the congestion control reward function can be set to the normalized switch port packet sending rate, and the congestion parameter in the congestion control reward function can be set to the normalized switch port congestion queue length.

[0150] Among them, the normalized switch port packet sending rate can be calculated by the following formula:

[0151] ; (4)

[0152] in, T is the normalized switch port packet sending rate, is the packet sending rate of the switch port, is the bandwidth of the switch port.

[0153] However, it takes time for the congestion queue length of the switch egress port of the target switch in the data center to change. t At this moment, the switch port uses DQN to implement the selection of explicit congestion notification marking parameters and Re-collect the switch status at all times and calculate t The switch output port makes a strategic decision at every moment, and the environment gives the switch a numerical reward. Always re-collect the switch status. T and Q Can be used The average value over time can also be used The instantaneous value of a moment. Moment TThe instantaneous value of can be expressed as:

[0154] ; (5)

[0155] in, T is the normalized switch port packet sending rate, is the unit observation time of the switch port packet sending rate, Indicates the packet sending rate of the switch port.

[0156] when Q =1, there is no congestion queue at the switch output port. T The instantaneous value of is too random to fluctuate and has no reference value. T The value can be used The normalized value of the average packet sending rate within the time period, the normalized switch port packet sending rate can be calculated by the following formula:

[0157] ; (6)

[0158] in, T is the normalized switch port packet sending rate, is the unit observation time of the switch port packet sending rate, is the switch port packet sending rate at the start time of the unit observation time, is the switch port packet sending rate at the end of the unit observation time, is the bandwidth of the switch port.

[0159] Because it takes time for the congestion queue length of the switch port of the target switch in the data center to change, Q When the data center network is severely congested, just set a reasonable observation time ,exist time Q The instantaneous value is more representative than the average value. t The significance of switch port strategy selection at all times.

[0160] In the embodiment of the present invention, the normalized switch port congestion queue length can be calculated by the following formula:

[0161] ;

[0162] in, is the normalized switch port congestion queue length, is the congestion queue length of the switch port, is the normalized function of the congestion queue length of the switch port, nThe actual order to which the congestion queue length of the switch port belongs. express The minimum m the index of the value, m is the normalized order of the congestion queue length of the switch port. M Step, The length of the congestion queue on the switch port m The cut-off value of the order, is a constant coefficient, In kilobits.

[0163] Among them, the constant coefficient can be adaptively changed according to the scene.

[0164] In addition, from equations (6) and (7), we know that T and Q The value range of should be within, and it is impossible for them to be 1 at the same time. Therefore, the congestion control reward function provided by the embodiment of the present invention is less than T and Q Therefore, the weight of the product term function can be set slightly larger. In some optional implementations of the embodiments of the present invention, in the congestion control reward function, the weight of the throughput parameter and the weight of the congestion parameter are both smaller than the weight of the product term function.

[0165] In addition, to adapt to different traffic scenarios, the weight of the throughput parameter can be set equal to the weight of the congestion parameter or one of them can be set larger. For example, for a small traffic scenario that is sensitive to latency, the weight of the congestion parameter can be set greater than the weight of the throughput parameter. For a large traffic scenario that is sensitive to throughput, the weight of the throughput parameter can be set greater than the weight of the congestion parameter. For unknown traffic scenarios or mixed traffic scenarios, the weight of the throughput parameter can be set equal to the weight of the congestion parameter.

[0166] According to different congestion control model training tasks, the initialization method of the congestion control model in S201 is selected. For example, for congestion control model training without prior knowledge, the method of randomly initializing model parameters can be used. For congestion control models that have been trained in an offline simulation environment, the pre-trained model parameters are loaded, and the model migration fine-tuning can be performed in the actual operating environment of the target switch.

[0167] Collecting the congestion control samples of the target switch to construct the training data set in S202 may include: building a switch simulation system according to the target switch system where the target switch is located, and collecting the offline training data set from the switch simulation system.

[0168] In other embodiments of the present invention, a congestion control model may be obtained by pre-training in a general switch simulation system.

[0169] Acquiring candidate explicit congestion notification marking parameters in S201 refers to setting candidate values ​​for three parameters: a low marking threshold Kmin, a high marking threshold Kmax, and a marking probability maximum value Pmax.

[0170] In combination with the congestion control reward function provided in the embodiment of the present invention, the DQN algorithm can be used to perform the training process of the congestion control model. The training steps may include: initializing the experience replay component and accumulating training samples; initializing the Q network parameters and copying them to the target neural network; using the Q network and the experience replay component to generate training data; randomly selecting a batch of training data from the stored data; using the Q network to calculate the Q values ​​corresponding to all actions in the current state, and selecting the Q values ​​corresponding to specific actions; using the target neural network to calculate the target Q value; calculating the mean square error loss and updating the weights of the Q network; if the iteration end condition is met, the trained congestion control model is obtained; if the iteration end condition is not met, returning to the step of generating training data using the Q network and the experience replay component.

[0171] The lossless network congestion control method provided by the embodiment of the present invention has the beneficial effect that when training a congestion control model for executing a lossless network congestion control task of a target switch, a congestion control reward function of a weighted sum of a throughput parameter, a congestion parameter and a product term function is used, so as to solve the problem that it is difficult to achieve tuning that takes into account both high throughput and low latency because the reward function used in the previous training of the congestion control model is only the weighted sum of the throughput parameter and the congestion parameter. The optimization direction of the congestion control model is controlled by adding a product term function that is positively correlated with the product of the throughput parameter and the congestion parameter, which is not only conducive to faster convergence of the model, but also can take into account the traffic requirements of the data center for high throughput and low latency. The congestion control model obtained by such training is used to execute the lossless network congestion control task of the target switch, and has stronger robustness and stability in a complex data center network environment.

[0172] Based on the above embodiment, the embodiment of the present invention further illustrates the steps of constructing a training data set.

[0173] In the embodiment of the present invention, collecting congestion control samples of the target switch to construct a training data set in S202 may include:

[0174] Taking a switch port of a target switch as an agent, collecting congestion control samples of all agents in the target switch system where the target switch is located, and obtaining a set of congestion control samples;

[0175] Multiple groups of congestion control samples are collected repeatedly to obtain a training data set.

[0176] In the embodiment of the present invention, since the target switch may have multiple switch ports, each switch port can be regarded as an intelligent agent, thereby collecting training samples.

[0177] In some other optional implementations of the embodiment of the present invention, collecting congestion control samples of the target switch to construct a training data set in S202 may also include:

[0178] Get the current time of the switch port Throughput parameters , current moment Congestion parameter and the current moment Explicit Congestion Notification Marking Parameters .

[0179] Among them, the current moment Throughput parameters is the result of normalized calculation based on the switch port packet sending rate at the current moment. Congestion parameter is the result of normalized calculation based on the congestion queue length of the switch port at the current moment. Explicit Congestion Notification Marking Parameters A random selection from the candidate explicit congestion notification marking parameters.

[0180] The candidate explicit congestion notification marking parameters are preset candidate values ​​of the three parameters: the low marking threshold Kmin, the high marking threshold Kmax, and the maximum marking probability Pmax, for example:

[0181] ; (8)

[0182] Among them, when selecting the explicit congestion notification marking parameter, Kmin≤Kmax is required as a constraint. All output switch ports of all switches randomly select the explicit congestion notification marking parameter, and configure the explicit congestion notification marking parameter according to the selected explicit congestion notification marking parameter, and store the configuration as .

[0183] Elapsed time After that, wait for the switch to respond and collect the next time Specifically, the switch port can be configured with the explicit congestion notification marking parameters at the current moment, and the switch port can be collected at the next moment. Throughput parameters , the next moment Congestion parameter and the next moment Explicit Congestion Notification Marking Parameters ; Among them, the next moment Throughput parameters is the result of normalized calculation based on the packet sending rate of the switch port at the next moment. Congestion parameter is the result of normalized calculation based on the congestion queue length of the switch port at the next moment. Explicit Congestion Notification Marking Parameters A random selection from the candidate explicit congestion notification marking parameters.

[0184] The next moment Throughput parameters and the next moment Congestion parameter Substituting the congestion control reward function, the environmental reward parameter is calculated according to equation (1).

[0185] Take a switch port of a target switch as an agent, use the above steps to collect congestion control samples of all agents in the target switch system where the target switch is located, and stack them into a set of congestion control samples. Assuming that there are M agents in total, and the vector of a congestion control sample collected in the above steps has N dimensions, then the set of congestion control samples obtained by stacking is M×N.

[0186] Repeatedly collect multiple groups of congestion control samples to obtain a training data set. Assuming that it is repeated K times in total, the final training data set is K×M×N.

[0187] After the training data set is collected, the congestion control model involved in the lossless network congestion control task can be trained. During the training process, the congestion control model can adopt a deep Q learning network. In S203, the congestion control model is iteratively trained using the training data set to obtain the trained congestion control model, which may include: iteratively training the congestion control model using a dual deep Q learning network training method to obtain the trained congestion control model. This is because in a standard deep Q learning network, when updating the Q value, the current network's own prediction is used to calculate the maximum future reward, which may cause the Q value to be overestimated because the network may be affected by the current estimation error when predicting future rewards. Therefore, in an embodiment of the present invention, a dual deep Q learning network is used to improve the stability and performance of the learning process and reduce the deviation of the Q value estimation, so as to achieve better results in many complex reinforcement learning tasks.

[0188] In some optional implementations of the embodiments of the present invention, the congestion control model is iteratively trained using a dual deep Q learning network training method to obtain a trained congestion control model, which may include:

[0189] Initialize the policy neural network and the target neural network.

[0190] Randomly sample batches of training data from the training dataset to train the neural network.

[0191] Use the following formula to select actions and values ​​through the policy neural network to calculate the optimal value under the input features at the current moment: :

[0192] ; (9)

[0193] in, For the current moment t The input features of For the current moment t The optimal action under the input features, is a policy neural network.

[0194] The following formula is used to select the optimal action under the input features at the next moment through the target neural network, and the optimal value under the input features at the next moment is calculated through the policy neural network: :

[0195] ; (10)

[0196] in, is the sampling time interval, For the next moment The input features of For the next moment The optimal action under the input features, represents the index of the action when the policy neural network outputs the maximum value, is the target neural network.

[0197] The average loss value of the current batch training data is calculated by the following formula :

[0198] ; (11)

[0199] in, is the environmental reward parameter, is the discount factor, is the root mean square error function. Discount coefficient It can be adjusted according to the topology and traffic scenarios.

[0200] The average loss Backpropagation is performed and an adaptive moment estimation optimizer is used to update the weights of the policy neural network.

[0201] Use the following formula to update the target neural network once every S updates of the policy neural network:

[0202] ; (12)

[0203] in, is the average coefficient. Average coefficient It can be adjusted according to the topology and traffic scenarios.

[0204] If the iteration end condition is met, the policy neural network is used as the trained congestion control model; if the iteration end condition is not met, batch training data is obtained by random sampling from the training data set to train the neural network.

[0205] After the network weight parameters converge, only the policy neural network is needed for actual machine deployment. The corresponding policy selection is:

[0206] . (13)

[0207] Based on the above embodiments, the embodiments of the present invention further illustrate lossless network congestion control methods in different scenarios.

[0208] In some optional implementations of the embodiments of the present invention, collecting congestion control samples of the target switch to construct a training data set in S202 may include:

[0209] Deploy the congestion control model on the target switch;

[0210] When executing the congestion control task of the switch port using the congestion control model, collecting congestion control samples from the target switch;

[0211] The congestion control model is iteratively trained using the training data set to obtain a trained congestion control model, including:

[0212] The congestion control model is iteratively trained using the congestion control samples collected from the target switch. If the iteration end condition is met, the trained congestion control model is obtained; if the iteration end condition is not met, the congestion control sample is collected from the target switch when the congestion control task of the switch port is executed using the congestion control model.

[0213] That is to say, the congestion control model can be directly initialized on the target switch for iterative training.

[0214] However, due to the high cost of online training, in some other optional implementations of the embodiments of the present invention, the congestion control model may be a congestion control model pre-trained in the switch simulation system;

[0215] Then, collecting congestion control samples of the target switch to construct a training data set in S202 may include:

[0216] Deploy the pre-trained congestion control model on the target switch;

[0217] When executing the congestion control task of the switch port using the pre-trained congestion control model, collecting congestion control samples from the target switch;

[0218] The congestion control model is iteratively trained using the training data set to obtain a trained congestion control model, including:

[0219] The congestion control samples collected from the target switch are used to fine-tune the model parameters of the pre-trained congestion control model. If the iteration end condition is met, the trained congestion control model is obtained; if the iteration end condition is not met, the congestion control samples collected from the target switch are returned when the pre-trained congestion control model is used to perform the congestion control task of the switch port.

[0220] That is, a pre-trained congestion control model can be obtained by offline training in a switch simulation environment, and then deployed to the target switch for online model parameter fine-tuning, so as to quickly obtain a congestion control solution that adapts to the environment of the target switch while reducing the training cost.

[0221] S201 to S203 provided in the embodiment of the present invention can be applied to both the offline training process of the congestion control model and the online model fine-tuning process of the congestion control model.

[0222] In some other optional implementations of the embodiments of the present invention, the deployment method of the congestion control solution can also be selected according to the actual situation of the switch network. In S204, the lossless network congestion control task of the target switch is executed based on the trained congestion control model, which may include:

[0223] If the target switch network where the target switch is located satisfies the stability condition for both the network topology structure and the traffic pattern scenario, then an explicit congestion notification marking parameter is selected based on the congestion control model trained on the switch port of the target switch to perform a lossless network congestion control task;

[0224] If at least one of the network topology of the target switch network and the traffic pattern scenario of the target switch network does not meet the stability condition, an explicit congestion notification marking parameter is selected based on the trained congestion control model of the switch port of the target switch and the own state information of the upstream switch of the target switch to perform the lossless network congestion control task.

[0225] In practical applications, the stability conditions of the network topology and the traffic pattern scenarios can be quantified by setting the corresponding parameter types and rate thresholds. For target switch networks with relatively stable network topology and traffic pattern scenarios, explicit congestion notification marking parameters can be selected based only on the trained congestion control model to perform lossless network congestion control tasks. Since the target switch network environment is relatively stable, it is often not necessary to frequently update the model parameters of the congestion control model. For target switch networks with less stable network topology and traffic pattern scenarios, in order to avoid frequent updates of the model parameters of the congestion control model, the output port of the upstream switch can be set to transmit its own state information to the output port of the downstream switch. The output port of the downstream switch exchanges information based on the upstream switch's own state information, and updates the downstream switch's own state based on the interaction aggregation results. Finally, the trained DQN is used to implement strategy decisions based on the downstream switch's own state value.

[0226] It should be noted that in the embodiments of the lossless network congestion control method of the present invention, some of the steps or features can be ignored or not executed. The hardware or software functional modules divided for the convenience of description are not the only implementation form of the lossless network congestion control method provided by the embodiment of the present invention.

[0227] The above describes in detail various embodiments corresponding to the lossless network congestion control method. On this basis, the present invention also discloses a lossless network congestion control device, equipment, non-volatile storage medium and computer program product corresponding to the above method.

[0228] Figure 3 A schematic diagram of the structure of a lossless network congestion control device provided by an embodiment of the present invention.

[0229] like Figure 3 As shown, the lossless network congestion control device provided by the embodiment of the present invention includes:

[0230] An acquisition unit 301 is used to acquire a congestion control model, candidate explicit congestion notification marking parameters and a congestion control reward function;

[0231] A sampling unit 302, used for collecting congestion control samples of a target switch to construct a training data set;

[0232] A model updating unit 303, configured to iteratively train the congestion control model using the training data set to obtain a trained congestion control model;

[0233] A control unit 304, configured to execute a lossless network congestion control task of a target switch based on the trained congestion control model;

[0234] Among them, the congestion control reward function is the weighted sum of the throughput parameter, the congestion parameter and the product term function; the product term function is a function of the product of the throughput parameter and the congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes the state parameters at the current moment, the explicit congestion notification marking parameters selected according to the state parameters at the current moment by the congestion control model, the state parameters at the next moment, and the environmental reward parameters calculated by substituting the state parameters at the next moment into the congestion control reward function; the types of state parameters include the throughput parameters of the switch port of the target switch and the congestion parameters of the switch port.

[0235] In some optional implementations of the embodiments of the present invention, the congestion control reward function can be expressed by the following formula:

[0236] ;

[0237] in, r is the environmental reward parameter, T is the throughput parameter, is the weight of the throughput parameter, Q is the congestion parameter, is the weight of the congestion parameter, is the product term function, is the weight of the product term function.

[0238] The product term function can be expressed as follows:

[0239] ;

[0240] in, h >0.

[0241] In some optional implementations of the embodiments of the present invention, the throughput parameter in the congestion control reward function is the normalized switch port packet sending rate, and the congestion parameter in the congestion control reward function is the normalized switch port congestion queue length.

[0242] In some optional implementations of the embodiments of the present invention, the normalized switch port packet sending rate is calculated by the following formula:

[0243] ;

[0244] in,T is the normalized switch port packet sending rate, is the packet sending rate of the switch port, is the bandwidth of the switch port.

[0245] In some other optional implementations of the embodiments of the present invention, the normalized switch port packet sending rate is calculated by the following formula:

[0246] ;

[0247] in, T is the normalized switch port packet sending rate, is the unit observation time of the switch port packet sending rate, is the switch port packet sending rate at the start time of the unit observation time, is the switch port packet sending rate at the end of the unit observation time, is the bandwidth of the switch port.

[0248] In some optional implementations of the embodiments of the present invention, the normalized switch port congestion queue length is calculated by the following formula:

[0249] ;

[0250] in, is the normalized switch port congestion queue length, is the congestion queue length of the switch port, is the normalized function of the congestion queue length of the switch port, n is the actual order of the congestion queue length of the switch port, express The minimum m the index of the value, m is the normalized order of the congestion queue length of the switch port. M Step, The length of the congestion queue on the switch port m The cut-off value of the order, is a constant coefficient, In kilobits.

[0251] In some optional implementations of the embodiments of the present invention, in the congestion control reward function, the weight of the throughput parameter and the weight of the congestion parameter are both smaller than the weight of the product term function.

[0252] In some optional implementations of the embodiments of the present invention, the sampling unit 302 collects congestion control samples of the target switch to construct a training data set, which may include:

[0253] Taking a switch port of a target switch as an agent, collecting congestion control samples of all agents in the target switch system where the target switch is located, and obtaining a set of congestion control samples;

[0254] Multiple groups of congestion control samples are collected repeatedly to obtain a training data set.

[0255] In some optional implementations of the embodiments of the present invention, the sampling unit 302 collects congestion control samples of the target switch to construct a training data set, which may also include:

[0256] Obtain the throughput parameter, congestion parameter and explicit congestion notification marking parameter of the switch port at the current moment; wherein the throughput parameter at the current moment is the result of normalized calculation based on the switch port packet sending rate at the current moment, the congestion parameter at the current moment is the result of normalized calculation based on the switch port congestion queue length at the current moment, and the explicit congestion notification marking parameter at the current moment is the result randomly selected from the candidate explicit congestion notification marking parameters;

[0257] After configuring the switch port with the explicit congestion notification marking parameter at the current moment, the throughput parameter, the congestion parameter at the next moment, and the explicit congestion notification marking parameter at the next moment of the switch port are collected; wherein the throughput parameter at the next moment is the result of normalized calculation based on the switch port packet sending rate at the next moment of the switch port, the congestion parameter at the next moment is the result of normalized calculation based on the switch port congestion queue length at the next moment of the switch port, and the explicit congestion notification marking parameter at the next moment is the result randomly selected from the candidate explicit congestion notification marking parameters;

[0258] Substitute the throughput parameter at the next moment and the congestion parameter at the next moment into the congestion control reward function to calculate the environmental reward parameter;

[0259] Taking a switch port of a target switch as an agent, the above steps are used to collect congestion control samples of all agents in the target switch system where the target switch is located, and stacking them into a group of congestion control samples;

[0260] Multiple groups of congestion control samples are collected repeatedly to obtain a training data set.

[0261] In some optional implementations of the embodiments of the present invention, the congestion control model is a deep Q learning network;

[0262] The model updating unit 303 iteratively trains the congestion control model using the training data set to obtain the trained congestion control model, which may include:

[0263] The congestion control model is iteratively trained using a dual deep Q learning network training method to obtain a trained congestion control model.

[0264] In some other optional implementations of the embodiments of the present invention, the model updating unit 303 uses a dual deep Q learning network training method to iteratively train the congestion control model to obtain a trained congestion control model, which may include:

[0265] Initialize the policy neural network and the target neural network;

[0266] Randomly sample batches of training data from the training data set to train the neural network;

[0267] Use the following formula to select actions and values ​​through the policy neural network to calculate the optimal value under the input features at the current moment: :

[0268] ;

[0269] in, For the current moment t The input features of For the current moment t The optimal action under the input features, is the policy neural network;

[0270] The following formula is used to select the optimal action under the input features at the next moment through the target neural network, and the optimal value under the input features at the next moment is calculated through the policy neural network: :

[0271] ;

[0272] in, is the sampling time interval, For the next moment The input features of For the next moment The optimal action under the input features, represents the index of the action when the policy neural network outputs the maximum value, is the target neural network;

[0273] The average loss value of the current batch training data is calculated by the following formula :

[0274] ;

[0275] in, is the environmental reward parameter, is the discount factor, is the root mean square error function;

[0276] The average loss Backpropagation is performed and the weights of the strategy neural network are updated using an adaptive moment estimation optimizer;

[0277] Use the following formula to update the target neural network once every S updates of the policy neural network:

[0278] ;

[0279] in, is the average coefficient;

[0280] If the iteration end condition is met, the policy neural network is used as the trained congestion control model; if the iteration end condition is not met, batch training data is obtained by random sampling from the training data set to train the neural network.

[0281] In some optional implementations of the embodiments of the present invention, the sampling unit 302 collects congestion control samples of the target switch to construct a training data set, which may include:

[0282] A switch simulation system is built according to the target switch system where the target switch is located, and an offline training data set is collected from the switch simulation system.

[0283] In some other optional implementations of the embodiment of the present invention, the sampling unit 302 collects congestion control samples of the target switch to construct a training data set, which may include:

[0284] Deploy the congestion control model on the target switch;

[0285] When executing the congestion control task of the switch port using the congestion control model, collecting congestion control samples from the target switch;

[0286] The model updating unit 303 iteratively trains the congestion control model using the training data set to obtain the trained congestion control model, which may include:

[0287] The congestion control model is iteratively trained using the congestion control samples collected from the target switch. If the iteration end condition is met, the trained congestion control model is obtained; if the iteration end condition is not met, the congestion control sample is collected from the target switch when the congestion control task of the switch port is executed using the congestion control model.

[0288] In some further optional implementations of the embodiments of the present invention, the congestion control model is a congestion control model pre-trained in a switch simulation system;

[0289] The sampling unit 302 collects congestion control samples of the target switch to construct a training data set, including:

[0290] Deploy the pre-trained congestion control model on the target switch;

[0291] When executing the congestion control task of the switch port using the pre-trained congestion control model, collecting congestion control samples from the target switch;

[0292] The model updating unit 303 iteratively trains the congestion control model using the training data set to obtain a trained congestion control model, including:

[0293] The congestion control samples collected from the target switch are used to fine-tune the model parameters of the pre-trained congestion control model. If the iteration end condition is met, the trained congestion control model is obtained; if the iteration end condition is not met, the congestion control samples collected from the target switch are returned when the pre-trained congestion control model is used to perform the congestion control task of the switch port.

[0294] In some optional implementations of the embodiments of the present invention, the control unit 304 performs a lossless network congestion control task of the target switch based on the trained congestion control model, including:

[0295] If the target switch network where the target switch is located satisfies the stability condition for both the network topology structure and the traffic pattern scenario, then an explicit congestion notification marking parameter is selected based on the congestion control model trained on the switch port of the target switch to perform a lossless network congestion control task;

[0296] If at least one of the network topology of the target switch network and the traffic pattern scenario of the target switch network does not meet the stability condition, an explicit congestion notification marking parameter is selected based on the trained congestion control model of the switch port of the target switch and the own state information of the upstream switch of the target switch to perform the lossless network congestion control task.

[0297] It should be noted that in each implementation of the lossless network congestion control device provided by the embodiment of the present invention, the division of units is only a logical functional division, and other division methods can be used. The connection method between different units can be electrical, mechanical or other connection methods. Separated units can be located in the same physical location or distributed on multiple network nodes. Each unit can be implemented in the form of hardware or in the form of a software functional unit. That is, part or all of the units provided in the embodiment of the present invention can be selected according to actual needs and the corresponding connection method or integration method can be adopted to achieve the purpose of the embodiment of the present invention.

[0298] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0299] Figure 4 A schematic diagram of the structure of a lossless network congestion control device provided by an embodiment of the present invention.

[0300] like Figure 4 As shown, the lossless network congestion control device provided by the embodiment of the present invention includes:

[0301] A memory 410 for storing a computer program 411;

[0302] The processor 420 is used to execute the computer program 411. When the computer program 411 is executed by the processor 420, the steps of the lossless network congestion control method provided in any one of the above embodiments are implemented.

[0303] Among them, the processor 420 may include one or more processing cores, such as a 3-core processor, an 8-core processor, etc. The processor 420 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 420 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 420 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 420 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0304] The memory 410 may include one or more non-volatile storage media, which may be non-transitory. The memory 410 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 410 is at least used to store the following computer program 411, wherein the computer program 411, after being loaded and executed by the processor 420, can implement the relevant steps in the lossless network congestion control method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 410 may also include an operating system 412 and data 413, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 412 may be Windows or other types of operating systems. Data 413 may include, but is not limited to, the data involved in the above method.

[0305] In some embodiments, the lossless network congestion control device may further include a display screen 430 , a power supply 440 , a communication interface 450 , an input and output interface 460 , a sensor 470 , and a communication bus 480 .

[0306] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation to the lossless network congestion control device, and may include more or less components than those shown in the figure.

[0307] The lossless network congestion control device provided by the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the steps of the lossless network congestion control method provided by the above embodiment, and the effect is the same as above.

[0308] An embodiment of the present invention provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the lossless network congestion control method provided in any one of the above embodiments can be implemented.

[0309] The non-volatile storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0310] For the introduction of the non-volatile storage medium provided in the embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the lossless network congestion control method provided in the embodiment of the present invention, and the present invention will not elaborate on it here.

[0311] An embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the lossless network congestion control method provided in any one of the above embodiments.

[0312] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the lossless network congestion control method provided by the embodiment of the present invention, and the present invention will not elaborate on it here.

[0313] The above is a detailed introduction to the lossless network congestion control method, device, equipment, medium and switch system provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the devices, equipment, non-volatile storage media and computer program products disclosed in the embodiments, since they correspond to the methods and systems disclosed in the embodiments, the description is relatively simple, and the relevant parts can refer to the description of the methods and systems. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0314] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A lossless network congestion control method, characterized in that: include: Obtain a congestion control model, candidate explicit congestion notification marking parameters, and a congestion control reward function; Collect congestion control samples of the target switch to construct a training dataset; Iteratively training the congestion control model using the training data set to obtain the trained congestion control model; Execute a lossless network congestion control task of the target switch based on the trained congestion control model; The congestion control reward function is a weighted sum of a throughput parameter, a congestion parameter and a product term function; the product term function is a function of the product of a throughput parameter and a congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes a state parameter at a current moment, an explicit congestion notification marking parameter selected according to the state parameter at the current moment by using the congestion control model, a state parameter at a next moment, and an environmental reward parameter calculated by substituting the state parameter at the next moment into the congestion control reward function; the types of state parameters include a throughput parameter of a switch port of the target switch and a congestion parameter of the switch port; The throughput parameter in the congestion control reward function is the normalized switch port packet sending rate, and the congestion parameter in the congestion control reward function is the normalized switch port congestion queue length.

2. The lossless network congestion control method according to claim 1, characterized in that: The congestion control reward function is expressed as follows: ; in, r is the environmental reward parameter, T is the throughput parameter, is the weight of the throughput parameter, Q is the congestion parameter, is the weight of the congestion parameter, is the product term function, is the weight of the product term function.

3. The lossless network congestion control method according to claim 2, characterized in that: The product term function is expressed by the following formula: ; in, h >0.

4. The lossless network congestion control method according to claim 1, characterized in that: The normalized switch port packet sending rate is calculated by the following formula: ; in, T is the normalized switch port packet sending rate, is the packet sending rate of the switch port, is the bandwidth of the switch port.

5. The lossless network congestion control method according to claim 1, characterized in that: The normalized switch port packet sending rate is calculated by the following formula: ; in, T is the normalized switch port packet sending rate, is the unit observation time of the packet sending rate of the switch port, is the switch port packet sending rate at the start time of the unit observation time, is the switch port packet sending rate at the end of the unit observation time, is the bandwidth of the switch port.

6. The lossless network congestion control method according to claim 1, characterized in that: The normalized switch port congestion queue length is calculated by the following formula: ; in, is the normalized switch port congestion queue length, is the congestion queue length of the switch port, is the normalized function of the congestion queue length of the switch port, n is the actual order of the congestion queue length of the switch port, express The minimum m the index of the value, m is the normalized order of the congestion queue length of the switch port, and the normalized order is M Step, The length of the congestion queue on the switch port m The cut-off value of the order, is a constant coefficient, In kilobits.

7. The lossless network congestion control method according to claim 1, characterized in that: In the congestion control reward function, the weight of the throughput parameter and the weight of the congestion parameter are both smaller than the weight of the product term function.

8. The lossless network congestion control method according to claim 1, characterized in that: The collecting of congestion control samples of the target switch to construct a training data set includes: Taking one switch port of the target switch as an intelligent agent, collecting the congestion control samples of all the intelligent agents in the target switch system where the target switch is located, and obtaining a group of congestion control samples; Multiple groups of the congestion control samples are repeatedly collected to obtain the training data set.

9. The lossless network congestion control method according to claim 1, characterized in that: The collecting of congestion control samples of the target switch to construct a training data set includes: Obtaining the throughput parameter, congestion parameter and explicit congestion notification marking parameter of the switch port at the current moment; wherein the throughput parameter at the current moment is a result of normalized calculation based on the switch port packet sending rate of the switch port at the current moment, the congestion parameter at the current moment is a result of normalized calculation based on the switch port congestion queue length of the switch port at the current moment, and the explicit congestion notification marking parameter at the current moment is a result randomly selected from the candidate explicit congestion notification marking parameters; After configuring the switch port with the explicit congestion notification marking parameter at the current moment, collecting the throughput parameter, congestion parameter and explicit congestion notification marking parameter of the switch port at the next moment; wherein the throughput parameter at the next moment is the result of normalized calculation based on the switch port packet sending rate at the next moment of the switch port, the congestion parameter at the next moment is the result of normalized calculation based on the switch port congestion queue length at the next moment of the switch port, and the explicit congestion notification marking parameter at the next moment is the result randomly selected from the candidate explicit congestion notification marking parameters; Substituting the throughput parameter at the next moment and the congestion parameter at the next moment into the congestion control reward function, and calculating the environment reward parameter; Taking one switch port of the target switch as an intelligent agent, using the above steps to collect the congestion control samples of all the intelligent agents in the target switch system where the target switch is located, and stacking them into a group of congestion control samples; Multiple groups of the congestion control samples are repeatedly collected to obtain the training data set.

10. The lossless network congestion control method according to claim 1, characterized in that: The congestion control model is a deep Q learning network; Iteratively training the congestion control model using the training data set to obtain the trained congestion control model includes: The congestion control model is iteratively trained using a dual deep Q learning network training method to obtain the trained congestion control model.

11. The lossless network congestion control method according to claim 10, characterized in that: The congestion control model is iteratively trained by using a dual deep Q learning network training method to obtain the trained congestion control model, including: Initialize the policy neural network and the target neural network; Randomly sampling from the training data set to obtain batch training data to train the neural network; The following formula is used to select actions and values ​​through the strategy neural network to calculate the optimal value under the input features at the current moment: : ; in, For the current moment t The input features of For the current moment t The optimal action under the input features, is the strategy neural network; The following formula is used to select the optimal action under the input feature at the next moment through the target neural network, and the optimal value under the input feature at the next moment is calculated through the strategy neural network: : ; in, is the sampling time interval, For the next moment The input features of For the next moment The optimal action under the input features, represents the index of the action when the policy neural network outputs the maximum value, is the target neural network; The average loss value of the current batch training data is calculated by the following formula : ; in, is the environmental reward parameter, is the discount factor, is the root mean square error function; The average loss value Backpropagating and updating the weights of the strategy neural network using an adaptive moment estimation optimizer; The following formula is used to update the target neural network once every S updates of the strategy neural network: ; in, is the average coefficient; If the iteration end condition is met, the strategy neural network is used as the trained congestion control model; if the iteration end condition is not met, batch training data is obtained by random sampling from the training data set to train the neural network.

12. The lossless network congestion control method according to claim 1, characterized in that: The collecting of congestion control samples of the target switch to construct a training data set includes: A switch simulation system is built according to the target switch system where the target switch is located, and an offline training data set is collected from the switch simulation system.

13. The lossless network congestion control method according to claim 1, characterized in that: The collecting of congestion control samples of the target switch to construct a training data set includes: Deploying the congestion control model on the target switch; When executing the congestion control task of the switch port by using the congestion control model, collecting the congestion control sample from the target switch; Iteratively training the congestion control model using the training data set to obtain the trained congestion control model includes: The congestion control model is iteratively trained using the congestion control samples collected from the target switch. If an iteration end condition is met, the trained congestion control model is obtained. If the iteration end condition is not met, the congestion control sample is collected from the target switch when the congestion control task of the switch port is executed using the congestion control model.

14. The lossless network congestion control method according to claim 1, characterized in that: The congestion control model is a congestion control model pre-trained in a switch simulation system; The collecting of congestion control samples of the target switch to construct a training data set includes: Deploying the pre-trained congestion control model on the target switch; When executing the congestion control task of the switch port using the pre-trained congestion control model, collecting the congestion control sample from the target switch; Iteratively training the congestion control model using the training data set to obtain the trained congestion control model includes: The congestion control samples collected from the target switch are used to fine-tune model parameters of the pre-trained congestion control model. If the iteration end condition is met, the trained congestion control model is obtained; if the iteration end condition is not met, the congestion control samples are collected from the target switch when the congestion control task of the switch port is performed using the pre-trained congestion control model.

15. The lossless network congestion control method according to claim 1, characterized in that: The performing the lossless network congestion control task of the target switch based on the trained congestion control model includes: If the target switch network where the target switch is located satisfies the stability condition for both the network topology structure and the traffic pattern scenario, then selecting an explicit congestion notification marking parameter based on the congestion control model trained on the switch port of the target switch to perform the lossless network congestion control task; If at least one of the network topology of the target switch network and the traffic pattern scenario of the target switch network does not meet the stability condition, an explicit congestion notification marking parameter is selected based on the congestion control model trained on the switch port of the target switch and the self-state information of the upstream switch of the target switch to perform the lossless network congestion control task.

16. A switch system, characterized in that: Includes multiple target switches; The switch port of the target switch is deployed with a congestion control model, a candidate explicit congestion notification marking parameter and a congestion control reward function; the target switch is used to collect the congestion control samples to construct a training data set when executing the congestion control task of the switch port, iteratively train the congestion control model using the training data set to obtain the trained congestion control model, and execute the lossless network congestion control task based on the trained congestion control model; The congestion control reward function is a weighted sum of a throughput parameter, a congestion parameter and a product term function; the product term function is a function of the product of a throughput parameter and a congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes a state parameter at a current moment, an explicit congestion notification marking parameter selected according to the state parameter at the current moment by using the congestion control model, a state parameter at a next moment, and an environmental reward parameter calculated by substituting the state parameter at the next moment into the congestion control reward function; the types of state parameters include a throughput parameter of a switch port of the target switch and a congestion parameter of the switch port; The throughput parameter in the congestion control reward function is the normalized switch port packet sending rate, and the congestion parameter in the congestion control reward function is the normalized switch port congestion queue length.

17. A lossless network congestion control device, characterized in that: include: An acquisition unit, used for acquiring a congestion control model, candidate explicit congestion notification marking parameters and a congestion control reward function; A sampling unit, used for collecting congestion control samples of a target switch to construct a training data set; A model updating unit, configured to iteratively train the congestion control model using the training data set to obtain the trained congestion control model; A control unit, configured to execute a lossless network congestion control task of the target switch based on the trained congestion control model; The congestion control reward function is a weighted sum of a throughput parameter, a congestion parameter and a product term function; the product term function is a function of the product of a throughput parameter and a congestion parameter, and the product term function is positively correlated with the product of the throughput parameter and the congestion parameter; the congestion control sample includes a state parameter at a current moment, an explicit congestion notification marking parameter selected according to the state parameter at the current moment by using the congestion control model, a state parameter at a next moment, and an environmental reward parameter calculated by substituting the state parameter at the next moment into the congestion control reward function; the types of state parameters include a throughput parameter of a switch port of the target switch and a congestion parameter of the switch port; The throughput parameter in the congestion control reward function is the normalized switch port packet sending rate, and the congestion parameter in the congestion control reward function is the normalized switch port congestion queue length.

18. A lossless network congestion control device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the lossless network congestion control method as claimed in any one of claims 1 to 15 are implemented.

19. A non-volatile storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the lossless network congestion control method according to any one of claims 1 to 15 are implemented.

20. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the lossless network congestion control method as claimed in any one of claims 1 to 15 are implemented.