Message transmission control method, device and system

By selecting packet-by-packet or flow-by-flow load balancing at the source node to transmit message streams based on conditions, the problem of throughput degradation caused by packet-by-packet load balancing is solved, network load balancing and throughput stability are achieved, and the packet loss rate is reduced.

CN120729796APending Publication Date: 2025-09-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410396069.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

When per-packet load balancing is used to transmit packets in a network, the throughput of the traffic at the destination node may drop sharply. This is especially true in some cases where the destination node has insufficient reordering resources or the transmission protocol does not support per-packet load balancing, resulting in unbalanced network traffic and reduced throughput.

Method used

By determining the conditions at the source node, a packet-by-packet or flow-by-flow load balancing method is selected to transmit the message stream. The conditions include transmission protocol support, the rescheduling capability and resource conditions of the destination node, adding hash factors or labels to indicate the path, and dynamically adjusting the load balancing method to ensure that the destination node has sufficient rescheduling resources and throughput.

Benefits of technology

It improves the load balancing degree of the network, reduces the packet loss rate of the destination node and the processing pressure of out-of-order messages, and ensures the stability of throughput and network reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729796A_ABST
    Figure CN120729796A_ABST
Patent Text Reader

Abstract

The invention discloses a message transmission control method, device and system, and belongs to the technical field of communication. The method is applied to a source node for sending a first message flow, and comprises the following steps: determining a first condition, and determining to send a message of the first message flow in a packet-by-packet load sharing mode according to the first condition. Wherein the first condition comprises that the transmission protocol adopted by the first message flow supports the transmission of the message in a packet-by-packet load sharing mode. According to the method, conditional packet-by-packet load sharing can be carried out on the message flow, so that the throughput of a destination side node of the message flow during message flow processing caused by improper use of packet-by-packet load sharing can be avoided under the condition of improving the load balance degree of a message flow transmission network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device and system for controlling message transmission. Background Art

[0002] The message forwarding capabilities of network nodes (such as switches and routers) are limited. In some cases, some network nodes may be responsible for forwarding a large amount of traffic, while other network nodes are relatively idle. This situation is also called network traffic imbalance. In this case, the network's data transmission capacity is reduced and single points of failure are more likely to occur.

[0003] To improve the data transmission capacity and reliability of the network, network nodes can use load balancing when forwarding traffic. Load balancing refers to the technology in which network nodes distribute traffic to multiple links for forwarding when forwarding traffic. Load balancing includes flow-by-flow load balancing with flow as the granularity and packet-by-packet load balancing with message as the granularity. When the traffic volume difference between flows is relatively large, flow-by-flow load balancing will still cause the problem of uneven load sharing. To further improve the load balancing degree of the network, packet-by-packet load balancing can be used to transmit messages in the network. However, when transmitting traffic in a packet-by-packet load balancing manner, in some cases, it may cause the throughput of the destination node of the traffic to drop sharply when processing the traffic. Summary of the Invention

[0004] The present application provides a method, device and system for controlling message transmission, which can avoid a sharp drop in throughput when a destination node of a flow processes the flow while improving the load balancing degree of the network.

[0005] The technical solutions provided in this application are as follows:

[0006] In a first aspect, the present application provides a method for controlling message transmission, the method being applied to a source node sending a first message flow, the method comprising: determining a first condition, and determining, based on the first condition, to use packet-by-packet load balancing to transmit messages in the first message flow. The first condition includes that a transmission protocol used by the first message flow supports packet-by-packet load balancing for message transmission.

[0007] Through this design, the source node can determine to send the message of the first message flow in a packet-by-packet load sharing manner when the first condition is met. This can avoid the problem that in some cases, when the message flow is transmitted in a packet-by-packet load sharing manner, the throughput of the destination node side device of the message flow decreases when processing the message flow. For example, it can avoid the problem that the transmission protocol used by the message flow does not support packet-by-packet load sharing, but the network node uses a packet-by-packet load sharing manner to transmit the message flow, thereby causing the throughput of the destination node of the message flow to drop sharply when processing the message flow.

[0008] In one possible design, the first condition also includes that the destination node of the first message flow and / or the access device of the destination node has message reordering capability, where the reordering capability refers to the ability to sort and reorganize out-of-order messages in the message flow.

[0009] In another possible design, the first condition also includes that the size of the reordering resources allocated by the destination node of the first message flow or the access device of the destination node for the first message flow exceeds a first threshold, and the reordering resources are used to sort and reorganize the out-of-order messages in the first message flow.

[0010] Through the above two possible designs, it is possible to determine that the first message flow will be transmitted using a packet-by-packet load sharing method only when the size of the reordering resources configured for the first message flow by the device with message reordering capability on the destination node side exceeds a certain threshold. In this way, it is possible to ensure that the device on the destination node side has sufficient reordering resources to use when sorting and reorganizing the out-of-order messages generated when the first message flow is transmitted using a packet-by-packet load sharing method, thereby improving the throughput of the destination node side when receiving and processing the first message flow. For example, when the destination node side has sufficient receiving buffer to use when sorting and reorganizing the out-of-order messages generated when the first message flow is transmitted using a packet-by-packet load sharing method, the probability of receiving buffer overflow can be reduced, thereby reducing the number of packet losses on the destination node side, and further improving the throughput of receiving and processing messages on the destination node side.

[0011] In another possible design, the first condition also includes receiving a first indication, where the first indication is used to indicate that packets of the first packet flow are sent in a packet-by-packet load sharing manner.

[0012] Through this possible design, the destination node of the first message flow or the access device of the destination node can, based on actual conditions (such as the degree of disorder of the received messages), adjust in real time the load sharing method adopted by the source node when sending the message flow through the first indication, thereby improving the load balancing degree of the transmission network.

[0013] In another possible design, the first condition further includes that the size of the first message flow exceeds the second threshold, or the first condition further includes that the first message flow is a data flow. With this possible design, it is possible to implement packet-by-packet load balancing for only large flows or data flows.

[0014] In another possible design, the method further includes: adding a different hash factor to each message to be transmitted in the first message flow; and sending the messages carrying the different hash factors. The first hash factor added to a first message in the first message flow is used to determine a forwarding path for the first message, where the first message is any message to be transmitted in the first message flow.

[0015] In another possible design, the method further includes: adding a first label to a message to be transmitted in the first message flow, and sending the message carrying the first label. The first label is used to instruct network nodes on the transmission path of the first message flow to forward the message carrying the first label using a packet-by-packet load balancing method.

[0016] Through the above two possible design methods, it is possible to transmit message streams in a packet-by-packet load sharing manner.

[0017] In another possible design, the first label is carried in a protocol field of a transport protocol used by the first packet flow, where the protocol field includes any one of the following fields: a flags field of Internet Protocol version 4 (IPv4), a flag field in a segment routing header (SRv6 SRH) based on segment routing of Internet Protocol version 6, unused bits in a network service header (NSH), or a field indicating a network operation in multi-protocol label switching (MPLS); or, the first label is a source media access control (MAC) address, a source Internet Protocol (IP) address, a network identifier (VNI) of a virtual extensible local area network (VXLAN) where the source node is located, or a source port number (VLOAD) included in a packet in the first packet flow. The first label is carried by a first port (sport); or, the first label is carried by an internet protocol version 6 (IPv6) flow label included in the message in the first message flow or a segment routing internet protocol version 6 (SRv6) segment identifier (SID) based on the internet protocol version 6 forwarding plane; or, the first label is carried in a differentiated services code point (DSCP) field, an experimental (EXP) field, a priority (PRI) field of a virtual local area network (VLAN) tag technology extension protocol, or an application-aware network (APN) field of the message in the first message flow.

[0018] Through this possible design, the first tag can be carried in various existing fields, so that the solution of the present application can be easily implemented.

[0019] In another possible design, the method further includes: determining a second condition, and determining, based on the second condition, to use a flow-by-flow load balancing method to send the messages of the second message flow. The second condition includes at least one of the following conditions: the transmission protocol used by the second message flow does not support the use of a packet-by-packet load balancing method to transmit messages, the destination node of the second message flow and the access device of the destination node do not have the message reordering capability, the destination node of the second message flow and the access device of the destination node have the message reordering capability, but the size of the reordering resources allocated by the node with the message reordering capability to the second message flow does not exceed the third threshold, a second indication sent by the destination node or the access device is received, the size of the second message flow does not exceed the fourth threshold, or the second message flow is a control flow. The second indication is used to indicate that the messages of the second message flow are sent using a flow-by-flow load balancing method.

[0020] In another possible design, the method further includes: adding a second label to a message to be transmitted in the second message flow, and sending the message carrying the second label. The second label is used to instruct network nodes on the transmission path of the second message flow to forward the messages of the second message flow using a flow-by-flow load balancing method.

[0021] Through the above two possible designs, it is possible to determine that the second message flow is transmitted using flow-by-flow load sharing when packet-by-packet load sharing is not suitable, thereby ensuring the throughput of the destination node side device of the second message flow when receiving and processing the message flow.

[0022] In another possible design, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages. When a message flow is divided into multiple message containers, flowlets, flow segments, or flowslices of the same size, and the message flow is load shared packet-by-packet with the message container, flowlet, flowcell, or flowslice as the load sharing granularity, the degree of balance of the load shared on different paths can be improved. Similarly, when the messages in a message flow are divided into multiple cells of the same size, and the message flow is load shared packet-by-packet with the cell as the load sharing granularity, the degree of balance of the load shared on different paths can be improved.

[0023] In the second aspect, the present application provides a method for controlling message transmission, which includes: receiving messages in a message flow; when the messages in the message flow include a load sharing label, forwarding the messages in the message flow carrying the load sharing label, the load sharing label is used to indicate the load sharing method used when forwarding the messages.

[0024] Through this possible design, the network node can forward the message using a corresponding load balancing method based on the indication information (load balancing label) carried in the message from the source node.

[0025] In one possible design, when the load sharing label is the first label used to indicate that packets are forwarded using a packet-by-packet load sharing method, the above-mentioned forwarded packet flow carries packets with a load sharing label, including: packets carrying the first label in the forwarded packet flow using a packet-by-packet load sharing method.

[0026] In another possible design, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages.

[0027] In another possible design, when the load sharing label is a second label used to indicate that the message is forwarded using a flow-by-flow load sharing method, the above-mentioned forwarded message flow carries messages with a load sharing label, including: messages carrying a second label in the forwarded message flow using a flow-by-flow load sharing method.

[0028] In another possible design, the above method also includes: when the message in the message flow does not include a load sharing label, for the first message in the message flow that does not include a load sharing label, determining the next hop forwarding node of the first message based on the hash factor carried by the first message; and sending the first message to the next hop forwarding node.

[0029] The beneficial effects of the second aspect and any possible design of the second aspect can be referred to the description of the beneficial effects of the corresponding scheme in the first aspect and any possible design of the first aspect, and will not be repeated here.

[0030] In the third aspect, the present application provides a method for controlling message transmission, which is applied to the destination node of a first message flow or the access device of the destination node, and the method includes: determining the degree of disorder of the first message flow; and sending a control indication to the source node of the first message flow or the access device of the source node based on the degree of disorder, and the control indication is used to indicate the load sharing method used when transmitting messages in the first message flow.

[0031] Through the solution provided in the present application, the destination node of the first message flow or the access device of the destination node can send a control instruction to the source node of the first message flow or the access device of the source node according to the degree of message disorder of the received first message flow, so as to use back pressure to control the load sharing method adopted by the source node or the access device of the source node when sending the first message flow. In this way, the destination node or the access device of the destination node can avoid the packet loss problem caused by insufficient reordering resources due to the excessive degree of disorder of the received first message flow (such as packet loss caused by overflow of insufficient receiving buffer, or packet loss caused by insufficient memory, etc.), thereby ensuring the throughput rate of receiving and processing messages by the destination node or the access device of the destination node.

[0032] In one possible design, the regulation indication is a first indication for indicating that packets in the first packet flow are to be sent in a packet-by-packet load sharing manner. The regulation indication is sent to the source node of the first packet flow or the access device of the source node based on the degree of disorder, including: when the degree of disorder does not exceed the first disorder threshold, the first indication is sent to the source node of the first packet flow or the access device of the source node.

[0033] Through this possible design, when the message disorder degree of the first message flow is low, the source node side device is instructed to subsequently send messages using a packet-by-packet load sharing method, thereby improving the load balancing degree of the transmission network.

[0034] In another possible design, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages.

[0035] In another possible design, the control instruction is a second instruction for instructing to transmit the first packet flow in a flow-by-flow load balancing manner; and the sending of the control instruction to the source node of the first packet flow or an access device of the source node based on the out-of-order level includes sending the second instruction to the source node of the first packet flow or an access device of the source node when the out-of-order level exceeds a second out-of-order threshold. The second out-of-order threshold is greater than or equal to the first out-of-order threshold.

[0036] Through this possible design, when the message disorder degree of the first message flow is high, the source node side device is instructed to subsequently send messages using a flow-by-flow load sharing method. This can reduce the message disorder degree of the received first message flow, thereby avoiding the problem of insufficient reordering resources caused by excessive message disorder, which in turn leads to packet loss.

[0037] In another possible design, the above-mentioned determination of the degree of disorder of the first message flow includes: detecting the length of a reordering queue of the first message flow, the reordering queue is used to sort and reorganize the disordered messages in the received first message flow, and the length of the reordering queue is used to characterize the degree of disorder.

[0038] In another possible design, determining the out-of-order degree of the first message stream includes detecting a change in the out-of-order degree of messages in the received first message stream, where the change is used to indicate the out-of-order degree. For a second message in the currently received first message stream, the out-of-order degree of the second message refers to the number of messages in the first message stream that are between the sequence number of the second message in the first message stream and the sequence number of the currently expected message and that have not been received by the destination node or the access device of the destination node.

[0039] In another possible design, the above-mentioned sending of control instructions to the source node of the first message flow or the access device of the source node includes: sending a data message to the source node of the first message flow or the access device of the source node, the data message carrying the control instructions; or, sending a control message to the source node of the first message flow or the access device of the source node, the control message being used to carry the control instructions.

[0040] In a fourth aspect, the present application provides a message transmission control device, the device being applied to a source node sending a first message flow, the device comprising: a determination unit configured to determine a first condition, and, based on the first condition, determine whether to transmit messages in the first message flow using packet-by-packet load balancing. The first condition includes that a transmission protocol used by the first message flow supports transmitting messages using packet-by-packet load balancing.

[0041] In one possible design, the first condition also includes that the destination node of the first message flow and / or the access device of the destination node has message reordering capability, where the reordering capability refers to the ability to sort and reorganize out-of-order messages in the message flow.

[0042] In another possible design, the first condition also includes that the size of the reordering resources allocated by the destination node of the first message flow or the access device of the destination node for the first message flow exceeds a first threshold, and the reordering resources are used to sort and reorganize the out-of-order messages in the first message flow.

[0043] In another possible design, the first condition also includes receiving a first indication, where the first indication is used to indicate that packets of the first packet flow are sent in a packet-by-packet load sharing manner.

[0044] In another possible design, the first condition further includes that the size of the first message flow exceeds a second threshold, or the first condition further includes that the first message flow is a data flow.

[0045] In another possible design, the apparatus further includes: an adding unit configured to add a different hash factor to each message to be transmitted in the first message stream; and a sending unit configured to send the messages carrying the different hash factors. The first hash factor added to a first message in the first message stream is used to determine a forwarding path for the first message, where the first message is any message to be transmitted in the first message stream.

[0046] In another possible design, the adding unit is configured to add a first label to a message to be transmitted in the first message flow, where the first label is configured to instruct network nodes on a transmission path of the first message flow to forward the message carrying the first label using a packet-by-packet load balancing method. The sending unit is configured to send the message carrying the first label.

[0047] In another possible design, the first label is carried in the protocol field of the transport protocol used by the first message flow, and the protocol field includes any one of the following fields: the flag field of IPv4, the flag field in the SRv6 SRH, the unused field in the NSH, or the field indicating network operations in MPLS. Alternatively, the first label is carried by the source MAC address, source IP address, VNI of the VXLAN where the source node is located, or the source port number included in the message in the first message flow. Alternatively, the first label is carried by the IPv6 flow label or SRv6 SID included in the message in the first message flow. Alternatively, the first label is carried in the DSCP field, EXP field, PRI field, or APN field of the VLAN Tag Technology Extension Protocol of the message in the first message flow.

[0048] In another possible design, the determination unit is further used to determine a second condition, and based on the second condition, determine whether to use a flow-by-flow load sharing method to send the messages of the second message flow. The second condition includes at least one of the following conditions: the transmission protocol used by the second message flow does not support the use of a packet-by-packet load sharing method to transmit messages, the destination node of the second message flow and the access device of the destination node do not have the message reordering capability, the destination node of the second message flow and the access device of the destination node have the message reordering capability, but the size of the reordering resources allocated to the second message flow by the node with the message reordering capability does not exceed the third threshold, a second indication sent by the destination node or the access device is received, the size of the second message flow does not exceed the fourth threshold, or the second message flow is a control flow. The second indication is used to indicate that the messages of the second message flow are sent using a flow-by-flow load sharing method.

[0049] In another possible design, the adding unit is configured to add a second label to a message to be transmitted in the second message flow, where the second label is configured to instruct network nodes on a transmission path of the second message flow to forward the messages of the second message flow using a flow-by-flow load balancing method. The sending unit is configured to send the message carrying the second label.

[0050] In another possible design, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages.

[0051] It should be understood that the description of the possible technical solutions and beneficial effects performed by the various functional modules divided in the fourth aspect and any possible design method in the fourth aspect can refer to the solutions provided by the above-mentioned first aspect and any possible design method in the first aspect, and will not be repeated here.

[0052] In the fifth aspect, the present application provides a control device for message transmission, which includes: a receiving unit for receiving messages in a message flow; a sending unit for forwarding messages carrying a load sharing label in a message flow when the messages in the message flow include a load sharing label, and the load sharing label is used to indicate the load sharing method used when forwarding the message.

[0053] In one possible design, when the load sharing label is a first label indicating that packets are forwarded using packet-by-packet load sharing, the sending unit is specifically configured to forward packets carrying the first label in a packet flow using packet-by-packet load sharing.

[0054] In another possible design, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages.

[0055] In another possible design, when the load sharing label is a second label for indicating that the message is forwarded using flow-by-flow load sharing, the sending unit is further specifically used to forward the message carrying the second label in the message flow using flow-by-flow load sharing.

[0056] In another possible design, the apparatus further includes: a determining unit configured to, when a message in the message flow does not include a load balancing label, determine, for a first message in the message flow that does not include a load balancing label, a next-hop forwarding node for the first message based on a hash factor carried by the first message. The sending unit is further configured to send the first message to the next-hop forwarding node.

[0057] It should be understood that the description of the possible technical solutions and beneficial effects performed by the various functional modules divided in the fifth aspect and any possible design method in the fifth aspect can refer to the solutions provided by the above-mentioned second aspect and any possible design method in the second aspect, and will not be repeated here.

[0058] In the sixth aspect, the present application provides a control device for message transmission, which is applied to the destination node of a first message flow or the access device of the destination node. The device includes: a determination unit for determining the degree of disorder of the first message flow; a sending unit for sending a control indication to the source node of the first message flow or the access device of the source node based on the degree of disorder, and the control indication is used to indicate the load sharing method used when transmitting messages in the first message flow.

[0059] In one possible design, the control indication is a first indication for indicating that packets in a first packet flow are sent in a packet-by-packet load sharing manner, and the sending unit is specifically used to send the first indication to the source node or the access device of the source node when the degree of disorder does not exceed the first disorder threshold.

[0060] In another possible design, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages.

[0061] In another possible design, the control instruction is a second instruction for instructing to transmit the first packet flow in a flow-by-flow load balancing manner, and the transmitting unit is further configured to transmit the second instruction to the source node or an access device of the source node when the out-of-order degree exceeds a second out-of-order threshold. The second out-of-order threshold is greater than or equal to the first out-of-order threshold.

[0062] In another possible design, the determining unit is specifically configured to detect the length of a reordering queue of the first message stream, wherein the reordering queue is configured to sort and reorganize out-of-order messages received in the first message stream, and the length of the reordering queue is configured to indicate the degree of the out-of-order message.

[0063] In another possible design, the determination unit is specifically configured to detect a change in a degree of out-of-orderness of messages in a received first message stream. The change is used to characterize the degree of out-of-orderness. For a second message in a currently received first message stream, the out-of-orderness of the second message refers to the number of messages in the first message stream that are between a sequence number of the second message in the first message stream and a sequence number of a message currently expected to be received and that have not been received by a destination node or an access device of the destination node.

[0064] In another possible design, the sending unit is specifically used to send a data message to the source node or the access device of the source node, where the data message carries a regulation indication, or to send a control message to the source node or the access device of the source node, where the control message is used to carry a regulation indication.

[0065] It should be understood that the description of the possible technical solutions and beneficial effects performed by the various functional modules divided in the sixth aspect and any possible design method in the sixth aspect can refer to the solutions provided by the above-mentioned third aspect and any possible design method in the third aspect, and will not be repeated here.

[0066] In the seventh aspect, the present application provides a control device for message transmission, comprising: a memory, a network interface and one or more processors, which 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, or execute the method provided by the second aspect and any possible design method of the second aspect, or execute the method provided by the third aspect and any possible design method of the third aspect.

[0067] Among them, in one possible design, the control device for message transmission described in the fourth, sixth or seventh aspects above, for example, can be an end-side device such as a terminal device or server that can send or receive message streams, or can be a component within the end-side device, such as a single board, a network card, etc., or can be a chip used to implement the method described in the first and / or third aspects above and part or all of the operations in any possible design of the first and / or third aspects. In another possible design, the control device for message transmission described in the fifth or seventh aspects above, for example, can be any network node with message forwarding capability, such as a router, a switch, a gateway, etc., or can be a component within a network node, such as a single board, a network card, etc., or can be a chip used to implement the method described in the second aspect above and part or all of the operations in any possible design of the second aspect.

[0068] In an eighth aspect, the present application provides a control system for message transmission, which includes a source node that sends a message flow, a network node that transmits the message flow, and a destination node / access device of the destination node of the message flow. The source node is used to execute the method provided in the first aspect and any possible design method of the first aspect, the network node is used to execute the method provided in the second aspect and any possible design method of the second aspect, and the destination node / access device of the destination node is used to execute the method provided in the third aspect and any possible design method of the third aspect. In a specific design, the source node is, for example, the control device for message transmission provided in the fourth or seventh aspect above, the network node is, for example, the control device for message transmission provided in the fifth or seventh aspect above, and the destination node / access device of the destination node is, for example, the control device for message transmission provided in the sixth or seventh aspect above.

[0069] In a ninth 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 computer program instructions. When the computer program instructions are executed by a computing device or a processor, the computing device or the processor executes the method provided in the first aspect and any possible design method of the first aspect, or executes the method provided in the second aspect and any possible design method of the second aspect, or executes the method provided in the third aspect and any possible design method of the third aspect.

[0070] In the tenth aspect, the present application provides a computer program product comprising instructions, which, when executed by a computing device or a processor, causes the computing device or the processor to execute the method provided in the first aspect and any possible design method of the first aspect, or to execute the method provided in the second aspect and any possible design method of the second aspect, or to execute the method provided in the third aspect and any possible design method of the third aspect.

[0071] In the eleventh aspect, the present application provides a chip, which includes a processor for running program instructions or codes. 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, or execute the method provided in the second aspect and any possible design method in the second aspect, or execute the method provided in the third aspect and any possible design method in the third aspect. Exemplarily, the chip also includes: an input interface, an output interface, and a memory. 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 connection and communication between the chip and other chips or devices.

[0072] It can be understood that any of the message transmission control devices, message transmission control systems, 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.

[0073] In this application, the names of the aforementioned message transmission control device, message transmission control system, etc. do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they are all within the scope of protection of this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1This is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0075] Figure 2 This is a flow chart of a method for controlling message transmission provided by an embodiment of the present application;

[0076] Figure 3 This is a flow chart of another method for controlling message transmission provided in an embodiment of the present application;

[0077] Figure 4 This is a flow chart of another method for controlling message transmission provided in an embodiment of the present application;

[0078] Figure 5 This is a flow chart of another method for controlling message transmission provided in an embodiment of the present application;

[0079] Figure 6 This is a flow chart of another method for controlling message transmission provided in an embodiment of the present application;

[0080] Figure 7 This is a schematic diagram of determining the degree of message disorder provided by an embodiment of the present application;

[0081] Figure 8 This is another schematic diagram of the message transmission control method provided in an embodiment of the present application;

[0082] Figure 9 This is another schematic diagram of the message transmission control method provided in an embodiment of the present application;

[0083] Figure 10 This is a structural diagram of a control device for message transmission provided in an embodiment of the present application;

[0084] Figure 11 This is a structural diagram of another control device for message transmission provided in an embodiment of the present application;

[0085] Figure 12 This is a structural diagram of another message transmission control device provided in an embodiment of the present application;

[0086] Figure 13 It is a structural diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0087] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0088] To facilitate understanding, the technology and background involved in the embodiments of this application are explained below.

[0089] 1) Flow-by-flow load balancing

[0090] When there are multiple paths in the network to the same destination address or the network segment where the address is located (referred to as the destination segment), for multiple message flows sent to the destination address or the destination segment, flow-by-flow load balancing means that the multiple message flows are distributed to different paths for transmission at the message flow granularity to achieve network load balancing.

[0091] In one example, flow-by-flow load balancing can be achieved through equal-cost multi-path routing (ECMP). Equal-cost paths refer to multiple paths in the network that have the same cost and reach the same destination address or the network segment where the address is located (denoted as the destination segment). When a network node supports ECMP, the traffic sent by the network node to the destination address or the destination segment can be shared through different equal-cost paths, thereby achieving load balancing of the network. In addition, when a path in the equal-cost path fails, other paths can replace it to complete traffic forwarding, thereby achieving routing redundancy backup function.

[0092] Common ECMP path selection strategies include, but are not limited to, the following: selecting a path for transmitting a message from multiple equal-cost paths based on a hash of the quintuple of the Internet Protocol (IP) message, selecting a path for transmitting a message from multiple equal-cost paths based on a modulo calculation of the quintuple of the IP message, selecting a path for transmitting a message from multiple equal-cost paths by round-robin, and selecting a path for transmitting a message by weighted round-robin. The quintuple refers to the source IP address, destination IP address, source port number, destination port number, and the transport protocol used by the IP message.

[0093] In addition, selecting a path for transmitting a message from multiple paths based on a hash result obtained by hashing one or more elements (such as a quintuple) in the message can also be called hash-based load sharing. In the embodiment of the present application, the element in the message used for hash calculation is called the hash factor in the message.

[0094] 2) Packet spray (PS)

[0095] When multiple paths exist on a network to the same destination address or the network segment where that address resides (referred to as the destination segment), per-packet load balancing for packets sent to that destination address or segment involves distributing the packets within that packet flow across different paths for transmission, thereby achieving network load balancing. The load balancing granularity for per-packet load balancing can include single packets, multiple packets, or a single cell, and is not limited to this.

[0096] When the load sharing granularity of packet-by-packet load sharing is a single message or multiple messages, in a possible implementation method, the single message or multiple messages can be messages included in flow units such as message containers, sub-flows (flowlets), flow segments (flowcells) or flow slices (flowslices). Among them, message containers, flowlets, flowcells and flowslices are flow units obtained after dividing the message flow. It should be understood that each flow unit includes at least one message. Therefore, it can also be understood that the load sharing granularity of packet-by-packet load sharing is message containers, flowlets, flowcells or flowslices. Optionally, when a message flow is divided into multiple message containers, flowlets, flowcells or flowslices of the same size, when the message flow is load shared packet-by-packet with the message container, flowlet, flowcell or flowslice as the load sharing granularity, the degree of load balancing shared on different paths can be improved.

[0097] When the load balancing granularity for per-packet load balancing is cells, the embodiments of the present application do not specifically limit the strategy for dividing a single message into multiple cells or the size of each cell. Alternatively, when the messages in a message flow are divided into cells of the same size, per-packet load balancing of the message flow using cells as the load balancing granularity can improve the balance of load shared across different paths.

[0098] 3) Segment routing based on the forwarding plane of Internet Protocol version 6 (SRv6)

[0099] Simply put, SRv6 stands for segment routing (SR) combined with Internet Protocol version 6 (IPv6). It is a protocol that carries the Internet Protocol (IP). SRv6 leverages existing IPv6 forwarding technology and is implemented through IPv6 extension headers. SRv6 divides the packet forwarding path into segments and assigns a segment identifier (SID) to each segment, thereby guiding packet forwarding.

[0100] 4) Network service header (NSH)

[0101] NSH is a data plane transport protocol. The service plane uses NSH header information to control service flow forwarding and provide services. For example, NSH can implement policies issued by the service function chain (SFC) control plane.

[0102] 5) Multi-protocol label switching (MPLS)

[0103] MPLS is a technology that uses labels to guide high-speed, efficient data transmission over open communication networks. Multi-protocol MPLS not only supports multiple network layer protocols but is also compatible with multiple Layer 2 data link layer technologies.

[0104] When load balancing message flows in a network, the related technologies fully adopt the traditional ECMP flow-by-flow load balancing method. However, when the flow size difference between the flows transmitted by the flow-by-flow load balancing method is relatively large, the flow-by-flow load balancing method will cause the problem of uneven load sharing. In addition, the transmission of message flows by the flow-by-flow load balancing method is prone to the problem of hash polarization, which causes multiple flows to be "crowded" on the same link at the same time. Hash polarization refers to the situation where different message flows are transmitted through the same path after two or more times of hash-based flow-by-flow load balancing, which will lead to uneven load sharing.

[0105] To avoid the problem of uneven load caused by per-flow load balancing, related technologies implement per-packet load balancing in a network that meets 1:1 convergence through fine-grained load balancing scheduling. This can achieve load balancing across multiple links and avoid network congestion. When using per-packet load balancing, the source node sending the message flow distributes the messages of the message flow to different paths for transmission at the granularity of messages (or message containers, flowlets, flowcells, or flowslices, etc.). Then, the destination node of the message flow receives the messages (or message containers, flowlets, flowcells, or flowslices, etc.) transmitted along the different paths. In this case, due to the different transmission delays between different paths, the messages (or message containers, flowlets, flowcells, or flowslices, etc.) received by the destination node of the message flow will be out of order. Therefore, the destination node needs to sort and reorganize the received messages (or message containers, flowlets, flowcells, or flowslices, etc.) to obtain the correct message flow sent by the source node.

[0106] However, when transmitting a packet flow (or traffic) using per-packet load balancing, in some cases the device at the destination node responsible for reordering out-of-order packets may experience a decrease in throughput when processing the packet flow. For example, if the transport protocol used by the packet flow does not support per-packet load balancing, but network nodes transmit the packet flow using per-packet load balancing, this can lead to a sharp decrease in throughput when processing the packet flow at the destination node.

[0107] In a related technology, an access control list (ACL) is statically configured for each network node that forwards messages, and in the ACL, each network connection (such as a queue pair (QP) connection) is configured to configure whether to perform packet-by-packet load balancing on the message stream transmitted through the network connection. In this technology, it is necessary to know in advance whether both ends of the network connection (including the source node (or the access device of the source node) and the destination node (or the access device of the destination node)) have the ability to reorder messages, and whether the transmission protocol used by the network connection allows messages to be out of order, etc., and then mark the network connection that supports packet-by-packet load balancing as "use packet-by-packet load balancing" when configuring the ACL. However, the process of configuring an ACL for each network node is very cumbersome and consumes ACL resources. In some scenarios with a large number of network connections, such as artificial intelligence (AI) training scenarios, the number of network connections in the data center is large (roughly half the number of graphics processing unit (GPU) cards), so it is very cumbersome to configure an ACL for each network node that includes a large number of network connection access policies. In addition, this solution can only be configured statically. For example, during network transmission of a message flow, the reordering resources used to sort and reorganize out-of-order messages in a certain network connection's end-side device change, which in turn causes the load sharing mode corresponding to the network connection to change. In this case, the ACL cannot be updated in time.

[0108] In another related technology, when the change value of the disorder degree of the out-of-order messages received by the destination side node exceeds a threshold, the priority flow control (PFC) is triggered to notify the source node of the message flow to reduce the rate of sending the message flow or stop sending the message flow, thereby reducing the disorder degree of the out-of-order messages received by the destination side node. However, directly controlling the source node to reduce the rate of sending the message flow or stop sending the message flow may cause side effects such as PFC storms. In addition, the essential reason for the high disorder degree of the out-of-order messages received by the device on the destination node side of the message flow is not that the message flow sending rate is too fast, but that it is caused by the packet-by-packet load sharing method of transmitting the message. Among them, the device on the destination node side of the message flow can be the destination node of the message flow itself, or the access device of the destination node, and this is not limited.

[0109] Based on this, embodiments of the present application provide a method for controlling message transmission that enables conditional, per-packet load balancing and dynamically adjusts the load balancing method used to transmit message flows in real time during message flow transmission. This improves network load balancing while ensuring throughput when processing message flows at the destination node or the access device at the destination node.

[0110] refer to Figure 1 , Figure 1 A schematic diagram of an implementation environment of the method provided in the embodiment of the present application is shown. Figure 1 As shown, the implementation environment includes a source node and a destination node communicating through a transmission network.

[0111] The source node is used to initiate a message flow and access the transmission network through the access device 11. The access device 11 is also called the access device of the source node. The access device of the source node is used to send the message flow initiated by the source node to the transmission network. In other words, the access device is equivalent to the entrance of the message flow initiated by the source node into the transmission network. Therefore, in the embodiment of the present application, the access device of the source node is also called the entrance device. Optionally, one or more devices with message forwarding capabilities may be included between the source node and the access device of the source node, and comparison is not limited thereto.

[0112] The destination node is the node indicated by the destination address of the message in the message flow initiated by the source node. The destination node communicates with the transmission network through the access device 12, and receives the message flow transmitted through the transmission network and initiated by the source node through the access device 12. The access device 12 is also called the access device of the destination node. The access device of the destination node is used to send the message flow initiated by the source node and transmitted via the transmission network to the destination node, that is, the access device is equivalent to the exit of the message flow initiated by the source node out of the transmission network. Therefore, in the embodiment of the present application, the access device of the destination node is also called the exit device. Optionally, one or more devices with message forwarding capabilities can be included between the destination node and the access device of the destination node, and the comparison is not limited.

[0113] Optionally, the source node and destination node are any two terminal devices and / or servers that need to communicate, or any two service clusters that need to communicate, or any terminal devices and service clusters that need to communicate, without limitation. Terminal devices include, but are not limited to, mobile phones, tablet computers, general-purpose computers, and other terminal devices. In one example, the source node is Server 1 and the destination node is Server 2. When Server 1 needs to access Server 2, Server 1 initiates a message flow and transmits the message flow to Server 2 via the transmission network.

[0114] Optional, Figure 1 The access devices 11 and 12 shown can be implemented as access switches. For example, for a single server cabinet, the access switch is implemented as a switch deployed within the server cabinet, thereby enabling interconnection between the server and the switch within the cabinet. The switch deployed within the server cabinet can be deployed at the top of rack (TOR), the middle of rack (MOR), or the bottom of rack (BOR). Therefore, TOR, MOR, or BOR can also be used to directly refer to a switch.

[0115] Figure 1 The transmission network shown can be any available network supported by the source node and the destination node. In one example, the transmission network can include one or more networks based on Internet Protocol version 4 (IPv4), or one or more networks based on Internet Protocol version 6 (IPv6), or at least one IPv4 network and at least one IPv6 network, without limitation. In addition, in the embodiments of the present application, the transmission protocol used by the source node and the destination node to transmit the message stream through the transmission network is not specifically limited, and the transmission protocol can be any available transmission protocol.

[0116] exist Figure 1 The transmission network shown includes at least two transmission links (or transmission paths) connecting the source node and the destination node. For example, the at least two transmission paths include a transmission path 1 passing through the access device 11, the forwarding node R1, the forwarding node R2, and the access device 12, and a transmission path 2 passing through the access device 11, the forwarding node R3, the forwarding node R4, and the access device 12. Among them, the access devices, forwarding nodes, etc. on the transmission path can be message forwarding devices with message forwarding capabilities such as switches and routers, and this is not limited to this. It should be understood that the access devices, forwarding nodes, etc. located on the transmission path between the source node and the destination node can all be referred to as network nodes. Exemplarily, network nodes include but are not limited to network devices such as routers, switches, and gateways.

[0117] By Figure 1Applying the method provided by the embodiments of the present application in the illustrated implementation environment enables conditional, packet-by-packet load balancing of message flows transmitted by the transmission network, and enables real-time, dynamic adjustment of the load balancing method for the message flows during message flow transmission. This improves network load balancing while also ensuring the throughput of the message flow's destination node-side device when processing the message flow. The destination node-side device for the message flow can be the message flow's destination node itself, or an access device for the destination node, without limitation.

[0118] It should be understood that the above content is an illustrative description of the real-time environment of the method provided in the embodiment of the present application, and does not constitute a limitation on the real-time environment of the method. Ordinary technicians in this field will know that as business needs change, the real-time environment can be adjusted according to application requirements, and the embodiments of the present application do not list them one by one.

[0119] The present application also provides a control device for message transmission, which is applied to the above-mentioned implementation environment and is used to execute the message transmission control method provided in the present application. The control device can be implemented as any computing device with message processing capabilities or a functional module in the computing device. Exemplarily, the computing device is implemented as a terminal device such as a mobile phone, a tablet computer, or a general-purpose computer, or as a network device such as a router, a switch, a gateway, or a server, but is not limited thereto.

[0120] When the control device is applied to the source node that initiates the message flow, the control device is used to execute the corresponding steps of the method described below, which are performed by the source node. For detailed descriptions, please refer to the following description and are not repeated here. Optionally, the control device is implemented as a functional module in the source node. Exemplarily, the control device is specifically implemented as a network interface card (NIC) (or network adapter) of the source node.

[0121] When the control device is applied to the destination node or the access device of the destination node that receives the message stream sent by the source node, the control device is used to execute the corresponding steps performed by the destination node or the access device of the destination node in the method described below. Please refer to the description below for detailed explanation, which will not be repeated here. In one case, when the destination node sorts and reorganizes the out-of-order messages in the message stream from the source node, the control device is specifically implemented as a functional module in the destination node. In another case, when the access device of the destination node sorts and reorganizes the out-of-order messages in the message stream from the source node, the control device is specifically implemented as a functional module in the access device of the destination node. Exemplarily, when the control device is implemented as a functional module in the destination node, the control device is specifically implemented as the NIC of the destination node.

[0122] When the control device is applied to a network node on a transmission path for transmitting a message stream between a source node and a destination node, the control device is configured to execute the corresponding steps of the method described below, which are performed by the network node. For detailed descriptions, please refer to the following description and are not further elaborated here. Optionally, the control device may be implemented as a network node or a functional module within the network node, without limitation.

[0123] The embodiment of the present application also provides a control system for message transmission, and the control system includes the source node mentioned above, the network node for forwarding the message flow, and the device / apparatus on the destination node side for sorting and reorganizing the disordered messages. The method provided by the embodiment of the present application is applied to the control system, and the various devices, nodes, and devices in the control system perform corresponding steps (see the method description below), which can realize conditional packet-by-packet load sharing for the message flow transmitted by the transmission network, and realize real-time dynamic adjustment of the load sharing method of the message flow during the message flow transmission process. In this way, while improving the degree of network load balancing, it is also possible to ensure the throughput of the device on the destination node side of the message flow when processing the message flow.

[0124] The following describes the implementation process of the message transmission control method provided in the embodiment of the present application.

[0125] refer to Figure 2 , Figure 2 The following is a flow chart showing a method for controlling message transmission provided by an embodiment of the present application. Figure 1 The implementation environment shown is executed by the source node that sends the message flow. Take any message flow sent by the source node, such as the first message flow, as an example. Figure 2 As shown, the method includes the following steps.

[0126] Step 101: A source node determines a first condition.

[0127] The first condition includes that the transmission protocol used by the first message flow supports packet-by-packet load sharing for message transmission.

[0128] It should be understood that when transmitting a message stream using a packet-by-packet load balancing method, the problem of message out-of-order transmission may arise. On the one hand, different transmission protocols have different tolerances for the degree of message out-of-order transmission. For example, some transmission protocols have a low tolerance for message out-of-order transmission. In this case, when using a packet-by-packet load balancing method to transmit the message stream, the network transmission efficiency is poor, and the throughput of the device on the destination node side of the message stream when processing the message stream is low. Therefore, when the first message stream uses a transmission protocol with a low tolerance for message out-of-order transmission, it is generally not recommended to use a packet-by-packet load balancing method to transmit the message. On the other hand, there are some transmission protocols, such as the Infiniband (IB) protocol and the Remote Direct Memory Access (RDMA) over Converged Ethernet version 2 (RoCEv2) protocol, which will directly discard out-of-order messages. In other words, the IB protocol and the RoCEv2 protocol do not support the transmission of message streams using a packet-by-packet load balancing method. On the other hand, some transport protocols, such as the Internetwide Area RDMA (iWARP) protocol and the Scalable Reliable Datagram (SRD) protocol, naturally support receiving and processing out-of-order messages. iWARP is a Transmission Control Protocol (TCP)-based RDMA technology protocol defined by the Internet Engineering Task Force (IETF). Therefore, iWARP and SRD support the transmission of message streams using a per-packet load balancing approach.

[0129] Optionally, the source node is pre-configured with the support status (e.g., support or non-support) of the transport protocol used when transmitting the message flow. For example, when the source node establishes a network connection (e.g., a QP connection) with the destination node to be accessed, it negotiates and configures the transport protocol for transmitting the message flow, and configures the transport protocol's support for packet-by-packet load balancing.

[0130] Furthermore, when sending the first message flow, the source node determines the transmission protocol used by the first message flow and further determines whether the transmission protocol supports transmitting messages in a packet-by-packet load balancing manner. Then, when the source node determines that the transmission protocol used by the first message flow supports transmitting messages in a packet-by-packet load balancing manner, it determines that the first condition is satisfied.

[0131] Optionally, the source node is pre-configured with the tolerance of the transmission protocol used when transmitting the message stream itself to the degree of message disorder, as well as the tolerance threshold. The embodiment of the present application does not specifically limit the value of the tolerance threshold. The degree of message disorder refers to the degree of message disorder in a message stream received by the destination node side device. The degree can be characterized by the number of disordered messages, and / or the frequency of disordered messages, and / or the degree of disorder of currently received messages, and / or the change in the degree of disorder of messages received over a period of time, etc., and there is no limitation on this. For a detailed description of the degree of disorder and the change in the value of the degree of disorder, please refer to the relevant description of calculating the degree of disorder below, which will not be repeated.

[0132] Furthermore, when the source node sends the first message stream, it determines the transmission protocol used by the first message stream (referred to as the first transmission protocol), and further determines the tolerance of the first transmission protocol to the degree of message disorder. When the source node determines that the tolerance of the first transmission protocol to the degree of message disorder is higher than the tolerance threshold, it determines that the first transmission protocol supports the use of packet-by-packet load sharing to transmit messages. At this time, the source node determines that the first condition is met. Correspondingly, when the source node determines that the tolerance of the first transmission protocol to the degree of message disorder is lower than the tolerance threshold, it determines that the first transmission protocol does not support the use of packet-by-packet load sharing to transmit messages. At this time, the source node determines that the first condition is not met.

[0133] Optionally, the source node is pre-configured with whether the transmission protocol used when transmitting its own message stream supports receiving and processing out-of-order messages.

[0134] Furthermore, when the source node sends the first message stream, it determines the transmission protocol used by the first message stream (referred to as the first transmission protocol), and further determines whether the first transmission protocol supports receiving out-of-order messages. Then, when the source node determines that the first transmission protocol supports receiving and processing out-of-order messages, it determines that the first transmission protocol supports transmitting messages using packet-by-packet load sharing. At this time, the source node determines that the first condition is met. Correspondingly, when the source node determines that the first transmission protocol does not support receiving and processing out-of-order messages (such as discarding out-of-order messages by default), it determines that the first transmission protocol does not support transmitting messages using packet-by-packet load sharing. At this time, the source node determines that the first condition is not met.

[0135] In some embodiments, the first condition may further include a condition describing at least one of the following possible implementations.

[0136] In a first possible implementation, the first condition also includes that the destination node of the first message flow and / or the access device of the destination node has message reordering capability, where the reordering capability refers to the ability to sort and reorganize out-of-order messages in the message flow.

[0137] It should be understood that since packet out-of-order transmission of a message stream may result when using packet-by-packet load balancing, when using packet-by-packet load balancing to transmit a first message stream, it is necessary to ensure that the destination device of the first message stream has message reordering capabilities. The destination device of the first message stream may be the destination node of the first message stream or an access device of the destination node, without limitation.

[0138] In an embodiment of the present application, for at least one node communicating with a source node, the at least one node includes the destination node of a first message flow. The source node is pre-configured with the configuration of the message reordering capability of each of the at least one node, or the source node is pre-configured with the configuration of the message reordering capability of the access device of each of the at least one node. The configuration of the message reordering capability of the node may be that the message reordering capability is configured or that the message reordering capability is not configured. The at least one node includes the destination node of the first message flow.

[0139] Taking the destination node of the first message flow as an example, when the source node establishes a network connection (e.g., a QP connection) with the destination node to be accessed, it obtains and configures the configuration of the message reordering capability of the destination node or the access device of the destination node. Optionally, when establishing a network connection (e.g., a QP connection) with the destination node to be accessed, the source node may first determine whether the device on the destination node side used to reorder out-of-order messages is the destination node itself or the access device of the destination node, and then obtain the configuration of the message reordering capability of the corresponding device.

[0140] Thus, when the source node sends the first message flow, it determines whether the destination node (or the access device of the destination node) of the first message flow is configured with the message reordering capability based on the pre-configured configuration of the message reordering capability of the destination node (or the access device of the destination node). Then, when the source node determines that the destination node of the first message flow or the access device of the destination node is configured with the message reordering capability, it determines that the first condition is satisfied.

[0141] In a second possible implementation, the first condition also includes that the size of the reordering resources allocated by the destination node of the first message flow or the access device of the destination node for the first message flow exceeds a first threshold, and the reordering resources are used to sort and reorganize the disordered messages in the first message flow. Exemplarily, when the node / device sorts and reorganizes disordered messages in its own receiving buffer, the reordering resources of the node / device include but are not limited to receiving buffer, computing resources, input / output (IO) bandwidth, etc. Among them, the receiving buffer is used to cache messages received by the node / device, and the computing resources are used to process the messages in the receiving buffer, such as sorting. The IO bandwidth is used to write the data (i.e., payload) carried by the messages in the receiving buffer to the memory or other storage, etc., and the comparison is not limited. Another exemplary embodiment, when the node / device sorts and reorganizes disordered messages in its own memory, the reordering resources of the node / device include but are not limited to memory, computing resources, IO bandwidth, etc.

[0142] It should be understood that the size of the reordering resources configured for a message flow by a device at the destination node will affect the device's throughput when processing the message flow. For example, if the reordering resources include a receive buffer, for example, if the destination node device's receive buffer is small but the messages it receives are highly out-of-order, the device's receive buffer will be insufficient to reorder the out-of-order messages. This can cause the device's receive buffer to overflow, leading to message loss and, further, a smaller number of messages received and processed per unit time by the device. This, in turn, reduces the device's throughput when processing the message flow.

[0143] In an embodiment of the present application, the source node can pre-acquire the size of the reordering resource allocated by the destination node of the first message flow or (or the access device of the destination node) for the first message flow.

[0144] Optionally, when establishing a network connection (e.g., a QP connection) with the destination node of the first message flow, the source node proactively requests or the destination node (or the access device of the destination node) proactively sends the size of the reordering resources configured by the destination node (or the access device of the destination node) for the first message flow, such as the size of the receive buffer allocated for the first message flow, the size of the I / O bandwidth allocated for the first message flow, etc. In response, the source node obtains the size of the reordering resources allocated by the destination node of the first message flow or the access device of the destination node for the first message flow.

[0145] It should be understood that when establishing a network connection with a destination node, the source node may first determine whether the device on the destination node side used to perform the reordering and reassembly operation on out-of-order packets is the destination node itself or an access device of the destination node. When the source node determines that the device on the destination node side used to perform the reordering and reassembly operation on out-of-order packets is the destination node itself, the source node obtains the size of the reordering resources configured by the destination node for the first packet flow. When the source node determines that the device on the destination node side used to perform the reordering and reassembly operation on out-of-order packets is the access device of the destination node, the source node obtains the size of the reordering resources configured by the access device for the first packet flow.

[0146] Furthermore, when the source node determines that the size of the obtained reordering resources allocated for the first message flow exceeds the first threshold, it determines that the first condition is met. It can be understood that when the reordering resources include a receiving buffer, the first threshold includes a size threshold of the receiving buffer. When the reordering resources include the proportion of the computing resources allocated by the device for the first message flow in the total computing resources of the device (such as the central processing unit (CPU) occupancy rate), the first threshold includes a proportion threshold. When the reordering resources include IO bandwidth, the first threshold includes a size threshold of the IO bandwidth, which will not be repeated. In addition, the embodiment of the present application does not specifically limit the value of the first threshold.

[0147] In a third possible implementation manner, the first condition further includes receiving a first indication, where the first indication is used to indicate that packets of the first packet flow are sent in a packet-by-packet load sharing manner.

[0148] In this embodiment, in the process of the source node sending the first message flow to the destination node, the destination node side device of the first message flow can send a first indication to the source node based on the degree of disorder of the received first message flow, so as to instruct the source node to use a packet-by-packet load sharing method to send the messages of the first message flow, thereby improving the load balancing degree of the transmission network. For detailed explanation, please refer to the description of step 302 below, which will not be repeated here.

[0149] In this case, when the source node receives a first indication sent by a device on the destination node side of the first message flow while sending the first message flow to the destination node, it determines that the first condition is met.

[0150] In a fourth possible implementation manner, the first condition further includes that the size of the first message flow exceeds a second threshold, or the first condition further includes that the first message flow is a data flow.

[0151] In some examples, based on the impact of large and small flows on network load balancing, the embodiments of the present application pre-set that only large flows are load-shared on a packet-by-packet basis, and set that small flows are load-shared on a flow-by-flow basis. Among them, a large flow refers to a message flow with a large amount of transmitted data, and a small flow refers to a data flow with a small amount of transmitted data. Therefore, in this case, when the source node sends the first message flow, it determines the size of the data that needs to be transmitted through the first message flow. Furthermore, when the source node determines that the size of the data transmitted by the first message flow exceeds the second threshold, the source node determines that the first message flow is a large flow, and determines that the first condition is met. The embodiments of the present application do not specifically limit the value of the second threshold.

[0152] In other examples, since control flows are typically small flows, this example sets per-packet load balancing for data flows and per-flow load balancing for control flows. Therefore, in this case, when the source node sends a first message flow, if the source node determines that the first message flow is a data flow, then the source node determines that the first condition is satisfied.

[0153] In some other examples, when the proportion of control flow in the message flow initiated by the source node is large, in order to avoid hash polarization when load sharing the control flow on a flow-by-flow basis, which may cause uneven load on the transmission network, in this case, the source node periodically counts the proportion of control flow in all message flows initiated by itself, and when the proportion exceeds the proportion threshold, it determines that the first condition is met.

[0154] Step 102: The source node determines to use a packet-by-packet load balancing method to send packets of the first packet flow according to the first condition.

[0155] When the first condition determined in step 101 is met, the source node determines to use a packet-by-packet load sharing method to send the packets of the first packet flow.

[0156] Through steps 101 to 102, the source node can determine to send the messages of the first message flow in a packet-by-packet load sharing manner when the first condition is met. This can avoid the problem of a decrease in throughput when the destination node side device of the message flow processes the message flow when the message flow is transmitted in a packet-by-packet load sharing manner in some cases. For example, it can avoid the problem that the transmission protocol used by the message flow does not support packet-by-packet load sharing, but the network node uses a packet-by-packet load sharing manner to transmit the message flow, thereby causing a sharp decrease in throughput when the destination node of the message flow processes the message flow.

[0157] Furthermore, for a first message flow initiated by a source node, when the first condition includes that the size of the reordering resources allocated for the first message flow by the destination node of the first message flow or the access device of the destination node exceeds a first threshold, this embodiment determines to transmit the first message flow using a packet-by-packet load balancing method only when the size of the reordering resources configured for the first message flow by a device with message reordering capabilities on the destination node side exceeds a certain threshold. In this way, it is possible to ensure that the device on the destination node side has sufficient resources to use when sorting and reassembling out-of-order messages generated when transmitting the first message flow using a packet-by-packet load balancing method, thereby improving the throughput of the destination node side when receiving and processing the first message flow. For example, when the destination node side has sufficient receive buffer to use when sorting and reassembling out-of-order messages generated when transmitting the first message flow using a packet-by-packet load balancing method, the probability of receive buffer overflow can be reduced, thereby reducing the number of packet losses on the destination node side, and thereby improving the throughput of receiving and processing messages on the destination node side.

[0158] In other embodiments, reference Figure 3 , shows a flow chart of another method for controlling message transmission provided by an embodiment of the present application. Optionally, the method can be applied to Figure 1 The implementation environment shown is executed by the source node that initiates the message flow. Take any message flow sent by the source node, such as the second message flow, as an example. Figure 3 As shown, the method includes the following steps.

[0159] Step 101A: The source node determines the second condition.

[0160] The second condition includes at least one of the following conditions: the transmission protocol used by the second message flow does not support packet-by-packet load balancing for message transmission; the destination node of the second message flow and the access device of the destination node do not have message reordering capabilities; the destination node and / or the access device have message reordering capabilities, but the size of the reordering resources allocated to the second message flow by the device with message reordering capabilities does not exceed a third threshold; a second indication sent by the destination node or the access device is received, the size of the second message flow does not exceed a fourth threshold, or the second message flow is a control flow. The second indication is used to indicate that messages of the second message flow are to be sent using a flow-by-flow load balancing method.

[0161] In one possible implementation, when sending the second message flow, the source node determines the transmission protocol used by the second message flow, and further determines whether the transmission protocol supports packet-by-packet load balancing for message transmission. For a detailed description of how the source node determines whether the transmission protocol supports packet-by-packet load balancing for message transmission, refer to the description of the source node determining whether the transmission protocol used by the first message flow supports packet-by-packet load balancing in step 101, and will not be repeated here. Then, upon determining that the transmission protocol used by the second message flow does not support packet-by-packet load balancing for message transmission, the source node determines that the second condition is satisfied.

[0162] In another possible implementation, when the source node sends the second message stream, it determines whether the destination node of the second message stream and the access device of the destination node are configured with message reordering capabilities based on the configuration of the message reordering capabilities of the pre-configured destination node of the second message stream and the access device of the destination node. Here, for a detailed description of how the source node determines whether the destination node of the second message stream and the access device of the destination node are configured with message reordering capabilities, please refer to the relevant description of the source node "determining whether the destination node of the first message stream (or the access device of the destination node) is configured with message reordering capabilities" in the first possible implementation in step 101, which will not be repeated here. Then, when the source node determines that the destination node of the second message stream and the access device of the destination node are not configured with message reordering capabilities, it determines that the second condition is satisfied.

[0163] In another possible implementation, when the source node determines that the destination node of the second message flow and / or the access device of the destination node is configured with message reordering capability, it also obtains the size of the reordering resources allocated by the device with message reordering capability for the second message flow, and determines that the second condition is satisfied when it determines that the size of the reordering resources allocated for the second message flow obtained does not exceed the third threshold value described above. The third threshold value may be the same as the first threshold value described above, or may be different, and this is not limited. For a detailed description of how the source node obtains the size of the reordering resources allocated by the device with message reordering capability for the second message flow, please refer to the relevant description of the source node "pre-acquiring the size of the reordering resources allocated by the destination node of the first message flow or (or the access device of the destination node) for the first message flow" in the second possible implementation in step 101, which will not be repeated here.

[0164] In another possible implementation, when the source node receives a second indication from a device on the destination node side of the second message flow while sending the second message flow to the destination node, the source node determines that the second condition is satisfied. For example, the device on the destination node side of the second message flow is the destination node of the second message flow, or an access device of the destination node of the second message flow, without limitation.

[0165] In this embodiment, during the process of the source node sending the second message stream to the destination node, the destination node side device of the second message stream can send a second instruction to the source node based on the degree of disorder of the received second message stream, instructing the source node to send the messages of the second message stream using a flow-by-flow load balancing method. This can effectively reduce the degree of disorder of the second message stream, because in most cases, flow-by-flow load balancing will not cause message disorder. Furthermore, this embodiment can avoid the packet loss problem caused by insufficient reordering resources (such as overflow of insufficient receiving buffer) of the destination node side device of the second message stream due to the excessive disorder of the received second message stream, thereby ensuring the throughput rate of the destination node side device receiving and processing messages. For a detailed description of the second instruction, please refer to the relevant description of step 302 below and will not be repeated here.

[0166] In another possible implementation, optionally, when the source node sends the second message flow, it determines the size of the data that needs to be transmitted through the second message flow. Furthermore, when the source node determines that the size of the data transmitted by the second message flow does not exceed the fourth threshold, the source node determines that the second message flow is a small flow, and determines that the second condition is met. The fourth threshold may be the same as or different from the second threshold described above, and there is no limitation on this. Optionally, when the source node sends the second message flow, when the source node determines that the type of the second message flow is a control flow, the source node determines that the second condition is met. Optionally, the source node periodically counts the proportion of control flows in all message flows initiated by itself, and determines that the second condition is met when the proportion does not exceed the proportion threshold described above.

[0167] Step 102A: The source node determines to use flow-by-flow load balancing to send the messages of the second message flow according to the second condition.

[0168] When the second condition determined in step 102A is met, the source node determines to use flow-by-flow load balancing to send the packets of the second packet flow.

[0169] Optionally, when determining that the second condition is met, the source node may also use a fixed transmission path to transmit the messages of the second message flow, that is, the source node does not use a load sharing method to transmit the messages of the second message flow.

[0170] Through steps 101A to 102A, it is possible to determine to transmit the message flow in a flow-by-flow load balancing manner when packet-by-packet load balancing is not suitable, thereby ensuring the throughput of the destination node side device when receiving and processing the message flow.

[0171] It should be understood that when per-flow load balancing is used to load-balance message flows, a message flow will reach the destination node through a single transmission path, so messages in the message flow will basically not be out of order (except when switching to a backup link after a link failure, in which case a small amount of message out of order may occur). Furthermore, message flows transmitted using per-flow load balancing do not need to occupy the reordering resources used by the destination node device to sort and reassemble out-of-order messages. Therefore, when per-flow load balancing is used to transmit message flows, the throughput of the destination node device can be guaranteed.

[0172] In other embodiments, combined Figure 2 and Figure 3 ,refer to Figure 4 , Figure 4 The flowchart of another method for controlling message transmission provided by the embodiment of the present application is shown. Optionally, the method can be applied to Figure 1 The implementation environment shown in FIG is executed by the source node that initiates the message flow. Figure 4 As shown, after the source node determines through steps 101 to 102 to use packet-by-packet load balancing to send the messages of the first message flow, it executes the following step 103, and after the source node determines through steps 101A to 102A to use flow-by-flow load balancing to send the messages of the second message flow, it executes the following step 104.

[0173] Step 103: The source node sends the packets of the first packet flow in a packet-by-packet load balancing manner.

[0174] In an embodiment of the present application, the load sharing granularity of packet-by-packet load sharing includes but is not limited to a cell, a single message or multiple messages. The detailed description of the load sharing granularity of a cell, a single message or multiple messages can be referred to the above description and will not be repeated here.

[0175] In the first possible implementation, taking the load sharing granularity of the packet-by-packet load sharing method as a single message as an example, after the source node determines to use the packet-by-packet load sharing method to send the message of the first message flow, it adds a different hash factor to each message to be transmitted in the first message flow, and sends the message carrying the different hash factors to the network node (such as the network node described above) through its own network interface. Among them, for any message to be transmitted in the first message flow, such as the first message, the first hash factor added by the source node in the first message is used to determine the forwarding path (or transmission path) of the first message. It should be understood that when each message to be transmitted in the first message flow includes a different hash factor, any network node that receives the message can obtain different hash results after hashing the hash factors in different messages. For the first message, the network node can determine the corresponding transmission path based on the hash result calculated based on the first hash factor, and transmit the first message through the transmission path. Thus, for different messages in the first message stream, the network node can determine the corresponding transmission path for each message based on the hash result calculated by the hash factor in each message, and transmit the message through the corresponding transmission path. In this way, packet-by-packet load balancing of the first message stream can be achieved. For detailed description, please refer to the relevant description in step 203 and will not be repeated here. In the embodiment of the present application, the packet-by-packet load balancing achieved based on this implementation method is referred to as hash-based packet-by-packet load balancing.

[0176] Optionally, for the messages to be transmitted in the first message stream, the source node uses a preset algorithm to generate a different hash factor for each message to be transmitted in the first message stream, and adds the generated hash factor to the corresponding message. This embodiment of the application does not specifically limit the preset algorithm. For example, the preset algorithm is a random value generation algorithm.

[0177] In one example, after the source node determines to use packet-by-packet load balancing to send messages of the first message flow, the source node sets a different label for each message to be transmitted in the first message flow based on relevant technologies, and sends messages carrying different labels to the network node through its own network interface. The label serves as a hash factor for the message. Furthermore, after any network node receives a message containing a label, it can perform hash-based packet-by-packet load balancing on the message based on the label in the message.

[0178] Similarly, when the load sharing granularity of the packet-by-packet load sharing method is a packet, the source node adds a different hash factor to each packet to be transmitted in the first packet flow, and sends the packet carrying the different hash factors to the network node through its own network interface. Similarly, when the load sharing granularity of the packet-by-packet load sharing method is at least one packet, for example, the load sharing granularity includes at least one packet container (or flowlet, flowcell or flowslice), etc., the source node adds a different hash factor to each packet container (or flowlet, flowcell or flowslice) to be transmitted in the first packet flow, and sends the packet container (or flowlet, flowcell or flowslice) carrying the different hash factors to the network node through its own network interface.

[0179] In the second possible implementation method, taking the load sharing granularity of a single message in the packet-by-packet load sharing method as an example, after the source node determines to use the packet-by-packet load sharing method to send the message of the first message flow, it adds a first label to each message to be transmitted in the first message flow, and sends the message carrying the first label. For example, the source node sends the message carrying the first label to the network node through its own network interface.

[0180] The first label is used to instruct network nodes along the transmission path of the first message flow to forward messages carrying the first label using a packet-by-packet load balancing method. When a source node adds the first label to a message, the first label may be carried in any reusable or scalable field in the message, which is not specifically limited in this embodiment of the present application.

[0181] In one example, the first label is carried in the protocol field of the transport protocol used by the first message flow. The protocol field includes but is not limited to any of the following fields: the flags field of IPv4, the flags field in the segment routing header (SRH) of SRv6, the unused bits in the NSH, or the field indicating the network action in MPLS. Based on this, the source node can add the first label to the corresponding protocol field according to the current transport protocol of the first message flow. It should be understood that the network operation of MPLS in the related art includes but is not limited to the label pop-up operation and the label push-in operation.

[0182] In another example, the first label is carried by the source media access control (MAC) address, source IP address, network identifier (VXLAN network identifier, VNI) of the virtual extensible local area network (VXLAN) where the source node is located, source port (source port, sport) number or application-aware network (APN) field included in the message in the first message flow.

[0183] In another example, the first label is carried by fields such as an IPv6 flow label and an SRv6 SID included in the packets in the first packet flow.

[0184] In another example, the first label is carried in a field included in a message in the first message flow that is used to carry message priority information. For example, the first label is carried in a Differentiated Services Code Point (DSCP) field, an Experimental (EXP) field, or a Priority (PRI) field of the Virtual Local Area Network (VLAN) Tagging Extension Protocol included in the message in the first message flow. In related technologies, the DSCP field is used to carry priority information for IP messages, and the EXP field has a value of 0 to 7 and is used to carry priority information for MPLS messages, which will not be described in detail.

[0185] Optionally, for any message in the first message flow that carries the first label, such as the second message, the packet-by-packet load sharing method indicated by the first label includes but is not limited to: determining the target next-hop node of the second message from the multiple next-hop nodes of the first message flow in a round-robin manner, and forwarding the second message to the target next-hop node of the second message; or, determining the next-hop node with a load less than a load threshold among the multiple next-hop nodes of the first message flow as the target next-hop node of the second message, and forwarding the second message to the target next-hop node of the second message; or, determining any next-hop node in the first m order of load among the multiple next-hop nodes of the first message flow as the target next-hop node of the second message, and forwarding the second message to the target next-hop node of the second message, where m is a positive integer. For a detailed description of how the network node sends the message using the packet-by-packet load sharing method according to the first label in the message, please refer to the relevant description in the following step 202, which will not be repeated here.

[0186] Similarly, when the load sharing granularity of the packet-by-packet load sharing method is a cell, the source node adds a first label to each cell to be transmitted in the first message flow, and sends the cell carrying the first label to the network node through its own network interface. Similarly, when the load sharing granularity of the packet-by-packet load sharing method is at least one message, for example, the load sharing granularity is a message container (or flowlet, flowcell, or flowslice) including at least one message, the source node adds a first label to each message container (or flowlet, flowcell, or flowslice) to be transmitted in the first message flow, and sends the message container (or flowlet, flowcell, or flowslice) carrying the first label to the network node through its own network interface.

[0187] Step 104: The source node sends the messages of the second message flow by using a flow-by-flow load balancing method.

[0188] In one possible implementation, after the source node determines to use flow-by-flow load balancing to send packets of the second packet flow, the source node adds a second label to each packet to be transmitted in the second packet flow and sends the packet carrying the second label. For example, the source node sends the packet carrying the second label to the network node.

[0189] The second label is used to instruct network nodes on the transmission path of the second message flow to forward messages carrying the second label using a flow-by-flow load balancing method. When the source node adds the second label to the message, the second label can be carried in any reusable or scalable field in the message, which is not specifically limited in this embodiment of the present application. For detailed examples of the fields in the message used to carry the second label, please refer to the relevant description of the fields used to carry the first label in step 103, and will not be repeated here.

[0190] In another possible scenario, after the source node determines to use a flow-by-flow load balancing method to send the messages of the second message flow, the source node determines to use a flow-by-flow load balancing method based on hashing to send the messages of the second message flow. Therefore, the source node sets the same hash factor for each message to be transmitted in the second message flow, and sends the message carrying the same hash factor in the second message flow to the network node through its own network interface. It should be understood that when each message to be transmitted in the second message flow includes the same hash factor, any network node that receives the message can obtain the same hash result after performing a hash calculation on the hash factor carried by the message containing the same hash factor, and then the network node transmits the message carrying the same hash factor through the same transmission path corresponding to the same hash result, that is, realizing flow-by-flow load balancing for the second message flow. For detailed description, refer to the relevant description in step 203 and will not be repeated here.

[0191] In this way, through steps 103 to 104, the source node processes the message flow accordingly according to the determined load sharing method, so that the network nodes on the message flow transmission path forward the message flow initiated by the source node in the corresponding load sharing method.

[0192] Further, after the source node sends the message of the message flow to the network node by executing step 103 or step 104, Figure 4 ,refer to Figure 5 , Figure 5 The flowchart of another method for controlling message transmission provided by the embodiment of the present application is shown. Optionally, the method can be applied to Figure 1 The implementation environment shown and Figure 1 The network node located between the source node and the destination node in the implementation environment shown is executed. Figure 5 As shown, the method includes steps 201 to 203.

[0193] Step 201: A network node receives a message of a message flow.

[0194] Among them, the network node can be Figure 1 The access device 11 shown can also be Figure 1 Any forwarding node shown is capable of receiving a message flow from a source node, without limitation.

[0195] Illustratively, the network node receives a message of a message flow from a source node through its own network interface, for example, receives a message of the first message flow described above, or receives a message of the second message flow described above.

[0196] Step 202: If the message in the message flow includes a load balancing label, the network node forwards the message in the message flow carrying the load balancing label, wherein the load balancing label is used to indicate the load balancing mode used when forwarding the message.

[0197] After receiving a message from a message flow, the network node identifies whether the received message contains a load balancing label. Then, when the network node identifies the load balancing label in the received message, it forwards the message in the message flow that carries the load balancing label according to the load balancing label carried in the message.

[0198] In the first possible scenario, taking the first message flow described above as an example, when the network node determines that the identified load sharing label is the first label for indicating that packets are forwarded using a packet-by-packet load sharing method, the network node forwards the packets in the message flow that carry the load sharing label, including: the network node responds to the instruction of the first label carried by the packets in the first message flow and forwards the packets in the first message flow that carry the first label using a packet-by-packet load sharing method. The specific implementation of packet-by-packet load sharing may be any packet-by-packet load sharing method other than hash-based packet-by-packet load sharing, and this is not limited to this.

[0199] One possible implementation method is to take the load sharing granularity of a single message as an example. For any message in the first message flow that carries the first label, such as the second message, the network node uses a rotation method to determine the target next hop node of the second message among multiple next hop nodes in the first message flow, and forward the second message to the target next hop node of the second message.

[0200] For example, when the messages received by the network node and carrying the first label and belonging to the first message flow include message 1, message 2, message 3, and message 4, and the next-hop nodes when the first message flow is transmitted through the network node include node 1 and node 2. Therefore, the network node can sequentially determine node 1 as the next-hop node of message 1 and forward message 1 to node 1, determine node 2 as the next-hop node of message 2 and forward message 2 to node 2, then determine node 1 as the next-hop node of message 3 and forward message 3 to node 1, and then determine node 2 as the next-hop node of message 4 and forward message 4 to node 2.

[0201] Another possible implementation method is that since the next-hop nodes when the first message flows through the network node for transmission are all adjacent nodes of the network node, the network node can periodically or in real time detect the idle bandwidth of the adjacent nodes to determine the load of the adjacent nodes, thereby determining the load of the next-hop node when the first message flows through the network node for transmission.

[0202] Still taking the load sharing granularity of a single message in the packet-by-packet load sharing method as an example, for the second message carrying the first label in the first message flow, the network node can determine the next hop node with a load less than the load threshold among the multiple next hop nodes of the first message flow as the target next hop node of the second message, and forward the second message to the target next hop node of the second message. Among them, the embodiment of the present application does not specifically limit the value of the load threshold. It should be understood that in the embodiment of the present application, when the load of the node exceeds the load threshold, it means that the current load of the node is relatively large, that is, the node is currently busy. When the load of the node is less than the load threshold, it means that the current load of the node is relatively small, that is, the node is currently relatively idle. Therefore, the network node forwards the second message to the next hop node that is currently relatively idle, which can improve the load balancing degree of the transmission network.

[0203] Alternatively, the network node sorts the loads of multiple next-hop nodes of the first message flow from small to large, and determines any of the first m next-hop nodes in the sorting as the target next-hop node of the second message, and forwards the second message to the target next-hop node of the second message. For example, the network node determines the next-hop node with the smallest load among the multiple next-hop nodes of the first message flow as the target next-hop node of the second message, and forwards the second message to the next-hop node. It should be understood that in an embodiment of the present application, the loads of multiple next-hop nodes of the first message flow are sorted from small to large, and the first m next-hop nodes in the sorting are all relatively idle nodes. Therefore, the network node forwards the second message to any next-hop node that is currently relatively idle, which can improve the load balancing degree of the transmission network.

[0204] In a second possible scenario, taking the second message flow described above as an example, when the network node determines that the load sharing label is a second label for indicating that messages are forwarded using a flow-by-flow load sharing method, the network node forwards messages in the message flow that carry the load sharing label, including: the network node responds to the indication of the second label carried by the messages in the second message flow, and forwards the messages in the second message flow that carry the second label using a flow-by-flow packet load sharing method. The embodiments of the present application do not limit the specific implementation of flow-by-flow load balancing.

[0205] In one possible implementation, when a network node receives a second message flow containing a second label, the network node determines a target next-hop node for the second message flow from among multiple next-hop nodes in a rotating manner, and forwards the message carrying the second label in the second message flow to the target next-hop node for the second message flow. The multiple next-hop nodes are common next-hop nodes for multiple message flows forwarded by the network node.

[0206] Exemplarily, when a network node receives multiple message flows, including flow 1, flow 2, flow 3, and flow 4, the messages in flow 1, flow 2, flow 3, and flow 4 all carry a second label, and flow 1, flow 2, flow 3, and flow 4 have the same multiple next-hop nodes when transmitted through the network node. Taking the multiple next-hop nodes including node 1 and node 2 as an example, in this case, the network node can sequentially determine node 1 as the next-hop node of flow 1 and forward the message carrying the second label in flow 1 to node 1, determine node 2 as the next-hop node of flow 2 and forward the message carrying the second label in flow 2 to node 2, then determine node 1 as the next-hop node of flow 3 and forward the message carrying the second label in flow 3 to node 1, then determine node 2 as the next-hop node of flow 4 and forward the message carrying the second label in flow 4 to node 2.

[0207] Another possible implementation is that when the message of the second message flow received by the network node carries the second label, the network node uses a hash algorithm to determine the target next hop node of the second message flow among multiple next hop nodes, and forwards the message carrying the second label in the second message flow to the target next hop node of the second message flow. The multiple next hop nodes are the common next hop nodes of the multiple message flows forwarded by the network node. That is, when the network node determines that the message of the received second message flow carries the second label, the message carrying the second label in the second message flow is subjected to hash-based flow-by-flow load sharing, which will not be elaborated. It should be understood that in this implementation, the hash factor used for hash calculation in each message carrying the second label in the second message flow is the same. Exemplarily, the hash factor includes but is not limited to the five-tuple of the message.

[0208] Step 203: When the messages in the above message flow do not include a load balancing label, for the first message in the message flow that does not include a load balancing label, the network node determines the next-hop forwarding node of the first message based on the hash factor carried by the first message, and sends the first message to the next-hop forwarding node.

[0209] When the network node determines that no load sharing label is identified in the received message, the network node forwards the message that does not include the load sharing label based on a pre-configured policy.

[0210] Optionally, the network node may be pre-configured with a policy that uses hash-based load balancing to forward packets that do not include a load balancing label. In this case, if the network node does not recognize a load balancing label in a received packet, the network node forwards the packet using hash-based load balancing.

[0211] Exemplarily, taking any message (such as the first message) in the first message flow that does not carry a load sharing label as an example, after the network node receives the first message, when the network node does not recognize the load sharing label in the first message, the network node extracts a hash factor from the first message and performs a hash calculation on the extracted hash factor to obtain a hash result. Furthermore, the network node determines the target next hop node of the first message among the multiple next hop nodes of the first message based on the calculated hash result, and forwards the first message to the target next hop node of the first message through its own network interface. Among them, the target next hop node of the first message is the next hop node corresponding to the calculated hash result among the multiple next hop nodes of the first message.

[0212] It should be understood that in this case, when the hash factors carried by each message in the message flow (such as the first message flow) received by the network node that does not carry a load sharing label are different, the network node calculates different hash results based on the different hash factors in each message, so that the network node can determine for each message the target next hop node corresponding to the hash result calculated based on the hash factor carried by each message. In this way, hash-based packet-by-packet load sharing is achieved for the messages of the first message flow.

[0213] When the hash factors carried in each message in a message flow (such as the second message flow) received by the network node that does not carry a load sharing label are the same, the network node calculates the same hash result based on the same hash factor in each message, so that the network node can determine the target next hop node corresponding to the same hash result for each message. In this way, hash-based flow-by-flow load balancing is achieved for the messages in the second message flow.

[0214] Optionally, the network node pre-configured policy is to forward messages that do not include a load balancing label using a preset transmission path. That is, the network node does not load balance messages that do not include a load balancing label. In this case, still using the first message that does not include a load balancing label as an example, the network node determines the preset path configured for the destination address based on the destination address of the first message, determines the next hop node for the first message based on the preset path, and sends the first message to the next hop node.

[0215] Through steps 201 to 203, each network node on the transmission path from the source node to the destination node can transmit the message flow from the source node using the load sharing method indicated by the source node until the message flow is forwarded to the destination node.

[0216] In response, the destination node or its access device can receive the message stream initiated by the source node and forwarded by at least one network node. When the network nodes forward the message stream from the source node using a packet-by-packet load balancing method, the destination node or its access device, after receiving the messages in the message stream, must reorder and reassemble the out-of-order messages in the received message stream to obtain a correctly ordered message stream and perform corresponding processing.

[0217] In some embodiments, the destination node or the access device of the destination node can also reversely regulate the load sharing mode specified by the source node when sending the message flow according to the disorder degree of the received message flow.

[0218] refer to Figure 6 , Figure 6 A flow chart of another method for controlling message transmission provided in an embodiment of the present application is shown. Optionally, the method is applied to Figure 1 The implementation environment shown and Figure 1 The destination node or the access device of the destination node in the implementation environment shown is executed. The following takes the method executed by the destination node and the message flow received by the destination node as an example. Figure 6 As shown, the method includes steps 301 and 302.

[0219] Step 301: The destination node determines the disorder degree of the first message flow.

[0220] Optionally, for the messages of the first message stream received by the destination node, the destination node can sort and reorganize the out-of-order messages of the first message stream in the receiving buffer, or the destination node can also sort and reorganize the out-of-order messages of the first message stream in the memory. This embodiment of the present application is not limited to this.

[0221] For simplicity of description, the following description is given by taking the case where the destination node sorts and reassembles out-of-order messages of the first message flow in the receiving buffer as an example.

[0222] In one possible implementation, the destination node detects the length of the sorting queue of the first message flow in the receiving buffer. The sorting queue of the first message flow is used to sort and reorganize the out-of-order messages in the received first message flow. The length of the sorting queue of the first message flow can be used to characterize the degree of disorder of the first message flow in the receiving buffer.

[0223] For example, when the destination node detects that the length of the sorting queue of the first message flow in the receiving buffer does not exceed the first length threshold, it is determined that the disorder degree of the first message flow in the receiving buffer does not exceed the first disorder threshold. For another example, when the destination node detects that the length of the sorting queue of the first message flow in the receiving buffer exceeds the second length threshold, it is determined that the disorder degree of the first message flow in the receiving buffer exceeds the second disorder threshold. Among them, the embodiment of the present application does not specifically limit the values ​​of the first length threshold, the second length threshold, the first disorder threshold, and the second disorder threshold. It should be noted that the second length threshold is greater than or equal to the first length threshold, and the second disorder threshold is greater than or equal to the first disorder threshold.

[0224] In another possible implementation, the destination node detects a change in the disorder degree of the messages in the received first message flow, where the change is used to represent the disorder degree of the first message flow in the receiving buffer.

[0225] For any message in the currently received first message stream, such as the third message, the disorder degree of the third message refers to the number of messages in the first message stream that are between the sequence number of the third message in the first message stream and the sequence number of the message currently expected to be received and that have not been received by the destination node. For example, refer to Figure 7 , Figure 7 A schematic diagram of determining the disorder degree of a message is shown. Figure 7 As shown, at the destination node, the destination node currently expects to receive message 11 with sequence number 11, while the destination node currently actually receives message 14 with sequence number 14. Therefore, the destination node determines that the disorder degree of the currently received message 14 is 14-11=3.

[0226] The change in disorder degree is the difference between the disorder degrees of two adjacent messages. For example, if the destination node currently receives message 14 with a disorder degree of 3 and the next message it receives (recorded as message 16) with a disorder degree of 5, the destination node determines that the change in disorder degree between messages 14 and 16 is 2.

[0227] Furthermore, when the destination node detects that the change value of the disorder degree of a preset number of consecutive messages in the received first message stream does not exceed the first change threshold, or the average value of the change value of the disorder degree of the preset number of consecutive messages does not exceed the first change threshold, it is determined that the disorder degree of the first message stream in the receiving buffer does not exceed the first disorder threshold. When the destination node detects that the change value of the disorder degree of a preset number of consecutive messages in the received first message stream exceeds the second change threshold, or the average value of the change value of the disorder degree of the preset number of consecutive messages exceeds the second change threshold, it is determined that the disorder degree of the first message stream in the receiving buffer exceeds the second disorder threshold. Among them, the embodiment of the present application does not specifically limit the values ​​of the first change threshold, the second change threshold, the first disorder threshold, and the second disorder threshold. It should be noted that the second change threshold is greater than or equal to the first change threshold, and the second disorder threshold is greater than or equal to the first disorder threshold.

[0228] Step 302: The destination node sends a control instruction to the source node of the first message flow or the access device of the source node according to the above disorder degree. The control instruction is used to indicate the load sharing method used for transmitting messages in the first message flow.

[0229] The control instruction carries the flow ID of the first message flow. In an embodiment of the present application, the control instruction may be a first instruction for instructing to send the first message flow messages in a packet-by-packet load balancing manner, or the control instruction may be a second instruction for instructing to send the first message flow messages in a flow-by-flow load balancing manner.

[0230] In one possible implementation, when the destination node determines that the out-of-order level of the first message flow in the receive buffer does not exceed a first out-of-order threshold, indicating that the destination node has a large receive buffer margin, to improve the load balancing of the transmission network, the destination node sends a control instruction to the source node of the first message flow or an access device of the source node, instructing the source node to transmit the messages of the first message flow using a packet-by-packet load balancing method. That is, the destination node sends the first instruction to the source node of the first message flow or an access device of the source node. In this way, the source node or the access device of the source node can respond to the first instruction and subsequently transmit the messages of the first message flow using a packet-by-packet load balancing method.

[0231] In another possible implementation, when the destination node determines that the degree of disorder of the first message flow in the receive buffer exceeds a second disorder threshold, indicating that the receive buffer of the destination node is about to be full, to avoid overflow of the receive buffer of the destination node, resulting in packet loss, and thus reducing the throughput of receiving and processing messages at the destination node, the destination node sends a control instruction to the source node of the first message flow or the access device of the source node, indicating that the messages of the first message flow should be sent using a flow-by-flow load balancing method. That is, the destination node sends a second instruction to the source node of the first message flow or the access device of the source node. In this way, the source node or the access device of the source node responds to the second instruction and subsequently transmits the messages of the first message flow using a flow-by-flow load balancing method.

[0232] Optionally, when the destination node determines that it needs to send a control instruction to the source node of the first message flow or the access device of the source node, the destination node may carry the control instruction as a payload in a data message sent by the destination node to the source node, and send the control instruction to the source node or the access device of the source node via the network node. In response, the source node or the access device of the source node receives the data message carrying the control instruction and obtains the control instruction from the data message.

[0233] Optionally, an embodiment of the present application defines a control message specifically for carrying a control instruction. In one example, the format of the control message can refer to the CNP message and will not be described in detail. In this case, when the destination node determines that a control instruction needs to be sent to the source node of the first message flow or the access device of the source node, it generates a control message for carrying the control instruction and sends the control message to the source node or the access device of the source node via the network node. In response, the source node or the access device of the source node receives the control message and obtains a control instruction based on the control message.

[0234] In addition, it should be noted that when the source node receives a control indication and the flow ID carried by the control indication represents the first message flow, the source node determines whether the first condition or the second condition described above is met based on the received control indication, and determines the load sharing method for sending the first message flow based on the first condition or the second condition. For detailed explanations, please refer to the above steps 101 to 102, and the relevant descriptions of steps 101A to 102A, and will not be repeated here.

[0235] When the access device of the source node receives a control indication, and the flow ID carried by the control indication represents the first message flow, the access device determines the load sharing method for sending the first message flow based on the received control indication, and after determining the load sharing method for sending the first message flow, sends the message of the first message flow through the process described in step 103 or step 104, which will not be repeated here.

[0236] Through steps 301 to 302, the destination node of the message flow or the access device of the destination node can send a control instruction to the source node or the access device of the source node according to the degree of disorder of the received message flow, and use back pressure to control the load sharing method adopted by the source node or the access device of the source node when sending the message flow. In this way, the destination node or the access device of the destination node can avoid the packet loss problem caused by insufficient reordering resources due to the excessive disorder of the first message flow received (such as packet loss caused by overflow of insufficient receiving buffer, or packet loss caused by insufficient memory, etc.), thereby ensuring the throughput rate of receiving and processing messages by the destination node or the access device of the destination node.

[0237] In summary, through Figures 2 to 6 The method described above can achieve conditional, packet-by-packet load balancing for message flows sent by a source node, and can also dynamically adjust the load balancing method used by the source node or its access device when sending message flows based on the real-time disorder of the message flows received by the destination node or its access device during the message flow transmission process. In this way, the method provided by the embodiments of the present application can improve the degree of network load balancing while ensuring the throughput of the message flow when the destination node-side device processes the message flow.

[0238] In order to further deepen the understanding of the method provided in the embodiments of the present application, the method is further explained below with reference to specific examples.

[0239] refer to Figure 8 , Figure 8 Another schematic diagram of the control method for message transmission provided by the embodiment of the present application is shown. Figure 8 As shown, nodes S1 , S2 , and S3 access the transmission network via access device 11 , and nodes D1 , D2 , and D3 access the transmission network via access device 12 .

[0240] When node S3 generates flow 80 destined for node D1, it first executes steps 101-102 and steps 101A-102A to determine the load balancing method for sending flow 80. Furthermore, if node S3 determines to use per-packet load balancing for sending flow 80, node S3 executes step 103 to send flow 80. If node S3 determines to use per-flow load balancing for sending flow 80, node S3 executes step 104 to send flow 80. In response, access device 11 receives flow 80 and forwards it by executing steps 201-203. For example, access device 11 sends the packets of flow 80 via transmission path 1 and transmission path 2 using per-packet load balancing. Transmission path 1 passes through forwarding nodes R1 and R2, while transmission path 2 passes through forwarding nodes R3 and R4. In response, node D1 receives the packets of flow 80 from node S3, sent via transmission paths 1 and 2 of the transmission network.

[0241] Combine Figure 8 ,refer to Figure 9 , Figure 9 FIG. 1 shows another schematic diagram of a method for controlling message transmission provided in an embodiment of the present application. Figure 9 As shown, at node S3, Figure 8 During the process of sending flow 80 in the method described above, node D1 or access device 12 determines the out-of-order level of the out-of-order packets of flow 80 it receives by executing step 301. Furthermore, when node D1 or access device 12 determines that the out-of-order level of flow 80 does not exceed a first out-of-order threshold, it sends a first instruction to node S3 or access device 11, instructing node S3 or access device 11 to subsequently transmit packets of flow 80 using a packet-by-packet load balancing approach. When node D1 or access device 12 determines that the out-of-order level of flow 80 exceeds a second out-of-order threshold, it sends a second instruction to node S3 or access device 11, instructing node S3 or access device 11 to subsequently transmit packets of flow 80 using a flow-by-flow load balancing approach. In this way, the load balancing method used by node S3 or access device 11 to transmit flow 80 can be dynamically adjusted, thereby ensuring the throughput of node D1 or access device 12 when receiving and processing packets, while maintaining the load balancing level of the packet transmission network.

[0242] The above mainly introduces the solution provided in the embodiment of the present application from the perspective of method.

[0243] To achieve the above functions, refer to Figure 10 , Figure 10 FIG. 1 shows a schematic diagram of a control device for message transmission provided in an embodiment of the present application. Figure 10As shown, the control device 1000 for message transmission is applied to the source node that sends the first message flow, and is used to execute the steps executed by the source node in the control method for message transmission described above, for example, to execute Figure 2 、 Figure 3 、 Figure 4 、 Figure 5 or Figure 6 The steps in the method shown are performed by the source node. The control device 1000 for message transmission may include a determining unit 1001.

[0244] The determining unit 1001 is configured to determine a first condition and determine to transmit packets of the first packet flow in a packet-by-packet load balancing manner based on the first condition, wherein the first condition includes that the transmission protocol used by the first packet flow supports packet-by-packet load balancing.

[0245] As an example, combined with Figure 2 , the determination unit 1001 can be used to execute step 101 and step 102.

[0246] Optionally, the first condition also includes that the destination node of the first message flow and / or the access device of the destination node has a message reordering capability, where the reordering capability refers to the ability to sort and reorganize out-of-order messages in the message flow.

[0247] Optionally, the first condition also includes that the size of the reordering resources allocated to the first message flow by the destination node of the first message flow or the access device of the destination node exceeds a first threshold, and the reordering resources are used to sort and reorganize out-of-order messages in the first message flow.

[0248] Optionally, the first condition further includes receiving a first indication, where the first indication is used to indicate that packets of the first packet flow are sent in a packet-by-packet load sharing manner.

[0249] Optionally, the first condition further includes that the size of the first message flow exceeds a second threshold, or the first condition further includes that the first message flow is a data flow.

[0250] Optionally, the message transmission control device 1000 further includes: an adding unit 1002, configured to add a different hash factor to each message to be transmitted in the first message flow; and a sending unit 1003, configured to send messages carrying different hash factors. The first hash factor added to a first message in the first message flow is used to determine a forwarding path for the first message, where the first message is any message to be transmitted in the first message flow.

[0251] As an example, combined with Figure 4 , the adding unit 1002 and the sending unit 1003 can be used to execute step 103.

[0252] Optionally, the adding unit 1002 is configured to add a first label to a message to be transmitted in the first message flow, and the sending unit 1003 is configured to send the message carrying the first label. The first label is used to instruct network nodes on the transmission path of the first message flow to forward the message carrying the first label using a packet-by-packet load balancing method.

[0253] As an example, combined with Figure 4 , the sending unit 1003 can be used to execute step 103.

[0254] Optionally, the first label is carried in the protocol field of the transmission protocol adopted by the first message flow, and the protocol field includes any one of the following fields: the flag field of IPv4, the flag field in SRv6 SRH, the unused field in NSH, or the field indicating network operation in MPLS; or, the first label is carried by the MAC address, source IP address, VNI of the VXLAN where the source node is located, or the source port number included in the message in the first message flow; or, the first label is carried by the IPv6 flow label or SRv6 SID included in the message in the first message flow; or, the first label is carried in the DSCP field, EXP field, PRI field or APN field of the VLAN tag technology extension protocol of the message in the first message flow.

[0255] Optionally, the determination unit 1001 is further used to determine a second condition, and based on the second condition, determine whether to use a flow-by-flow load balancing method to send the messages of the second message flow. The second condition includes at least one of the following conditions: the transmission protocol used by the second message flow does not support the use of a packet-by-packet load balancing method to transmit messages, the destination node of the second message flow and the access device of the destination node do not have the message reordering capability, the destination node of the second message flow and the access device of the destination node have the message reordering capability, but the size of the reordering resources allocated by the node with the message reordering capability to the first message flow does not exceed the third threshold, a second indication sent by the destination node of the second message flow or the access device of the destination node is received, the size of the second message flow does not exceed the fourth threshold, or the second message flow is a control flow. The second indication is used to indicate that the messages of the second message flow are to be sent using a flow-by-flow load balancing method.

[0256] As an example, combined with Figure 3 , the determination unit 1001 can be used to execute step 101A and step 102A.

[0257] Optionally, the adding unit 1002 is configured to add a second label to the message to be transmitted in the second message flow, and the sending unit 1003 is configured to send the message carrying the second label. The second label is used to instruct the network nodes on the transmission path of the second message flow to forward the messages of the second message flow using a flow-by-flow load balancing method;

[0258] As an example, combined with Figure 4 , the adding unit 1002 and the sending unit 1003 can be used to execute step 104.

[0259] Optionally, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages.

[0260] 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 of any of the above message transmission control devices 1000 and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.

[0261] As an example, in combination with the following Figure 13 The functions implemented by the determining unit 1001 and the adding unit 1002 in the control device 1000 for message transmission can be realized by Figure 13 Processor 1301 in the Figure 13 The functions implemented by the sending unit 1003 in the control device 1000 for message transmission can be realized by Figure 13 The network interface 1303 is shown implemented.

[0262] refer to Figure 11 , Figure 11 FIG. 1 shows a schematic diagram of the structure of another control device for message transmission provided in an embodiment of the present application. Figure 11 As shown, the message transmission control device 1100 is used to execute the steps executed by the network node in the message transmission control method described above, for example, Figure 2 、 Figure 3 、 Figure 4 、 Figure 5 or Figure 6 The steps in the method shown are performed by a network node. The control device 1100 for message transmission may include a receiving unit 1101 and a sending unit 1102.

[0263] The receiving unit 1101 is configured to receive a message in a message flow. The sending unit 1102 is configured to forward the message in the message flow carrying the load balancing label when the message in the message flow includes a load balancing label, where the load balancing label is used to indicate a load balancing mode used when forwarding the message.

[0264] As an example, combined with Figure 5 , the receiving unit 1101 can be used to execute step 201, and the sending unit 1102 can be used to execute step 202.

[0265] Optionally, when the load sharing label is a first label for indicating that packets are forwarded in a packet-by-packet load sharing manner, the sending unit 1102 is specifically configured to forward packets carrying the first label in the packet flow in a packet-by-packet load sharing manner.

[0266] Optionally, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages.

[0267] Optionally, when the load sharing label is a second label for indicating that packets are forwarded in a flow-by-flow load sharing manner, the sending unit 1102 is further configured to forward packets carrying the second label in the packet flow in a flow-by-flow load sharing manner.

[0268] Optionally, the transmission control device 1100 further includes: a determining unit 1103 configured to, when a message in the message flow does not include a load balancing label, determine a next-hop forwarding node for a first message in the message flow that does not include a load balancing label based on a hash factor carried by the first message. The sending unit 1102 is further configured to send the first message to the next-hop forwarding node.

[0269] As an example, combined with Figure 5 , the determining unit 1103 and the sending unit 1102 can be used to execute step 203.

[0270] 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 of any of the above message transmission control devices 1100 and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.

[0271] As an example, in combination with the following Figure 13 The functions implemented by the receiving unit 1101 and the sending unit 1102 in the control device 1100 for message transmission can be realized by Figure 13 The network interface 1303 shown is implemented. The function implemented by the determination unit 1103 in the control device 1100 for message transmission can be achieved by Figure 13 Processor 1301 in the Figure 13 The program code in the memory 1302 is implemented.

[0272] refer to Figure 12 , Figure 12 FIG. 1 shows a structural diagram of another control device for message transmission provided in an embodiment of the present application. Figure 12 As shown, the control device 1200 for message transmission is applied to the destination node of the first message flow or the access device of the destination node, and is used to execute the steps executed by the destination node or the access device of the destination node in the control method for message transmission described above, for example, Figure 2 、 Figure 3 、 Figure 4 、 Figure 5 or Figure 6 The steps in the method shown are performed by the destination node or the access device of the destination node. The control device 1200 for message transmission may include a determining unit 1201 and a sending unit 1202.

[0273] The determining unit 1201 is configured to determine the disorder level of the first message flow. The sending unit 1202 is configured to send a control instruction to the source node of the first message flow or the access device of the source node based on the disorder level, wherein the control instruction is used to indicate the load sharing method used when transmitting messages in the first message flow.

[0274] As an example, combined with Figure 6 , the determining unit 1201 can be used to execute step 301, and the sending unit 1202 can be used to execute step 302.

[0275] Optionally, the regulation indication is a first indication for indicating that packets in the first packet flow are sent in a packet-by-packet load sharing manner, and the sending unit 1202 is specifically used to send the first indication to the source node or the access device of the source node when the degree of disorder does not exceed the first disorder threshold.

[0276] Optionally, the load sharing granularity of packet-by-packet load sharing includes a cell, a single message, or multiple messages.

[0277] Optionally, the control instruction is a second instruction for instructing to send the first packet flow in a flow-by-flow load balancing manner, and the sending unit 1202 is further specifically configured to send the second instruction to the source node or the access device of the source node when the out-of-order degree exceeds a second out-of-order threshold. The second out-of-order threshold is greater than or equal to the first out-of-order threshold.

[0278] Optionally, the determining unit 1201 is specifically configured to detect the length of a reordering queue of the first message flow, where the reordering queue is configured to sort and reorganize out-of-order messages in the received first message flow, and the length of the reordering queue is configured to represent the degree of out-of-orderness.

[0279] Optionally, the determination unit 1201 is specifically used to detect a change in the disorder degree of messages in the received first message stream, and the change value is used to characterize the degree of disorder; for the second message in the currently received first message stream, the disorder degree of the second message refers to the number of messages in the first message stream that are between the sequence number of the second message in the first message stream and the sequence number of the message currently expected to be received and that have not been received by the destination node or the access device of the destination node.

[0280] Optionally, the sending unit 1202 is specifically used to send a data message to the source node of the first message flow or the access device of the source node, where the data message carries a regulation indication, or to send a control message to the source node of the first message flow or the access device of the source node, where the control message is used to carry a regulation indication.

[0281] 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 beneficial effects of any of the above message transmission control devices 1200 can be referred to the above corresponding method embodiments, which will not be repeated here.

[0282] As an example, in combination with the following Figure 13 The function implemented by the determination unit 1201 in the message transmission control device 1200 can be achieved by Figure 13 Processor 1301 in the Figure 13 The functions implemented by the sending unit 1202 in the control device 1200 for message transmission can be realized by the program code in the memory 1302 in the memory 1302. Figure 13 The network interface 1303 is shown implemented.

[0283] It should be readily apparent to those skilled in the art that, in combination with the units and algorithmic steps of the various examples 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 performed 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.

[0284] It should be noted that Figure 10 、 Figure 11 or Figure 12 The division of modules / units described above is illustrative and represents only one logical functional division. Actual implementations may employ different divisions. For example, two or more functions may be integrated into a single processing module. These integrated modules may be implemented as either hardware or software functional modules.

[0285] The present application provides a computing device that is used to implement some or all of the functions of the message transmission control method provided in the present application. For example, the computing device is implemented as the source node, network node, destination node, or access device of the destination node described above.

[0286] Figure 13 This is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. Figure 13As shown, the computing device 1300 includes a processor 1301 , a memory 1302 , a network interface 1303 and a bus 1304 . The processor 1301 , the memory 1302 , and the network interface 1303 are communicatively connected to each other via the bus 1304 .

[0287] The processor 1301 may include a general-purpose processor and / or a dedicated hardware chip. A general-purpose 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 at least one of a digital signal processor (DSP), a data processing unit (DPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, a neural processing unit (NPU), a tensor processing unit (TPU), an artificial intelligence (artificial intelligent) chip or a network processor (NP). The processor 1301 may also be an integrated circuit chip having signal processing capabilities. During implementation, part or all of the functions of the method provided in the embodiment of the present application may be accomplished through hardware integrated logic circuits in the processor 1301 or instructions in software form.

[0288] The memory 1302 is used to store computer programs, including an operating system 1302a and executable code (i.e., program instructions) 1302b. The memory 1302 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 static storage device that can store static information and instructions, or 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), or 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 discs or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic 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 1302 is used to store relevant information about the first condition and the second condition, etc. The memory 1302 is, for example, independent and connected to the processor 1301 via the bus 1304. Or the memory 1302 and the processor 1301 are integrated together. The memory 1302 can store executable code, and when the executable code stored in the memory 1302 is executed by the processor 1301, the processor 1301 is used to execute part or all of the functions of the control method for message transmission provided in the embodiment of the present application. For the implementation method of the processor 1301 executing the process, please refer to the relevant description in the aforementioned embodiment. The memory 1302 may also include software modules and data required by other running processes such as an operating system.

[0289] The network interface 1303 uses a transceiver module, such as, but not limited to, a transceiver, to communicate with other devices or communication networks. For example, the network interface 1303 can be any one or a combination of the following devices: a network interface (e.g., an Ethernet interface), a wireless network card, or other devices with network access capabilities. The network interface 1303 includes a receiving unit for receiving data / messages and a transmitting unit for sending data / messages.

[0290] The bus 1304 is any type of communication bus used to interconnect the internal components of the computing device 1300 (e.g., the memory 1302, the processor 1301, the network interface 1303, etc.). For example, a system bus is provided. The embodiments of the present application illustrate the example of the aforementioned components within the computing device 1300 being interconnected via the bus 1304. Alternatively, the aforementioned components within the computing device 1300 may be communicatively connected to each other using other connection methods besides the bus 1304. For example, the aforementioned components within the computing device 1300 may be interconnected via an internal logical interface.

[0291] 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 each device is independently arranged on different chips or integrated 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 parts that are not described in detail in a certain process, please refer to the relevant descriptions of other processes.

[0292] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product providing a program development platform includes one or more computer instructions. When these computer program instructions are loaded and executed on the computing device 1300, all or part of the functions of the message transmission control method provided in the embodiments of the present application are implemented in whole or in part.

[0293] Furthermore, computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. 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.

[0294] The embodiment of the present application provides a message transmission control system, which includes: a source node for sending a message flow, a network node for transmitting the message flow, and a destination node / access device of the destination node. Figure 2 、 Figure 3 、 Figure 4 、 Figure 5 or Figure 6 The part of the method shown in the figure that is executed by the source node, the network node is used to execute the following Figure 2 、 Figure 3 、 Figure 4 、 Figure 5 or Figure 6 The part of the method shown in the figure that is executed by the network node, the destination node / destination node access device is used to execute the following Figure 2 、 Figure 3 、 Figure 4 、 Figure 5 or Figure 6 The part of the method shown that is executed by the destination node / the access device of the destination node will not be described in detail.

[0295] An embodiment of the present application also provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium. The computer-readable storage medium includes computer program instructions. When the computer program instructions are executed by a computing device, a computer system or a processor, the computing device, the computer system or the processor executes the control method for message transmission provided in the embodiment of the present application.

[0296] An embodiment of the present application also provides a computer program product containing instructions. When the instructions are executed by a computing device, a computer system or a processor, the control method for message transmission provided by the embodiment of the present application is implemented on the computing device, the computer system or the processor.

[0297] A computer system is a system with computing processing capabilities. A computer system generally includes a processor and memory. The processor is configured to retrieve and execute instructions stored in the memory to enable the computer system to implement the message transmission control method described above. Optionally, the computer system may also include at least one of an input interface and an output interface. The processor, memory, input interface, and output interface of the computer system are connected via internal connection paths.

[0298] Those 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.

[0299] 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 the relevant laws, regulations and standards of relevant countries and regions.

[0300] 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 control method for message transmission 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, 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 connection and communication between the chip and other chips or devices.

[0301] 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" refers to one or more, and the term "plurality" refers to a plurality, unless otherwise expressly limited.

[0302] In this application, the term "and / or" simply describes an association between related objects, indicating that three possible relationships exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0303] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is 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.

[0304] It should be understood that determining B based on A does not mean determining B based solely on A. B can also be determined based on A and / or other information.

[0305] It will 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 preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0306] 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.

[0307] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the concepts and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for controlling message transmission, characterized in that: Applied to a source node sending a first message flow, the method includes: Determining a first condition, where the first condition includes that a transmission protocol used by the first message flow supports transmitting messages in a packet-by-packet load balancing manner; According to the first condition, it is determined to use a packet-by-packet load sharing method to send the packets of the first packet flow.

2. The method according to claim 1, wherein The first condition also includes that the destination node of the first message flow and / or the access device of the destination node has a message reordering capability, where the reordering capability refers to the capability of sorting and reorganizing out-of-order messages in the message flow.

3. The method according to claim 2, wherein The first condition also includes that the size of the reordering resources allocated to the first message flow by the destination node of the first message flow or the access device of the destination node exceeds a first threshold, and the reordering resources are used to sort and reorganize out-of-order messages in the first message flow.

4. The method according to any one of claims 1 to 3, characterized in that The first condition also includes receiving a first indication, where the first indication is used to indicate that packets of the first packet flow are sent in a packet-by-packet load balancing manner.

5. The method according to any one of claims 1 to 4, characterized in that The first condition also includes that the size of the first message flow exceeds a second threshold, or the first condition also includes that the first message flow is a data flow.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: adding a different hash factor to each message to be transmitted in the first message flow; for a first hash factor added to a first message in the first message flow, the first hash factor is used to determine a forwarding path for the first message, where the first message is any message to be transmitted in the first message flow; Send messages with different hash factors.

7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Adding a first label to a message to be transmitted in the first message flow, where the first label is used to instruct network nodes on a transmission path of the first message flow to forward the message carrying the first label in a packet-by-packet load balancing manner; Sending a message carrying the first label.

8. The method according to claim 7, wherein The first label is carried in a protocol field of a transport protocol used by the first packet flow, where the protocol field includes any one of the following fields: a flag field of Internet Protocol version 4 (IPv4), a flag field in a Segment Routing Header (SRv6) SRH of Segment Routing based on Internet Protocol version 6, an unused field in a Network Service Header (NSH), or a field indicating a network operation in Multi-Protocol Label Switching (MPLS); or The first label is carried by a source media access control MAC address, a source Internet protocol IP address, a network identifier VNI of a virtual extended local area network VXLAN where the source node is located, or a source port number included in the message in the first message flow; or The first label is carried by an IPv6 flow label or an SRv6 segment identifier SID included in a message in the first message flow; or, The first tag is carried in the Differentiated Services Code Point DSCP field, the Experimental EXP field, the Priority PRI field of the Virtual Local Area Network (VLAN) tag technology extension protocol, or the Application Aware Network (APN) field of the message in the first message flow.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Determine a second condition, where the second condition includes at least one of the following conditions: the transmission protocol used by the second message flow sent by the source node does not support packet-by-packet load balancing for transmitting messages, the destination node of the second message flow and the access device of the destination node of the second message flow do not have message reordering capabilities, the destination node of the second message flow and the access device of the destination node of the second message flow have message reordering capabilities, but the size of the reordering resources allocated by the node with message reordering capabilities for the second message flow does not exceed a third threshold, a second indication sent by the destination node of the second message flow or the access device of the destination node of the second message flow is received, the size of the second message flow does not exceed a fourth threshold, or the second message flow is a control flow; wherein the second indication is used to indicate that messages of the second message flow are sent in a flow-by-flow load balancing manner; According to the second condition, it is determined to use a flow-by-flow load balancing method to send the messages of the second message flow.

10. The method according to claim 9, wherein The method further comprises: Adding a second label to a message to be transmitted in the second message flow, where the second label is used to instruct a network node on a transmission path of the second message flow to forward the message of the second message flow in a flow-by-flow load balancing manner; Sending a message carrying the second label.

11. The method according to any one of claims 1 to 10, characterized in that The load sharing granularity of the packet-by-packet load sharing includes a cell, a single message or multiple messages.

12. A method for controlling message transmission, characterized in that: The method comprises: Receive messages from a message stream; In a case where the packets in the packet flow include a load sharing label, the packets in the packet flow carrying the load sharing label are forwarded, where the load sharing label is used to indicate a load sharing mode used when forwarding the packets.

13. The method according to claim 12, wherein: When the load sharing label is a first label for indicating that packets are forwarded in a packet-by-packet load sharing manner, forwarding the packet in the packet flow that carries the load sharing label includes: The packets carrying the first label in the packet flow are forwarded in a packet-by-packet load balancing manner.

14. The method according to claim 13, wherein The load sharing granularity of the packet-by-packet load sharing includes a cell, a single message or multiple messages.

15. The method according to any one of claims 12 to 14, characterized in that When the load sharing label is a second label for indicating that packets are forwarded in a flow-by-flow load sharing manner, forwarding the packet in the packet flow that carries the load sharing label includes: A flow-by-flow load balancing method is adopted to forward the packets carrying the second label in the packet flow.

16. The method according to claim 12, wherein The method further comprises: In a case where the message in the message flow does not include the load sharing label, for a first message in the message flow that does not include the load sharing label, determining a next hop forwarding node for the first message according to a hash factor carried by the first message; Send the first message to the next-hop forwarding node.

17. A method for controlling message transmission, characterized in that: Applied to a destination node of a first message flow or an access device of the destination node, the method comprising: Determining a degree of disorder of the first message flow; According to the disorder degree, a regulation indication is sent to the source node of the first message flow or the access device of the source node, where the regulation indication is used to indicate a load sharing method used when transmitting messages in the first message flow.

18. The method according to claim 17, wherein The control instruction is a first instruction for instructing to send the messages in the first message flow in a packet-by-packet load sharing manner; and sending the control instruction to the source node of the first message flow or the access device of the source node according to the disorder degree includes: When the disorder level does not exceed a first disorder threshold, the first indication is sent to the source node or an access device of the source node.

19. The method according to claim 18, wherein The load sharing granularity of the packet-by-packet load sharing includes a cell, a single message or multiple messages.

20. The method according to claim 18 or 19, wherein The control instruction is a second instruction for instructing to send the first message flow in a flow-by-flow load sharing manner; and sending the control instruction to the source node of the first message flow or the access device of the source node according to the disorder degree includes: When the disorder level exceeds a second disorder threshold, the second indication is sent to the source node or an access device of the source node; wherein the second disorder threshold is greater than or equal to the first disorder threshold.

21. The method according to any one of claims 17 to 20, characterized in that The determining the disorder degree of the first message flow includes: The length of the reordering queue of the first message flow is detected. The reordering queue is used to sort and reorganize out-of-order messages received in the first message flow. The length of the reordering queue is used to represent the degree of the out-of-order message.

22. The method according to any one of claims 17 to 20, characterized in that The determining the disorder degree of the first message flow includes: Detect a change in the degree of disorder of the messages in the first message stream received, where the change value is used to characterize the degree of disorder; for the second message in the first message stream currently received, the degree of disorder of the second message refers to the number of messages in the first message stream that are between the sequence number of the second message in the first message stream and the sequence number of the message currently expected to be received and that have not been received by the destination node or the access device of the destination node.

23. The method according to any one of claims 17 to 22, characterized in that The sending a control instruction to the source node of the first message flow or the access device of the source node includes: Sending a data message to the source node or an access device of the source node, wherein the data message carries the control instruction; or A control message is sent to the source node or an access device of the source node, where the control message is used to carry the regulation instruction.

24. A control device for message transmission, 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 23.

25. A message transmission control system, characterized in that: include: A source node for sending a message flow, a network node for transmitting a message flow, and a destination node for the message flow / an access device for the destination node, wherein the source node is used to execute the method as described in any one of claims 1 to 11, the network node is used to execute the method as described in any one of claims 12 to 16, and the destination node / the access device for the destination node is used to execute the method as described in any one of claims 17 to 23.

26. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device or a processor, the computing device or the processor is caused to perform the method according to any one of claims 1 to 23.

27. A computer-readable storage medium, 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 23.