Data forwarding equipment adjusting method and system and related equipment
By obtaining traffic injection information and using neural network models to automatically configure ECN parameters, the problem of ECN parameters in the existing technology is solved, effectively alleviating network congestion and improving transmission service quality.
Patent Information
- Application Number
- CN202310686865.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, manually set ECN parameters are not adaptable enough to alleviate network congestion, resulting in the network being in a congested state for a long time, affecting the quality of transmission services.
By obtaining traffic injection information, using neural network models to automatically predict and configure ECN parameters, dynamically adjust the outgoing port parameters of the data forwarding device to adapt to network traffic characteristics, alleviate congestion and improve service quality.
Effectively alleviate network congestion, improve transmission service quality, avoid human interference and multi-model error amplification, and improve the accuracy of ECN parameters and the overall performance of the network.
Smart Images

Figure CN119109876A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data forwarding device adjustment method, system and related equipment. Background Art
[0002] In a computer cluster, computing resources can be divided into multiple nodes according to the granularity of physical servers. Data can be exchanged between different nodes through data forwarding devices in the network (such as switches, routers, etc.).
[0003] Typically, multiple nodes may exchange data through the same one or more data forwarding devices, which may cause the data forwarding device to receive too many data packets in a period of time, resulting in network congestion. At this time, the data forwarding device usually marks the forwarded data packets based on the manually set explicit congestion notification (ECN) parameters, so that different nodes can adjust the rate of sending data packets to the data forwarding device according to the ECN marking information during data communication, thereby alleviating network congestion problems.
[0004] However, in actual application scenarios, the manually set ECN parameters may not be applicable to the network. This makes it easy for the network to be in a congested state for a long time after the data forwarding device forwards data packets between different nodes based on the manually set ECN parameters, resulting in low network transmission service quality.
[0005] Therefore, there is an urgent need for a method to alleviate network congestion problems and improve the quality of network transmission services. Summary of the invention
[0006] The present application provides a data forwarding device adjustment method to alleviate network congestion problems and improve network transmission service quality. In addition, the present application also provides a data forwarding device, a data forwarding system, a chip, a computer-readable storage medium, and a computer program product.
[0007] In a first aspect, the present application provides a data forwarding device adjustment method, comprising: a first data forwarding device obtains first traffic injection information, the first traffic injection information is used to indicate attribute information of a first data packet cached by at least one ingress queue in the first data forwarding device, the attribute information may be, for example, an identifier of an ingress queue that caches the first data packet, an identifier of an egress queue used when forwarding data in the first data packet, information such as the first data packet; then, the first data forwarding device performs a prediction based on the first traffic injection information to obtain a first ECN parameter, the first ECN parameter may include, for example, a first length threshold, a second length threshold, and a probability threshold, so that the first data forwarding device sets the ECN parameter of a first egress port corresponding to a first egress queue in the first data forwarding device to the first ECN parameter.
[0008] Since the traffic injection information can reflect the traffic characteristics of the network where the data forwarding device is located, the first ECN parameter automatically generated and configured according to the traffic injection information can be adapted to the network. Therefore, after the first data forwarding device sets the first ECN parameter as the ECN parameter of the first output port, the first data forwarding device can subsequently control the speed at which the sender sends data packets to the first data forwarding device according to the first ECN parameter, thereby effectively alleviating the congestion problem in the network and improving the quality of network transmission services.
[0009] In a possible implementation, the first data forwarding device may also forward the second data packet in the first egress queue through the first egress port according to the first ECN parameter, wherein the second data packet is obtained by encapsulating the first data packet, such as modifying the address information in the packet header of the first data packet to the address information of the next-hop data forwarding device, etc. In this way, the first data forwarding device forwards the data packet according to the appropriate first ECN parameter, which can timely alleviate the congestion problem in the network and improve the quality of network transmission service when the network is congested.
[0010] In a possible implementation, when the first data forwarding device predicts and obtains the first ECN parameter, it may specifically use the first neural network model corresponding to the first data forwarding device to infer according to the first traffic injection information to obtain the first ECN parameter. In this way, using the neural network model to infer the ECN parameter can improve the efficiency of setting ECN for the first data forwarding device and get rid of the interference of human factors. Moreover, the first data processing device uses a neural network model to infer according to the traffic injection information to obtain the first ECN parameter, which can effectively avoid the problem of error amplification existing in multiple models compared to gradually inferring the ECN parameter through multiple models, so that the quality of network transmission service can be maintained at a high level.
[0011] In a possible implementation, a first data forwarding device is located at a first level in a network, and the network also includes a second data forwarding device located at a second level, such as a network structure of the network may be a leaf-spine structure or a dragonfly structure, etc. The second data forwarding device is used to forward data packets sent by the first data forwarding device, and the second data forwarding device is configured with a second neural network model, and the second neural network model is used to infer a second ECN parameter of a second output port for the second data forwarding device, wherein the second neural network model may be the same as or different from the first neural network model, and the second data forwarding device forwards data packets through the second output port according to the second ECN parameter. In this way, by configuring a neural network model for each data forwarding device in a multi-layer network, all data forwarding devices in the network can forward data packets based on a suitable ECN, thereby achieving a high level of data transmission service quality of the network and avoiding or alleviating congestion problems in the network.
[0012] In a possible implementation, the first neural network model and the second neural network model have different model parameters, or the first neural network model and the second neural network model have different network structures. In this way, by configuring different neural network models for data forwarding devices at different levels, it is helpful to improve the accuracy of setting ECN parameters for data forwarding devices at each level, thereby helping to improve the data transmission service quality of the network and alleviate network congestion problems.
[0013] In a possible implementation, the first neural network model and the second neural network model are jointly trained by simulation based on a reinforcement learning algorithm, and the reinforcement learning algorithm may be, for example, an Actor-Critic algorithm, wherein the first data forwarding device forwards data packets based on the ECN parameters of the first output port inferred by the first neural network model, and the second data forwarding device forwards data packets sent by the first data forwarding device based on the ECN parameters of the second output port inferred by the second neural network model. In this way, by jointly training the neural network models in data forwarding devices at different levels, the neural network models in data forwarding devices at different levels can be interrelated and influence each other, so that the neural network models in data forwarding devices at different levels can output ECN parameters that are more suitable for the network, thereby further improving the data transmission service quality of the network and alleviating network congestion problems.
[0014] In a possible implementation, the first data forwarding device also obtains configuration information of the ingress port to which at least one ingress queue belongs, and the configuration information may be, for example, information such as the bandwidth of the ingress port, packet forwarding delay, etc. Then, when the first data forwarding device uses the first neural network for reasoning, it may specifically be based on the first traffic injection information and the configuration information, and use the first neural network corresponding to the first data forwarding device for reasoning to obtain the first ECN parameter. In this way, the first data forwarding device performs reasoning based on information of multiple dimensions and outputs the first ECN parameter, which can make the first ECN parameter more adaptable to the network where the first data forwarding device is located, that is, it can improve the accuracy of the first ECN parameter, which is conducive to using the first ECN parameter to further improve the transmission service quality of the network.
[0015] In a possible implementation, the first traffic injection information is used to indicate the attribute information of the first data packet cached by at least one ingress queue in the first time period, then the first data forwarding device may also obtain the second traffic injection information, the second traffic injection information is used to indicate the attribute information of the third data packet cached by the at least one ingress queue in the second time period, wherein the egress queue corresponding to the third data packet is the first egress queue; then, when the first data forwarding device infers the first ECN parameter, it may specifically be inferring using the first neural network corresponding to the first data forwarding device based on the first traffic injection information and the second traffic injection information. In this way, the first data forwarding device determines the first ECN parameter based on the traffic injection information in multiple time periods, which can avoid the accidental characteristics of the traffic injection information in a single time period as much as possible, which may affect the accuracy of the first ECN parameter finally determined.
[0016] In a possible implementation, when forwarding a data packet, the first data forwarding device may specifically first verify whether the first ECN parameter inferred by the first neural network model exceeds the parameter range; when the first ECN parameter exceeds the parameter range, the first data forwarding device adjusts the first ECN parameter according to the parameter range to obtain a third ECN parameter, and forwards the second data packet in the first egress queue through the first egress port according to the third ECN parameter. In this way, by adjusting the first ECN parameter, the ECN parameter set for the first egress port can be made more in line with the actual application requirements of the network, thereby improving the data transmission service quality of the network.
[0017] In a possible implementation, when checking whether the first ECN parameter exceeds the parameter range, the first data forwarding device may first determine the first application scenario to which the first data packet belongs, such as a low latency requirement scenario or an audio and video scenario, etc. Then, the first data forwarding device determines the first parameter range from multiple parameter ranges according to the first application scenario, wherein different parameter ranges correspond to different application scenarios, so that the first data forwarding device checks whether the first ECN parameter exceeds the first parameter range. In this way, the first data forwarding device may configure appropriate ECN parameters for the first egress port according to the application scenario to which the data packet belongs, thereby further improving the accuracy of configuring the ECN parameters for the first egress port and improving the data transmission service quality of the network.
[0018] In a possible implementation, when forwarding a data packet, the first data forwarding device may specifically first detect whether there is indication information for priority-based flow control PFC, and when there is indication information for the PFC, the first data forwarding device adjusts the first ECN parameter to obtain a fourth ECN parameter, and forwards the data packet in the first egress queue through the first egress port according to the fourth ECN parameter. In this way, by adjusting the first ECN parameter, the ECN parameter set for the first egress port can be made to better meet the actual application requirements of the network, thereby improving the data transmission service quality of the network.
[0019] In a second aspect, the present application provides a data forwarding device, which includes various modules for executing the data forwarding device adjustment method in the first aspect or any possible implementation manner of the first aspect.
[0020] In a third aspect, the present application provides a data forwarding device, the data forwarding device comprising a processor, a memory and a display. The processor and the memory communicate with each other. The processor is used to execute instructions stored in the memory so that the data forwarding device performs a data forwarding device adjustment method as in the first aspect or any one of the implementations of the first aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The data forwarding device may also include a bus. The processor is connected to the memory via the bus. The memory may include a readable memory and a random access memory.
[0021] In a fourth aspect, the present application provides a chip, comprising a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, the processor being used to execute the data forwarding device adjustment method in the first aspect or any one of the implementations of the first aspect.
[0022] In a fifth aspect, the present application provides a data forwarding system, comprising at least one data forwarding device provided in the third aspect above.
[0023] In a sixth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computing device, the computing device executes the operating steps of the data forwarding device adjustment method described in the first aspect or any one of the implementations of the first aspect.
[0024] In a seventh aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device, enables the computing device to execute the operating steps of the data forwarding device adjustment method described in the first aspect or any one of the implementations of the first aspect.
[0025] Based on the implementations provided in the above aspects, the present application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of the structure of an exemplary computing device cluster 10 provided in this application;
[0027] Figure 2 A flowchart of a data forwarding device adjustment method provided by the present application;
[0028] Figure 3 A schematic diagram of configuring ECN parameters for the data forwarding device 209 provided in this application;
[0029] Figure 4 A flowchart of another data forwarding device adjustment method provided by the present application;
[0030] Figure 5 A schematic diagram of training neural network models at different levels by proportional simulation provided in this application;
[0031] Figure 6 A schematic diagram of the structure of a data forwarding device provided in this application;
[0032] Figure 7 A schematic diagram of the hardware structure of a data forwarding device provided in this application. DETAILED DESCRIPTION
[0033] In order to alleviate the network congestion problem and improve the quality of network transmission services, the present application provides a data forwarding device adjustment method, which automatically configures ECN parameters for the data forwarding device according to the traffic injection information. In this way, not only can the congestion problem in the network be effectively alleviated and the quality of network transmission services be improved; moreover, when using one model to set the ECN parameters, the error amplification problem existing in the ECN parameters inferred by using multiple models can be effectively avoided, so that the quality of network transmission services can be maintained at a high level.
[0034] The technical solution in the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0035] See also Figure 1 , is a schematic diagram of the structure of an exemplary computing device cluster 10 provided in this application. Figure 1 As shown, the computing device cluster 10 includes multiple nodes and data forwarding devices at different levels, wherein multiple data forwarding devices at different levels can constitute a data forwarding system. For ease of description, Figure 1 The example is taken as an example including nodes 101 to 108, data forwarding devices 201 to 212 at the first level, and data forwarding devices 301 to 304 at the second level.
[0036] Each node among nodes 101 to 108 may be a computing node such as a server, or may be a node of other types. Data interaction is achieved between different nodes through one or more data forwarding devices.
[0037] The data forwarding device in the computing device cluster 10 refers to a network device with a data forwarding function, such as a switch or a router. In addition, the multiple data forwarding devices in the computing device cluster 10 can be divided into multiple levels. Figure 1 As shown, multiple data forwarding devices can form a communication network with a leaf-spine structure, and the multiple data forwarding devices can be divided into two levels, including data forwarding devices 301 to 304 located in the spine layer (or backbone layer), and data forwarding devices 201 to 212 located in the leaf layer. In actual application, since the data forwarding devices 201 to 208 are closer to the nodes in the computing device cluster 10, the leaf layer where the data forwarding devices 201 to 208 are located can also be called the top of rack (TOR) layer.
[0038] Furthermore, the plurality of data forwarding devices at the leaf layer in the computing device cluster 10 may be divided into a plurality of regions, such as Figure 1 Area 1 and area 2 in the area, and the data forwarding devices between different areas communicate through the data forwarding devices located in the spine layer. For example, the data forwarding device 209 in area 1 communicates with the data forwarding device 211 in area 2 through the data forwarding device 301 or the data forwarding device 302 located in the spine layer.
[0039] Each data forwarding device may have multiple ports, and each port may be configured with at least one queue. The data forwarding device may use some ports (hereinafter referred to as ingress ports) to receive data packets sent by nodes or other data forwarding devices, and the received data packets are cached in the queue configured for the ingress port (hereinafter referred to as the ingress queue); and the data forwarding device also uses another part of the ports (hereinafter referred to as egress ports) to forward data packets externally, and before sending the data packets, the data packets are cached in the queue configured for the egress port (hereinafter referred to as the egress queue).
[0040] like Figure 1 As shown, nodes 101 to 104 may all communicate with node 105 through data forwarding devices 209, 301, and 211, which may cause these data forwarding devices to receive too many data packets sent by nodes 101 to 104 in a short period of time. The speed at which the data forwarding devices receive data packets exceeds the speed at which they forward data packets. At this time, the data packets that are not forwarded in time will be cached in the queue, causing network congestion. When the number of data packets that are not forwarded exceeds the upper limit of the number of data packets that can be cached in the queue, a large number of data packets that have not entered the queue (such as data packets with lower priority) will be discarded by the data forwarding devices, resulting in low quality of network transmission service.
[0041] To this end, the present application provides a data forwarding method to alleviate network congestion problems and improve the quality of network transmission services. In specific implementation, taking the data forwarding device 209 as an example, the data forwarding device 209 obtains traffic injection information, and the traffic injection information is used to indicate the attribute information of the data packet cached by at least one inlet queue in the data forwarding device 209. The attribute information can be, for example, the identifier of the inlet queue, the identifier of the outlet queue, the length of the data packet and other attribute information, and the obtained traffic injection information is also used to indicate that the outlet queue corresponding to the data packet is the first outlet queue, so that the data forwarding device 209 can make a prediction based on the traffic injection information, such as using the neural network model corresponding to the data forwarding device 209 to make a prediction, etc., to obtain a first explicit congestion notification (ECN) parameter, and set the ECN parameter of the first egress port corresponding to the first egress queue in the data forwarding device 209 to the first ECN parameter. Among them, the ECN parameter is used to avoid or alleviate the network congestion problem. Specifically, after the data forwarding device 209 forwards the data packet according to the ECN parameter, it can trigger the node 101 to the node 104 to control the speed of sending the data packet to the data forwarding device 209, such as reducing the speed of sending the data packet to the data forwarding device 209, so as to avoid or alleviate the network congestion problem.
[0042] Since the traffic injection information can reflect the traffic characteristics of the network where the data forwarding device 209 is located, the first ECN parameter automatically generated and configured according to the traffic injection information can be adapted to the network. Therefore, after the data forwarding device 209 sets the first ECN parameter as the ECN parameter of the first output port, the data forwarding device 209 can subsequently control the speed at which the node 101 to the node 104 sends data packets to the data forwarding device 209 according to the first ECN parameter, thereby effectively alleviating the congestion problem in the network and improving the quality of network transmission services.
[0043] In actual application, when predicting the first ECN parameter, the data processing device 209 may specifically use a neural network model to infer the first ECN parameter according to the traffic injection information. At this time, using a neural network model to infer the ECN parameter used by the data forwarding device 209 to forward the data packet can effectively avoid the error amplification problem existing in multiple models compared to gradually inferring the ECN parameter through multiple models, so that the quality of network transmission service can be maintained at a high level. At the same time, using the neural network model to infer the ECN parameter can also improve the efficiency of setting ECN for the data forwarding device 209 and get rid of the interference of human factors.
[0044] Furthermore, after setting the ECN parameters for the first egress port, the data forwarding device 209 can also forward the data packets in the first egress queue through the first egress port according to the set first ECN parameters. The data packets cached by the first egress queue are obtained by encapsulating the data packets cached by the at least one ingress queue, so that when the network is congested, the congestion problem in the network can be alleviated and the quality of network transmission service can be improved by forwarding the data packets.
[0045] The above is an example of automatically configuring ECN parameters for an egress queue of the data forwarding device 209. In actual application, the ECN parameters can be automatically set in accordance with the above method for other egress queues configured for the egress port in the data forwarding device 209, other egress ports in the data forwarding device 209, and each data forwarding device in the computing device cluster 10. In this way, the global traffic in the computing device cluster 10 can be optimized, and the transmission service quality of the overall network in the computing device cluster 10 can be improved.
[0046] Exemplarily, the above-mentioned data forwarding device 209 can be implemented by software or hardware.
[0047] In the first example, when implemented by software, the data forwarding device 209 can be implemented by at least one of a virtual machine, a container, and a computing engine, for example.
[0048] In the second example, when implemented by hardware, the data forwarding device 209 can be implemented by at least one physical device including a processor. The processor can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system on chip (SoC), a software-defined infrastructure (SDI) chip, an artificial intelligence (AI) chip, a data processing unit (DPU), or any combination thereof. In addition, the number of processors included in the data forwarding device 209 can be one or more, and the type of processors included can be one or more. The number and type of processors can be set according to the business requirements of the actual application, and this embodiment does not limit this.
[0049] It is worth noting that the above Figure 1 The computing device cluster 10 shown is only used as an exemplary description. In other applicable computing device clusters, the computing device cluster may have more devices to support the computing device cluster to have more functions, such as devices for storing scheduling logs, etc. Alternatively, multiple data forwarding devices in the computing device cluster may have other multi-layer structures, such as multiple data forwarding devices may form a dragonfly structure, etc. The specific structure of the above computing device cluster is not limited in this application.
[0050] For ease of understanding, an embodiment of the data forwarding device adjustment method provided by the present application is described below in conjunction with the accompanying drawings.
[0051] See also Figure 2 , Figure 2 A flow chart of a data forwarding device adjustment method provided in this application, which can be applied to Figure 1 The computing device cluster 10 described above may be applied to other applicable computing device clusters. Figure 1The data forwarding device 209 in the computing device cluster 10 is taken as an example for illustrative description.
[0052] in, Figure 2 The data forwarding device adjustment method shown may specifically include:
[0053] S201 : The data forwarding device 209 obtains traffic injection information, where the traffic injection information is used to indicate attribute information of a first data packet cached in at least one ingress queue in the data forwarding device 209 , wherein the egress queue corresponding to the first data packet is the first egress queue in the data forwarding device 209 .
[0054] Typically, the data forwarding device 209 is configured with multiple ports, including an inbound port for receiving data packets and an outbound port for forwarding data, and the inbound port and the outbound port may be respectively configured with at least one queue.
[0055] Among them, at least one ingress queue configured for the ingress port is used to cache data packets received by the data forwarding device 209 through the ingress port, and when multiple ingress queues are configured for the same ingress port, different ingress queues are used to cache data packets with different priorities, and the multiple data packets cached by each ingress queue have the same priority.
[0056] Similarly, at least one egress queue configured for an egress port is used to cache data packets that the data forwarding device 209 needs to forward through the egress port, and when multiple egress queues are configured for the same egress port, different egress queues are used to cache data packets with different priorities, and multiple data packets cached in the same egress queue have the same priority. Normally, the data forwarding device 209 will preferentially forward data packets with higher priorities through the egress port.
[0057] In this embodiment, the data forwarding device 209 can obtain the traffic injection information of the data forwarding device 209, and the traffic injection information is used to indicate the attribute information of the first data packet cached by each inlet queue in the data forwarding device 209, and the attribute information may include, for example, the identifier of the inlet queue used to cache the first data packet, the identifier of the egress queue used when forwarding the data in the first data packet, the packet length (referring to the length of the data packet), and other information. Among them, the egress queues of the first data packet are all the same egress queue, which is referred to as the first egress queue in this embodiment. In actual application, the data forwarding device 209 can periodically collect traffic injection information, such as collecting traffic injection information every 3 seconds, etc., so as to periodically update the ECN parameters used by the data forwarding device 209 to forward data packets.
[0058] As an implementation example, the data forwarding device 209 may collect attribute information of data packets cached in each inlet queue in the data forwarding device, for example, the attribute information of data packets cached in each inlet queue by the data forwarding device within a period of time (such as within 1 second) may be collected and counted, such as Figure 3 Then, the data forwarding device 209 can filter multiple data packets according to the identifier of the egress queue included in the attribute information of each data packet, and the first data packets obtained by filtering are all data packets whose attribute information includes the identifier of the first egress queue, so that the data forwarding device 209 can subsequently set corresponding ECN parameters for forwarding data packets in the first egress queue according to the attribute information of the first data packet.
[0059] S202: The data forwarding device 209 performs prediction according to the traffic injection information to obtain a first ECN parameter.
[0060] Illustratively, this embodiment provides the following implementation examples of obtaining the first ECN parameter according to prediction of traffic injection information.
[0061] In the first implementation example, the data forwarding device 209 may be pre-configured with a correspondence between the traffic injection information and the ECN parameters, such as a mapping table between the traffic injection information and the ECN parameters, so that the data forwarding device 209 can search for the correspondence according to the acquired traffic injection information to obtain the first ECN parameter. The correspondence between the traffic injection information and the ECN parameters may be determined in advance through experimental tests (such as simulation tests) and configured in the data forwarding device 209.
[0062] In the second implementation example, the data forwarding device 209 may also be configured with a neural network model for inferring ECN parameters, and the neural network model is used to infer the first ECN parameters. Exemplarily, the neural network model may be constructed based on one or more neural networks of convolutional neural networks (CNN), recurrent neural networks (RNN), deep neural networks (DNN), and long short-term memory networks (LSTM), or based on other types of neural networks, which is not limited in this embodiment.
[0063] The data forwarding device 209 can classify multiple first data packets according to the ingress port based on the traffic injection information, and determine the first data packets received by the data forwarding device 209 through each ingress port. Then, the data forwarding device 209 can calculate the average packet length of the first data packets corresponding to each ingress port based on the attribute information of the first data packets, and specifically can calculate the quotient between the sum of the packet lengths of all first data packets corresponding to each ingress port and the total number of all first data packets corresponding to the ingress port, and use the obtained quotient value as the average packet length. Then, the data forwarding device 209 sorts the ingress ports according to the average packet length to obtain a sorting result. Finally, the data forwarding device 209 can input the sorting result into the neural network model so that the neural network model can perform inference based on the sorting result and output the first ECN parameter.
[0064] Since the traffic injection information can reflect the traffic characteristics of the network in which the data forwarding device 209 is located, the first ECN parameter inferred by the data forwarding device 209 using the neural network model based on the traffic injection information can be adapted to the network, so that when the first ECN parameter is subsequently used to forward data packets, congestion problems in the network can be avoided or alleviated.
[0065] In the third implementation example, the data forwarding device 209 not only obtains the traffic injection information, but also obtains the configuration information of the ingress port to which the at least one ingress queue for caching the first data packet belongs, such as obtaining the configuration information by querying the port, and the configuration information may be, for example, the bandwidth of the ingress port, packet forwarding delay, etc. Then, the data forwarding device 209 may perform normalization processing on the first data packets received through each ingress port within a period of time according to the configuration information, and the normalization result may represent the number of data packets forwarded by each ingress port within the period of time under the same configuration (such as the same bandwidth, the same packet forwarding delay, etc.) / the total packet length. For example, assuming that the bandwidth of ingress port 1 is 15 Mbps (megabits per second) and the bandwidth of ingress port 2 is 20 Mbps, the data forwarding device 209 can perform normalization processing on the number of first data packets (or total packet length) received by each ingress port in the same time period according to the configuration information of each ingress port, and obtain a normalization result, which indicates that the number of first data packets received by ingress port 1 at a bandwidth of 10 Mbps is A, and the number of first data packets received by ingress port 2 at a bandwidth of 10 Mbps is B. Finally, the data forwarding device 209 can input the normalization result and the sorting results of each ingress port obtained based on the traffic injection information into the neural network model, so that the neural network model performs inference according to the normalization result and the sorting result, and outputs the first ECN parameter, such as Figure 3As shown. The specific implementation of the neural network model can refer to the above-mentioned relevant descriptions and will not be repeated here. For example, the data forwarding device 209 can vectorize the normalization result and the sorting result respectively, and splice the vectorized normalization result and the sorting result into an overall vector (or, the data forwarding device 209 can generate a corresponding matrix based on the normalization result and the sorting result); then, the data forwarding device 209 can input the overall vector (or matrix) into the neural network model, so that the neural network model can perform corresponding calculations on the overall vector (or matrix) using a multi-layer network structure, and output the calculation results as the first ECN parameter.
[0066] In this way, the neural network model infers and outputs the first ECN parameter based on information of multiple dimensions such as normalization results and sorting results, which makes the first ECN parameter more adaptable to the network where the data forwarding device 209 is located, that is, it can improve the accuracy of the first ECN parameter, which is conducive to using the first ECN parameter to further improve the transmission service quality of the network.
[0067] In the fourth implementation example, the above-mentioned traffic injection information obtained by the data forwarding device 209 may be the first traffic injection information corresponding to the first data packet cached by the inlet queue in the first time period. In addition, the data forwarding device 209 may also obtain the second traffic injection information, which is used to indicate the attribute information of the third data packet cached by at least one inlet queue in the data forwarding device 209 in the second time period, and the egress queue corresponding to the third data packet is still the first egress queue. Among them, the specific implementation method of the data forwarding device 209 obtaining the second traffic injection information can refer to the description of the relevant parts of obtaining the first traffic injection information, which will not be repeated here. In this way, the data forwarding device 209 can use the neural network model to infer according to the first traffic injection information and the second traffic injection information, so as to output the first ECN parameter. In specific implementation, the data forwarding device 209 can calculate the first sorting result of each input port according to the first traffic injection information, and calculate the second sorting result of each input port according to the second traffic injection information, so that the data forwarding device 209 inputs the first sorting result and the second sorting result into the neural network model at the same time, or splices the first sorting result and the second sorting result and inputs them into the neural network model to obtain the first ECN parameter of the neural network model inference output.
[0068] In this way, the data forwarding device 209 determines the first ECN parameter according to the traffic injection information in multiple time periods, which can avoid the accidental characteristics of the traffic injection information in a single time period from affecting the accuracy of the finally determined first ECN parameter.
[0069] The fourth implementation example is to illustrate the implementation process of the data forwarding device 209 determining the first ECN parameter based on the traffic injection information in two time periods. In actual application, the data forwarding device 209 can also infer the first ECN parameter based on the traffic injection information in more than three (including three) time periods. For example, the data forwarding device 209 can superimpose the traffic injection information in multiple time periods as a sliding window, and use the neural network model to infer the first ECN parameter based on the data in the sliding window.
[0070] It is worth noting that the above implementation examples are only used to exemplify the process of predicting and obtaining the first ECN parameter. In other embodiments, the data forwarding device 209 may also combine the above multiple implementation methods to obtain the first ECN parameter. For example, the data forwarding device 209 may use the sorting results and normalization results of the above various ingress ports as model input data in the first time period, and refer to the above method to obtain the sorting results and normalization results of the ingress ports in other time periods, so that the data forwarding device 209 can input the sorting results and normalization results corresponding to the multiple time periods into the neural network model, so that the neural network model outputs the first ECN parameter, etc.
[0071] S203: The data forwarding device 209 sets the ECN parameter of the first egress port corresponding to the first egress queue as the first ECN parameter.
[0072] Since the first ECN parameter predicted by the data forwarding device 209 according to the traffic injection information can be more compatible with the network, the data forwarding device 209 sets the ECN parameter of the first egress port to the first ECN parameter, so that when the first ECN parameter is used to forward the data packet later, the node 101 to the node 104 can be controlled to adaptively adjust the speed of sending the data packet. Therefore, when the network has congestion problems, the first ECN parameter is used to control the node 101 to the node 104 to reduce the rate of sending the data packet to alleviate the congestion problem in the network; when the network does not have congestion problems, the first ECN parameter is used to control the node 101 to the node 104 to increase the rate of sending the data packet, so that the data transmission service quality in the network is maintained at a high level.
[0073] Furthermore, the data forwarding device 209 may also forward the data packet using the first ECN parameter. To this end, this embodiment may also include the following steps:
[0074] S204: The data forwarding device 209 forwards the second data packet in the first egress queue through the first egress port according to the first ECN parameter.
[0075] The second data packet is obtained by encapsulating the first data packet. Generally, in the process of forwarding data packets, the data forwarding device 209 can read the first data packet from the inlet queue and modify the header of the first data packet, such as modifying the Internet Protocol (IP) address in the header of the first data packet to the IP address of the next-hop data forwarding device, and thereby encapsulate to obtain a second data packet including the next-hop IP address. Then, the data forwarding device 209 can write the second data packet into the first egress queue for caching.
[0076] After predicting and obtaining the first ECN parameter, the data forwarding device 209 may forward the second data packet in the first egress queue through the first egress port according to the first ECN parameter.
[0077] Exemplarily, the first ECN parameter may include, for example, a first length threshold, a second length threshold, and a probability threshold, which are represented by Kmin, Kmax, and Pmax in turn below. Figure 3 As shown. Kmin is less than Kmax, and the value range of Pmax is (0,1). The data forwarding device 209 can count the queue length in the current first egress queue, which can be the number of data packets included in the first egress queue or the total length of data packets, etc. Then, the data forwarding device 209 can compare the queue length with Kmin and Kmax.
[0078] When the queue length is less than or equal to Kmin, the data forwarding device 209 directly forwards the second data packet in the first egress queue to the outside. Specifically, the second data packet may be forwarded to the next-hop data forwarding device (such as data forwarding device 301) according to the IP address or media access control (MAC) address included in the second data packet.
[0079] When the queue length is greater than Kmin and less than Kmax, the data forwarding device 209 can set the value of the ECN flag in the multiple second data packets in the first egress queue according to the value of Pmax (that is, set the ECN flag). For example, the ECN flag can be located in a part of the fields in the header of the second data packet, such as using a two-bit field in the header as the ECN flag. The value of the ECN flag in some of the second data packets can be 0, and the value of the ECN flag in the remaining second data packets can be 1, such as Figure 3 As shown, and the ratio of the number of second data packets with a value of 1 to the total number of second data packets is equal to or approximately equal to the value of Pmax.
[0080] When the queue length is greater than or equal to Kmax, the data forwarding device 209 may set the value of the ECN flag bit in each second data packet in the first egress queue to 1, such as Figure 3 After setting the value of the ECN flag bit for the second data packet in the first egress queue, the data forwarding device 209 may forward each second data packet in the first egress queue in sequence.
[0081] In this way, the node as the receiving end of the data packet can detect the value of the ECN flag in the received multiple data packets. In actual application, the received data packet can be a data packet encapsulated based on the second data packet, such as a data packet encapsulated by the data forwarding device 211 and the data forwarding device 205.
[0082] If the values of the ECN flag bits in the received multiple data packets are all empty or 0, it indicates that there is no congestion in the communication link between the sender and the receiver. Then, the receiver can do nothing, so that the sender can send data packets according to the preset strategy, such as the sender can continue to send data packets to the data forwarding device at the previous packet sending speed, or the sender can gradually increase the speed of sending data packets, that is, the sender gradually increases the number of data packets sent per unit time.
[0083] If, among the multiple data packets received, the value of the ECN flag of some data packets is 1 (or other values), and the value of the ECN flag of another part of the data packets is 0 (or other values), it indicates that there is a certain degree of congestion in the communication link between the sender and the receiver. Then, the receiver can count the information of the ECN flag in the multiple data packets, such as counting the proportion of data packets with the value of the ECN flag of 1 relative to all data packets, and feed back the statistical information to the sender through congestion notification packets (CNP). In this way, the sender can adopt a corresponding congestion control algorithm, and reduce the speed of sending data packets to the data forwarding device according to the statistical information carried in the CNP packet, such as reducing the number of data packets sent in a unit time period from the first number to the second number. Exemplarily, the congestion control algorithm, for example, can be a data center quantized congestion notification (DCQCN) algorithm, or can be other types of algorithms. In this way, when the network is slightly congested, the speed at which the sender sends data packets can be reduced, so that the network can be restored from a congested state to a smooth state, thereby restoring the quality of network transmission services to a higher level.
[0084] If the value of the ECN flag bit of all received data packets is 1 (or other values), it indicates that the congestion of the communication link between the sender and the receiver is relatively serious. At this time, the receiver can notify the sender to reduce the speed of sending data packets by feeding back CNP packets to the sender. Accordingly, the sender can reduce the number of data packets sent in a unit time period from the first number to the third number (the third number is less than the second number) according to the congestion control algorithm, or the sender can stop sending data packets to the data forwarding device for a period of time. In this way, when the network is severely congested, the speed at which the sender sends data packets can be reduced with greater granularity, so that the congestion level of the network can be effectively alleviated, or even the network can be restored to a smooth state, thereby effectively improving the transmission service quality of the network.
[0085] In a further possible implementation, the data forwarding device 209 may also modify the first ECN parameter predicted according to the traffic injection information. To this end, the present embodiment provides the following three implementation examples.
[0086] In the first example, the ECN parameters automatically set by the data forwarding device 209 may need to meet certain conditions. For example, in actual application scenarios, some users may require that the delay of the data forwarding device 209 forwarding data packets is small, so the maximum value of Kmin or Kmax in the ECN parameters of the data forwarding device 209 is set, or the minimum value of Pmax is set. Then, before the data forwarding device 209 forwards the second data packet using the first ECN parameter, it can first check whether the first ECN parameter predicted according to the traffic injection information exceeds the parameter range. If it does not exceed the parameter range, the data forwarding device 209 can forward multiple second data packets in the first egress queue through the first egress port based on the first ECN parameter according to the description of the related parts above. If the first ECN parameter predicted according to the traffic injection information exceeds the parameter range, the data forwarding device 209 can adjust the first ECN parameter according to the parameter range, such as setting the value of Kmin to the maximum value set by the user, etc., to obtain a third ECN parameter. Then, the data forwarding device 209 forwards the plurality of second data packets in the first egress queue through the first egress port according to the adjusted third ECN parameter. The specific implementation of forwarding the data packets can be found in the above-mentioned related descriptions and will not be repeated here.
[0087] In the second example, the data forwarding device 209 may first forward multiple second data packets in the first egress queue through the first egress port according to the predicted first ECN parameter. Then, the data forwarding device 209 may detect whether there is indication information of priority-based flow control (PFC), such as a PFC pause frame, etc. If not, the data forwarding device may continue to forward the data packets in the first egress queue through the first egress port based on the first ECN parameter. If it exists, it indicates that after forwarding the data packets based on the currently set first ECN parameter, there is still a congestion problem in the network, then the data forwarding device 209 may adjust the size of the first ECN parameter to obtain a fourth ECN parameter, and forward the data packets in the first egress queue through the first egress port based on the fourth ECN parameter obtained after the adjustment, so as to further alleviate the network congestion problem by adjusting the ECN parameter.
[0088] The PFC indication information detected by the data forwarding device 209 may be generated by the data forwarding device 209. For example, when the number of data packets received by the data forwarding device 209 is too large and some data packets are discarded, the data forwarding device 209 may generate a PFC pause frame and send the PFC pause frame to other data forwarding devices, such as to the data forwarding devices 201 to 204, so as to instruct the nodes 101 to 104 connected thereto to reduce or pause sending data packets.
[0089] Alternatively, the PFC indication information detected by the data forwarding device 209 may be sent by the next-hop data forwarding device (such as the data forwarding device 301) of the data forwarding device 209. For example, after the data forwarding device 209 forwards the data packet to the data forwarding device 301, the number of data packets received by the data forwarding device 301 may be too large, so a corresponding PFC pause frame is generated and fed back to the data forwarding device 209. At this time, the data forwarding device 209 detects that the data forwarding device 301 has sent the PFC pause frame.
[0090] When the data forwarding device 209 adjusts the ECN parameter according to the indication information of the PFC, it can perform iterative adjustment according to a preset adjustment ratio. Exemplarily, the data forwarding device 209 can first scale the ECN parameter according to a certain size ratio (such as 5%), wherein the data forwarding device 209 can only reduce the value of the Kmax parameter by 5%, or can simultaneously scale Kmin, Kmax and Pmax according to a ratio of 5%, etc. Then, the data forwarding device 209 can forward the data packets in the first egress queue through the first egress port according to the adjusted ECN parameter. If the indication information of the PFC is still detected, the data forwarding device 209 can continue to scale the ECN parameter according to the ratio, and then forward the data packets in the first egress queue based on the further adjusted ECN parameter. Repeat this process until the indication information of the PFC is not detected or the value of the ECN parameter reaches the preset boundary value.
[0091] In the third implementation example, the data forwarding device 209 can determine whether to adjust the ECN parameters predicted according to the traffic injection information according to the application scenario to which the data packet belongs. In specific implementation, the data forwarding device 209 may receive data packets in multiple application scenarios. Exemplarily, the application scenario to which the data packet belongs can be divided into text scenarios, picture scenarios, audio and video scenarios, etc. according to the data type; or, the application scenario to which the data packet belongs can be divided into low delay requirement scenarios, high delay requirement scenarios, delay-free scenarios, etc. according to the transmission delay requirements; or, it can be divided into multiple application scenarios in other ways. Among them, different application scenarios can correspond to different parameter ranges. For example, for data packets belonging to text scenarios or high-latency requirement scenarios, the delay requirement for data transmission is relatively low, then the value of Kmin or Kmax in the parameter range corresponding to the text scenario or high-latency requirement scenario can be set to be larger; for data packets belonging to audio and video scenarios or low-latency requirement scenarios, the delay requirement for data transmission is relatively high, then the value of Kmin or Kmax in the parameter range corresponding to the audio and video scenarios or low-latency requirement scenarios can be set to be smaller, so that when there are many data packets to be transmitted in the network, the sending end can be timely controlled to reduce the rate of sending data packets, ensuring that the data packets are transmitted with low latency between the sending end and the receiving end. In this implementation example, the data forwarding device 209 can first determine the application scenario to which the first data packet belongs, hereinafter referred to as the first application scenario.
[0092] Then, the data forwarding device 209 can determine the first parameter range corresponding to the first application scenario from a plurality of parameter ranges, wherein different parameter ranges correspond to different application scenarios, such as the second application scenario corresponds to the second parameter range, etc., so that the data forwarding device 209 can verify whether the first ECN parameter predicted according to the traffic injection information exceeds the first parameter range. If it does not exceed the first parameter range, the data forwarding device 209 can forward multiple second data packets in the first egress queue through the first egress port based on the first ECN parameter. If the first ECN parameter exceeds the first parameter range, the data forwarding device 209 can adjust the first ECN parameter according to the first parameter range, such as setting the value of Kmin to the maximum value set by the user. Then, the data forwarding device 209 forwards multiple second data packets in the first egress queue through the first egress port according to the adjusted ECN parameter.
[0093] It is worth noting that in this embodiment, the data forwarding device 209 determines the ECN parameter for the first egress queue according to the flow of the ingress port as an example to introduce the implementation process of the data forwarding device 209 forwarding the data packet in the first egress queue. In actual application, the first egress port may be configured with multiple egress queues, and the data forwarding device 209 may be configured with multiple egress ports. Then, the data forwarding device 209 may refer to the above implementation method to determine the corresponding ECN parameters for each egress queue configured for each egress port, so that when forwarding the data packet in each egress queue, the data forwarding device 209 may add an ECN tag to the data packet in the egress queue based on the ECN parameter corresponding to the egress queue and forward the data packet. The specific implementation process can be referred to the above-mentioned description of the relevant parts, which will not be repeated here.
[0094] In this embodiment, according to the flow injection information that can reflect the flow characteristics of the network in which the data forwarding device 209 is located, the ECN parameters of the first egress queue are automatically generated and configured, so that the ECN parameters can be adapted to the network (that is, more accurate), so that the data forwarding device 209 forwards the data packets in the network according to the ECN parameters, which can effectively alleviate the congestion problem in the network and improve the quality of network transmission services. At the same time, this automatic configuration of ECN parameters can also improve the efficiency of setting ECN for each egress queue in the data forwarding device 209, get rid of the interference of human factors, and reduce the dependence on operation and maintenance personnel.
[0095] Moreover, when a neural network model is used to predict the ECN parameters used by the data forwarding device 209 to forward data packets, compared with obtaining the ECN parameters by gradually inferring multiple models, the error amplification problem existing in multiple models can be effectively avoided, thereby enabling the network transmission service quality to be maintained at a high level.
[0096] In addition, by adjusting the predicted ECN parameters, the accuracy of the ECN parameters can be further improved, so that the data forwarding device 209 forwards data packets based on the adjusted ECN parameters, which can reduce the probability of triggering PFC pause frames and further improve the quality of network transmission services.
[0097] Furthermore, the neural network model can output different ECN parameters according to the traffic injection information in different time periods, so that the ECN parameters adopted by the data forwarding device 209 can be adaptively adjusted as the traffic in the network changes, so that the quality of network transmission service can always be maintained at a high level.
[0098] Above Figure 2 In the illustrated embodiment, a data forwarding device is used as an example to determine the ECN parameters. When the neural network model is used to predict the ECN parameters, each data forwarding device in the computing device cluster 10 may be configured with a neural network model to automatically configure the corresponding ECN parameters for the data forwarding device. The neural network models configured in different data forwarding devices may be the same or different. As an implementation example, Figure 1 In the computing device cluster 10 shown, the data forwarding device located at the spine layer and the data forwarding device located at the leaf layer can be configured with different neural network models, for example, they can have different network parameters, or different neural network structures (such as different numbers of network layers); different data forwarding devices at the same level can be configured with the same neural network model.
[0099] For ease of understanding, the following Figure 4 as well as Figure 5 , the specific implementation process of automatically configuring ECN parameters for each data forwarding device using a neural network model in the computing device cluster 10 is exemplarily described. The method can be executed by a training node in the computing device cluster 10, and the training node can be, for example, a server with a model training function. Figure 4 As shown, the method may specifically include:
[0100] S401: The training node obtains the neural network model in each data forwarding device in the cluster through proportional simulation.
[0101] In this embodiment, the multiple data forwarding devices in the computing device cluster 10 can form a network structure including multiple levels, such as Figure 1The leaf-spine structure shown (or it can be a dragonfly structure, etc.). At least one data forwarding device is deployed at each level, and each data forwarding device is configured with a neural network model for predicting ECN parameters. The neural network model on each data forwarding device can configure corresponding ECN parameters for each output port on the data forwarding device according to the traffic injection information on the data forwarding device, such as the neural network model 1 configured on the data forwarding device 209, which can infer and set ECN parameter 1 for the first output port on the data forwarding device 209, and the neural network model 2 configured on the data forwarding device 301 can infer and set ECN parameter 2 for the second output port on the data forwarding device 301. Among them, different data forwarding devices at the same level are configured with the same neural network model; data forwarding devices at different levels can be configured with different neural network models, specifically, the network parameters in the neural network model are different, or the neural network structure is different.
[0102] Among them, the neural network models in multiple data forwarding devices at different levels can be jointly trained through proportional simulation.
[0103] In a specific implementation, nodes 101 to 104 can send data packets to data forwarding devices 201 to 204 respectively, and the data packets are used to communicate with nodes in area 2. Data forwarding devices 201 to 204 send the received data packets to data forwarding device 209, and data forwarding device 209 forwards the data packets to data forwarding device 301, and then data forwarding device 301 further forwards the data packets to data forwarding device 211 or data forwarding device 212. Finally, data forwarding device 211 or data forwarding device 212 forwards the data packets to the corresponding nodes in area 2 through data forwarding devices 205 to 208, as shown in FIG. Figure 5 As shown. Among them, Figure 5 Only some of the above-mentioned multiple data forwarding devices are presented for illustration. In this way, the traffic received and forwarded by the data forwarding devices in multiple levels when the nodes in area 1 communicate with the nodes in area 2 can be simulated. In this process, each data forwarding device can collect the traffic injection information on each egress port (or each egress queue corresponding to the egress port), and use the neural network model on the data forwarding device to set the corresponding ECN parameters for each egress port according to the traffic injection information, so that each data forwarding device forwards the data packet based on the set ECN parameters.
[0104] For example, the training node can use a reinforcement learning algorithm to jointly train multiple neural network models. The neural network model on each data forwarding device can be used as an Actor network in the reinforcement learning algorithm. Figure 5 As shown, in the process of nodes in area 1 communicating with nodes in area 2 through data forwarding devices 209, 301 and 211, the training node can collect network service quality indicators, such as collecting network packet forwarding delay, port throughput in each data forwarding device and other data. The collected data can reflect the congestion of the network, such as no congestion, mild congestion or severe congestion. Then, the training node can use the Critic network in the reinforcement learning algorithm to update the parameters of the neural network model corresponding to the data forwarding device in the spine layer and the neural network model corresponding to the data forwarding device in the leaf layer according to the collected data.
[0105] Then, each node in area 1 continues to send data packets to the nodes in area 2 through data forwarding devices 209, 301 and 211. Accordingly, after the parameters are updated, the neural network model as the Actor network in the data forwarding devices 209, 301 and 211 can re-infer new ECN parameters based on the traffic injection information collected by each data forwarding device, and make corresponding settings for each egress port based on the new ECN parameters, so that the data forwarding devices 209, 301 and 211 can forward data packets based on the updated ECN parameters. Then, the training node can continue to collect the network's service quality indicators, and use the Critic network to continue to update the parameters of the neural network model corresponding to the data forwarding devices in the spine layer and the leaf layer based on the collected data.
[0106] By repeating the above process, iterative training of the neural network models corresponding to the data forwarding devices 209, 301 and 211 can be achieved until the termination condition of the iterative training is reached, such as the accuracy of the ECN parameters output by the neural network model is not lower than the threshold, or the number of iterative training reaches a preset number, etc.
[0107] After training the neural network models of the spine layer and the leaf layer, the neural network model in the data forwarding device 301 can be synchronized to other data forwarding devices located at the spine layer, such as data forwarding devices 302 to 304. The neural network model in the data forwarding device 209 can be synchronized to other data forwarding devices located at the leaf layer and belonging to area 1, including. The neural network model in the data forwarding device 211 can be synchronized to other data forwarding devices located at the leaf layer and belonging to area 2, including data forwarding devices 205 to 208, data forwarding device 213, etc. In this way, by completing the joint training of the neural network models in some data forwarding devices, the neural network model configured for all data forwarding devices in the computing device cluster 10 can be obtained.
[0108] It can be understood that the above-mentioned specific implementation method of training the neural network model in the data forwarding devices at multiple levels is only an exemplary description. In actual application, the neural network model in the data forwarding devices at each level can also be obtained by other methods, and this embodiment does not limit this.
[0109] S402: A data forwarding device at the spine layer obtains first traffic injection information, where the first traffic injection information is used to indicate attribute information of a first data packet cached by at least one ingress queue in the data forwarding device, wherein the egress queue corresponding to the first data packet is the first egress queue in the data forwarding device.
[0110] In this embodiment, the data forwarding device located at the spine layer is used to refer to Figure 1 Each data forwarding device in the data forwarding device 301 to the data forwarding device 304 is shown. In addition, the first egress queue is used to refer to each egress queue in the multiple egress queues included in the data forwarding device.
[0111] S403: The data forwarding device at the spine layer performs reasoning based on the first traffic injection information using a neural network model corresponding to the data forwarding device to obtain a first ECN parameter.
[0112] S404: The data forwarding device at the spine layer forwards the second data packet in the first egress queue through the first egress port according to the first ECN parameter, wherein the second data packet is obtained by encapsulating the first data packet.
[0113] S405: The data forwarding device at the leaf layer obtains second traffic injection information, where the second traffic injection information is used to indicate attribute information of a third data packet cached by at least one ingress queue in the data forwarding device, wherein the egress queue corresponding to the third data packet is the second egress queue in the data forwarding device.
[0114] In this embodiment, the data forwarding device located at the spine layer may specifically refer to Figure 1 Each data forwarding device in the data forwarding device 301 to the data forwarding device 304 is shown. In addition, the second egress queue is used to refer to an egress queue among the multiple egress queues included in the data forwarding device.
[0115] S406: The data forwarding device at the leaf layer performs reasoning based on the second traffic injection information using a neural network model corresponding to the data forwarding device to obtain a second ECN parameter.
[0116] S407: The data forwarding device at the leaf layer forwards a fourth data packet in the second egress queue through the second egress port according to the second ECN parameter, wherein the fourth data packet is obtained by encapsulating the third data packet.
[0117] Furthermore, each data forwarding device can also dynamically update the ECN parameters output by the neural network model, such as adjusting the ECN parameters output by the neural network model according to the conditions that the ECN parameters need to meet, or adjusting the ECN parameters output by the neural network model after detecting the presence of a PFC pause frame.
[0118] It should be noted that the above-mentioned implementation method of configuring a neural network model for multiple data forwarding devices in the computing device cluster 10 is only an implementation example and is not intended to be limiting. For example, in other possible embodiments, the training node may also use other methods to complete the training of the neural network model in each data forwarding device, such as traffic data may be provided by the user to the training node, or the neural network model in each data forwarding device may be incrementally trained, etc.; or, different data forwarding devices at the same level may be configured with different neural network models, which is not limited in this embodiment.
[0119] In this embodiment, by configuring a neural network model for multiple data forwarding devices in the computing device cluster 10 and automatically configuring appropriate ECN parameters, different data forwarding devices can be effectively coordinated to jointly complete cluster-scale congestion information feedback and control. Based on the mutual cooperation of multiple data forwarding devices, network congestion problems can be effectively avoided or alleviated, thereby improving the quality of network transmission services.
[0120] It is worth noting that other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be familiar with the fact that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.
[0121] Combination of the above Figures 1 to 5 The data forwarding device adjustment method provided in the embodiment of the present application is introduced, and then the structure of the data forwarding device provided in the embodiment of the present application is introduced with reference to the accompanying drawings.
[0122] See also Figure 6 , shows a schematic diagram of the structure of a data forwarding device, the data forwarding device 600 includes:
[0123] An acquisition module 601 is used to acquire first traffic injection information, where the first traffic injection information is used to indicate attribute information of a first data packet cached by at least one ingress queue in a first data forwarding device, wherein the egress queue corresponding to the first data packet is a first egress queue in the first data forwarding device;
[0124] A prediction module 602, configured to make a prediction based on the first traffic injection information to obtain a first congestion display reminder ECN parameter;
[0125] The setting module 603 is used to set the ECN parameter of the first egress port corresponding to the first egress queue in the first data forwarding device to the first ECN parameter.
[0126] In a possible implementation manner, the data forwarding device 600 further includes:
[0127] The forwarding module 604 is configured to forward a second data packet in the first egress queue through the first egress port according to the first ECN parameter, where the second data packet is obtained by encapsulating the first data packet.
[0128] In a possible implementation, the prediction module 602 is specifically configured to:
[0129] The first ECN parameter is obtained by using a first neural network model corresponding to the first data forwarding device and performing reasoning according to the first traffic injection information.
[0130] In a possible implementation, the first data forwarding device is located at a first level of a network, and the network further includes a second data forwarding device located at a second level, the second data forwarding device is used to forward data packets sent by the first data forwarding device, the second data forwarding device is configured with a second neural network model, the second neural network is used to infer a second ECN parameter of a second output port for the second data forwarding device, and the second data forwarding device forwards the data packet through the second output port according to the second ECN parameter.
[0131] In a possible implementation, the first neural network model and the second neural network model have different model parameters, or the first neural network model and the second neural network model have different network structures.
[0132] In a possible implementation, the first neural network model and the second neural network model are jointly trained by simulation based on a reinforcement learning algorithm, wherein the first data forwarding device forwards data packets based on the ECN parameters of the first output port inferred by the first neural network model, and the second data forwarding device forwards data packets sent by the first data forwarding device based on the ECN parameters of the second output port inferred by the second neural network model.
[0133] In a possible implementation, the acquisition module 601 is further configured to:
[0134] Obtaining configuration information of the ingress ports to which the at least one ingress queue belongs respectively;
[0135] Then, the prediction module 602 is specifically used for:
[0136] According to the first traffic injection information and the configuration information, reasoning is performed using a first neural network corresponding to the first data forwarding device.
[0137] In a possible implementation manner, the first traffic injection information is used to indicate attribute information of a first data packet cached by the at least one ingress queue within a first time period, and the acquisition module 601 is further used to:
[0138] Acquire second traffic injection information, where the second traffic injection information is used to indicate attribute information of a third data packet cached by the at least one ingress queue within a second time period, wherein the egress queue corresponding to the third data packet is the first egress queue;
[0139] Then, the prediction module 602 is specifically used for:
[0140] Based on the first traffic injection information and the second traffic injection information, reasoning is performed using a first neural network corresponding to the first data forwarding device.
[0141] In a possible implementation manner, the forwarding module 604 is specifically configured to:
[0142] Checking whether the first ECN parameter exceeds a parameter range;
[0143] When the first ECN parameter exceeds the parameter range, adjusting the first ECN parameter according to the parameter range to obtain a third ECN parameter;
[0144] The second data packet in the first egress queue is forwarded through the first egress port according to the third ECN parameter.
[0145] In a possible implementation manner, the forwarding module 604 is specifically configured to:
[0146] Determining a first application scenario to which the first data packet belongs;
[0147] According to the first application scenario, determining a first parameter range from a plurality of parameter ranges, where different parameter ranges correspond to different application scenarios;
[0148] Check whether the first ECN parameter exceeds the first parameter range.
[0149] In a possible implementation manner, the forwarding module 604 is specifically configured to:
[0150] Check whether there is indication information for priority-based flow control PFC;
[0151] When there is indication information for the PFC, adjusting the first ECN parameter to obtain a fourth ECN parameter;
[0152] The data packets in the first egress queue are forwarded through the first egress port according to the fourth ECN parameter.
[0153] because Figure 6 The data forwarding device 600 shown corresponds to the above Figure 2 The data forwarding device 209 in the embodiment shown in the figure is Figure 6 For the specific implementation of the data forwarding device 600 and its technical effects, see the above Figure 2 The description of the relevant parts in the illustrated embodiment will not be repeated here.
[0154] Figure 7 A hardware structure diagram of a data forwarding device 700 provided in this application, the data forwarding device 700 may be, for example, the above-mentioned Figure 2 The data forwarding device 209 etc. in the illustrated embodiment.
[0155] like Figure 7 As shown, the data forwarding device 700 includes a processor 701, a memory 702, and a communication interface 703. The processor 701, the memory 702, and the communication interface 703 communicate via a bus 704, and may also communicate via other means such as wireless transmission. The memory 702 is used to store instructions, and the processor 701 is used to execute instructions stored in the memory 702. Furthermore, the data forwarding device 700 may also include a memory unit 705, and the memory unit 705 may be connected to the processor 701, the storage medium 702, and the communication interface 703 via a bus 704. The memory 702 stores program code, and the processor 701 may call the program code stored in the memory 702 to perform the following operations:
[0156] Acquire first traffic injection information, where the first traffic injection information is used to indicate attribute information of a first data packet cached by at least one ingress queue in a first data forwarding device, wherein the egress queue corresponding to the first data packet is a first egress queue in the first data forwarding device;
[0157] Perform prediction according to the first traffic injection information to obtain a first congestion reminder ECN parameter;
[0158] An ECN parameter of a first egress port corresponding to the first egress queue in the first data forwarding device is set to the first ECN parameter.
[0159] It should be understood that in the embodiment of the present application, the processor 701 may be a CPU, and the processor 701 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete device components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0160] The memory 702 may include a read-only memory and a random access memory, and provides instructions and data to the processor 701. The memory 702 may also include a nonvolatile random access memory.
[0161] The memory 702 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0162] The communication interface 703 is used to communicate with other devices connected to the data forwarding device 700. The bus 704 includes not only a data bus, but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are labeled as bus 704 in the figure.
[0163] It should be understood that the data forwarding device 700 according to the embodiment of the present application may correspond to the data forwarding device 600 in the embodiment of the present application, and may correspond to the data forwarding device 600 in the embodiment of the present application. Figure 2 The method performed by the data forwarding device 209 in the method shown, and the above and other operations and / or functions implemented by the data forwarding device 700 are respectively to implement Figure 2 For the sake of brevity, the process of the corresponding method in will not be repeated here.
[0164] The present application also provides a chip, the chip includes a processor and a power supply circuit, the processor is used to implement the following Figure 2 The operation steps of the method executed by the data forwarding device 209 in the method described above. The processor can be any processor such as a dedicated CPU, ASIC, PLD, CPLD, FPGA, GAL, SoC, SDI chip, AI chip, or any combination thereof.
[0165] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned data forwarding device adjustment method.
[0166] The embodiment of the present application also provides a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
[0167] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0168] The computer program product may be a software installation package. When any of the aforementioned methods for adjusting the data forwarding device is required, the computer program product may be downloaded and executed on a computing device.
[0169] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0170] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data forwarding device adjustment method, characterized in that: The method comprises: Acquire first traffic injection information, where the first traffic injection information is used to indicate attribute information of a first data packet cached by at least one ingress queue in a first data forwarding device, wherein the egress queue corresponding to the first data packet is a first egress queue in the first data forwarding device; Perform prediction according to the first traffic injection information to obtain a first congestion reminder ECN parameter; An ECN parameter of a first egress port corresponding to the first egress queue in the first data forwarding device is set to the first ECN parameter.
2. The method according to claim 1, characterized in that The method further comprises: According to the first ECN parameter, a second data packet in the first egress queue is forwarded through the first egress port, where the second data packet is obtained by encapsulating the first data packet.
3. The method according to claim 1 or 2, characterized in that: The step of performing prediction according to the first traffic injection information to obtain a first congestion display reminder ECN parameter includes: The first ECN parameter is obtained by using a first neural network model corresponding to the first data forwarding device and performing reasoning according to the first traffic injection information.
4. The method according to claim 3, characterized in that The first data forwarding device is located at a first level of a network. The network also includes a second data forwarding device located at a second level. The second data forwarding device is used to forward data packets sent by the first data forwarding device. The second data forwarding device is configured with a second neural network model. The second neural network is used to infer a second ECN parameter of a second output port for the second data forwarding device. The second data forwarding device forwards the data packet through the second output port according to the second ECN parameter.
5. The method according to claim 4, characterized in that The first neural network model and the second neural network model have different model parameters, or the first neural network model and the second neural network model have different network structures.
6. The method according to claim 4 or 5, characterized in that: The first neural network model and the second neural network model are jointly trained through simulation based on a reinforcement learning algorithm, wherein the first data forwarding device forwards data packets based on the ECN parameters of the first output port inferred by the first neural network model, and the second data forwarding device forwards data packets sent by the first data forwarding device based on the ECN parameters of the second output port inferred by the second neural network model.
7. The method according to any one of claims 3 to 6, characterized in that: The method further comprises Obtaining configuration information of the ingress ports to which the at least one ingress queue belongs respectively; Then, according to the first traffic injection information, reasoning is performed using a first neural network corresponding to the first data forwarding device, including: According to the first traffic injection information and the configuration information, reasoning is performed using a first neural network corresponding to the first data forwarding device.
8. The method according to any one of claims 3 to 6, characterized in that: The first traffic injection information is used to indicate attribute information of a first data packet cached by the at least one ingress queue within a first time period, and the method further includes: Acquire second traffic injection information, where the second traffic injection information is used to indicate attribute information of a third data packet cached by the at least one ingress queue within a second time period, wherein the egress queue corresponding to the third data packet is the first egress queue; Then, performing reasoning using a first neural network corresponding to the first data forwarding device according to the first traffic injection information includes: According to the first traffic injection information and the second traffic injection information, reasoning is performed using a first neural network corresponding to the first data forwarding device.
9. The method according to claim 2, characterized in that: The forwarding, according to the first ECN parameter, the second data packet in the first egress queue through the first egress port includes: Checking whether the first ECN parameter exceeds a parameter range; When the first ECN parameter exceeds the parameter range, adjusting the first ECN parameter according to the parameter range to obtain a third ECN parameter; The second data packet in the first egress queue is forwarded through the first egress port according to the third ECN parameter.
10. The method according to claim 9, characterized in that The checking whether the first ECN parameter exceeds a parameter range includes: Determining a first application scenario to which the first data packet belongs; According to the first application scenario, determining a first parameter range from a plurality of parameter ranges, where different parameter ranges correspond to different application scenarios; Check whether the first ECN parameter exceeds the first parameter range.
11. The method according to claim 2, characterized in that The forwarding, according to the first ECN parameter, the second data packet in the first egress queue through the first egress port includes: Check whether there is indication information for priority-based flow control PFC; When there is indication information for the PFC, adjusting the first ECN parameter to obtain a fourth ECN parameter; The data packets in the first egress queue are forwarded through the first egress port according to the fourth ECN parameter.
12. A data forwarding device, characterized in that: The data forwarding device comprises: an acquisition module, configured to acquire first traffic injection information, wherein the first traffic injection information is used to indicate attribute information of a first data packet cached by at least one ingress queue in a first data forwarding device, wherein the egress queue corresponding to the first data packet is a first egress queue in the first data forwarding device; A prediction module, configured to make a prediction based on the first traffic injection information to obtain a first congestion reminder ECN parameter; The setting module is used to set the ECN parameter of the first egress port corresponding to the first egress queue in the first data forwarding device to the first ECN parameter.
13. A chip, characterized in that: The chip includes a processor and a power supply circuit, wherein the power supply circuit is used to supply power to the processor, and the processor is used to execute the steps of the method according to any one of claims 1 to 11.
14. A data forwarding device, characterized in that: Including processor and memory; The processor is used to execute instructions stored in the memory so that the data forwarding device performs the steps of the method according to any one of claims 1 to 11.
15. A data forwarding system, characterized in that: Includes at least one data forwarding device as claimed in claim 14.
16. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computing device, cause the computing device to perform the steps of the method according to any one of claims 1 to 11.
