Message forwarding method, device and equipment
By receiving messages in the network and determining whether they meet the flow rate adjustment requirements of L4S services, scheduling to the L4S queue and forwarding, the problem of how to ensure the transmission delay of L4S packets when both L4S packets and traditional packets exist in the network is solved, and effective message forwarding and scheduling is achieved.
Patent Information
- Application Number
- CN202311564228.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2025-05-23
AI Technical Summary
When there are packets transmitted by low transmission delay low packet loss (L4S) services and traditional services in the network, how to effectively schedule and forward L4S packets to ensure their low transmission delay requirements.
By receiving messages and determining the transmission service type of the message stream to which they belong, obtaining the real-time rate of the message stream, determining whether it meets the flow rate adjustment requirements of the L4S service, and scheduling the message stream that meets the requirements into the L4S queue, and forwarding according to the scheduling priority of the L4S queue.
When both L4S messages and traditional messages exist in the network, it is realized that packet flows that strictly comply with the L4S service flow rate adjustment requirements can be forwarded according to the scheduling priority of the L4S queue, thus ensuring the transmission delay of L4S messages.
Smart Images

Figure CN120034501A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message forwarding method, device and equipment. Background Art
[0002] With the continuous development of the Internet, network traffic continues to grow rapidly, the services carried by the network are becoming more and more diverse, and there are more and more interactive applications in the network (such as interactive web pages, interactive videos, instant messaging, etc.).
[0003] Usually, interactive applications require low transmission latency. To achieve low transmission latency for applications, low latency, low loss, scalable throughput (L4S) services have emerged. The main idea of L4S is to reduce the traffic jitter caused by the greedy algorithm of the transmission control protocol (TCP) and reduce the queue delay of L4S services.
[0004] Therefore, when there are messages transmitted using L4S services (referred to as L4S messages) and messages transmitted using traditional services (referred to as traditional messages) in the network, how network devices schedule the transmission of L4S messages becomes an urgent problem to be solved. Among them, L4S messages are messages with low transmission delay requirements, and traditional messages are messages that are not sensitive to delay, that is, the delay of L4S messages is lower than the delay of traditional messages. Summary of the invention
[0005] The present application provides a message forwarding method, apparatus and equipment, which implements the method of forwarding message flows that strictly comply with the flow rate regulation requirements of the first service according to the scheduling priority of the first service when business messages transmitted using a first service and business messages transmitted using a second service exist in the network at the same time, thereby ensuring the transmission delay of these messages.
[0006] The technical solutions provided by this application are as follows:
[0007] In the first aspect, the present application provides a message forwarding method, the method comprising: receiving a first message; obtaining the real-time rate of the first message flow when it is determined that the transmission service used by the first message flow to which the first message belongs is the first service; determining whether the first message flow meets the flow rate regulation requirement of the first service according to the real-time rate of the first message flow; scheduling the first message to a first queue for storing messages transmitted using the first service when the first message flow meets the flow rate regulation requirement of the first service; sending the first message according to the scheduling priority of the first queue. The transmission service includes the first service or the second service, and the transmission delay of the message transmitted using the first service is different from the transmission delay of the message transmitted using the second service.
[0008] Through the method provided by the present application, it is achieved that when it is determined that the message flow to which the message belongs adopts the first service for transmission, it is further determined whether the message flow strictly complies with the flow rate regulation requirements of the first service according to whether the real-time rate of the message flow meets the flow rate regulation requirements of the first service. Furthermore, in the case where the message flow transmitted by the first service strictly complies with the flow rate regulation requirements of the first service, the messages of the message flow are scheduled to the queue corresponding to the first service, and the forwarding messages are scheduled according to the scheduling priority of the queue corresponding to the first service. In other words, the method provided by the present application can forward the message flow that strictly complies with the flow rate regulation requirements of the first service according to the scheduling priority of the first service when there are both business messages transmitted by the first service and business messages transmitted by the second service in the network, thereby ensuring the transmission delay of these messages.
[0009] In a possible design, the determining whether the first message flow meets the flow rate adjustment requirement of the first service according to the real-time rate of the first message flow includes: determining that the first message flow meets the flow rate adjustment requirement of the first service when the real-time rate of the first message flow is less than or equal to the expected rate. The expected rate refers to the expected rate of the first message flow after the flow rate of the first message flow is adjusted based on the first service.
[0010] In another possible design, the method further includes: when the real-time rate of the first message flow is greater than the expected rate, determining that the first message flow does not meet the flow rate regulation requirement of the first service.
[0011] Through these two possible design methods, it is possible to determine whether the real-time flow rate of the message flow meets the flow rate adjustment requirement of the first service.
[0012] In another possible design, the method further includes: in the case where it is determined that the first message flow does not meet the flow rate adjustment requirement of the first service, scheduling the first message to a second queue for storing messages transmitted using the second service; and sending the first message according to the scheduling priority of the second queue. Wherein, when the transmission delay of the message transmitted using the first service is lower than the transmission delay of the message transmitted using the second service, the scheduling priority of the second queue is lower than the scheduling priority of the first queue.
[0013] Through this possible design, for a message flow whose real-time rate does not meet the flow rate regulation requirement of the first service, it means that the message flow transmitted by the first service does not strictly comply with the rate regulation requirement of the first service, and thus the message of the message flow is sent according to the scheduling priority of the second service. In this way, the transmission delay of the message flow transmitted by the first service and strictly complying with the flow rate regulation requirement of the first service can be guaranteed.
[0014] In another possible design, the minimum watermark of the first queue is lower than the minimum watermark of the second queue. The minimum watermark of the first queue is the starting position of marking the message with an explicit congestion notification (ECN) mark in the first queue. The minimum watermark of the second queue is the position where packet loss starts in the second queue, or the minimum watermark of the second queue is the starting position of marking the message with an ECN mark in the second queue. The ECN mark is used to regulate the message flow rate.
[0015] Through this possible design, when the first queue has a lower minimum waterline, the length of the first queue can be maintained at a shorter state, so that the first queue has a lower queuing delay, thereby ensuring the transmission delay of the messages in the first queue transmitted using the first service.
[0016] In another possible design, the above method is applied to a message forwarding device. In the message forwarding device, an on-chip buffer for storing messages in the first queue is larger than an on-chip buffer for storing messages in the second queue.
[0017] Among them, the on-chip cache refers to the cache on the chip, or can also be understood as the memory of the message forwarding device. Since the on-chip cache has a faster read and write rate than the off-chip memory, when more on-chip cache is configured for the messages in the first queue in the message forwarding device through this possible design method, the message forwarding device can read and write the messages in the first queue faster when forwarding the messages in the first queue stored in the on-chip cache, so that the forwarding of the messages in the first queue can be completed faster, which can improve the forwarding efficiency of the messages in the first queue, thereby ensuring the transmission delay of the messages in the first queue.
[0018] In another possible design, the above method is applied to a message forwarding device, wherein the bandwidth of reading and / or writing the off-chip memory configured for the first queue in the message forwarding device is greater than the bandwidth of reading and / or writing the off-chip memory configured for the second queue.
[0019] Among them, the off-chip memory can be understood as the memory other than the on-chip cache. Compared with the on-chip cache, the read and write rate of the off-chip memory is lower. Therefore, through this possible design, more bandwidth for reading and / or writing the off-chip memory is configured for the first queue in the message forwarding device, which can enable the message forwarding device to quickly read and write the messages stored in the off-chip memory in the first queue, so as to complete the forwarding of the messages in the first queue. In addition, the message forwarding device configures more bandwidth for reading and / or writing the off-chip cache for the first queue, which can reduce the waiting delay caused by the failure to read the messages of the first queue from the off-chip memory in time due to insufficient read and write bandwidth, and can also avoid the situation where the message of the first queue that the message forwarding device has recently received cannot be written into the off-chip memory and packet loss occurs.
[0020] In another possible design, the method further includes: detecting the sending rate of the message in the first queue; when the sending rate of the message in the first queue is greater than the rate threshold, and the first queue and the second queue are currently scheduled according to the strict priority (SP) scheduling rule, adjusting the scheduling rules of the first queue and the second queue to weighted round robin (WRR) scheduling, and the scheduling weight of the first queue is greater than the scheduling weight of the second queue; or, when the sending rate of the message in the first queue is greater than the rate threshold, and the first queue and the second queue are currently scheduled according to the WRR scheduling rule, reducing the scheduling weight of the first queue, and / or increasing the scheduling weight of the second queue. Wherein, the adjusted scheduling weight of the first queue is greater than the adjusted scheduling weight of the second queue.
[0021] Through this possible design, it is achieved that when the message forwarding device schedules and forwards messages through the first queue and the second queue, and the scheduling priority of the first queue is higher than the scheduling priority of the second queue, if the sending rate of the messages in the first queue exceeds the rate threshold, the scheduling priority of the messages in the first queue is lowered, and / or the scheduling priority of the messages in the second queue is increased. In this way, it is achieved that on the basis of ensuring the scheduling priority of the first queue, it is also ensured that the messages in the second queue can obtain a relatively fair sending bandwidth of the message forwarding device. In addition, it is achieved that the message flow transmitted by the first service in a short period of time obtains a higher scheduling priority, and at the same time, it is ensured that the message flow transmitted by the first service and the message flow transmitted by the second service obtain approximately fair bandwidth for a long time.
[0022] In another possible design, the real-time rate of the first message stream is obtained, including: collecting first flow parameters of the first message stream; and calculating the real-time rate of the first message stream according to the first flow parameters of the first message stream. The first flow parameters of the first message stream include the transmission duration of the first message stream and the number of bytes received by the time the first message is received.
[0023] In another possible design, the method further includes: determining the expected rate of the first message flow according to the historical rate of the first message flow and the target speed reduction ratio. Furthermore, the above-mentioned determination of whether the first message flow meets the flow rate regulation requirement of the first service according to the real-time rate of the first message flow includes: determining whether the first message flow meets the flow rate regulation requirement of the first service according to the real-time rate of the first message flow and the expected rate of the first message flow. Among them, the historical rate of the first message flow is the real-time rate of the first message flow when the second message in the first message flow is received, and the second message is a message in the first message flow that is received before the first message and is scheduled to the first queue. The target speed reduction ratio is the speed reduction ratio required by the first service after the second message is scheduled to the first queue.
[0024] In another possible design, before determining the expected rate of the first message flow according to the historical rate and the target speed reduction ratio of the first message flow, the method further includes: obtaining the historical rate; obtaining the historical marking probability; searching for the corresponding relationship between the marking probability and the speed reduction ratio according to the historical marking probability, so as to determine the target speed reduction ratio of the first message flow required by the first service after the second message is dispatched to the first queue, and the target speed reduction ratio is used to determine the expected rate of the first message flow. The historical marking probability is the probability of marking the ECN mark for the second message dispatched to the first queue.
[0025] Through the above-mentioned possible design methods, it is possible to obtain the real-time rate and expected rate of the first message flow, and determine whether the first message flow meets the flow rate regulation requirement of the first service based on the real-time rate and expected rate of the first message flow.
[0026] In another possible design, the above method is performed by a message forwarding device. The message forwarding device is configured with at least one of the following conversion functions: a quadratic function, a multi-power function, an exponential function, or a function that is piecewise fitted by any two of the quadratic function, the multi-power function, and the exponential function. After the first message is dispatched to the first queue, the above method also includes: when the real-time length of the first queue including the first message is greater than the lowest watermark of the first queue, according to the real-time length of the first queue and the first conversion function, the marking probability of the first message is calculated; according to the marking probability of the first message, an ECN mark is marked for the first message. Among them, the lowest watermark is the starting position of marking the message with the ECN mark in the first queue, and the ECN mark is used to indicate the reduction of the message flow rate, and the first conversion function is any conversion function configured by the message forwarding device.
[0027] In another possible design, before calculating the marking probability of the first message according to the real-time length of the first queue and the first conversion function, the method further includes: in response to a preset event, updating the second conversion function to the first conversion function. The second conversion function is any one of the multiple conversion functions configured by the message forwarding device except the first conversion function, or the second conversion function is a conversion function having a constant parameter different from that of the first conversion function.
[0028] In another possible design, the preset event includes any one of the following events: the preset duration is reached, the queue delay of the first queue is greater than the delay threshold, or an update instruction is received.
[0029] Through the above-mentioned several possible design methods, a conversion function for calculating the message marking probability can be flexibly configured.
[0030] In another possible design, the first service is a low latency, low loss, scalable throughput (L4S) service, and the second service is a traditional service that does not adopt the L4S service.
[0031] In a second aspect, the present application provides a message forwarding device. The message forwarding device is used to execute any one of the methods provided in the first aspect above. The present application may divide the message forwarding device into functional modules according to any one of the methods provided in the first aspect above. For example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. Exemplarily, the present application may divide the message forwarding device into a transceiver unit and a processing unit, etc. according to the function. The description of the possible technical solutions and beneficial effects executed by each of the divided functional modules can refer to the solutions provided by the first aspect above and any possible design method in the first aspect, and will not be repeated here.
[0032] In a third aspect, the present application provides a message forwarding device. The message forwarding device includes: a memory, a network interface, and one or more processors. The one or more processors receive or send data through the network interface, and the one or more processors are configured to read program instructions stored in the memory to execute the method provided by the first aspect and any possible design method of the first aspect.
[0033] In a fourth aspect, the present application provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium, and the computer-readable storage medium includes program instructions. When the program instructions are executed on a message forwarding device, the message forwarding device executes the method provided in the first aspect and any possible design method in the first aspect.
[0034] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device or a message forwarding device, enables the computing device or the message forwarding device to execute the method provided in the first aspect and any possible design method in the first aspect.
[0035] In a sixth aspect, the present application provides a chip, which includes a processor for running program instructions or codes, and the chip or a device including the chip can be used to execute the method provided in the first aspect and any possible design method in the first aspect. Exemplarily, the chip also includes: an input interface, an output interface, and a memory. Among them, the input interface, output interface, processor, and memory of the chip are connected through the internal connection path of the chip, the memory in the chip is used to store the program instructions or codes run by the processor, and the input interface and output interface of the chip are used for the connection and communication between the chip and other chips or devices.
[0036] It can be understood that any of the message forwarding devices, message forwarding equipment, computer-readable storage media, computer program products or chips provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods and will not be repeated here.
[0037] In this application, the names of the above-mentioned message forwarding device, message forwarding equipment, etc. do not limit the equipment or functional modules themselves. In actual implementation, these equipment or functional modules may appear with other names. As long as the functions of each equipment or functional module are similar to those of this application, they all fall within the protection scope of this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of an application scenario of the method provided in the embodiment of the present application;
[0039] Figure 2 It is a schematic diagram of a change curve of a marking probability and a packet loss probability provided in an embodiment of the present application;
[0040] Figure 3 It is a flowchart of a message forwarding method provided in an embodiment of the present application;
[0041] Figure 4 It is a schematic diagram of a process for determining a transmission service type adopted by a first message flow according to a real-time rate of a first message flow to which a first message belongs, provided in an embodiment of the present application;
[0042] Figure 5 It is a flowchart of another message forwarding method provided in an embodiment of the present application;
[0043] Figure 6 It is a flowchart of another message forwarding method provided in an embodiment of the present application;
[0044] Figure 7 This is a schematic diagram of a process for obtaining a real-time rate of a message flow provided by an embodiment of the present application;
[0045] Figure 8 It is a schematic diagram of a process for determining an expected rate of a first message flow provided by an embodiment of the present application;
[0046] Fig. 9 It is a flowchart of another message forwarding method provided in an embodiment of the present application;
[0047] Fig.10 It is a structural schematic diagram of a message forwarding device provided in an embodiment of the present application;
[0048] Fig.11 It is a structural diagram of a message forwarding device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0050] To facilitate understanding, the technology and background involved in the embodiments of the present application are first explained below.
[0051] Active queue management (AQM)
[0052] AQM is a network traffic management mechanism. AQM aims to reduce network congestion and improve the throughput and latency performance of network traffic. AQM controls the transmission and queuing of messages by implementing a series of algorithms and strategies in message forwarding devices (such as routers, switches, etc.) to address some of the defects of traditional transmission control protocol (TCP) congestion control methods. Therefore, AQM can also be understood as an active congestion control mechanism.
[0053] As an example, common congestion control strategies in the AQM mechanism include tail drop, weighted random early detection (WRED) drop, random early detection (RED) drop, and explicit congestion notification (ECN) marking. Among them, the queue refers to a queue in a message forwarding device for storing messages to be transmitted. Optionally, the queues in the message forwarding device can be divided according to the ports of the message forwarding device, or according to the sender of the message, or according to the service type corresponding to the message flow to which the message belongs (such as video type service, audio type service, etc.), or according to the priority or quality of service (QoS) level of the message flow to which the message belongs, without limitation.
[0054] For the sake of simplicity, the embodiments of the present application hereinafter refer to “congestion control strategy in the AQM mechanism” as “congestion control strategy”.
[0055] The following briefly introduces congestion control policies such as queue tail drop, queue WRED drop, queue RED drop, and queue ECN marking.
[0056] 1. Tail drop of queue
[0057] In a queue for storing messages to be transmitted in a message forwarding device, tail drop means that when the queue length exceeds the maximum queue length, the messages to be scheduled to the queue are dropped. This can prevent the queue delay from increasing due to a queue being too long, and can prevent the queue from occupying too many resources of the message forwarding device. It should be understood that when the length of the queue for storing messages to be transmitted in a message forwarding device exceeds the maximum queue length, it can be understood that the network traffic is severely congested.
[0058] However, when the message forwarding device executes the congestion control strategy of tail drop, it will cause continuous message loss, which will cause the sender of the message to timeout and retransmit, resulting in corresponding retransmission delay, and TCP will enter the slow start state of congestion control. TCP entering the slow start state means that the sender of the TCP connection suddenly reduces the message sending rate to a very small value. In addition, since there are many TCP connections in the network, the messages in these connections are usually transmitted by multiplexing the network layer. In this case, if the message forwarding device drops the tail of the queue when the network is congested, it may affect many TCP connections at the same time, causing many TCP connections to suddenly enter the slow start state at the same time. This is called global synchronization in TCP terminology. It can be seen that global synchronization will cause the traffic volume of the entire network to drop suddenly, and after the network congestion returns to normal, global synchronization will cause the traffic volume of the entire network to increase suddenly.
[0059] 2. Queue WRED discard and queue RED discard
[0060] In the queues used to store messages to be transmitted in the message forwarding device, queue WRED discard and queue RED discard refer to when the queue length exceeds the minimum queue length (or the lowest watermark), the messages to be scheduled to the queue are discarded according to a certain probability. In addition, as the queue length increases, the probability of the message forwarding device discarding messages gradually increases, until the queue length reaches the maximum queue length (or the highest watermark), the probability of the message forwarding device discarding messages is 100%. That is, when the queue length reaches the highest watermark, the congestion control strategy equivalent to AQM becomes queue tail discard. Through queue WRED discard and queue RED discard, the TCP global synchronization problem caused by queue tail discard can be avoided, but queue WRED discard and queue RED discard will cause unnecessary packet loss.
[0061] The difference between queue WRED and queue RED is that when the queue length exceeds the minimum waterline and packets are discarded with a certain probability, the queue RED discard policy randomly discards packets, while the queue WRED discard policy preferentially discards packets in packet flows with low priorities when discarding packets.
[0062] It should be understood that when the length of the queue for storing messages to be transmitted in the message forwarding device exceeds the minimum watermark, it means that the queue is congested. When the length of the queue for storing messages to be transmitted in the message forwarding device exceeds the maximum watermark, it means that the current network traffic is seriously congested.
[0063] It should also be understood that both queue WRED discard and queue RED discard will cause the sender of the message to retransmit the message due to discarding the message, thereby generating a corresponding retransmission delay. Therefore, both queue WRED discard and queue RED discard will increase the transmission delay of certain network traffic (the traffic to which the discarded message belongs).
[0064] 3. Queue ECN Marking
[0065] In a queue for storing messages to be transmitted in a message forwarding device, the queue ECN marking means that when the queue length exceeds the minimum waterline, the message dispatched to the queue is marked with the ECN mark, so that after receiving the message including the ECN mark, the receiving end of the message sends an acknowledgement character (ACK) message carrying the ECN mark to the sending end of the message, so that the sending end of the message reduces the sending rate of the message in response to the ECN mark. Among them, the ECN mark is used to indicate the reduction of the message flow rate. In addition, as the queue length increases, the probability of the message forwarding device marking the message with the ECN mark (recorded as the marking probability) gradually increases, until the queue length reaches the highest waterline, the probability of the message forwarding device marking the message with the ECN mark is 100%. It should be understood that when the length of the queue for storing messages to be transmitted in the message forwarding device exceeds the minimum waterline, it means that the queue is congested. Therefore, the purpose of adjusting the message flow rate when congestion occurs can be achieved through the queue ECN marking strategy. Since the queue ECN marking strategy does not cause packet loss when adjusting the message flow rate, it avoids the message sender from timeout retransmission, thereby avoiding the transmission delay caused by timeout retransmission. Therefore, when adjusting the message flow rate through queue ECN marking, the message transmission delay can be guaranteed.
[0066] Currently, for business messages that require low transmission latency, such as messages of interactive applications, low latency, low loss, scalable throughput (L4S) transmission services can be used to transmit business messages. A detailed description of L4S can be found in the draft RFC9330 (request for comments 9330), which is not described in detail here. Among them, interactive applications are, for example, applications for providing functions such as interactive web pages, interactive videos, instant messaging, online rendered games, or remote desktops, or interactive applications are cloud-based applications, such as cloud-rendered virtual reality applications, cloud-rendered augmented reality applications, cloud-based game rendering applications, or video-assisted remote control of machinery and industrial processes.
[0067] For service messages that require low transmission delay, the message transmission delay can be reduced by reducing the retransmission delay of the service message and the queuing delay when the message forwarding device forwards the service message. Therefore, based on the advantages of queue ECN marking, when the service message that requires low transmission delay is transmitted using the L4S transmission service, the message forwarding device used to forward the message generally supports the queue ECN marking congestion control strategy and can adjust the flow rate of the service message transmitted using the L4S transmission service through the queue ECN marking.
[0068] For the sake of simplicity, in the embodiments of the present application, "service messages transmitted using the L4S transmission service" are referred to as "L4S messages" below, and service messages not transmitted using the L4S transmission service are referred to as traditional messages, and the transmission service used by traditional messages is referred to as traditional services. Among them, L4S messages are service messages that require low transmission delay, and traditional messages are service messages that have no requirements or are not sensitive to transmission delay. In other words, the transmission delay of L4S messages is lower than the transmission delay of traditional messages.
[0069] However, in the process of forwarding messages by the message forwarding device, it is inevitable that L4S messages and traditional messages will exist at the same time. In this case, due to the different transmission delay requirements of L4S messages and traditional messages, the message forwarding device can set a queue for storing L4S messages to be transmitted (referred to as L4S queue) for L4S messages, and execute a corresponding congestion control strategy for the L4S queue to avoid congestion of L4S messages on the basis of ensuring the transmission delay of L4S messages. Correspondingly, for traditional messages, the message forwarding device is also provided with a queue for storing traditional messages to be transmitted (referred to as traditional queue), and executes a corresponding congestion control strategy to avoid congestion of traditional messages.
[0070] The embodiment of the present application provides a message forwarding method, which implements the scheduling and forwarding of business messages when there are business messages using different transmission services in the network at the same time. Wherein, different transmission services correspond to different transmission delay requirements. Taking the case where there are business messages using the first service for transmission and business messages using the second service for transmission in the network at the same time as an example, the method provided by the embodiment of the present application includes: receiving a first message, the transmission service used by the first message flow to which the first message belongs is the first service or the second service, wherein the transmission delay of the message transmitted using the first service is different from the transmission delay of the message transmitted using the second service; when it is determined that the transmission service used by the first message flow is the first service, the real-time rate of the first message flow is obtained; according to the real-time rate of the first message flow, it is determined whether the first message flow meets the flow rate adjustment requirements of the first service; when the first message flow meets the flow rate adjustment requirements of the first service, the first message is scheduled to the first queue for storing messages transmitted using the first service; and the first message is sent according to the scheduling priority of the first queue. Wherein, the second service is the transmission service used by the message that is not transmitted using the first service. The flow rate adjustment requirement of the first service refers to the adjustment requirement when adjusting the flow rate of the message flow to ensure the transmission delay of the message flow transmitted by the first service. For example, the flow rate adjustment requirement of the first service specifically requires that the flow rate of the message flow be reduced by 10%.
[0071] Through this method, it is achieved that when it is determined that the message flow to which the message belongs adopts the first service for transmission, it is further determined whether the message flow strictly complies with the flow rate regulation requirements of the first service based on whether the real-time rate of the message flow meets the flow rate regulation requirements of the first service. Furthermore, when the message flow transmitted by the first service strictly complies with the flow rate regulation requirements of the first service, the messages of the message flow are scheduled to the queue corresponding to the first service, and the forwarding messages are scheduled according to the scheduling priority of the queue corresponding to the first service. Therefore, the method provided in the embodiment of the present application can forward the message flow that strictly complies with the flow rate regulation requirements of the first service according to the scheduling priority of the first service when there are both business messages transmitted by the first service and business messages transmitted by the second service in the network, thereby ensuring the transmission delay of these messages.
[0072] Optionally, the transmission delay of the message transmitted by the first service is lower than the transmission delay of the message transmitted by the second service. As an example, the first service may be an L4S service, and the second service may be a traditional service that does not use the L4S service, wherein the transmission delay of the message transmitted by the L4S service is lower than the transmission delay of the message transmitted by the traditional service.
[0073] refer to Figure 1 , Figure 1The figure shows a schematic diagram of an application scenario of the method provided by the embodiments of the present application. When a sending end needs to send a message to a receiving end through a network based on service requirements, there is generally at least one Figure 1 message forwarding device as shown for forwarding the message of the sending end to the receiving end on the communication link between the sending end and the receiving end. The method provided by the embodiments of the present application is applied to any message forwarding device that forwards messages between the sending end and the receiving end, and this message forwarding device supports forwarding messages transmitted using a first service and also supports forwarding messages transmitted using a second service.
[0074] Among them, the network protocol adopted by the network between the sending end and the receiving end can be Internet Protocol Version 4 (IPv4) or Internet Protocol Version 6 (IPv6), which is not limited herein. When the network protocol adopted by the network between the sending end and the receiving end is IPv4, the message sent by the sending end to the receiving end is an IPv4 message. When the network protocol adopted by the network between the sending end and the receiving end is IPv6, the message sent by the sending end to the receiving end is an IPv6 message.
[0075] It should be understood that the above content is an exemplary description of the application scenario of the message forwarding method provided by the embodiments of the present application, and does not constitute a limitation on the application scenario of the message forwarding method. Those of ordinary skill in the art know that with the change of service requirements, its application scenario can be adjusted according to application needs, and the embodiments of the present application do not list them one by one.
[0076] The embodiments of the present application also provide a message forwarding device, which is used to execute the message forwarding method provided by the embodiments of the present application. Optionally, this device can be any network device with message forwarding capabilities, or a functional module in this network device. Among them, a network device with message forwarding capabilities can also be called a message forwarding device. As an example, the message forwarding device can be a network device such as a router, a switch, a gateway, etc., which is not limited herein.
[0077] In the embodiments of the present application, to implement the forwarding of messages transmitted using a first service and messages transmitted using a second service, a first queue for storing messages transmitted using a first service to be transmitted is set in the message forwarding device, and a second queue for storing messages transmitted using a second service is set. As an example, when the first service is the L4S service, the first queue can be called the L4S queue. When the second service is a traditional service, the second queue can be called the traditional queue.
[0078] Among them, when congestion control is performed on the first queue and the second queue, both the first queue and the second queue support the AQM mechanism, and the first queue and the second queue can adopt the same congestion control strategy or different congestion control strategies, which is not limited. For example, to avoid the problem of global synchronization, the congestion control strategies adopted by the first queue and the second queue can be any congestion control strategy such as queue WRED discard, queue RED discard or queue ECN marking. For another example, since the transmission delay required by the first service is lower than the transmission delay of the second service, the congestion control strategy adopted by the first queue can be queue ECN marking, which can reduce the retransmission delay caused by packet loss. The congestion control strategy adopted by the second queue is not limited, for example, it can be any congestion control strategy such as queue WRED discard, queue RED discard or queue ECN marking.
[0079] In some embodiments, to ensure low transmission delay of the first service, the lowest watermark of the first queue is lower than the lowest watermark of the second queue, so that the message transmitted through the first queue can have a lower queue queuing delay. Wherein, the lowest watermark of the first queue is the starting position of executing the congestion control strategy in the first queue, and the lowest watermark of the second queue is the starting position of executing the congestion control strategy in the second queue. As an example, when the congestion control strategy adopted by the first queue is the queue ECN marking strategy, the lowest watermark of the first queue is the starting position of marking the message with the ECN mark in the first queue. When the congestion control strategy adopted by the second queue is the queue WRED discard strategy or the queue RED discard strategy, the lowest watermark of the second queue is the position where packet loss starts in the second queue. When the congestion control strategy adopted by the second queue is the queue ECN marking strategy, the lowest watermark of the second queue is the starting position of marking the message with the ECN mark in the second queue. Wherein, the ECN mark is used to indicate a reduction in message flow rate.
[0080] Optionally, the message forwarding device may adjust the lowest watermark position and the highest watermark position of the first queue in response to a preset event, and / or the message forwarding device may also adjust the lowest watermark position and the highest watermark position of the second queue in response to a preset event. The detailed description of the preset event can be referred to the description below and will not be repeated here.
[0081] For the above-mentioned second queue, when the current length of the second queue exceeds the lowest waterline of the second queue, and the congestion control strategy adopted by the second queue is the queue WRED discard strategy or the queue RED discard strategy, the message forwarding device can determine the packet loss probability for the message newly scheduled to the second queue according to the real-time length of the second queue, and the packet loss probability refers to the probability of performing a packet loss operation on the message newly scheduled to the second queue. When the real-time length of the second queue exceeds the lowest waterline of the second queue, and the congestion control strategy adopted by the second queue is the queue ECN marking strategy, the message forwarding device can determine the marking probability for the message newly scheduled to the second queue according to the real-time length of the second queue, and the marking probability refers to the probability of marking the ECN mark for the message newly scheduled to the second queue.
[0082] Taking the congestion control strategy adopted by the second queue as the queue WRED discard strategy as an example, when the real-time length of the second queue exceeds the lowest waterline of the second queue, the message forwarding device calculates the packet loss probability for each message newly scheduled to the second queue according to the real-time length of the second queue and the first preset conversion function. Among them, the first preset conversion function is any one of the one or more conversion functions configured in the message forwarding device. In an embodiment of the present application, one or more of the following conversion functions are configured in the message forwarding device: a quadratic function, a multi-power function, an exponential function, or a function that is piecewise fitted by any two of the quadratic function, the multi-power function, or the exponential function, etc., but is not limited to this.
[0083] As an example, when the real-time length of the second queue is L1, the length of the second queue from the head to the lowest waterline is L2, and L1 is greater than L2, it means that the current length of the second queue exceeds the lowest waterline of the second queue. In this case, the packet loss probability p1 determined by the packet forwarding device for the latest packet scheduled to the second queue satisfies the following formula (1):
[0084] Formula (1)p1=F1(L1)
[0085] Wherein, F1 is a first preset conversion function for calculating the packet loss probability. Then, for the message that is newly scheduled to the second queue, the message forwarding device performs a packet loss operation on the message according to p1, and the embodiment of the present application does not describe this process in detail.
[0086] As another example, when the packet forwarding device supports adjusting the position of the lowest watermark of the second queue in the process of forwarding packets through the second queue, p1 satisfies the following formula (2):
[0087] Formula (2)p1=F1(L1,L2)
[0088] It can be seen that the length L2 of the lowest cutoff waterline in the second queue is also used as a variable of the first preset conversion function F1 when calculating the packet loss probability.
[0089] For the first queue mentioned above, when the real-time length of the first queue exceeds the lowest waterline of the first queue, and the congestion control strategy adopted by the first queue is the queue ECN marking strategy, the message forwarding device can determine the marking probability for each message newly scheduled to the first queue based on the real-time length of the first queue and the packet loss probability / marking probability determined by the message forwarding device for each message newly scheduled to the second queue, and the marking probability refers to the probability of marking the ECN mark for the message newly scheduled to the first queue. It can be seen that when the message forwarding device determines the marking probability for the message newly scheduled to the first queue, it uses the packet loss probability / marking probability determined by the message forwarding device for the message newly scheduled to the second queue as a variable.
[0090] Specifically, when the real-time length of the first queue exceeds the lowest waterline of the first queue, the message forwarding device calculates the marking probability for each message most recently scheduled to the first queue based on the real-time length of the first queue, the packet loss probability / marking probability determined by the message forwarding device for the message most recently scheduled to the second queue, and the second preset conversion function. Among them, the second preset conversion function may be the same as or different from the first preset conversion function described above, and this is not limited. The detailed description of the second preset conversion function can refer to the description of the first preset conversion function above, and will not be repeated here.
[0091] As an example, when the real-time length of the first queue is L3, the length of the lowest waterline in the first queue is L4, and L3 is greater than L4, it means that the real-time length of the first queue exceeds the lowest waterline of the first queue. When the packet loss probability determined by the message forwarding device for the message most recently scheduled to the second queue is p1, the marking probability p2 determined by the message forwarding device for the message most recently scheduled to the first queue satisfies the following formula (3):
[0092] Formula (3) p2 = F2 (L3, p1)
[0093] Wherein, F2 is a second preset conversion function for calculating the marking probability. Then, for the message that is newly scheduled to the first queue, the message forwarding device marks the message with an ECN mark according to p2, and the embodiment of the present application does not describe this process in detail.
[0094] As another example, when the packet forwarding device supports adjusting the position of the lowest watermark of the first queue in the process of forwarding packets through the first queue, p2 satisfies the following formula (4):
[0095] Formula (4)p2=F2(L3, p1, L4)
[0096] It can be seen that the length L4 of the lowest cutoff waterline in the first queue is also used as a variable of the second preset conversion function F2 when calculating the marking probability.
[0097] It should be understood that the lowest waterline, highest waterline, marking probability, and packet loss probability of the queues mentioned above can all be referred to as AQM parameters. It should also be understood that, since the message forwarding device uses the packet loss probability / marking probability determined for the message most recently scheduled to the second queue as a variable when determining the marking probability for the message most recently scheduled to the first queue, the message forwarding device determines the marking probability for the message most recently scheduled to the first queue, which is also referred to as the AQM parameter based on the coupling of the first queue and the second queue. Alternatively, it can be understood that the first queue and the second queue are coupled and managed by an AQM control module in the message forwarding device.
[0098] In an embodiment of the present application, the message forwarding device may update the first preset conversion function to another conversion function in response to a preset event during the process of calculating the above p1 according to the first preset conversion function. And / or, the message forwarding device may update the second preset conversion function to another conversion function in response to a preset event during the process of calculating the above p2 according to the second preset conversion function. The preset event may be any one of the following events: the arrival of a preset duration, the queue delay of a queue for storing transmission messages is greater than a delay threshold, or an update instruction is received, etc. For detailed descriptions, please refer to the relevant descriptions in the method below, which will not be repeated here.
[0099] In addition, taking the case where the first queue is an L4S queue and the second queue is a traditional queue, when the congestion control strategy adopted by the first queue is the queue ECN marking strategy and the congestion control strategy adopted by the second queue is the queue WRED discard strategy, the change rate of the marking probability of marking the ECN mark between the lowest watermark and the highest watermark of the first queue (referred to as the first change rate) is generally different from the change rate of the packet loss probability of performing packet loss between the lowest watermark and the highest watermark of the second queue (referred to as the second change rate). Figure 2 As shown, Figure 2 FIG. 2 shows a schematic diagram of a change curve of a marking probability and a packet loss probability. Figure 2 As shown in the figure, the packet loss probability of the traditional queue shown by the dotted line increases linearly as the overall queue length increases. The marking probability of the L4S queue shown by the solid line increases nonlinearly as the overall queue length increases. In addition, the change range of the marking probability of the L4S queue is greater than the change range of the packet loss probability of the traditional queue. Among them, the overall queue length refers to the sum of the lengths of the L4S queue and the traditional queue in the message forwarding device.
[0100] Depend on Figure 2It can be seen that when the overall queue is lightly loaded, it means that the overall queue in the message forwarding device is short at this time, but the lengths of the L4S queue and the traditional queue exceed their respective minimum watermarks, and the marking probability of the L4S queue and the packet loss probability of the traditional queue are both small. In this case, since the L4S queue has a higher scheduling priority and the minimum watermark of the L4S queue is shallow, the messages in the L4S queue can obtain more sending bandwidth of the message forwarding device. When the overall queue is congested, it means that the overall queue in the message forwarding device is long at this time, but the lengths of the L4S queue and the traditional queue do not exceed their respective maximum watermarks. At this time, the marking probability of the traditional queue increases, that is, the packet loss increases, but the marking probability of the L4S queue increases significantly, that is, the speed reduction of the message flow in the L4S queue is large. In this case, since the L4S queue has a higher scheduling priority, even if the speed reduction of the message flow in the L4S queue is large, compared with the L4S queue, the traditional queue can obtain a relatively fair sending bandwidth in the message forwarding device.
[0101] In some other embodiments, the on-chip cache in the message forwarding device for storing the messages in the first queue is larger than the on-chip cache for storing the messages in the second queue. The on-chip cache is a cache on the chip, or can also be understood as a memory of the message forwarding device. Since the on-chip cache has a faster read and write rate than the off-chip memory, when the message forwarding device configures more on-chip cache for the messages in the first queue, the message forwarding device can read and write the L4S message faster when forwarding the L4S message stored in the on-chip cache in the first queue, so that the forwarding of the L4S message can be completed faster, which can improve the forwarding efficiency of the L4S message, thereby ensuring the low transmission delay required by the L4S service.
[0102] In some other embodiments, the bandwidth of the read and / or write off-chip memory configured for the first queue in the message forwarding device is greater than the bandwidth of the read and / or write off-chip memory configured for the second queue. Among them, the off-chip memory of the message forwarding device can be understood as a memory other than the on-chip cache in the message forwarding device, and the read and write rate of the off-chip memory is lower than that of the on-chip cache. It should be understood that since the on-chip cache of the message forwarding device is limited, in the message forwarding device, part of the message of the first queue is stored in the on-chip cache of the message forwarding device, and part is stored in the off-chip memory of the message forwarding device. Similarly, part of the message of the second queue is stored in the on-chip cache of the message forwarding device, and part is stored in the off-chip memory of the message forwarding device. Therefore, in order to ensure the processing efficiency of the message forwarding device for the message stored in the off-chip memory in the first queue, the embodiment of the present application configures more bandwidth for reading and / or writing off-chip memory for the first queue in the message forwarding device, so that the message forwarding device can quickly read and write the message stored in the off-chip memory in the first queue, so as to complete the forwarding of the message in the first queue. In addition, the message forwarding device configures more bandwidth for reading and / or writing the off-chip cache for the first queue, which can reduce the waiting delay caused by the failure to read the messages of the first queue from the off-chip memory in time due to insufficient read and write bandwidth, and can also avoid the situation where the messages of the first queue newly received by the message forwarding device cannot be written into the off-chip memory and cause packet loss.
[0103] The following describes the implementation process of the message forwarding method provided in the embodiment of the present application.
[0104] refer to Figure 3 , Figure 3 The schematic diagram of the process of a message forwarding method provided by the embodiment of the present application is shown. The method can be applied to Figure 1 The packet forwarding device in the application scenario shown. Figure 3 As shown, the method comprises the following steps:
[0105] Step 101: Receive a first message.
[0106] The first message is any message received by the message forwarding device and needs to be forwarded. Optionally, the transmission service used by the first message may be the first service or the second service described above, which is not limited.
[0107] As an example, the message forwarding device receives the first message through its own network interface. It should be understood that there may be at least one other message forwarding device between the sender of the first message and the message forwarding device, and there may be at least one other message forwarding device between the message forwarding device and the destination device (i.e., the receiving end) of the first message, without limitation.
[0108] Step 102: When the transmission service adopted by the first message flow to which the first message belongs is the first service, obtain the real-time rate of the first message flow.
[0109] The message forwarding device can first determine whether the transmission service adopted by the first message flow to which the first message belongs is the first service or the second service according to the field carrying the indication of the transmission service type in the first message. It should be understood that the first message generally includes a field carrying the indication of the transmission service type (such as a dedicated type field or a reserved field, etc.). Therefore, the message forwarding device can determine the transmission service type carried in the first message by parsing the field carrying the indication of the transmission service type in the first message.
[0110] Taking the first service as the L4S service as an example, assuming that the differentiated services code point (DSCP) field (or type of service (TOS) field) of the first message carries an L4S flag, after the message forwarding device obtains the L4S flag by parsing the DSCP field (or TOS field) of the first message, it can determine that the first message is an L4S message, that is, it can determine that the transmission service type adopted by the first message flow to which the first message belongs is the L4S service.
[0111] Taking the second service as the traditional service described above as an example, assuming that the DSCP field (or TOS field) of the first message does not carry an L4S flag, when the transmission service type determined by the message forwarding device after parsing the DSCP field (or TOS field) is not the L4S service, it can determine that the first message is a traditional message, that is, it can determine that the transmission service type adopted by the first message flow to which the first message belongs is the traditional service.
[0112] Furthermore, when the message forwarding device determines that the transmission service adopted by the first message flow to which the first message belongs is the first service according to the field carrying the indication of the transmission service type in the first message, obtain the real-time rate of the first message flow.
[0113] Optionally, the message forwarding device collects the first flow parameter of the first message flow through the flow table and calculates the real-time rate of the first message flow according to the first flow parameter. The detailed process of the message forwarding device collecting the first flow parameter of the first message flow through the flow table and calculating the real-time rate of the first message flow according to the first flow parameter can be referred to the following description and will not be elaborated here.
[0114] Step 103: Determine whether the first message flow meets the flow rate adjustment requirement of the first service according to the real-time rate of the first message flow.
[0115] Optionally, when determining that congestion occurs in the first queue, the message forwarding device determines whether the first message flow meets a flow rate adjustment requirement of the first service according to the real-time rate of the first message flow.
[0116] It should be understood that when congestion occurs in the first queue, the first queue will certainly use a congestion control strategy to control the message flow of the first queue to slow down. Therefore, in this case, after the message forwarding device determines that the transmission service used by the first message flow is the first service according to the field carrying the transmission service type in the first message, it can further determine whether the first message flow meets the flow rate adjustment requirements of the first service according to the real-time rate of the first message flow when the message forwarding device receives the first message, thereby judging whether the sender of the first message flow strictly complies with the flow rate adjustment requirements of the first service.
[0117] Optionally, the message forwarding device can determine whether the first queue is congested or about to be congested by judging whether the real-time length of the first queue is greater than or equal to a threshold. For example, when the message forwarding device determines that the real-time length of the first queue is greater than or equal to the threshold, it is determined that the first queue is congested. When the message forwarding device determines that the real-time length of the first queue is less than the threshold, it is determined that the first queue is not congested. Here, the threshold is greater than or equal to the length value of the cut-off minimum watermark in the first queue. It should be understood that in order to ensure the transmission delay of the L4S message in the first queue, when the real-time length of the first queue is greater than the length of the cut-off minimum watermark in the first queue, the message forwarding device determines that the first queue is congested and starts to adjust the flow rate of the message in the first queue based on the congestion control strategy. For example, when the real-time length of the first queue is greater than the length of the cut-off minimum watermark in the first queue, the message forwarding device starts to mark the message in the first queue with an ECN mark with a certain marking probability, so as to instruct the sender of the message to reduce the rate of sending the message through the ECN mark.
[0118] Specifically, the message forwarding device can determine whether the first message flow meets the flow rate adjustment requirement of the first service based on the real-time rate of the first message flow and the expected rate of the first message flow. Taking the first service as the L4S service as an example, the expected rate of the first message flow refers to: in order to ensure the transmission delay of the L4S message in the first queue, when the first queue performs congestion control on the L4S message in the first queue through the congestion control strategy, the sender of the L4S message is required to reduce the message flow rate. The flow rate adjustment requirement of the L4S service refers to: for the first queue used to store L4S messages, in order to ensure the required transmission delay of the L4S service, the first queue controls the flow rate of the L4S message in the first queue through the congestion control strategy, the requirement for the message flow rate.
[0119] When the message forwarding device determines that it is necessary to determine whether the first message flow meets the flow rate adjustment requirement of the first service based on the real-time rate of the first message flow and the expected rate of the first message flow, the message forwarding device needs to first determine the expected rate of the first message flow. Optionally, the message forwarding device can determine the expected rate of the first message flow based on the historical rate and historical marking probability corresponding to the second message. The second message is a message received before the first message and scheduled to the first queue. Among them, the detailed process of the message forwarding device determining the expected rate of the first message flow can be referred to the description below, which will not be repeated here.
[0120] Further, after the message forwarding device determines the expected rate of the first message flow, the message forwarding device determines whether the first message flow meets the flow rate adjustment requirement of the first service according to the real-time rate when the first message is received and the expected rate of the first message flow.
[0121] In one possible case, when the real-time rate of the first message flow is less than or equal to the expected rate of the first message flow, the message forwarding device determines that the first message flow meets the flow rate adjustment requirement of the first service. In other words, the sender of the first message flow reduces the sending rate of the first message flow in strict accordance with the flow rate adjustment requirement of the first service. In this case, the message forwarding device determines that the transmission service type used by the first message flow is the first service.
[0122] In another possible situation, when the real-time rate of the first message flow is greater than the expected rate of the first message flow, the message forwarding device determines that the first message flow does not meet the flow rate adjustment requirement of the first service. In other words, the sender of the first message flow does not reduce the sending rate of the first message flow according to the flow rate adjustment requirement of the first service. In this case, the message forwarding device determines that the transmission service type used by the first message flow is the second service.
[0123] It should be understood that after the message forwarding device determines whether the first message flow meets the flow rate adjustment requirement of the first service, it is equivalent to achieving the purpose of further confirming the transmission service type adopted by the first message flow according to the field indicating the transmission service type carried in the first message after the message forwarding device determines the transmission service adopted by the first message flow according to the real-time rate of the first message flow. Or it can be understood that steps 102 to 103 implement the flow classification of the first message flow.
[0124] refer to Figure 4 , Figure 4 The schematic diagram shows a process in which the message forwarding device further determines the transmission service type adopted by the first message flow according to the real-time rate of the first message flow to which the first message belongs in the embodiment of the present application. Figure 4As shown, for the first message received by the message forwarding device, after the message forwarding device determines that the transmission service adopted by the first message flow is the first service based on the field indicating the transmission service type carried in the first message, the real-time rate of the first message flow is also obtained through the flow table (refer to step 102). At the same time, for the first queue used to store messages transmitted using the first service, the message forwarding device also obtains the historical rate and historical marking probability of the first message flow, and obtains the expected rate of the first message flow to which the first message belongs based on the historical rate and the historical marking probability (refer to steps 1031 to 1034 below). Then the message forwarding device compares the real-time rate of the first message flow with the expected rate of the first message flow (refer to step 103), thereby obtaining the result of whether the first message flow meets the flow rate regulation requirement of the first service, thereby achieving the purpose of classifying the transmission service type adopted by the first message. In an embodiment of the present application, Figure 4 The described process is called intelligent flow classification.
[0125] Step 104: When the first message flow meets the flow rate adjustment requirement of the first service, the message forwarding device schedules the first message to the first queue.
[0126] In some embodiments, after receiving the first message, the message forwarding device first caches the first message in the receiving cache. When the message forwarding device determines that the transmission service used by the first message flow is the first service according to the field carrying the transmission service type in the first message, and further determines that the real-time rate of the first message flow meets the flow rate adjustment requirement of the first service when the first message is received, the message forwarding device writes the first message cached in the receiving cache into the storage space pointed to by the tail pointer of the first queue, thereby achieving the purpose of scheduling the first message to the first queue.
[0127] After the message forwarding device schedules the first message to the first queue, and determines that the real-time length of the first queue including the first message exceeds (or is greater than) the lowest watermark of the first queue, the message forwarding device calculates the marking probability of marking the first message with the ECN mark according to the real-time length of the first queue and the first conversion function. Among them, the detailed description of the message forwarding device calculating the marking probability for the first message scheduled to the first queue can refer to the above description of the message forwarding device calculating the marking probability for the message most recently scheduled to the first queue, which will not be repeated. In addition, the detailed description of the first conversion function can refer to the above description of the second preset conversion function, which will not be repeated.
[0128] Next, the message forwarding device marks the first message with an ECN mark according to the mark probability calculated for the first message. This process is not described in detail in the embodiment of the present application.
[0129] In some examples, before the message forwarding device calculates the marking probability for the first message scheduled to the first queue based on the real-time length of the first queue of the first message and the first conversion function, it can first update the second conversion function configured by the message forwarding device to the first conversion function in response to a preset event. The second conversion function is also a conversion function used to calculate the marking probability for the message in the first queue. Exemplarily, the second conversion function is any conversion function other than the first conversion function among the multiple conversion functions configured by the message forwarding device. In this case, the message forwarding device updates the second conversion function configured by the message forwarding device to the first conversion function specifically including: the message forwarding device switches the second conversion function configured by the message forwarding device to the first conversion function. In another exemplary embodiment, the second conversion function is a conversion function having different constant parameters from the first conversion function. In this case, the message forwarding device updates the second conversion function configured by the message forwarding device to the first conversion function specifically including: the message forwarding device modifies the constant parameters of the second conversion function to obtain the first conversion function.
[0130] Wherein, the preset event includes but is not limited to: the arrival of the preset duration, the queue delay of the first queue is greater than the delay threshold, or the update instruction is received. In one example, the message forwarding device can periodically update the conversion function used to calculate the marking probability for the message in the first queue with the preset duration as a period, so when the preset duration after the last update of the conversion function arrives, the message forwarding device takes this as a preset event, and responds to the preset event to perform the operation of updating the conversion function. In another example, the message forwarding device counts the queue delay of the first queue, and when the counted queue delay is greater than the delay threshold, it takes this as a preset event, and responds to the preset event to perform the operation of updating the conversion function. Wherein, the embodiment of the present application does not specifically limit the value of the delay threshold, and the delay threshold satisfies the transmission delay requirement of the first service. In another example, the message forwarding device receives an instruction input by the user to indicate the update of the conversion function, and takes this as a preset event, and responds to the preset event to perform the operation of updating the conversion function.
[0131] Step 105: Send the first message according to the scheduling priority of the first queue.
[0132] It should be understood that when the transmission delay required by the first service is lower than the transmission delay required by the second service, the scheduling priority of the first queue is higher than the high priority of the second queue. Therefore, the message forwarding device executes the scheduling strategy according to the scheduling priority of the first queue to complete the scheduling forwarding of the first message scheduled to the first queue.
[0133] Through the method described in steps 101 to 105, in a scenario where there are messages transmitted using the first service and messages transmitted using the second service in the network at the same time, after the message forwarding device determines that the transmission service used by the message flow to which the message belongs is the first service based on the field carrying the transmission service type in the received message, it further determines whether the sender of the message flow strictly complies with the flow rate regulation requirements of the first service based on the real-time rate of the message flow, and only schedules the messages that strictly comply with the flow rate regulation requirements of the first service to the first queue for storing messages transmitted using the first service, thereby scheduling and forwarding the messages according to the scheduling priority corresponding to the queue. In this way, malicious traffic that nominally uses the first service for transmission but actually does not strictly comply with the flow rate regulation requirements of the first service can be filtered, so that the transmission delay of the traffic that is actually transmitted using the first service can be guaranteed.
[0134] In other embodiments, in combination Figure 3 In the method described above, when the message forwarding device determines in step 103 that the first message flow does not meet the flow rate adjustment requirement of the first service, reference Figure 5 , the message forwarding device also performs the following steps.
[0135] Step 106: When it is determined that the first message flow does not meet the flow rate adjustment requirement of the first service, the first message is scheduled to the second queue.
[0136] When the message forwarding device determines that the first message flow does not meet the flow rate adjustment requirement of the first service, it means that for the first message flow transmitted using the first service, the sender of the first message flow does not strictly comply with the flow rate adjustment requirement of the first service. At this time, the message forwarding device processes the message flow originally transmitted using the first service as a message flow transmitted using the second service.
[0137] Optionally, when the message forwarding device determines that the first message flow does not meet the flow rate regulation requirements of the first service, it can set a malicious flag for the first message to indicate that the sender of the first message flow does not strictly comply with the flow rate regulation requirements of the first service. Then, the message forwarding device schedules the first message to a second queue for storing messages transmitted using the second service.
[0138] In some embodiments, after receiving the first message, the message forwarding device first caches the first message in the receiving cache. When the message forwarding device determines that the transmission service used by the first message flow is the first service according to the field carrying the transmission service type in the first message, and further determines that the real-time rate of the first message flow does not meet the flow rate adjustment requirement of the first service when the first message is received, the message forwarding device writes the first message cached in the receiving cache into the storage space pointed to by the tail pointer of the second queue, thereby achieving the purpose of scheduling the first message to the second queue.
[0139] It is understandable that when the message forwarding device determines in step 103 that the real-time length of the first queue is lower than the lowest waterline of the first queue after a period of time, it means that the first queue is not congested at this time. In this case, the message forwarding device will not set a malicious mark for the message of the first message flow, so that the message of the first message flow can be rescheduled to the first queue. Alternatively, when the message forwarding device determines in step 103 that the real-time rate of the first message flow is less than or equal to the expected rate after a period of time, it means that the sender of the first message flow strictly complies with the rate adjustment requirements of the first service. Therefore, in this case, the message forwarding device will not set a malicious mark for the message of the first message flow, so that the message of the first message flow can be rescheduled to the first queue.
[0140] It can be understood that after the message forwarding device dispatches the first message to the second queue, and determines that the real-time length of the second queue including the first message exceeds (or is greater than) the lowest waterline of the second queue, the message forwarding device calculates the packet loss probability of performing a packet loss operation on the first message according to the real-time length of the first queue and the conversion function. For a detailed description of the message forwarding device calculating the packet loss probability of performing a packet loss operation on the first message according to the real-time length of the first queue and the conversion function, reference can be made to the detailed description of the message forwarding device calculating the marking probability of marking the first message with the ECN flag according to the real-time length of the first queue and the first conversion function in step 104, which will not be repeated here.
[0141] Step 107: Send the first message according to the scheduling priority of the second queue.
[0142] It should be understood that when the transmission delay required by the first service is lower than the transmission delay required by the second service, the scheduling priority of the second queue is lower than the high priority of the first queue. Therefore, the message forwarding device executes the scheduling strategy according to the scheduling priority of the first queue to complete the forwarding of the first message scheduled to the second queue.
[0143] Through the method described in steps 101 to 107, malicious traffic (such as the first message flow) that nominally uses the first service for transmission but actually does not strictly comply with the flow rate adjustment requirements of the first service is filtered, and the messages of the first message flow are scheduled to be sent through the second queue for storing messages that use the second service for transmission. In this way, the transmission delay of the traffic that actually uses the first service for transmission can be guaranteed.
[0144] In some other embodiments, there are messages transmitted using the first service and messages transmitted using the second service in the network at the same time, and the network device sends the messages transmitted using the first service through the first queue described above, and sends the messages transmitted using the second service through the second queue. Since the first queue and the second queue have different scheduling priorities, in order to ensure fairness when sending messages through different queues, reference is made to Figure 6 , Figure 6 A schematic diagram of a flow chart of another message forwarding method provided in an embodiment of the present application is shown. The method can be applied Figure 1 The packet forwarding device in the application scenario shown. Figure 6 As shown, the method includes the following steps.
[0145] Step 201: Detect the sending rate of messages in the first queue.
[0146] In the process of forwarding messages through the first queue and the second queue, if the scheduling priority of the first queue is higher than the scheduling priority of the second queue, then when there are many messages in the first queue, when the message forwarding device schedules and forwards the messages, there will be a large number of messages in the first queue to be scheduled and forwarded, and the messages in the second queue may be in a state of waiting for scheduling for a long time, which will make the messages in the second queue not be fairly scheduled, thereby affecting the experience of users sending messages in the second queue.
[0147] In this case, the message forwarding device continuously or periodically detects the sending rate of messages in the first queue. The sending rate of messages in the first queue refers to the rate at which the message forwarding device schedules and forwards messages in the first queue.
[0148] Optionally, the process of the message forwarding device detecting the sending rate of the messages in the first queue can be implemented by counting the number of bytes of the messages in the first queue that are scheduled to be forwarded within a unit time. For example, if the message forwarding device determines that the number of bytes of the messages in the first queue that are scheduled to be forwarded within 1 second is 10 megabits (Mb), then the sending rate of the messages in the first queue can be determined to be 10 megabits per second (Mbps).
[0149] Step 202: When the sending rate of messages in the first queue is greater than the rate threshold, and the message forwarding device currently schedules the first queue and the second queue according to the strict priority scheduling rule, the message forwarding device adjusts the scheduling rules of the first queue and the second queue to weighted round-robin scheduling, and the scheduling weight of the first queue is greater than the scheduling weight of the second queue.
[0150] A rate threshold is configured in the message forwarding device. Optionally, the rate threshold may be a committed information rate (CIR). It should be understood that when the sending rate of the messages in the first queue is greater than the rate threshold, the messages in the first queue will occupy too much sending bandwidth of the message forwarding device, resulting in a lack of available sending bandwidth for the messages in the second queue. For example, for the first queue with a high scheduling priority and the second queue with a low scheduling priority, assuming that the current scheduling rule is a strict priority (SP) scheduling rule, the message forwarding device needs to schedule and send all the messages in the first queue before scheduling and sending the messages in the second queue. When the message forwarding device continuously schedules messages for the first queue, the SP scheduling rule will cause the message forwarding device to continuously schedule and send the messages in the first queue, resulting in the messages in the second queue being in a state of waiting for scheduling for a long time. This will cause serious unfairness problems when the first queue and the second queue send messages through the sending bandwidth of the message forwarding device. The SP scheduling rule means that after all the messages in the queue with a high scheduling priority are scheduled to be sent, the messages in the queue with a low scheduling priority are scheduled to be sent.
[0151] Taking fairness into consideration, for the sending rate of the message in the first queue detected by the message forwarding device at any time, when the message forwarding device determines that the sending rate is greater than the rate threshold, and the message forwarding device currently schedules the first queue and the second queue according to the scheduling rule of the SP, the message forwarding device adjusts the scheduling rules of the first queue and the second queue to weighted round robin (WRR) scheduling. Among them, the WRR scheduling rule means: cyclically scheduling messages in queues with different scheduling priorities with different scheduling weights, and the scheduling weight of the queue with a high scheduling priority is greater than the scheduling weight of the queue with a low scheduling priority. Therefore, considering that the scheduling priority of the first queue is higher than the scheduling priority of the second queue, the scheduling weight configured by the message forwarding device for the first queue (referred to as the first scheduling weight) is greater than the scheduling weight configured for the second queue (referred to as the second scheduling weight). The embodiment of the present application does not specifically limit the values of the first scheduling weight and the second scheduling weight, and it is only necessary to ensure that the value of the first scheduling weight is greater than the value of the first scheduling weight. It should be understood that after the message forwarding device adjusts the scheduling rules of the first queue and the second queue to weighted round-robin scheduling, the scheduling weight of the first queue can ensure the transmission delay of the messages transmitted in the first queue using the first service.
[0152] As an example, for a first queue with a high scheduling priority and a second queue with a low scheduling priority, when the message forwarding device adjusts the scheduling rule from SP to WRR, and the message forwarding device configures a first scheduling weight of 10 for the first queue and a second scheduling weight of 1 for the second queue, in this case, when the message forwarding device schedules the sending of messages in the first queue and the second queue based on the WRR scheduling rule, it first schedules the sending of 10 messages in the first queue, then schedules the sending of 1 message in the second queue, and then schedules the sending of 10 messages in the first queue again, and after scheduling the sending of the 10 messages, schedules the sending of 1 message in the second queue, and so on. The message forwarding device can perform weighted round-robin scheduling on the messages in the first queue and the second queue according to the scheduling weight of the first queue and the scheduling weight of the second queue.
[0153] Step 203: When the sending rate of the messages in the first queue is greater than the rate threshold, and the message forwarding device currently schedules the first queue and the second queue according to the scheduling rule of weighted round-robin scheduling (WRR), the message forwarding device reduces the scheduling weight of the first queue and / or increases the scheduling weight of the second queue. The adjusted scheduling weight of the first queue is greater than the adjusted scheduling weight of the second queue.
[0154] It should be understood that when the message forwarding device currently schedules the first queue and the second queue according to the WRR scheduling rule, for the sending rate of the message in the first queue detected by the message forwarding device at any time, if the sending rate is greater than the rate threshold, it means that the message in the first queue has occupied too many sending resources of the message forwarding device, that is, it means that the message forwarding device has a serious unfairness problem when scheduling the messages in the first queue and the second queue. In this case, the message forwarding device can reduce the first scheduling weight configured for the first queue, and / or increase the second scheduling weight configured for the second queue. Among them, the embodiment of the present application does not limit the specific value of reducing the first scheduling weight and increasing the specific value of the second scheduling weight. Considering that the scheduling priority of the first queue is higher than the scheduling priority of the second queue, the embodiment of the present application only needs to ensure that the adjusted first scheduling weight is still greater than the adjusted second scheduling weight. It can be understood that after the message forwarding device reduces the scheduling weight of the first queue and / or increases the scheduling weight of the second queue, the adjusted scheduling weight of the first queue can ensure the transmission delay of the message transmitted by the first service in the first queue.
[0155] In one example, the message forwarding device reduces the first scheduling weight configured for the first queue to obtain a third scheduling weight. In addition, the message forwarding device maintains the second scheduling weight configured for the second queue unchanged. At this time, in order to ensure that the scheduling priority of the first queue is higher than the scheduling priority of the second queue, the third scheduling weight is greater than the second scheduling weight.
[0156] In another example, the message forwarding device maintains the first scheduling weight configured for the first queue unchanged. In addition, the message forwarding device increases the second scheduling weight configured for the second queue to obtain a fourth scheduling weight. At this time, in order to ensure that the scheduling priority of the first queue is higher than the scheduling priority of the second queue, the first scheduling weight is greater than the fourth scheduling weight.
[0157] In another example, the message forwarding device reduces the first scheduling weight configured for the first queue to obtain a third scheduling weight. In addition, the message forwarding device increases the second scheduling weight configured for the second queue to obtain a fourth scheduling weight. At this time, in order to ensure that the scheduling priority of the first queue is higher than the scheduling priority of the second queue, the third scheduling weight is greater than the fourth scheduling weight.
[0158] Optionally, the message forwarding device may execute step 203 when it detects that the sending rate of messages in the first queue is greater than the rate threshold after executing step 202. Of course, the scheduling rule for scheduling the first queue and the second queue originally configured by the message forwarding may also be WRR. In this case, the message forwarding device executes step 203 when it detects that the sending rate of messages in the first queue is greater than the rate threshold at any time. This embodiment of the present application does not limit this.
[0159] In the embodiment of the present application, the process of adjusting the scheduling rules for scheduling the first queue and the second queue described in steps 201 to 203 can be called conditional priority scheduling. The condition refers to: the scheduling weight of the first queue is greater than the scheduling weight of the second queue, and the scheduling weight of the first queue can ensure the transmission delay of the message transmitted by the first service in the first queue.
[0160] Through the method described in steps 201 to 203, it is realized that when the message forwarding device schedules and forwards messages through the first queue and the second queue, and the scheduling priority of the first queue is higher than the scheduling priority of the second queue, the message forwarding device ensures that the messages in the second queue can obtain relatively fair transmission bandwidth of the message forwarding device on the basis of ensuring the scheduling priority of the first queue. In this way, it is realized that the message flow transmitted by the first service (such as L4S service) in a short time obtains a higher scheduling priority, and at the same time ensures that the message flow transmitted by the first service and the message flow transmitted by the second service in a long time obtain approximately fair bandwidth.
[0161] The following is a detailed description of the process of "the message forwarding device collects the first flow parameters of the first message flow through the flow table, and calculates the real-time rate of the first message flow according to the first flow parameters" in step 102. Figure 7 , Figure 7 A schematic diagram of a process for obtaining a real-time rate of a message flow provided by an embodiment of the present application is shown. Figure 7 As shown, the process includes the following steps:
[0162] Step 1021: Obtain first flow parameters of the first message flow.
[0163] The first flow parameters include the transmission duration of the first message flow and the number of bytes of the first message flow that have been received until the message forwarding device receives the first message. The transmission duration of the first message flow can be calculated by the time when the message forwarding device receives the first message of the first message flow and the time when the first message is received.
[0164] Optionally, the message forwarding device creates a flow table entry in the flow table for each message flow received, and is able to collect flow parameters of the message flow through the flow table entry. Among them, a flow table is configured in the message forwarding device. Optionally, the flow table configured by the message forwarding device can be implemented as a hash table, which is not limited to this. In some examples, the flow table configured in the message forwarding device can be a software flow table or a hardware flow table, which is not limited to this. It can be understood that compared with the software flow table, the hardware flow table supports larger table item specifications and has a faster flow parameter collection frequency.
[0165] In the flow table configured by the message forwarding device, each flow table entry corresponds to a message flow. For example, by recording the flow identifier (ID) or five-tuple of the message flow in the flow table entry, the flow table entry is matched with the message flow. The five-tuple of the message flow includes the source address, source port, destination address, destination port and transport protocol of the message flow. It should be understood that the five-tuple or flow ID of the message flow can be used to identify the message flow.
[0166] Taking the example that the first message flow is identified by the quintuple of the first message flow (recorded as the first quintuple), when the message forwarding device receives the third message carrying the first quintuple, it first queries the flow table of the message forwarding device according to the first quintuple carried by the third message. In one possible case, the message forwarding device determines that there is no flow table entry including the first quintuple in the flow table after querying the flow table according to the first quintuple, which means that the third message carrying the first quintuple is the first message of the first message flow identified by the first quintuple. In this case, the message forwarding device creates a new flow table entry in the flow table (recorded as the first flow table entry), and records the first quintuple in the first flow table entry, as well as the time when the first message of the first message flow is received, the time when the current message is received, and the number of bytes of the first message flow that have been received in the first flow table entry. Among them, since the third message is the first message of the first message flow at this time, the time of receiving the first message of the first message flow and the time of receiving the current message recorded in the first flow table entry are both the time when the message forwarding device receives the third message, and the number of bytes of the first message flow that have been received recorded in the first flow table entry is the number of bytes included in the third message. It can be seen that the first flow table entry is the flow table entry corresponding to the first message flow in the flow table. In another possible situation, the message forwarding device determines that there is a first flow table entry including the first quintuple in the flow table after querying the flow table according to the first quintuple carried by the third message. At this time, it means that the flow table includes a flow table entry corresponding to the first message flow identified by the first quintuple. In this case, the message forwarding device updates the first flow table entry to record the time when the current message is received and the number of bytes of the first message flow that have been received. Specifically, the message forwarding device updates the time of receiving the current message recorded in the first flow table entry to the time of receiving the third message, and adds the number of bytes of the first message flow received recorded in the first flow table entry to the number of bytes included in the third message, so as to update the number of bytes of the first message flow received recorded in the first flow table entry.
[0167] As an example, take the case where message flow 1 is identified by quintuple 1. When the message forwarding device receives message 1 carrying quintuple 1 at the current time (denoted as t1), and the number of bytes included in message 1 is 10, the message forwarding device first queries the flow table according to quintuple 1. When the message forwarding device queries the flow table according to quintuple 1 and determines that there is no flow table entry including quintuple 1 in the flow table, it means that message 1 carrying quintuple 1 is the first message of message flow 1 identified by quintuple 1. In this case, the message forwarding device creates a new flow table entry (denoted as flow table entry 1) in the flow table, and records quintuple 1 in flow table entry 1, as well as t1 and the number of bytes 10 in flow table entry 1. Among them, t1 is the time when the message forwarding device receives the first message of message flow 1, and is also the time when the message forwarding device receives the current message, and the number of bytes 10 is the number of bytes received by the message forwarding device. When the message forwarding device queries the flow table according to the five-tuple 1 and determines that there is a flow table entry 1 including the five-tuple 1 in the flow table, it means that the flow table includes a flow table entry corresponding to the message flow 1 identified by the five-tuple 1. In this case, the message forwarding device updates t1 with the time when the current message is received recorded in the flow table entry 1. In addition, when the number of bytes recorded in the flow table entry 1 is 100, the message forwarding device also updates the number of bytes of the received message flow 1 recorded in the flow table entry 1 to (100+10)=110.
[0168] In this way, when the message forwarding device receives the first message, the first flow table entry corresponding to the first message flow in the flow table can be updated according to the first message. Specifically, the message forwarding device updates the time of receiving the current message recorded in the first flow table entry according to the time of receiving the first message, and updates the number of bytes of the first message flow that has been received recorded in the first flow table entry according to the number of bytes included in the first message.
[0169] Furthermore, after updating the first flow table entry according to the first message, the message forwarding device reads the number of bytes of the first message flow received recorded in the first flow table entry from the first flow table entry. That is, the message forwarding device obtains the number of bytes received in the first flow parameter.
[0170] In addition, after updating the first flow table entry according to the first message, the message forwarding device also reads the time when the first message of the first message flow is received and the time when the current message (i.e., the first message) is received recorded in the first flow table entry, and determines the transmission time of the first message flow until the message forwarding device receives the first message based on the read time when the first message of the first message flow is received and the time when the current message is received. Among them, the transmission time of the first message flow = the time when the current message is received - the time when the first message of the first message flow is received. In this way, the message forwarding device obtains the transmission time of the first message flow in the first flow parameters.
[0171] Step 1022: Calculate the real-time rate of the first message flow according to the first flow parameters.
[0172] The message forwarding device calculates the real-time rate of the first message flow according to the transmission time of the first message flow and the number of bytes received by the time the first message is received. The real-time rate of the first message flow when the message forwarding device receives the first message = the number of bytes received by the first message flow / the transmission time of the first message flow by the time the first message is received.
[0173] In this way, through step 1021 to step 1022, the message forwarding device calculates the real-time rate of the first message flow when the first message is received.
[0174] Optionally, since the flow table capacity configured in the message forwarding device is limited, the message forwarding device can filter out large flows and small flows based on the real-time rate determined historically for the message flow corresponding to each flow table entry. For example, the message forwarding device determines a message flow whose real-time rate is greater than a threshold as a large flow, and determines a message flow whose real-time rate is less than the threshold as a small flow. For another example, the message forwarding device determines a message flow whose average of multiple real-time rates determined within a period of time exceeds a threshold as a large flow, and determines a message flow whose average of multiple real-time rates determined within a period of time does not exceed the threshold as a small flow. Not limited to this. Furthermore, when the message forwarding device receives a message of a new message flow, but the flow table is full at the current moment, the message forwarding device clears the flow table entry corresponding to the small flow, and uses the flow table entry as the flow table entry of the newly arrived message flow. No more details will be given.
[0175] The detailed process of "the message forwarding device determines the expected rate of the first message flow" in step 103 is described below. Figure 8 , Figure 8 FIG. 2 is a schematic diagram showing a process of determining an expected rate of a first message flow according to an embodiment of the present application. Figure 8 As shown, the process may include the following steps.
[0176] Step 1031: Obtain the historical rate of the first message flow.
[0177] The historical rate of the first message flow refers to the real-time rate of the first message flow when the message forwarding device receives the second message in the first message flow. The second message is any message in the first message flow that is received by the message forwarding device before the first message and is scheduled to the first queue. Therefore, the historical rate can also be understood as the historical rate corresponding to the second message.
[0178] The message forwarding device can calculate the real-time rate of the first message flow when the message forwarding device receives the second message based on the second flow parameter of the first message flow. The second flow parameter includes the transmission duration of the first message flow and the number of bytes received by the time the second message in the first message flow is received. The detailed description of the message forwarding device calculating the real-time rate of the first message flow when the message forwarding device receives the second message based on the second flow parameter of the first message flow can be referred to the description of the message forwarding device calculating the real-time rate of the first message flow based on the first flow parameter of the first message flow in step 102, which will not be repeated here.
[0179] Step 1032: Obtain historical marking probability.
[0180] The historical marking probability is the marking probability corresponding to the second message. When the congestion control strategy adopted by the first queue is the strategy of marking the ECN mark, the historical marking probability specifically refers to the probability of marking the ECN mark for the second message scheduled to the first queue.
[0181] Optionally, the message forwarding device determines the historical marking probability based on the historical status information of the first queue. The historical status information of the first queue includes the real-time length of the first queue when the message forwarding device schedules the second message to the first queue. Optionally, the historical status information of the first queue may also include the lowest watermark of the first queue when the message forwarding device schedules the second message to the first queue. It should be understood that when the congestion control strategy adopted by the first queue is a strategy of marking the ECN mark, the lowest watermark of the first queue is the starting position of the message forwarding device marking the ECN mark for the message in the first queue.
[0182] For example, after receiving the second message and dispatching the second message to the first queue, the message forwarding device reads the real-time status data of the first queue (that is, the above-mentioned historical status information of the first queue). Then, the message forwarding device calculates the probability of marking the ECN mark for the second message in the first queue (that is, the above-mentioned historical marking probability) based on the read real-time status data of the first queue and the conversion function. Among them, the detailed description of the message forwarding device calculating the probability of marking the ECN mark for the second message in the first queue based on the real-time status data of the first queue and the conversion function can be referred to the description of the message forwarding device calculating the marking probability for the message newly dispatched to the first queue as described above, which will not be repeated here.
[0183] It can be understood that steps 1031 to 1032 can be repeated periodically to ensure that the historical rate obtained by the message forwarding device at the current moment is based on the historical rate determined by the messages scheduled to the first queue at a time close to the current moment, and the historical marking probability determined corresponding to the historical rate.
[0184] Step 1033: Find the corresponding relationship between the marking probability and the speed reduction ratio according to the above historical marking probability to determine the target speed reduction ratio of the first message flow required by the first service after scheduling the second message to the first queue.
[0185] Among them, the speed reduction ratio of the first message flow required by the first service refers to the speed reduction ratio of the sending end of the message to reduce the message flow rate when the first queue performs congestion control on the messages in the first queue through the congestion control strategy in order to ensure the transmission delay of the messages in the first queue. It should be understood that the message forwarding device configures the correspondence between different marking probabilities and different speed reduction ratios for the first queue according to the transmission delay requirements of the messages transmitted by the first service in the first queue. For example, when the marking probability is 0.1, the corresponding speed reduction ratio is a speed reduction of 10%. For another example, when the marking probability is 0.8, the corresponding speed reduction ratio is 80%, but it is not limited to this.
[0186] Therefore, the message forwarding device can determine the target speed reduction ratio based on the correspondence between the historical marking probability query mark probability and the speed reduction ratio determined in step 1032, which is the speed reduction ratio of the first message flow required by the first service after scheduling the second message to the first queue.
[0187] Step 1034: Determine the expected rate of the first message flow according to the historical rate of the first message flow and the target rate reduction ratio.
[0188] Here, the expected rate of the first message flow is specifically: after the message forwarding device receives the second message and schedules the second message to the first queue, in order to ensure the transmission delay of the message in the first queue, when the first queue performs congestion control on the message in the first queue through the congestion control strategy, the sender of the message is required to reduce the message flow rate.
[0189] As an example, the expected rate of the first message flow=the historical rate of the first message flow×the target rate reduction ratio.
[0190] In order to deepen the understanding of the message processing method provided in the embodiment of the present application, the message forwarding method is further introduced below with reference to examples.
[0191] For example, the first service is an L4S service, the second service is a traditional service, the first queue is an L4S queue, and the second queue is a traditional queue. Fig. 9 , Fig. 9 A flow chart of another message forwarding method provided in an embodiment of the present application is shown.
[0192] like Fig. 9As shown, after receiving an L4S message or a traditional message, the message forwarding device first classifies the message according to the field carrying the transmission service type in the message, thereby determining the transmission service used by the message flow to which the message belongs (refer to step 102). Next, when the message forwarding device determines that the message is a message using the L4S service according to the field indicating the transmission service type carried in the received message, that is, the message is an L4S message, the message forwarding device further performs intelligent flow classification on the message (refer to Figure 4 As described above). Then the message forwarding device will schedule the messages that strictly comply with the flow rate regulation requirements of L4S to the L4S queue (refer to step 104), and will schedule the messages that do not strictly comply with the flow rate regulation requirements of L4S to the traditional queue (refer to step 106). When the message forwarding device determines that the message is a message using a traditional service based on the field indicating the type of transmission service carried in the received message, that is, the message is a traditional message, the message forwarding device schedules the traditional message to the traditional queue. Then, the scheduler of the message forwarding device performs conditional priority scheduling (refer to steps 201 to 203), and schedules and sends the messages in the L4S queue and the traditional queue (refer to steps 105 and 107).
[0193] In addition, the message forwarding device also determines the AQM parameters in the process of forwarding the message, and sends the AQM parameters to the L4S queue and the traditional queue. The AQM parameters include but are not limited to the marking probability, packet loss probability, minimum waterline position, and maximum waterline position determined by the message forwarding device for the L4S queue and the traditional queue. The detailed description of the determination of the AQM parameters by the message forwarding device can refer to the relevant description above, which will not be repeated here.
[0194] It should be noted that the sequence of steps of the message forwarding method provided in the embodiment of the present application can be adjusted appropriately, and the steps can be increased or decreased accordingly according to the situation. Any technician familiar with the technical field can easily think of a change within the technical scope disclosed in this application, and all of them should be included in the protection scope of this application, so they will not be repeated.
[0195] The above mainly introduces the solution provided in the embodiment of the present application from the perspective of method.
[0196] In order to achieve the above functions, Fig.10 As shown, Fig.10 FIG. 1 is a schematic diagram showing the structure of a message forwarding device 1000 provided in an embodiment of the present application. The message forwarding device 1000 is used to execute the message forwarding method described above, for example, to execute Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 or Fig. 9The message forwarding device 1000 may include a transceiver unit 1001 and a processing unit 1002 .
[0197] The transceiver unit 1001 is used to receive a first message. The processing unit 1002 is used to obtain the real-time rate of the first message flow when it is determined that the transmission service adopted by the first message flow to which the first message belongs is the first service; determine whether the first message flow meets the flow rate regulation requirement of the first service according to the real-time rate of the first message flow; and when the first message flow meets the flow rate regulation requirement of the first service, schedule the first message to a first queue for storing messages transmitted using the first service. The transceiver unit 1001 is also used to send the first message according to the scheduling priority of the first queue. The transmission service includes the first service or the second service, and the transmission delay of the message transmitted using the first service is different from the transmission delay of the message transmitted using the second service.
[0198] As an example, combining Figure 3 The transceiver unit 1001 can be used to execute step 101 and step 105, and the processing unit 1002 can be used to execute step 102, step 103 and step 104.
[0199] Optionally, the processing unit 1002 is specifically configured to determine that the first message flow meets the flow rate adjustment requirement of the first service when the real-time rate of the first message flow is less than or equal to the expected rate. The expected rate refers to the expected rate of the first message flow after the flow rate of the first message flow is adjusted based on the first service.
[0200] As an example, combining Figure 3 , processing unit 1002 can be used to execute step 103.
[0201] Optionally, the processing unit 1002 is further specifically configured to determine that the first message flow fails to meet a flow rate adjustment requirement of the first service when the real-time rate of the first message flow is greater than an expected rate.
[0202] As an example, combining Figure 3 , processing unit 1002 can be used to execute step 103.
[0203] Optionally, the processing unit 1002 is further configured to schedule the first message to a second queue for storing messages transmitted using the second service when it is determined that the first message flow does not meet the flow rate regulation requirements of the first service. The transceiver unit 1001 is further configured to send the first message according to the scheduling priority of the second queue. When the transmission delay of the message transmitted using the first service is lower than the transmission delay of the message transmitted using the second service, the scheduling priority of the second queue is lower than the scheduling priority of the first queue.
[0204] As an example, combining Figure 5 , the processing unit 1002 can be used to execute step 106, and the transceiver unit 1001 can be used to execute step 107.
[0205] Optionally, the lowest watermark of the first queue is lower than the lowest watermark of the second queue. The lowest watermark of the first queue is the starting position of marking the ECN mark for the message in the first queue. The lowest watermark of the second queue is the position where packet loss starts in the second queue, or the lowest watermark of the second queue is the starting position of marking the ECN mark for the message in the second queue. The ECN mark is used to regulate the message flow rate.
[0206] Optionally, the above method is applied to a message forwarding device. In the message forwarding device, an on-chip buffer for storing messages in the first queue is larger than an on-chip buffer for storing messages in the second queue.
[0207] Optionally, the above method is applied to a message forwarding device. In the message forwarding device, the bandwidth of reading and / or writing the off-chip memory configured for the first queue is greater than the bandwidth of reading and / or writing the off-chip memory configured for the second queue.
[0208] Optionally, the processing unit 1002 is further used to detect the sending rate of the message in the first queue. When the sending rate of the message in the first queue is greater than the rate threshold, and the first queue and the second queue are currently scheduled according to the scheduling rule of SP, the processing unit 1002 is further used to adjust the scheduling rules of the first queue and the second queue to WRR scheduling, and the scheduling weight of the first queue is greater than the scheduling weight of the second queue. Alternatively, when the sending rate of the message in the first queue is greater than the rate threshold, and the first queue and the second queue are currently scheduled according to the scheduling rule of WRR, the processing unit 1002 is further used to reduce the scheduling weight of the first queue and / or increase the scheduling weight of the second queue. Among them, the adjusted scheduling weight of the first queue is greater than the adjusted scheduling weight of the second queue.
[0209] As an example, combining Figure 6 , the processing unit 1002 can be used to execute steps 201 to 203.
[0210] Optionally, the processing unit 1002 is further specifically configured to collect first flow parameters of the first message flow; and calculate the real-time rate of the first message flow according to the first flow parameters of the first message flow. The first flow parameters of the first message flow include the transmission duration of the first message flow and the number of bytes received by the time the first message is received.
[0211] As an example, combining Figure 7 , processing unit 1002 can be used to execute step 1021 and step 1022.
[0212] Optionally, the processing unit 1002 is further used to determine the expected rate of the first message flow according to the historical rate of the first message flow and the target speed reduction ratio; and to determine whether the first message flow meets the flow rate adjustment requirement of the first service according to the real-time rate of the first message flow and the expected rate of the first message flow. The historical rate of the first message flow is the real-time rate of the first message flow when the second message in the first message flow is received, and the second message is a message in the first message flow that is received before the first message and is scheduled to the first queue. The target speed reduction ratio is the speed reduction ratio required by the first service after the second message is scheduled to the first queue.
[0213] As an example, combining Figure 8 , processing unit 1002 may be configured to perform step 1034. Figure 3 , processing unit 1002 can be used to execute step 103.
[0214] Optionally, before the processing unit 1002 determines the expected rate of the first message flow according to the historical rate and the target speed reduction ratio of the first message flow, the processing unit 1002 is further used to obtain the historical rate, obtain the historical marking probability, and find the corresponding relationship between the marking probability and the speed reduction ratio according to the historical marking probability, so as to determine the target speed reduction ratio of the first message flow required by the first service after the second message is scheduled to the first queue. The target speed reduction ratio is used to determine the expected rate of the first message flow, and the historical marking probability is the probability of marking the ECN mark for the second message scheduled to the first queue.
[0215] As an example, combining Figure 8 , the processing unit 1002 can be used to execute steps 1031 to 1033.
[0216] Optionally, the above method is performed by a message forwarding device. The message forwarding device is configured with at least one of the following conversion functions: a quadratic function, a multi-power function, an exponential function, or a function that is piecewise fitted by any two of the quadratic function, the multi-power function, and the exponential function. After the processing unit 1002 schedules the first message to the first queue, the processing unit 1002 is also used to calculate the marking probability of the first message according to the real-time length of the first queue and the first conversion function when the real-time length of the first queue including the first message is greater than the lowest watermark of the first queue; and mark the first message with an ECN mark according to the marking probability of the first message. The lowest watermark is the starting position of marking the message with an ECN mark in the first queue, and the ECN mark is used to indicate a reduction in the message flow rate, and the first conversion function is any conversion function configured by the message forwarding device.
[0217] Optionally, before the processing unit 1002 calculates the marking probability of the first message according to the real-time length of the first queue and the first conversion function, the processing unit 1002 is further configured to update the second conversion function to the first conversion function in response to a preset event. The second conversion function is any conversion function other than the first conversion function among the multiple conversion functions configured by the message forwarding device, or the second conversion function is a conversion function having a constant parameter different from that of the first conversion function.
[0218] Optionally, the above-mentioned preset event includes any one of the following events: the preset duration is reached, the queue delay of the first queue is greater than the delay threshold, or an update instruction is received.
[0219] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the above message forwarding devices 1000 can refer to the above corresponding method embodiments, which will not be repeated here.
[0220] As an example, in combination with the following Fig.11 The functions implemented by the transceiver unit 1001 in the message forwarding device 1000 can be realized by Fig.11 The functions implemented by the processing unit 1002 in the message forwarding device 1000 can be realized by Fig.11 Processor 1101 in the Fig.11 The program code in the memory 1102 is implemented.
[0221] Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0222] It should be noted that Fig.10 The division of modules / units in the above is schematic and is only a logical function division. There may be other division methods in actual implementation. For example, two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or software function modules.
[0223] An embodiment of the present application provides a message forwarding device, which is used to implement part or all of the functions of the message forwarding method provided in the embodiment of the present application. Fig.11Schematic diagram of the structure of a message forwarding device provided in an embodiment of the present application. Fig.11 As shown, the message forwarding device 1100 includes a processor 1101, a memory 1102, a network interface 1103 and a bus 1104. The processor 1101, the memory 1102 and the network interface 1103 are connected to each other through the bus 1104.
[0224] Processor 1101 may include a general processor and / or a dedicated hardware chip. A general processor may include: a central processing unit (CPU), a microprocessor or a graphics processing unit (GPU). The CPU is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). A dedicated hardware chip is a hardware module for high-performance processing. Dedicated hardware chips include digital signal processors (DSP), data processors (DPU), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, neural processing units (NPU), tensor processing units (TPU), artificial intelligence (artificial intelligent) chips or network processors (NP). Processor 1101 may also be an integrated circuit chip with signal processing capabilities. During the implementation process, part or all of the functions of the method provided in the embodiment of the present application can be completed through the hardware integrated logic circuit in the processor 1101 or the instructions in the form of software.
[0225] The memory 1102 is used to store computer programs, and the computer programs include an operating system 1102a and executable codes (i.e., program instructions) 1102b. The memory 1102 is, for example, a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, or other types of static storage devices that can store static information and instructions, and is also a random access memory (static RAM, SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (synchlink DRAM, SLDRAM) or other types of dynamic storage devices that can store information and instructions, such as read-only optical disks or other optical disk storage, optical disk storage (including compressed optical disks, laser disks, optical disks, digital versatile disks, Blu-ray disks, etc.), disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store the desired executable code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this. For example, the memory 1102 is used to store the flow table, the message of the first queue, the message of the second queue, etc. described above. The memory 1102, for example, exists independently and is connected to the processor 1101 via the bus 1104. Or the memory 1102 and the processor 1101 are integrated together. The memory 1102 can store executable code, and when the executable code stored in the memory 1102 is executed by the processor 1101, the processor 1101 is used to execute part or all of the functions of the message forwarding method provided in the embodiment of the present application. The implementation method of the processor 1101 executing the process please refer to the relevant description in the aforementioned embodiment. The memory 1102 may also include software modules and data required for other running processes such as an operating system.
[0226] The network interface 1103 uses a transceiver module such as, but not limited to, a transceiver to achieve communication with other devices or communication networks. For example, the network interface 1103 can be any one or any combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, and other devices with network access functions. The network interface 1103 includes a receiving unit for receiving data / messages, and a sending unit for sending data / messages.
[0227] The bus 1104 is any type of communication bus for interconnecting the internal devices (e.g., the memory 1102, the processor 1101, and the network interface 1103) of the message forwarding device 1100. For example, a system bus. The embodiment of the present application takes the interconnection of the above-mentioned devices inside the message forwarding device 1100 through the bus 1104 as an example. Optionally, the above-mentioned devices inside the message forwarding device 1100 can also be connected to each other in communication with each other using other connection methods other than the bus 1104, for example, the above-mentioned devices inside the message forwarding device 1100 are interconnected through an internal logical interface.
[0228] It should be noted that the above-mentioned multiple devices can be respectively arranged on independent chips, or at least partially or completely arranged on the same chip. Whether to independently arrange each device on different chips or to integrate and arrange it on one or more chips often depends on the needs of product design. The embodiments of the present application do not limit the specific implementation form of the above-mentioned devices. The descriptions of the processes corresponding to the above-mentioned figures have different focuses. For the parts not described in detail in a certain process, please refer to the relevant descriptions of other processes.
[0229] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product providing the program development platform includes one or more computer instructions, and when these computer program instructions are loaded and executed on the message forwarding device 1100, all or part of the functions of the message forwarding method provided in the embodiments of the present application are implemented.
[0230] Furthermore, 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, computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium stores computer program instructions that provide a program development platform.
[0231] An embodiment of the present application also provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium, and the computer-readable storage medium includes program instructions. When the program instructions are executed on a computing device, a message forwarding device, a computer system or a processor, the computing device, the message forwarding device, the computer system or the processor implements the message forwarding method provided in the embodiment of the present application.
[0232] An embodiment of the present application also provides a computer program product comprising instructions. When the computer program product is run on a computing device, a message forwarding device, a computer system or a processor, the computing device, the message forwarding device, the computer system or the processor implements the message forwarding method provided by the embodiment of the present application.
[0233] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0234] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0235] The embodiment of the present application also provides a chip, which includes a processor for running program instructions or codes, and the chip or a device including the chip can be used to execute the message forwarding method provided in the embodiment of the present application. Exemplarily, the chip also includes: an input interface, an output interface, and a memory. Among them, the input interface, output interface, processor, and memory of the chip are connected through the internal connection path of the chip, and the memory in the chip is used to store the program instructions or codes run by the processor, and the input interface and output interface of the chip are used for the connection and communication between the chip and other chips or devices.
[0236] In the embodiments of the present application, the terms "first", "second" and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "at least one" means one or more, and the term "plurality" means a plurality, unless otherwise expressly defined.
[0237] The term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0238] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0239] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0240] It should be understood that the term “comprise” (also known as “includes”, “including”, “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0241] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0242] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the concept and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A message forwarding method, It is characterized in that include: receiving a first message; In a case where it is determined that a transmission service used by a first message flow to which the first message belongs is a first service, obtaining a real-time rate of the first message flow; wherein the transmission service includes the first service or the second service, and a transmission delay of a message transmitted using the first service is different from a transmission delay of a message transmitted using the second service; Determining, according to the real-time rate of the first message flow, whether the first message flow meets the flow rate adjustment requirement of the first service; If the first message flow meets the flow rate adjustment requirement of the first service, dispatching the first message to a first queue, where the first queue is used to store messages transmitted using the first service; The first message is sent according to the scheduling priority of the first queue.
2. The method according to claim 1, It is characterized in that The determining, according to the real-time rate of the first message flow, whether the first message flow meets the flow rate adjustment requirement of the first service includes: When the real-time rate of the first message flow is less than or equal to the expected rate, it is determined that the first message flow meets the flow rate adjustment requirement of the first service; wherein the expected rate refers to the expected rate of the first message flow after the flow rate of the first message flow is adjusted based on the first service.
3. The method according to claim 2, It is characterized in that The method further comprises: When the real-time rate of the first message flow is greater than the expected rate, it is determined that the first message flow does not meet the flow rate adjustment requirement of the first service.
4. The method according to claim 3, It is characterized in that The method further comprises: If it is determined that the first message flow does not meet the flow rate adjustment requirement of the first service, the first message is scheduled to a second queue, where the second queue is used to store messages transmitted using the second service; The first message is sent according to the scheduling priority of the second queue, wherein when the transmission delay of the message transmitted using the first service is lower than the transmission delay of the message transmitted using the second service, the scheduling priority of the second queue is lower than the scheduling priority of the first queue.
5. The method according to claim 4, It is characterized in that The lowest watermark of the first queue is lower than the lowest watermark of the second queue. The lowest watermark of the first queue is the starting position of marking an explicit congestion notification ECN mark for messages in the first queue. The ECN mark is used to regulate the message flow rate. The lowest watermark of the second queue is the position where packet loss starts in the second queue, or the lowest watermark of the second queue is the starting position of marking an ECN mark for messages in the second queue.
6. The method according to claim 4 or 5, It is characterized in that The method is applied to a message forwarding device, in which an on-chip cache for storing messages in the first queue is larger than an on-chip cache for storing messages in the second queue.
7. The method according to any one of claims 4 to 6, It is characterized in that The method is applied to a message forwarding device, in which a bandwidth for reading and / or writing an off-chip memory configured for the first queue is greater than a bandwidth for reading and / or writing an off-chip memory configured for the second queue.
8. The method according to any one of claims 4 to 7, It is characterized in that The method further comprises: Detecting a sending rate of messages in the first queue; When the sending rate is greater than the rate threshold, and the first queue and the second queue are currently scheduled according to the scheduling rule of strict priority SP, the scheduling rules of the first queue and the second queue are adjusted to weighted round-robin WRR scheduling, and the scheduling weight of the first queue is greater than the scheduling weight of the second queue; or, When the sending rate is greater than the rate threshold and the first queue and the second queue are currently scheduled according to the WRR scheduling rules, the scheduling weight of the first queue is reduced, and / or the scheduling weight of the second queue is increased; wherein the adjusted scheduling weight of the first queue is greater than the adjusted scheduling weight of the second queue.
9. The method according to any one of claims 1 to 8, It is characterized in that The obtaining the real-time rate of the first message flow includes: Collecting first flow parameters of the first message flow, where the first flow parameters include a transmission duration and a number of received bytes of the first message flow until the first message is received; The real-time rate of the first message flow is calculated according to the first flow parameters.
10. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: Determine the expected rate of the first message flow according to the historical rate and the target speed reduction ratio of the first message flow; wherein the historical rate is the real-time rate of the first message flow when the second message in the first message flow is received, the second message is a message received before the first message and scheduled to the first queue, and the target speed reduction ratio is the speed reduction ratio required by the first service after the second message is scheduled to the first queue; The determining, according to the real-time rate of the first message flow, whether the first message flow meets the flow rate adjustment requirement of the first service includes: According to the real-time rate of the first message flow and the expected rate of the first message flow, it is determined whether the first message flow meets the flow rate adjustment requirement of the first service.
11. The method according to claim 10, It is characterized in that Before determining the expected rate of the first message flow according to the historical rate and the target rate reduction ratio of the first message flow, the method further includes: Obtaining the historical rate; Obtaining a historical marking probability, where the historical marking probability is a probability of marking an ECN mark on the second message scheduled to the first queue; The correspondence between the marking probability and the speed reduction ratio is searched according to the historical marking probability to determine the target speed reduction ratio of the first message flow required by the first service after the second message is scheduled to the first queue, and the target speed reduction ratio is used to determine the expected rate of the first message flow.
12. The method according to any one of claims 1 to 11, It is characterized in that The method is performed by a message forwarding device, and the message forwarding device is configured with at least one of the following conversion functions: a quadratic function, a multi-power function, an exponential function, or a function obtained by performing piecewise fitting by any two of the quadratic function, the multi-power function, and the exponential function; After scheduling the first message to the first queue, the method further includes: When the real-time length of the first queue including the first message is greater than the lowest watermark of the first queue, calculating the marking probability of the first message according to the real-time length of the first queue and a first conversion function, the lowest watermark is the starting position of marking the message with an ECN mark in the first queue, the ECN mark is used to indicate reducing the message flow rate, and the first conversion function is any conversion function configured by the message forwarding device; An ECN mark is marked on the first message according to the marking probability of the first message.
13. The method according to claim 12, It is characterized in that Before calculating the marking probability of the first message according to the real-time length of the first queue and the first conversion function, the method further includes: In response to a preset event, the second conversion function is updated to the first conversion function, where the second conversion function is any one of the multiple conversion functions configured by the message forwarding device except the first conversion function, or the second conversion function is a conversion function having different constant parameters from the first conversion function.
14. The method according to claim 13, It is characterized in that The preset event includes any one of the following events: a preset duration is reached, a queue delay of the first queue is greater than a delay threshold, or an update instruction is received.
15. The method according to any one of claims 1 to 14, It is characterized in that The first service is a low-latency, low-packet-loss, scalable-throughput L4S service, and the second service is a traditional service that does not adopt the L4S service.
16. A message forwarding device, It is characterized in that include: A transceiver unit, configured to perform operations related to receiving and / or sending in the method according to any one of claims 1 to 15; A processing unit, configured to perform other operations other than operations related to receiving and / or sending in the method according to any one of claims 1 to 15.
17. A message forwarding device, It is characterized in that include: A memory, a network interface and one or more processors, wherein the one or more processors receive or send data through the network interface, and the one or more processors are configured to read program instructions stored in the memory to execute the method according to any one of claims 1 to 15.
18. A computer program product comprising instructions, It is characterized in that When the instruction is executed by the message forwarding device, the message forwarding device executes the method as claimed in any one of claims 1 to 15.
19. A computer-readable storage medium, It is characterized in that The method comprises computer program instructions, and when the computer program instructions are executed by a computing device or a processor, the computing device or the processor performs the method according to any one of claims 1 to 15.