Load sharing method and related device

By obtaining the unordered packet reordering capability of the tail node and determining multiple paths to meet their capability requirements, the problem of unordered packets in packet-by-packet load sharing is solved and the communication quality is improved.

CN120434199APending Publication Date: 2025-08-05HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410160272.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-04
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

The existing load sharing method cannot effectively solve the problem of out-of-order packets in the packet-by-package load sharing scenario, resulting in a decline in communication quality.

Method used

By obtaining the capability information of the out-of-order message reordering of the tail node, multiple paths are determined to meet their capability requirements, ensuring that the messages can be successfully reordered during transmission, and reducing the probability of failure of the out-of-order message reordering.

Benefits of technology

It effectively reduces communication packet loss caused by out-of-order packets and improves communication quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434199A_ABST
    Figure CN120434199A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a load sharing method and a related device, and the method comprises the steps that a first device receives a first message sent by a second device, and the first message indicates the reordering capability of the second device for out-of-order messages; and the first device determines capability information of the second device according to the first message, and the capability information of the second device is used for determining a plurality of paths for executing load sharing. Therefore, the delay jitter range of the plurality of paths meets the requirement of the capability information of the second device. By means of the method, the multiple paths for executing load sharing can be determined according to the reordering capacity of the tail node on the out-of-order messages, it is ensured that the sequence of the out-of-order messages transmitted by the tail node on the multiple paths can be successfully recovered, and the communication quality is improved.
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 load sharing method and related devices. Background Art

[0002] With the expansion of networks and the diversification of application scenarios, current network configurations are becoming increasingly diverse. Traffic sent from one network device to another typically has multiple paths. Networks need to distribute traffic across multiple paths to improve forwarding performance, enhance network reliability, and ultimately provide better user services.

[0003] Existing load balancing methods include: per-flow load balancing and per-packet load balancing. Figure 1 As shown, Figure 1 This is a diagram of flow-by-flow load balancing. Flow-by-flow load balancing means dividing the original message into different flows according to the characteristic fields of the message, and then forwarding the messages of the same flow on the same path. The characteristic fields may be source Internet Protocol (IP) address, destination IP address, source port number, destination port number or protocol number. For example, Figure 2 As shown, Figure 2 This is a diagram of packet-by-packet load balancing. Packet-by-packet load balancing means that multiple packets are evenly distributed across multiple paths for forwarding according to the order in which they arrive.

[0004] Per-flow load balancing has limited applicability. For example, in scenarios with significant traffic, per-flow load balancing cannot address the network congestion caused by traffic. Traffic refers to data flows that continuously consume a large amount of bandwidth on a network path. For example, traffic can be caused by data backup or virtual machine migration. Per-packet load balancing, on the other hand, can distribute traffic to multiple paths, mitigating the network congestion caused by traffic. However, per-packet load balancing can cause packet out-of-order transmission, limiting its application. Currently, per-packet load balancing is typically only used for services that are not sensitive to packet order. Therefore, in scenarios where per-packet load balancing is used, mitigating the impact of out-of-order transmission becomes a pressing issue. Summary of the Invention

[0005] The present application provides a load sharing method that can determine multiple paths for performing load sharing based on the tail node's ability to reorder out-of-order messages, ensuring that the tail node can successfully restore the order of out-of-order messages transmitted over multiple paths, thereby improving communication quality.

[0006] In a first aspect, the present application provides a load balancing method, which is applied to a first device and includes the following steps: first, the first device receives a first message sent by a second device, where the first message indicates the second device's ability to reorder out-of-order messages. Then, the first device determines capability information of the second device based on the first message, where the capability information of the second device is used to determine multiple paths for load balancing.

[0007] For example, the first device is a controller in a network system, and the controller is used to control and manage a head node, a tail node, and an intermediate node between the head node and the tail node.

[0008] For another example, the first device is a head node in a network system, the second device is a tail node in the network system, and the network system further includes a controller for controlling and managing the head node, the tail node, and intermediate nodes between the head node and the tail node.

[0009] In this solution, the delay difference between the multiple paths between the first device and the second device may be large. If multiple paths are randomly selected to perform load sharing to transmit messages, it may cause the messages to be out of order. The out-of-order messages transmitted by these multiple paths may exceed the reordering capability of the second device, causing the second device to be unable to successfully reorder the out-of-order messages, affecting the communication quality. After the first device obtains the capability information of the second device, the multiple paths for performing load sharing determined based on the capability information of the second device can ensure that the multiple paths meet the capability information requirements of the second device, for example, the delay jitter range of the multiple paths meets the capability information requirements of the second device. This avoids the selection of multiple paths with large delay differences to perform load sharing, ensures that the second device can successfully reorder the out-of-order messages transmitted in these multiple paths, effectively reduces the probability of failure of the second device to reorder the out-of-order messages, avoids packet loss due to reordering failure, and improves communication quality.

[0010] In one possible implementation, a first device receives a first message sent by a second device, including: first, the first device sends a second message to the second device. Then, the first device sends a third message to the second device. After the first device sends the second message and the third message to the second device, the first device receives a first message sent by the second device, where the first message is generated by the second device in response to the received second message and the third message.

[0011] In this solution, the first device triggers the acquisition of capability information of the second device by sending at least two messages to the second device, thereby improving the implementation flexibility of the solution so as to flexibly adapt to the needs of different services.

[0012] In one possible implementation, after sending the second message to the second device, the first device waits for a sending interval and sends a third message to the second device. The first device then determines the sending interval corresponding to the first message based on the first message, and the sending interval is used to determine the capability information of the second device.

[0013] In this solution, the first device waits for the sending interval to send at least two messages to the second device, and then determines the capability information of the second device based on the sending interval and the first message fed back by the second device, thereby reducing the processing difficulty of the second device and simplifying the implementation of the second device.

[0014] In one possible implementation, the second device's capability information is determined to include a maximum out-of-order time based on the interval between two messages sent to the second device. The maximum out-of-order time is the maximum interval between receipts during which the second device can successfully reorder at least two out-of-order messages. By reporting the maximum out-of-order time, the delay jitter range of multiple paths determined based on the capability information is ensured to be less than or equal to the maximum out-of-order time. This effectively reduces the probability of failure in the second device's reordering of out-of-order messages, avoids packet loss due to reordering failures, and improves communication quality.

[0015] Optionally, the maximum out-of-order time is less than or equal to the sending interval time.

[0016] In a possible implementation, the first device fragments the detection message whose destination address points to the second device to generate a second message and a third message.

[0017] This solution leverages the existing response mechanism for probe messages, allowing the first device to obtain a response message from the second device based on the fragmented message. Based on the received response message, the first device determines that the second device has successfully reordered the fragmented message and, therefore, determines the second device's capabilities. This reduces the processing complexity for the second device, simplifies its implementation, and improves processing efficiency.

[0018] Optionally, the detection message includes: a ping request message, a Bidirectional Active Measurement Protocol (TWAMP) message, or a Bidirectional Forwarding Detection (BFD) message.

[0019] In a possible implementation, the message sequence number of the second message is smaller than the message sequence number of the second message, which improves the implementation flexibility of the solution.

[0020] In one possible implementation, the second message carries a first identifier; the third message carries a second identifier; the first identifier and the second identifier are used to instruct the second device to trigger shuffling of the second and third messages. This allows the second device to identify the first identifier of the second message and the second identifier of the third message and then perform shuffling on the two messages. For example, the two messages are stored in a shuffling cache storage area, and upon receipt of the complete second and third messages, the first message is triggered to be sent to the first device. This improves the implementation flexibility of the solution.

[0021] Optionally, the first identifier and the second identifier may be the same identifier, or may be corresponding different identifiers.

[0022] In one possible implementation, step 1: the first device sends a second message to the second device;

[0023] Step 2: The first device waits for the sending interval time and sends a third message to the second device;

[0024] Step 3: In response to receiving the first message sent by the second device, the first device increases the sending interval;

[0025] Repeat the above steps 1, 2 and 3 until the first device does not receive the first message after sending the third message to the second device, and the first device stops sending the second message and the third message to the second device.

[0026] Then, the first device determines the sending interval corresponding to the last received first message based on the last received first message. The first device determines the maximum out-of-sequence time of the second device based on the sending interval corresponding to the last received first message.

[0027] In this solution, the accuracy of the maximum delay difference obtained by the first device is improved by periodically increasing the time interval for sending fragmented messages.

[0028] In one possible implementation, step 1: the first device sends a second message to the second device;

[0029] Step 2: The first device waits for the sending interval time and sends a third message to the second device;

[0030] Step 3: In response to not receiving the first message sent by the second device within the first time period, the first device reduces the sending interval;

[0031] Repeat the above steps 1, 2 and 3 until the first device receives the first message after sending the third message to the second device, and stop sending the second message and the third message to the second device.

[0032] In this solution, the accuracy of the maximum delay difference obtained by the first device is improved by periodically reducing the time interval for sending fragmented messages.

[0033] In one possible implementation, a first device sends a second message to a second device, including: after receiving first routing information, the first device sends the second message to the second device based on the first routing information, where the destination address included in the first routing information points to the second device. Without additional instructions, the first device can trigger detection of the second device's capability information upon receiving the routing information with the destination address pointing to the second device, thereby conserving communication resources.

[0034] In one possible implementation, the first device sends a second message to the second device, including: after the first device receives the message in the data stream, based on the characteristic information of the data stream, sending the second message to the second device, the destination address of the message in the data stream points to the second device. For example, when the message of the data stream arrives at the first device, the first device determines that the data stream needs to be load-balanced on a packet-by-packet basis based on the five-tuple of the message. Therefore, the first device needs to obtain the capability information of the destination of the data stream, that is, the capability information of the second device. Then, the first device sends the second message and the third message to the second device, triggering the acquisition of the capability information of the second device. Without additional instructions, the first device can trigger the detection of the capability information of the second device after receiving the message with the destination address pointing to the second device, thereby saving communication resources.

[0035] In one possible implementation, the first device determines the capability information of the second device based on the first field included in the first message, where the first field is used to carry the capability information of the second device. The second device can proactively report the capability information of the second device to save communication resources.

[0036] In one possible implementation, the capability information of the second device includes at least one of the following:

[0037] A maximum out-of-order time, which is the maximum reception interval time during which the second device successfully reorders at least two out-of-order messages;

[0038] Alternatively, the maximum number of out-of-order packets indicates a maximum number of packets that differs between at least two out-of-order packets that are successfully reordered by the second device;

[0039] Alternatively, the maximum number of out-of-order bytes indicates the maximum number of bytes of the storage space used by the second device to cache out-of-order messages.

[0040] In a possible implementation, the first message is a Border Gateway Protocol update BGP update message; the first field is a route attribute tag length value TLV field of an extended BGP.

[0041] In one possible implementation, a first device sends capability information of a second device to a controller. The capability information of the second device is used to constrain the controller to generate first path information. The first path information indicates multiple paths that meet the capability information requirements of the second device. The first device then receives the first path information sent by the controller. Based on the first path information, the first device performs packet-by-packet load balancing on the data flow across the multiple paths.

[0042] In one possible implementation, first path information is determined based on the capability information of the second device. The first path information indicates multiple paths that meet the capability information requirements of the second device. Specifically, when the first device is a head node, the head node can calculate the first path information based on the capability information of the second device. Alternatively, the head node can obtain the first path information from a controller based on the capability information of the second device. The first device then performs packet-by-packet load balancing on the data flow across the multiple paths based on the first path information.

[0043] In this solution, the head node can independently calculate the first path information based on the second device's capability information. Alternatively, the head node can obtain the first path information from a controller. In this case, the controller obtains the second device's capability information and then calculates the first path information based on it. This improves the solution's implementation flexibility and facilitates adaptation to diverse service needs.

[0044] In one possible implementation, the multiple paths meet the requirements of the second device's capability information, including: a delay jitter range of the multiple paths being less than or equal to a maximum out-of-order time; the second device's capability information indicates the maximum out-of-order time, and the maximum out-of-order time is the maximum interval between receipts of at least two out-of-order messages by the second device for successful reordering. The second device reports the maximum out-of-order time to the first device, enabling the first device to select the multiple paths indicated by the first path information based on the maximum out-of-order time, thereby improving processing efficiency and simplifying implementation of the first device.

[0045] In a possible implementation, the first path information includes: at least two segment lists, each segment list indicating a path.

[0046] In a possible implementation, the first device is a head node, the second device is a tail node, and the multiple paths are multiple paths between the head node and the tail node.

[0047] On the second aspect, an embodiment of the present application proposes a load sharing method, which is applied to a second device. The method specifically includes: the second device sends a first message to the first device, and the first message indicates the second device's ability to reorder out-of-order messages, so that the first device determines multiple paths for performing load sharing based on the capability information of the second device.

[0048] For example, the first device is a controller in a network system, and the controller is used to control and manage a head node, a tail node, and an intermediate node between the head node and the tail node.

[0049] For another example, the first device is a head node in a network system, the second device is a tail node in the network system, and the network system further includes a controller for controlling and managing the head node, the tail node, and intermediate nodes between the head node and the tail node.

[0050] In this solution, the second device supports reporting its capability information to the first device. Based on the second device's capability information, the first device determines multiple paths for load balancing, ensuring that the latency jitter ranges of these multiple paths meet the requirements of the second device's capability information. This ensures that when messages are transmitted along these multiple paths, out-of-order messages transmitted along these multiple paths can be successfully reordered by the second device, effectively reducing the probability of failure to reorder out-of-order messages by the second device, avoiding packet loss due to reordering failures and improving communication quality.

[0051] In one possible implementation, the second device sends a first message, including: the second device receives a second message sent by the first device; the second device receives a third message sent by the first device; and the second device sends the first message to the first device in response to the received second message and third message.

[0052] In this solution, the first device waits for the sending interval to send the second message and the third message to the second device. After the second device receives the second message and the third message, it triggers the sending of the first message to the first device, reducing the processing difficulty of the second device and simplifying the second device.

[0053] In one possible implementation, in response to receiving a second message and a third message, a second device sends a first message to a first device, including: the second device performs a reordering process on the received second message and the third message. Then, in response to successfully performing the reordering process, the second device generates a first message. The second device sends the first message to the first device.

[0054] In this solution, the second message and the third message are subjected to a random reordering process. If the random reordering process is successful, the second device feeds back the first message to the first device, thereby reducing the processing difficulty of the second device and simplifying the implementation of the second device.

[0055] In one possible implementation, reordering the received second and third messages includes: reordering the second and third messages based on a fragment offset of the third message and a fragment offset of the second message, wherein the fragment offset of the third message is smaller than the fragment offset of the second message, the fragment offset of the second message indicates the order of the second message among multiple fragment messages generated by the probe message, and the allocation offset of the third message indicates the order of the third message among the multiple fragment messages generated by the probe message. Then, after the reordering is successfully performed, the second and third messages are merged to generate a probe message. Finally, the first message is generated based on the probe message.

[0056] In this solution, the response mechanism of the detection message is adopted to reduce the processing difficulty of the second device and simplify the implementation of the second device.

[0057] In a possible implementation, the probe message includes: a ping request message, a Bidirectional Active Measurement Protocol (TWAMP) message, or a Bidirectional Forwarding Detection (BFD) message.

[0058] In one possible implementation, the second and third messages are reordered based on the message sequence number of the third message and the message sequence number of the second message, where the message sequence number of the second message is smaller than the message sequence number of the third message. This improves the implementation flexibility of the solution.

[0059] In a possible implementation, the second message and the third message are reordered according to the second identifier carried in the third message and the first identifier carried in the second message, thereby improving the implementation flexibility of the solution.

[0060] In a possible implementation, the first message includes a first field, and the first field is used to carry capability information of the second device.

[0061] In one possible implementation, the capability information of the second device includes at least one of the following:

[0062] A maximum out-of-order time, which is the maximum reception interval time during which the second device successfully reorders at least two out-of-order messages;

[0063] Alternatively, the maximum number of out-of-order packets indicates a maximum number of packets that differs between at least two out-of-order packets that are successfully reordered by the second device;

[0064] Alternatively, the maximum number of out-of-order bytes indicates the maximum number of bytes of the storage space used by the second device to cache out-of-order messages.

[0065] In a possible implementation, the first message is a Border Gateway Protocol update BGP update message;

[0066] The first field is the extended BGP routing attribute label length value TLV field.

[0067] In a third aspect, embodiments of the present application provide a load balancing method, which is applied to a first device and specifically includes the following steps: First, the first device obtains capability information of a second device, where the capability information of the second device indicates the second device's ability to reorder out-of-order packets. Second, the second device generates first path information based on the capability information of the second device, where the first path information indicates multiple paths, and the multiple paths are used to perform load balancing, where the multiple paths meet the requirements of the capability information of the second device.

[0068] For example, the first device is a controller in a network system, and the controller is used to control and manage a head node, a tail node, and an intermediate node between the head node and the tail node.

[0069] For another example, the first device is a head node in a network system, the second device is a tail node in the network system, and the network system further includes a controller for controlling and managing the head node, the tail node, and intermediate nodes between the head node and the tail node.

[0070] In this solution, after obtaining the capability information of the second device, the first device determines multiple paths for load balancing based on the second device's capability information. The delay jitter range of these multiple paths meets the requirements of the second device's capability information. This ensures that when packets are transmitted along these multiple paths, out-of-order packets transmitted along the multiple paths can be successfully reordered by the second device. This effectively reduces the probability of failure to reorder out-of-order packets by the second device, avoids packet loss due to reordering failures, and improves communication quality.

[0071] In a possible implementation, the delay jitter ranges of the multiple paths meet the requirements of the capability information of the second device. For example, the delay jitter ranges of the multiple paths are less than or equal to the maximum out-of-sequence time of the second device.

[0072] In a possible implementation, capability information of the second device sent by the head node is received, and the multiple paths are paths between the head node and the second device.

[0073] In one possible implementation, obtaining capability information of the second device includes: receiving a first message sent by the second device, the first message including a first field, the first field being used to carry capability information of the second device; and determining the capability information of the second device based on the first message.

[0074] In this solution, the first device can obtain the capability information of the second device from the head node, and the first device can also obtain the capability information of the second device directly from the second device, which improves the implementation flexibility of the solution.

[0075] In a possible implementation, the first message is a Border Gateway Protocol update BGP update message; the first field is a route attribute tag length value TLV field of an extended BGP.

[0076] In a possible implementation, the method further includes: sending first path information to the head node, where the multiple paths are paths between the head node and the second device.

[0077] In one possible implementation, the method further includes: performing packet-by-packet load balancing forwarding on the data stream across multiple paths based on the first path information. This ensures that, when performing packet-by-packet load balancing forwarding across the multiple paths, out-of-order packets transmitted along the multiple paths can be successfully reordered by the second device, effectively reducing the probability of failure of the second device to reorder the out-of-order packets, avoiding packet loss due to reordering failure, and improving communication quality.

[0078] In one possible implementation, generating the first path information according to the capability information of the second device includes:

[0079] According to the capability information of the second device, the delay jitter range of multiple paths is determined, where the delay jitter range is less than or equal to the maximum out-of-order time indicated by the capability information of the second device, and the maximum out-of-order time is the maximum reception interval time for the second device to successfully reorder at least two out-of-order messages; multiple paths between the first device and the second device are obtained and N paths that meet the delay jitter range requirements are screened, where N is a positive integer greater than 2, and the maximum delay difference of the N paths is less than or equal to the delay jitter range; first path information is generated, and the first path information indicates N paths.

[0080] In this solution, the maximum out-of-order time is used as a routing factor to determine multiple paths for load sharing, ensuring that the out-of-order messages transmitted in multiple paths can be successfully reordered in the second device, effectively reducing the failure probability of the second device in reordering the out-of-order messages, avoiding packet loss due to reordering failure, and improving communication quality.

[0081] In one possible implementation, the capability information of the second device includes at least one of the following:

[0082] A maximum out-of-order time, which is the maximum reception interval time during which the second device successfully reorders at least two out-of-order messages;

[0083] Alternatively, the maximum number of out-of-order packets indicates a maximum number of packets that differs between at least two out-of-order packets that are successfully reordered by the second device;

[0084] Alternatively, the maximum number of out-of-order bytes indicates the maximum number of bytes of the storage space used by the second device to cache out-of-order messages.

[0085] In one possible implementation, the capability information of the second device includes the maximum number of out-of-order messages. Based on the capability information of the second device, the delay jitter range of multiple paths is determined, including: obtaining the average receiving time interval of the second device receiving messages; determining the maximum out-of-order time based on the average receiving time interval and the maximum number of out-of-order messages; and determining the delay jitter range of multiple paths based on the maximum out-of-order time.

[0086] In this solution, the first device can convert the maximum number of out-of-order messages reported by the second device into the maximum out-of-order time, thereby simplifying the implementation difficulty of the second device.

[0087] In one possible implementation, the capability information of the second device includes a maximum number of out-of-order bytes. Based on the capability information of the second device, the delay jitter ranges of multiple paths are determined, including: obtaining the output port bandwidth of the second device; determining the maximum number of bytes of out-of-order messages received by the second device per unit time based on the output port bandwidth of the second device; determining the maximum out-of-order time based on the maximum number of bytes of out-of-order messages received by the second device per unit time and the maximum number of out-of-order bytes; and determining the delay jitter ranges of multiple paths based on the maximum out-of-order time.

[0088] In this solution, the first device can convert the maximum number of out-of-order bytes reported by the second device into the maximum out-of-order time, thereby simplifying the implementation difficulty of the second device.

[0089] In a possible implementation, the first path information includes: at least two segment lists, each segment list indicating a path.

[0090] In a fourth aspect, an embodiment of the present application provides a communication device, which is applied to a first device, and includes:

[0091] a transceiver module, configured to receive a first message sent by a second device, wherein the first message indicates a capability of the second device to reorder out-of-order messages;

[0092] The processing module is used to determine the capability information of the second device according to the first message, and the capability information of the second device is used to determine multiple paths for performing load sharing.

[0093] In one possible implementation,

[0094] The transceiver module is further configured to send a second message to the second device;

[0095] The transceiver module is further configured to send a third message to the second device;

[0096] The transceiver module is further configured to receive the first message sent by the second device, where the first message is generated by the second device in response to the received second message and the third message.

[0097] In a possible implementation, the transceiver module is further configured to, after sending the second message to the second device, wait for a sending interval time and then send the third message to the second device;

[0098] The processing module is further used to determine the sending interval time corresponding to the first message based on the first message.

[0099] In a possible implementation, the capability information of the second device includes: a maximum out-of-order time, where the maximum out-of-order time is a maximum reception interval time for the second device to successfully reorder at least two out-of-order messages.

[0100] In a possible implementation, the processing module is further configured to fragment the detection message whose destination address points to the second device to generate the second message and the third message.

[0101] In a possible implementation manner, the message sequence number of the second message is smaller than the message sequence number of the second message.

[0102] In a possible implementation, the second message carries the first identifier;

[0103] The third message carries a second identifier;

[0104] The first identifier and the second identifier are used to instruct the second device to trigger out-of-order reordering of the second message and the third message.

[0105] In one possible implementation, step 1: the transceiver module is further configured to send the second message to the second device;

[0106] Step 2: The transceiver module is further configured to wait for the sending interval and send the third message to the second device;

[0107] Step 3: The processing module is further configured to increase the sending interval in response to receiving the first message sent by the second device;

[0108] Repeat steps 1, 2, and 3 above.

[0109] In one possible implementation, step 1: the transceiver module is further configured to send the second message to the second device;

[0110] Step 2: The transceiver module is further configured to wait for the sending interval and send the third message to the second device;

[0111] Step 3: The processing module is further configured to reduce the sending interval in response to not receiving the first message sent by the second device within the first time period;

[0112] Repeat steps 1, 2, and 3 above.

[0113] In a possible implementation, the transceiver module is further configured to receive first routing information, where the destination address included in the first routing information points to the second device;

[0114] The transceiver module is further configured to send the second message to the second device according to the first routing information.

[0115] In a possible implementation, the transceiver module is further configured to receive a message in the data stream, wherein the destination address of the message points to the second device;

[0116] The transceiver module is further configured to send the second message to the second device according to the characteristic information of the data stream.

[0117] In a possible implementation, the processing module is further configured to determine capability information of the second device according to a first field included in the first message, where the first field is used to carry the capability information of the second device.

[0118] In a possible implementation, the first message is a Border Gateway Protocol update BGP update message;

[0119] The first field is an extended BGP routing attribute tag length value TLV field.

[0120] In one possible implementation,

[0121] a transceiver module, configured to send capability information of the second device to the controller, where the capability information of the second device is used to constrain the controller to generate first path information, where the first path information indicates the multiple paths, and the multiple paths meet requirements of the capability information of the second device;

[0122] The transceiver module is further configured to receive the first path information sent by the controller;

[0123] The transceiver module is further configured to perform packet-by-packet load balancing forwarding on the data streams in the multiple paths according to the first path information.

[0124] In one possible implementation,

[0125] The processing module is further configured to determine first path information based on the capability information of the second device, where the first path information indicates the multiple paths, and the multiple paths meet the requirement of the capability information of the second device;

[0126] The transceiver module is further configured to perform packet-by-packet load balancing forwarding on the data streams in the multiple paths according to the first path information.

[0127] In one possible implementation, the delay jitter range of the multiple paths is less than or equal to the maximum out-of-order time, the capability information of the second device indicates the maximum out-of-order time, and the maximum out-of-order time is the maximum reception interval time for the second device to successfully reorder at least two out-of-order messages.

[0128] In a possible implementation, the capability information of the second device includes at least one of the following:

[0129] a maximum out-of-order time, the maximum out-of-order time being a maximum reception interval time during which the second device successfully reorders at least two out-of-order messages;

[0130] Alternatively, a maximum number of out-of-order packets, where the maximum number of out-of-order packets indicates a maximum number of packets that differs between at least two out-of-order packets that are successfully reordered by the second apparatus;

[0131] Alternatively, the maximum number of out-of-order bytes indicates the maximum number of bytes of storage space used by the second device to cache out-of-order messages.

[0132] In a possible implementation, the first device is a head node, the second device is a tail node, and the multiple paths are multiple paths between the head node and the tail node.

[0133] In a fifth aspect, an embodiment of the present application provides a communication device, which is applied to a second device, and includes:

[0134] The transceiver module is used to send a first message to the first device, where the first message indicates the second device's ability to reorder out-of-order messages, so that the first device determines multiple paths for performing load sharing based on the capability information of the second device.

[0135] In one possible implementation,

[0136] The transceiver module is further configured to receive a second message sent by the first device;

[0137] The transceiver module is further configured to receive a third message sent by the first device;

[0138] The transceiver module is further configured to send the first message to the first device in response to the received second message and the third message.

[0139] In one possible implementation,

[0140] The processing module is further configured to perform out-of-order rearrangement processing on the received second message and the third message;

[0141] The processing module is further configured to generate the first message in response to successfully performing the out-of-order reordering process;

[0142] The transceiver module is further configured to send the first message to the first device.

[0143] In one possible implementation,

[0144] The processing module is further configured to perform out-of-order reordering on the second message and the third message according to the fragment offset of the third message and the fragment offset of the second message, wherein the fragment offset of the third message is smaller than the fragment offset of the second message, the fragment offset of the second message indicates the order of the second message in the multiple fragment messages generated by the detection message, and the allocation offset of the third message indicates the order of the third message in the multiple fragment messages generated by the detection message;

[0145] The processing module is further configured to merge the second message and the third message after the out-of-order reordering process is successfully performed to generate the detection message;

[0146] The processing module is further configured to generate the first message according to the detection message.

[0147] In one possible implementation,

[0148] The processing module is also used to perform out-of-order reordering processing on the second message and the third message according to the message sequence number of the third message and the message sequence number of the second message, wherein the message sequence number of the second message is smaller than the message sequence number of the second message.

[0149] In one possible implementation,

[0150] The processing module is further used to perform out-of-order reordering on the second message and the third message according to the second identifier carried by the third message and the first identifier carried by the second message.

[0151] In a possible implementation, the first message includes a first field, where the first field is used to carry capability information of the second device.

[0152] In a possible implementation, the capability information of the second device includes at least one of the following:

[0153] a maximum out-of-order time, the maximum out-of-order time being a maximum reception interval time during which the second device successfully reorders at least two out-of-order messages;

[0154] Alternatively, a maximum number of out-of-order packets, where the maximum number of out-of-order packets indicates a maximum number of packets that differs between at least two out-of-order packets that are successfully reordered by the second apparatus;

[0155] Alternatively, the maximum number of out-of-order bytes indicates the maximum number of bytes of storage space used by the second device to cache out-of-order messages.

[0156] In a possible implementation, the first message is a Border Gateway Protocol update BGP update message;

[0157] The first field is an extended BGP routing attribute tag length value TLV field.

[0158] In a sixth aspect, an embodiment of the present application provides a communication device, where the communication device is applied to a first device, and the method includes:

[0159] a transceiver module, configured to obtain capability information of a second device, where the capability information of the second device indicates a capability of the second device to reorder out-of-order messages;

[0160] The processing module is also used to generate first path information based on the capability information of the second device, where the first path information indicates multiple paths, and the multiple paths are used to perform load sharing. The delay jitter range of the multiple paths meets the requirements of the capability information of the second device.

[0161] In one possible implementation,

[0162] The transceiver module is further configured to receive capability information of the second device sent by the head node, wherein the multiple paths are paths between the head node and the second device.

[0163] In one possible implementation,

[0164] The transceiver module is further configured to receive a first message sent by the second apparatus, where the first message includes a first field, and the first field is configured to carry capability information of the second apparatus;

[0165] The processing module is further configured to determine capability information of the second device according to the first message.

[0166] In a possible implementation, the first message is a Border Gateway Protocol update BGP update message;

[0167] The first field is an extended BGP routing attribute tag length value TLV field.

[0168] In one possible implementation,

[0169] The transceiver module is further configured to send the first path information to the head node, where the multiple paths are paths between the head node and the second device.

[0170] In a possible implementation, the processing module is further configured to perform packet-by-packet load balancing forwarding on the data flows in the multiple paths according to the first path information.

[0171] In one possible implementation, the processing module is further configured to determine, based on the capability information of the second device, a delay jitter range of the multiple paths, where the delay jitter range is less than or equal to a maximum out-of-sequence time indicated by the capability information of the second device, where the maximum out-of-sequence time is a maximum reception interval for successfully reordering at least two out-of-sequence messages by the second device;

[0172] The processing module is further configured to obtain multiple paths between the first device and the second device and screen N paths that meet the delay jitter range requirement, where N is a positive integer greater than 2, and a maximum delay difference of the N paths is less than or equal to the delay jitter range;

[0173] The processing module is further configured to generate the first path information, where the first path information indicates the N paths.

[0174] In a possible implementation, the capability information of the second device includes at least one of the following:

[0175] a maximum out-of-order time, the maximum out-of-order time being a maximum reception interval time during which the second device successfully reorders at least two out-of-order messages;

[0176] Alternatively, a maximum number of out-of-order packets, where the maximum number of out-of-order packets indicates a maximum number of packets that differs between at least two out-of-order packets that are successfully reordered by the second apparatus;

[0177] Alternatively, the maximum number of out-of-order bytes indicates the maximum number of bytes of storage space used by the second device to cache out-of-order messages.

[0178] In one possible implementation,

[0179] The transceiver module is further configured to obtain an average reception time interval for receiving messages by the second device;

[0180] The processing module is further configured to determine the maximum out-of-order time according to the average receiving time interval and the maximum number of out-of-order messages;

[0181] The processing module is further configured to determine the delay jitter ranges of the multiple paths according to the maximum out-of-order time.

[0182] In one possible implementation,

[0183] The transceiver module is further configured to obtain the outbound port bandwidth of the second device;

[0184] The processing module is further configured to determine a maximum number of bytes of out-of-order messages received by the second device per unit time based on an outbound port bandwidth of the second device;

[0185] The processing module is further configured to determine the maximum out-of-order time based on a maximum number of bytes of out-of-order messages received by the second device within the unit time and the maximum number of out-of-order bytes;

[0186] The processing module is further configured to determine the delay jitter ranges of the multiple paths according to the maximum out-of-order time.

[0187] In a possible implementation, the first path information includes at least two segment lists, each of which indicates one of the paths.

[0188] In a possible implementation, the first device is a head node, or the first device is a controller, and the controller is used to control and manage the head node and the second device.

[0189] In a seventh aspect, the present application provides a communication device comprising a processor and a memory. The memory is configured to store program code, and the processor is configured to call the program code in the memory to cause the communication device to execute a method according to any one of the first, second, or third aspects, or any one of the second or third aspects.

[0190] In an eighth aspect, the present application provides a computer-readable storage medium storing instructions, which, when executed on a computer, enables the computer to execute a method as in any one of the embodiments of the first, second or third aspects.

[0191] In a ninth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute a method as in any one of the embodiments of the first, second or third aspects.

[0192] In a tenth aspect, the present application provides a chip comprising one or more processors. Part or all of the processors are used to read and execute computer instructions stored in a memory to execute the method in any possible implementation of any of the above aspects. Optionally, the chip also includes a memory. Optionally, the chip also includes a communication interface, and the processor is connected to the communication interface. The communication interface is used to receive data and / or information to be processed, the processor obtains data and / or information from the communication interface, processes the data and / or information, and outputs the processing results through the communication interface. Optionally, the communication interface is an input / output interface or a bus interface. The method provided in the present application is implemented by one chip, or by multiple chips working together.

[0193] The solutions provided in the fourth to tenth aspects are used to implement or cooperate with the methods provided in the first, second or third aspects, and therefore can achieve the same or corresponding beneficial effects as the first, second or third aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0194] Figure 1 This is a schematic diagram of flow-by-flow load sharing;

[0195] Figure 2 This is a diagram of packet-by-packet load sharing;

[0196] Figure 3 This is a schematic diagram of an elephant flow scenario in an embodiment of the present application;

[0197] Figure 4 A schematic diagram of a communication scenario involved in an embodiment of the present application;

[0198] Figure 5 A schematic diagram of a communication system proposed in an embodiment of the present application;

[0199] Figure 6 A schematic diagram of another communication system proposed in an embodiment of the present application;

[0200] Figure 7 A schematic diagram of a flow chart of an embodiment of a load sharing method in an embodiment of the present application;

[0201] Figure 8 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application;

[0202] Figure 9 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application;

[0203] Figure 10 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application;

[0204] Figure 11 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application;

[0205] Figure 12 This is a structural diagram of the first field in an embodiment of the present application;

[0206] Figure 13 This is a schematic diagram of an application scenario in an embodiment of the present application;

[0207] Figure 14 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application;

[0208] Figure 15 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application;

[0209] Figure 16 This is a schematic diagram of an application scenario in an embodiment of the present application;

[0210] Figure 17 This is a schematic diagram of a path calculation process in an embodiment of the present application;

[0211] Figure 18 This is a schematic diagram of a path calculation scenario in an embodiment of the present application;

[0212] Figure 19 This is a schematic diagram of another path calculation scenario in an embodiment of the present application;

[0213] Figure 20 This is another schematic diagram of a path calculation process in an embodiment of the present application;

[0214] Figure 21 This is another application scenario diagram in the embodiment of the present application;

[0215] Figure 22 A schematic structural diagram of a communication device 2200 provided in an embodiment of the present application;

[0216] Figure 23 A schematic structural diagram of a communication device 2300 provided in an embodiment of the present application;

[0217] Figure 24 A schematic structural diagram of a communication device 2400 provided in an embodiment of the present application;

[0218] Figure 25 A schematic diagram of a network system 2500 proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0219] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of the embodiments. The terms "first", "second" and corresponding terminology labels in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, and this is merely a way of distinguishing objects of the same properties when describing the embodiments of the present application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, so that a process, method, system, product or device that includes a series of units is not necessarily limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or devices.

[0220] In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this application is merely a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of this application, "at least one" refers to one or more items, and "multiple items" refers to two or more items. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0221] Below, some technical concepts involved in the embodiments of this application are introduced.

[0222] 1. Load balancing.

[0223] Load balancing refers to the process of distributing the load (traffic) across multiple links when network nodes forward traffic. By distributing traffic, requests, and data across different servers, load balancing improves system availability, reliability, and performance. Load balancing operates in two ways: per-flow load balancing and per-packet load balancing.

[0224] Flow-by-flow load balancing means dividing the original message into different flows according to the characteristic fields of the message, and then forwarding the messages of the same flow on the same path. The characteristic fields may include the source Internet Protocol (IP) address, destination IP address, source port number, destination port number or protocol number. For example, Figure 1 As shown, Figure 1 This is a diagram of flow-by-flow load balancing. Packets destined for node R3 include packets P2, P3, and P5. Packets destined for node R4 include packets P1, P4, and P6. Based on the packet destinations, packets P2, P3, and P5 are assigned to link 1 for transmission, while packets P1, P4, and P6 are assigned to link 2 for transmission.

[0225] Packet-by-packet load balancing means that multiple packets are evenly distributed to multiple paths participating in load balancing for forwarding according to the order in which the packets arrive. Figure 2 As shown, Figure 2 The following diagram illustrates packet-by-packet load balancing. The packets destined for node R3 include packets P2, P3, and P5. The packets destined for node R4 include packets P1, P4, and P6. At node R1, these packets are evenly distributed across links 1 and 2 in the order of packets (P1 → P2 → P3 → P4 → P5 → P6). On link 1, the packets are sent in the order of packets P1, P3, and P5; on link 2, the packets are sent in the order of packets P2, P4, and P6.

[0226] 2. Remote Direct Memory Access (RDMA)

[0227] To meet the increasingly complex computing demands of artificial intelligence (AI), data centers often utilize large distributed computing clusters. However, communication latency between numerous parallel programs in distributed computing clusters can hinder computing efficiency. To reduce network latency and improve computing efficiency, Remote Direct Access (RDMA) technology has emerged. By allowing applications to directly read and write remote memory, RDMA bypasses the kernel and writes data directly to the network interface card (NIC) without processor intervention, achieving high throughput, ultra-low latency, and low processor overhead.

[0228] Currently, computing clusters using RDMA technology already support reordering out-of-order packets. When packets arrive at the receiving end out of order, the receiving end caches and reorders them, then processes the packets restored to the correct order. Because computing clusters are relatively close together in data center scenarios, the maximum degree of packet out-of-order is low, allowing the receiving end to generally successfully reorder the packets.

[0229] 3. Elephant flow.

[0230] An elephant flow is a data flow with a large total number of bytes or a high throughput requirement (referred to as a flow), also known as a long flow. Figure 3 , Figure 3 This is a schematic diagram of an elephant flow scenario in an embodiment of the present application. In an example scenario, data backup is performed between data center A and data center B, and an elephant flow appears between data center A and data center B. In another example scenario, in the federated learning scenario of AI, the flow generated by the real-time AI computing business often occupies hundreds of gigabits per second (Gbps) of export bandwidth. After such a flow enters the network, an elephant flow is formed.

[0231] In scenarios with large traffic flows, per-flow load balancing will distribute the traffic to the same path, causing severe congestion. Therefore, per-flow load balancing cannot resolve network congestion caused by large traffic flows. However, per-packet load balancing distributes packets of the same data flow to different paths for transmission, thus resolving network congestion caused by large traffic flows.

[0232] However, packet-by-packet load balancing distributes data flows to multiple paths and relies on the reordering capability of the tail node. The reason is as follows: the delays of the multiple paths for packet-by-packet load balancing may differ. Therefore, when the data flows are forwarded on these multiple paths through packet-by-packet load balancing, the order in which they arrive at the tail node is inconsistent with the order in which they were sent. The tail node needs to reorder the multiple data packets (reordering can also be called out-of-order reordering). For example, the multiple paths for packet-by-packet load balancing include path 1 and path 2, and the delay difference between path 1 and path 2 is 10 milliseconds (ms). The head node transmits message 1 on path 1 and then transmits message 2 on path 2. After receiving message 2 on path 2, the tail node waits for 10 milliseconds before receiving message 1 on path 1.

[0233] For example, in wide area network (WAN) scenarios, nodes are often far apart, so the latency differences between multiple paths between nodes can be significant, leading to a high degree of packet out-of-ordering between nodes. If the latency differences between multiple paths for per-packet load balancing exceed the tail node's reordering capability, the tail node will be unable to restore the multiple out-of-order packets received from multiple paths to the correct order, causing communication failures and disrupting normal service operations.

[0234] Based on this, an embodiment of the present application proposes a load sharing method, wherein after a first device receives a first message sent by a second device, the first device determines the capability information of the second device based on the first message, and the capability information of the second device indicates the capability of the second device to reorder out-of-order messages. The load sharing method proposed in the embodiment of the present application can be applied to data center network scenarios or wide area network scenarios. In particular, in a wide area network scenario, due to the long distance of the path and the complex and changeable network environment, the delay difference between different paths may be large. When load sharing is performed using different paths with large delay differences, the messages transmitted by the different paths may be out of order, and the degree of message disorder may exceed the reordering capability of the second device, resulting in a reordering failure, thereby causing a decrease in communication quality and affecting normal business. Determining multiple paths for load sharing based on the capability information of the second device can ensure that the delay jitter range of the multiple paths meets the requirements of the capability information of the second device. In a wide area network (WAN) scenario, even if there are multiple paths with large delay differences between the first device and the second device, load balancing can still be performed using multiple paths that meet the capability information requirements of the second device. This ensures that when messages are transmitted through these multiple paths, out-of-order messages transmitted along these multiple paths can be successfully reordered on the second device, effectively reducing the probability of failure of the second device to reorder out-of-order messages, avoiding packet loss due to reordering failure, improving communication quality, and ensuring the normal operation of the service. The multiple paths determined based on the capability information of the second device can be used to perform packet-by-packet load balancing, resolving the issue of current packet-by-packet load balancing being limited by path delay differences. This makes it possible to apply packet-by-packet load balancing in WAN scenarios, improving communication quality in WAN scenarios.

[0235] The following describes some communication scenarios involved in the embodiments of this application. Figure 4 , Figure 4 A schematic diagram of a communication scenario involved in an embodiment of the present application. A communication scenario involved in an embodiment of the present application includes: a head node, an intermediate node, a tail node and a controller, wherein the controller is used to control and manage the above-mentioned head node, intermediate node and tail node. There are multiple paths between the head node and the tail node, and the multiple paths may include paths passing through intermediate nodes, and the multiple paths may also include direct paths between the head node and the tail node. It should be noted that the communication scenario also includes an end-side device connected to the tail node (not shown in the figure), and the end-side device may also be referred to as an egress port device.

[0236] The communication system proposed in the embodiment of the present application includes a first device and a second device. In a possible implementation, the first device is a controller, and the second device is an end node, for example Figure 5 As shown, Figure 5A schematic diagram of a communication system proposed in an embodiment of the present application. In another possible implementation, the first device is a head node and the second device is a tail node, for example Figure 6 As shown, Figure 6 This is another communication system diagram proposed in an embodiment of the present application. It should be noted that in an embodiment of the present application, the second device may also be an end-side device (or an egress device) connected to the tail node. When the second device is an end-side device (or an egress device), the method performed by the second device is similar to the method performed when the second device is the tail node, so it will not be described in detail. In addition, Figure 5 or Figure 6 The illustrated communication system further includes an intermediate node not shown in the figure, and the path between the head node and the tail node passes through the intermediate node.

[0237] The terminal side devices of the embodiment of the present application include but are not limited to: terminal devices (terminal), servers, virtual machines, three-layer switches, or gateways. The server can also be a cloud server deployed in the cloud, which is not limited in the embodiment of the present application.

[0238] Exemplarily, the terminal device may also be referred to as user equipment (UE), mobile station (MS), or mobile terminal (MT), etc. For example, the terminal device may be a mobile phone, a tablet computer, or a computer with wireless transceiver capabilities. It may also be a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control, a wireless terminal in unmanned driving, a wireless terminal in telemedicine, a wireless terminal in a smart grid, a wireless terminal in a smart city, a wireless terminal in a smart home, a vehicle-mounted terminal, a vehicle with vehicle-to-vehicle (V2V) communication capability, an intelligent connected vehicle, a drone with UAV to UAV (U2U) communication capability, etc., without limitation.

[0239] See also Figure 7 , Figure 7 The following is a flow chart of an embodiment of a load balancing method according to an embodiment of the present application. The load balancing method according to an embodiment of the present application includes:

[0240] S1. The second device sends a first message to the first device, where the first message indicates the second device's ability to reorder out-of-order messages.

[0241] First, the second device's ability to reorder out-of-order messages is described. Out-of-order messages refer to messages whose transmission order differs from the reception order. The second device's ability to reorder out-of-order messages can also be referred to as the second device's out-of-order reordering capability.

[0242] In one possible implementation, the second device's ability to reorder out-of-order messages includes a maximum out-of-order time, which is the maximum interval between receipts of at least two out-of-order messages during which the second device can successfully reorder them. For example, a maximum out-of-order time of 50 milliseconds indicates that the second device can successfully reorder out-of-order messages whose receipt time difference is less than or equal to 50 milliseconds.

[0243] In another possible implementation, the second device has the ability to reorder out-of-order messages: the number of out-of-order messages that the second device supports receiving, the time interval between the out-of-order messages received by the second device, and / or the number of message bytes of the out-of-order messages received by the second device. For example, the number of out-of-order messages that the second device supports receiving is 10, the time interval between the out-of-order messages received by the second device is 1 millisecond, and the number of message bytes of the out-of-order messages received by the second device is 1 megabyte (MB).

[0244] In another possible implementation, the second device's ability to reorder out-of-order messages includes a maximum number of out-of-order messages, where the maximum number of out-of-order messages indicates the maximum number of messages that can be successfully reordered by the second device. For example, a maximum number of out-of-order messages of 5 indicates that the second device can successfully reorder out-of-order messages with an order difference of 5 or less. When the second device receives message P5 and then receives messages P1, P2, P3, and P4, because the difference in the number of messages between message P5 and message P1 is 4, which is less than the maximum number of out-of-order messages of 5, the second device can restore messages P5, P1, P2, P3, and P4 to their normal order.

[0245] In another possible implementation, the second device's ability to reorder out-of-order messages includes: a maximum number of out-of-order bytes, which indicates the maximum number of bytes of the storage space used by the second device to cache out-of-order messages. For example, the maximum number of out-of-order bytes is 20 megabytes (MB), indicating that the size of the storage space used by the second device to cache out-of-order messages is 20 MB. When the second device receives message P5 and then receives message P1, message P2, message P3, and message P4, the total number of bytes of the above-mentioned messages P1, message P2, message P3, message P4, and message P5 is 19 MB, which is less than the maximum number of out-of-order bytes of 20 MB. After the second device receives message P4, message P5 (out-of-order message) is still stored in the storage space used to cache out-of-order messages, so the second device can reorder the above-mentioned messages P5, message P1, message P2, message P3, and message P4 to restore them to normal order. For another example, after receiving message P6, the second device receives messages P1, P2, P3, P4, and P5. The total number of bytes of messages P1, P2, P3, P4, P5, and P6 is 23MB, which is greater than the maximum out-of-order byte count of 20MB. Therefore, after the second device receives message P5, message P6 (an out-of-order message) has overflowed the storage space used to cache out-of-order messages. Therefore, the second device cannot reorder messages P1 through P6 back to their normal order, and the second device fails to reorder messages P1 through P6.

[0246] In another possible implementation, the second device's ability to reorder out-of-order messages may also include: a delay range. For example, the second device determines the delay range by combining other factors and the maximum out-of-order time. The delay range specifically includes a delay value interval, the maximum value of the delay value interval is less than or equal to the maximum out-of-order time, and the minimum value of the delay value interval can be determined by the processing capability or business requirements of the second device. For example, the delay range is [5 (milliseconds), 7 (milliseconds)], indicating that the second device can successfully perform out-of-order reordering on paths with delay values between 5 milliseconds and 7 milliseconds.

[0247] It should be noted that the second device may also use other indicators to measure its ability to reorder out-of-order messages, and the embodiments of the present application do not limit this.

[0248] Secondly, various possible implementations of the first message are introduced.

[0249] In one possible implementation, the first message explicitly indicates the second device's ability to reorder out-of-order messages. For example, the first message carries capability information of the second device, where the capability information indicates the second device's ability to reorder out-of-order messages. The capability information of the second device includes, but is not limited to, a maximum out-of-order time, a maximum number of out-of-order messages, or a maximum number of out-of-order bytes.

[0250] For example, the first message includes a first field, and the first field is used to carry capability information of the second device. In one example, the first message is a Border Gateway Protocol (BGP) update message, and the first field is a tag length value (TLV) field of the extended BGP routing attribute. In another example, the first message is a Path Computation Element Communication Protocol (PCEP) message. In another example, the first message is a telemetry message.

[0251] For easier understanding, see an example Figure 12 , Figure 12 This is a structural diagram of the first field in an embodiment of the present application. The first field can also be called a reorder-ability attribute (Reorder-Ability Attribute) TLV field. The first field specifically includes: an attribute flag field, an attribute field, a length field, and a maximum tolerance (max-TOLERANCE) field, wherein the maximum tolerance field indicates the capability information of the second device. For example, the maximum tolerance field is 50, the attribute field is 1, and the attribute field "1" indicates that the capability information of the second device indicated by the first field is the maximum out-of-order time. Combined with the attribute field, the maximum tolerance field "50" means that the maximum out-of-order time is 50 milliseconds.

[0252] In another possible implementation, the first message implicitly indicates the second device's ability to reorder out-of-order messages. For example, the first device determines the second device's capability information based on whether it has received the first message.

[0253] Next, various reporting methods of the first message are introduced.

[0254] In one possible implementation, the second device proactively reports the first message to the first device. For example, in order to report the second device's capability information to the first device, the second device proactively sends a first message to the first device, where the first message carries the first field. It should be noted that the second device may also use other methods to report the second device's capability information to the first device, and this embodiment of the present application does not limit this. For example, the second device may report the second device's capability information to the first device in an out-of-band manner.

[0255] A possible example scenario is as follows: the tail node (second device) sends a first message carrying a first field to the head node (first device). Then, the head node (first device) may forward the first message to the controller.

[0256] Another possible example scenario is as follows: the tail node (second device) sends a first message carrying a first field to the controller (first device).

[0257] In another possible implementation, the second device sends a first message to the first device in response to a message (or indication information or message) sent by the first device. In one example, the first device sends a request message to the second device, and the request message is used to request the second device to report the capability information of the second device. Then, in response to the request message, the second device sends a first message to the first device, and the first message carries a first field. In another example, the first device sends at least two out-of-order messages to the second device, and the second device reorders the out-of-order messages after receiving the at least two out-of-order messages. If the reordering is successful, the second device sends a first message to the first device, and the first message is a response message to the out-of-order message.

[0258] A possible example scenario is as follows: After the head node (first device) sends the second message to the tail node (second device), it waits for the retransmission interval to send the third message to the second device. After receiving the second and third messages, the tail node (second device) reorders them. If the reordering is successful, the tail node (second device) sends the first message back to the head node (first device).

[0259] S2. The first device determines capability information of the second device based on the first message, where the capability information of the second device is used to determine multiple paths for performing load sharing.

[0260] In one possible implementation, the first message explicitly indicates the second device's ability to reorder out-of-order messages, for example, the first message carries the second device's capability information. After receiving the first message, the first device obtains the second device's capability information from the first message.

[0261] In another possible implementation, the first message implicitly indicates the second device's ability to reorder out-of-order messages, and the first device determines the capability information of the second device based on whether the first message is received. In one example, the first device waits for a sending interval to send two out-of-order messages to the second device, and then the first device determines whether the second device has successfully reordered the two out-of-order messages based on whether it receives a response message (i.e., the first message) fed back by the second device based on the two out-of-order messages. If the first device receives the first message, then the maximum out-of-order time is greater than or equal to the sending interval, and the first device determines the capability information of the second device based on the sending interval.

[0262] For example, a first device sends message P2 to a second device. After waiting 25 milliseconds, the first device sends message P1 to the second device. The sequence number of message P2 (which indicates the order of the messages) is greater than the sequence number of message P1. After receiving messages P2 and P1, the second device reorders messages P2 and P1 and sends a response message to the first device in response to the restored order of messages P1 and P2. After receiving the response message, the first device determines that the corresponding sending interval of the response message is 25 milliseconds, and then determines that the maximum out-of-sequence time is less than or equal to 25 milliseconds.

[0263] After the first device determines the capability information of the second device, it determines multiple paths for performing load sharing based on the capability information of the second device, and the multiple paths meet the requirements of the capability information of the second device. For example, when the first device determines that the capability information of the second device is that the maximum out-of-order time is 25 milliseconds, the delay difference of the multiple paths determined by the first device for performing load sharing is less than or equal to 25 milliseconds. For example, the delay of path 1 is 7 milliseconds, the delay of path 2 is 17 milliseconds, and the delay difference between path 1 and path 2 is 10 milliseconds, which is less than 25 milliseconds. Path 1 and path 2 can be used to perform load sharing. Optionally, the load sharing is packet-by-packet load sharing.

[0264] In an embodiment of the present application, in a load sharing method, after a first device receives a first message sent by a second device, the first device determines the capability information of the second device based on the first message, and the capability information of the second device indicates the capability of the second device to reorder out-of-order messages. The capability information of the second device is used to determine multiple paths for performing load sharing, so that the delay jitter range of the multiple paths meets the requirements of the capability information of the second device. It ensures that when messages are transmitted through the multiple paths, the out-of-order messages transmitted in the multiple paths can be successfully reordered in the second device, effectively reducing the probability of failure of the second device to reorder out-of-order messages, avoiding packet loss due to reordering failure, improving communication quality, and ensuring the normal operation of the business. In addition, the first device can also obtain the capability information of the second device in a variety of ways, which improves the implementation flexibility of the solution and meets the business needs of various different scenarios.

[0265] In combination with the above embodiment, the following describes in detail how the first device determines the capability information of the second device according to the first message when the first message implicitly indicates the second device's capability to reorder out-of-order messages. Figure 8 , Figure 8 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application. It should be noted that, Figure 8 The illustrated load sharing method is described using two out-of-order messages (i.e., the second message and the third message) as an example. This embodiment of the present application does not limit the number of out-of-order messages sent by the first device to the second device. For example, the first device may send multiple out-of-order messages to the second device, and the second device may, in response to the multiple out-of-order messages, feed back at least one first message to the first device.

[0266] The load sharing method proposed in the embodiment of the present application further includes:

[0267] D1. The first device determines the second message and the third message.

[0268] In one possible implementation, the second message and the third message are fragmented messages, the destination address of the second message is directed to the second device, and the destination address of the third message is directed to the second device. For example, the first device fragments the probe message to generate the second message and the third message, which together constitute the probe message. The fragment offset of the third message is smaller than the fragment offset of the second message, the fragment offset of the second message indicates the order of the second message among the multiple messages generated by the probe message, and the fragment offset of the third message indicates the order of the third message among the multiple messages generated by the probe message.

[0269] A possible example is as follows: the first device first generates a detection message 1, and the message sequence number of the detection message 1 is 1. Then, the first device generates two fragmented messages based on the detection message 1, namely the second message 1 and the third message 1. Since the second message 1 and the third message 1 are fragmented messages generated based on the detection message 1, the message sequence numbers of the second message 1 and the third message 1 are the same. At this time, the order of the second message 1 and the third message 1 can be determined by the fragment offset of the second message 1 and the fragment offset of the third message 1. For example, if the third message 1 is the first fragmented message generated based on the detection message 1, then the fragment offset of the third message is 0; if the second message 1 is the second fragmented message generated based on the detection message 1, then the fragment offset of the second message 1 is 1 kilobyte (KB). The second device can determine the order of the second message and the third message based on the fragment offset of the second message and the fragment offset of the third message.

[0270] For example, there are multiple possible implementations of the probe message in the embodiments of the present application, including but not limited to: Ping request message, Two-Way Active Measurement Protocol (TWAMP) message, or Bidirectional Forwarding Detection (BFD) message, etc.

[0271] In another possible implementation, the message sequence number of the third message is smaller than the message sequence number of the second message. The first device may add a message sequence number to the third message at the IP layer of the third message, and the first device may add a message sequence number to the second message at the IP layer of the second message. The second device determines the order of the third message and the second message based on the message sequence number of the third message and the message sequence number of the second message.

[0272] In another possible implementation, the generation timestamp of the third message is smaller than the generation timestamp of the second message. The second device determines the order of the third message and the second message according to the generation timestamp of the third message and the generation timestamp of the second message.

[0273] In another possible implementation, the second message carries a first identifier, and the third message carries a second identifier, and the first identifier and the second identifier are used to instruct the second device to trigger the out-of-order reordering of the second message and the third message. For example, the second device determines the order of the second message and the third message based on the first identifier carried by the second message and the second identifier carried by the third message, and then performs out-of-order reordering on the second message and the third message. It should be noted that the first identifier and the second identifier can be the same identifier, or the first identifier and the second identifier can be corresponding different identifiers, and the embodiment of the present application does not limit this. For example, the first identifier and the second identifier can be identifiers of the application layer in the message.

[0274] Optionally, before step D1, there are multiple possible implementations for triggering the first device to detect capability information of the second device.

[0275] In one possible implementation, a first device (head node) receives first routing information including a destination address pointing to a second device. After receiving the routing information with the destination address pointing to the second device, the first device triggers detection of capability information of the second device and proceeds to step D1.

[0276] In another possible implementation, the first device detects whether to trigger detection of the capability information of the second device based on the message received in the data stream. For example, when the destination address of the message in the data stream points to the second device, it is determined that the capability information of the second device needs to be detected, and the process proceeds to step D1. For example, after receiving the message of data stream 1, the first device determines that data stream 1 needs to perform packet-by-packet load balancing forwarding. The destination address of the message of data stream 1 points to the second device, so the first device determines that the capability information of the second device needs to be detected. This allows the first device to determine multiple paths for performing packet-by-packet load balancing forwarding of data stream 1, where the multiple paths are the paths between the first device and the second device.

[0277] D2. The first device sends a second message to the second device.

[0278] In one possible implementation, to trigger the second device to reorder the second and third messages using the second and third messages, the first device sends the second and third messages to the second device in reverse order, where the reverse order refers to the order of the messages being reversed. Step D2 is first executed, followed by step D4.

[0279] D3. The second device caches the second message.

[0280] After the second device receives the second message, the second device buffers the second message.

[0281] In one possible implementation, upon detecting that the second message carries a fragment offset, the second device caches the second message. Specifically, the second device includes a storage space for caching out-of-order messages, and upon receiving the second message, the second device stores the second message in the storage space. The storage space may also be referred to as an out-of-order message cache queue.

[0282] D4. After waiting for a sending interval, the first device sends a third message to the second device.

[0283] After sending the second message, the first device waits for a sending interval time, and then sends a third message to the second device.

[0284] Optionally, the first device records the sending interval, and generates an association between the sending interval and identification information of the second message and / or the third message, and then stores the association. The identification information may be an indicator (ID) in an Internet Control Message Protocol (ICMP) header of the message. The association is shown in Table 1, for example.

[0285] Table 1

[0286] destination Message identification information Sending interval (milliseconds) Node 2 ICMP ID#1 1 Node 2 ICMP ID#2 20 Node 2 ICMP ID#3 10 Node 3 ICMP ID#4 5 Node 3 ICMP ID#5 10

[0287] Optionally, the transmission path of the second message and the third message is the same path, so as to reduce the delay error caused by the transmission.

[0288] D5. The second device re-arranges the second message and the third message in a disorderly order.

[0289] After receiving the third message, the second device detects the order of the second message and the third message. After determining that the second message and the third message need to be reordered, the second device reorders the second message and the third message.

[0290] In one possible implementation, the second device detects that the identification information of the second message is consistent with the identification information of the third message, and then determines that the second message and the third message are fragment messages for the same probe message. Taking the probe message as a ping request message as an example, the identification information can be the ID of the ICMP header of the message. Then, the second device further detects the fragment offset of the second message and the fragment offset of the third message. After determining that the fragment offset of the second message is greater than the fragment offset of the third message, it is confirmed that the second message and the third message are out-of-order messages, and the second message and the third message are restored to the normal order according to the fragment offset: third message → second message, and then enter step D6.

[0291] In another possible implementation, the second device determines that the second message and the third message are out-of-order messages based on the message sequence number of the second message and the message sequence number of the third message, and then reorders the above two messages according to the message sequence numbers, and then enters step D6.

[0292] In another possible implementation, the second device determines that the second and third messages need to be reordered based on the first identifier carried by the second message and the second identifier carried by the third message. After receiving the third message, the second device detects whether the second message is still stored in the reordered message cache queue. If the second message is still stored in the reordered message cache queue of the second device, the reordering process is deemed to have been successfully performed on the second and third messages, and the process proceeds to step D6.

[0293] After receiving the third message, the second device determines that there is no second message in the out-of-order message buffer queue, that is, the second message overflows the out-of-order message buffer queue, and the second device determines that the out-of-order reordering fails. The second device cannot send the first message to the first device and does not execute subsequent steps D6 to D8.

[0294] D6. In response to successfully executing the out-of-order reordering process, the second device generates a first message.

[0295] In one possible implementation, the second device reconstructs and recovers the detection message based on the third message and the second message after the out-of-order reordering process. In response to receiving the detection message, the second device generates a first message. The first message may be a ping reply message.

[0296] Optionally, the ICMP header ID of the first message may be the same as the ICMP header ID of the second message or the ICMP header ID of the third message.

[0297] D7. The second device sends a first message to the first device.

[0298] Optionally, the transmission path of the first message is the same as the transmission paths of the second message and the third message, so as to reduce a delay error caused by transmission.

[0299] D8. The first device determines, based on the first message, a sending interval between the second message and the third message, and further determines capability information of the second device.

[0300] In one possible implementation, after receiving the first message, the first device determines, based on the identification information of the first message, a corresponding transmission interval from an association stored by the first device. The transmission interval is the transmission interval between the second message and the third message corresponding to the first message. The first device then determines whether the maximum out-of-sequence time (capability information of the second device) is less than or equal to the transmission interval.

[0301] In the embodiments of the present application, the first device can proactively detect the capability information of the second device through the above method, thereby improving the implementation flexibility of the solution. When the second and third messages are fragments of the detection message, the response mechanism after receiving the detection message can be utilized, simplifying the implementation difficulty of the second device and improving processing efficiency.

[0302] In combination with the above embodiments, various methods for detecting capability information of a second device are described below.

[0303] In one example, the first device may increase the sending interval time sequentially.

[0304] See also Figure 9 , Figure 9 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application. The load sharing method proposed in the embodiment of the present application also includes:

[0305] F1. Increase the sending interval, which is the interval between sending the second message and the third message.

[0306] When step F1 is executed for the first time, it is determined that the sending interval time is an initial value, which may be 1 millisecond, 5 milliseconds, or 10 milliseconds.

[0307] After executing step F4, when executing step F1, the sending interval is increased. For example, the increase value of the sending interval may be 5 milliseconds.

[0308] Optionally, after executing step F4, the sending interval time is increased in arithmetic increments each time step F1 is executed. For example, the increment value of each execution of step F1 may be 5 milliseconds.

[0309] Optionally, after executing step F4, the sending interval is increased proportionally each time step F1 is executed. For example, the increment value each time step F1 is executed may be {5 (milliseconds), 10 (milliseconds), 20 (milliseconds), 40 (milliseconds), etc.}, thereby improving the efficiency of the first device detecting the capability information of the second device.

[0310] F2. The first device sends a second message to the second device.

[0311] F3. After waiting for a sending interval, the first device sends a third message to the second device.

[0312] F4. The first device detects whether the first message is received, where the first message is a response message to the second message and the third message.

[0313] When the first device receives the first message, the process proceeds to step F1, where the second and third messages are sent to the second device after increasing the transmission interval. The first device determines the maximum out-of-sequence time for the second device based on the transmission interval corresponding to the first message received this time, where the maximum out-of-sequence time for the second device is less than or equal to the transmission interval.

[0314] When the first device does not receive the first message within a period of time (eg, 100 milliseconds) after sending the third message, it is considered that the second device has failed in reordering the third message and the second message, and the process goes to step F5.

[0315] F5. The first device determines the maximum out-of-sequence time of the second device according to the sending interval time corresponding to the first message received last time.

[0316] Since the first device has not received the first message for a period of time, it is determined that the second message and the third message have exceeded the second device's ability to reorder out-of-order messages. Then, the first device determines the maximum out-of-order time of the second device based on the sending interval time corresponding to the last received first message. For example, the first device waits for 10 milliseconds to send the third message 1 after sending the second message 1, and then receives the first message 1 fed back by the second device. In response to the first message 1, the first device increases the sending interval time, and the increased sending interval time is 15 milliseconds. Then, the first device waits for 15 milliseconds to send the third message 2 after sending the second message 2. After sending the third message 2, the first device waits for 100 milliseconds to confirm that it has not received the response message (first message 2) to the second message 2 and the third message 2. Therefore, the first device determines that the maximum out-of-order time of the second device is less than or equal to 15 milliseconds.

[0317] In the embodiment of the present application, the accuracy of the maximum out-of-order time obtained by the first device is improved by periodically increasing the time interval between sending the second message and the third message.

[0318] In another example, the first device may decrease the sending interval time in sequence.

[0319] See also Figure 10 , Figure 10 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application. The load sharing method proposed in the embodiment of the present application also includes:

[0320] G1. Reduce the sending interval, which is the interval between sending the second message and the third message.

[0321] When step G1 is executed for the first time, it is determined that the sending interval time is an initial value, which may be 200 milliseconds, 100 milliseconds, or 50 milliseconds.

[0322] After executing step G4, when executing step G1, the sending interval is reduced. For example, the reduction value of the sending interval may be 5 milliseconds.

[0323] Optionally, after executing step G4, the sending interval time is decreased arithmetic increments each time step G1 is executed. For example, the decreasing value of each execution of step G1 may be 5 milliseconds.

[0324] Optionally, after executing step G4, the transmission interval is decreased geometrically each time step G1 is executed. For example, the decrease value each time step G1 is executed may be {·······40 (milliseconds), 20 (milliseconds), 10 (milliseconds), 5 (milliseconds)}, thereby improving the efficiency of detecting the capability information of the second device.

[0325] G2. Send a second message to the second device.

[0326] G3. Wait for the sending interval time and send the third message to the second device.

[0327] G4. Detect whether the first message is received, where the first message is a response message to the second message and the third message.

[0328] If the first device does not receive the first message within a period of time (e.g., 100 milliseconds) after sending the third message, the second device is deemed to have failed in its reordering of the third and second messages. The process then proceeds to step G1, where the second and third messages are sent to the second device after reducing the transmission interval. The first device determines the maximum reordering time for the second device based on the transmission interval corresponding to the first message received this time. The maximum reordering time for the second device is less than or equal to the transmission interval.

[0329] After the first device sends the third message, the first device receives the first message and then enters step G5.

[0330] G5. Determine the maximum out-of-order time of the second device according to the sending interval time corresponding to the received first message.

[0331] For example, after sending the second message 1, the first device waits 200 milliseconds before sending the third message 1. Then, after sending the third message 1, it waits 100 milliseconds and discovers that it has not received the first message 1 from the second device. The first device reduces the sending interval to 100 milliseconds. Then, after sending the second message 2, the first device waits 100 milliseconds before sending the third message 2. After sending the third message 2, the first device receives the first message 2. The first message 2 is a response message to the second and third messages 2. Therefore, the first device determines that the maximum out-of-sequence time of the second device is less than or equal to 100 milliseconds.

[0332] In the embodiment of the present application, the accuracy of the maximum out-of-order time obtained by the first device is improved by periodically reducing the time interval between sending the second message and the third message.

[0333] In another example, the first device may use a binary method to adjust the sending interval.

[0334] See also Figure 11 , Figure 11 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application. The load sharing method proposed in the embodiment of the present application also includes:

[0335] H1. The first device adjusts the sending interval according to the dichotomy method.

[0336] When step H1 is executed for the first time, an initial value of the sending interval is determined. The initial value may be 1 millisecond, 5 milliseconds, or 10 milliseconds.

[0337] After executing step H4, when executing step H1, the transmission interval is adjusted according to a binary method. Specifically, when the first device receives the first message, the transmission interval is increased; when the first device does not receive the first message, the transmission interval is decreased. The value of the reduced transmission interval can be half of the transmission interval at which the out-of-order reordering process failed.

[0338] For example, when the second message 1 and the third message 1 are sent to the second device, the sending interval is 10 milliseconds. After the first device receives the response of the second device, that is, the first message 1, the sending interval is adjusted to 200 milliseconds.

[0339] Then, after sending the second message 2 to the second device, the first device waits 200 milliseconds before sending the third message 2. After sending the third message 2, the first device waits 100 milliseconds and does not receive a response from the second device, namely the first message 2. It is considered that the second device has failed to reorder the third message 2 and the second message 2, and adjusts the sending interval to 100 milliseconds.

[0340] Then, the second device waits 100 milliseconds after sending the second message 3, and then sends the third message 3. After sending the third message 3, the first device receives the response of the second device, namely the first message 3, and determines that the maximum out-of-sequence time is less than or equal to 100 milliseconds.

[0341] Optionally, the second device may continue to adjust the sending interval until a condition is met, and the maximum out-of-sequence time of the second device is determined according to the sending interval.

[0342] H2. The first device sends a second message to the second device.

[0343] H3. After waiting for a sending interval, the first device sends a third message to the second device.

[0344] H4. The first device detects whether the stop condition is met.

[0345] In one possible implementation, the stopping condition is the number of times the first device has sent the second and third messages. For example, if the stopping condition is five times, then after the first device has sent the second and third messages to the second device five times, the maximum out-of-sequence time for the second device is determined based on the sending interval corresponding to the last received first message. If the first device has only sent the second and third messages to the second device four times, the process proceeds to step H1, where the first device continues to adjust the sending interval according to the binary method and then sends the second and third messages to the second device.

[0346] After sending the third message, the first device detects whether the stop condition is met. If the stop condition is not met, the process proceeds to step H1; if the stop condition is met, the process proceeds to step H5.

[0347] H5. Determine the maximum out-of-sequence time of the second device according to the sending interval time.

[0348] In step H5, the first device determines the maximum out-of-order time of the second device according to the sending interval time corresponding to the first message received last time.

[0349] In the embodiment of the present application, the sending time interval of the second message and the third message is adjusted by the binary method, thereby improving the efficiency of the first device in obtaining the maximum out-of-order time of the second device and improving the accuracy of the obtained maximum out-of-order time of the second device.

[0350] In combination with the above embodiment, the following describes an application scenario for determining the maximum out-of-order time. For example, please refer to Figure 13 , Figure 13 This is a schematic diagram of an application scenario in an embodiment of the present application, taking as an example a case where the first device is a head node, the second device is a tail node, and the intermediate nodes between the head node and the tail node include nodes R1 to R8. Figure 13 In the illustrated communication scenario, the delay of the link between any two intermediate nodes is shown in the figure. For example, the delay of the link between node R1 and node R3 is 5 milliseconds, and the delay of the link between node R1 and node R4 is 8 milliseconds.

[0351] L1. The head node sends a second message #1 to the tail node.

[0352] L2: After waiting for 1 millisecond, the head node sends the third message #1 to the tail node. The third message #1 and the second message #1 are fragment messages of the detection message #1.

[0353] L3. The head node sends a first message #1 to the tail node. The first message is a response message to the detection message #1.

[0354] L4. The head node increases the sending interval time based on receiving the first message #1.

[0355] L5. The head node sends a second message #2 to the tail node.

[0356] L6. After waiting for 10 milliseconds, the head node sends the third message #2 to the tail node. The third message #2 and the second message #2 are fragment messages of the detection message #2.

[0357] L7: The head node does not receive the first message #2 within 20 milliseconds, and reduces the sending interval.

[0358] L8. The head node sends a second message #3 to the tail node.

[0359] L9. After waiting for 5 milliseconds, the head node sends the third message #3 to the tail node. The third message #3 and the second message #3 are fragment messages of the detection message #3.

[0360] L10. The head node sends a first message #3 to the tail node. The first message #3 is a response message to the detection message #3.

[0361] L11, the maximum out-of-order time for the head node to determine the tail node is 5 milliseconds.

[0362] In combination with the above-mentioned embodiment, the following describes how the first device determines multiple paths for performing load sharing according to the capability information of the second device.

[0363] In one example, the first device is a controller and the second device is an end node. Figure 14 , Figure 14 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application. The load sharing method proposed in the embodiment of the present application includes:

[0364] J1. The head node reports the capability information of the second device to the controller (first device).

[0365] In step J1, the head node determines the capability information of the second device based on the first message sent by the tail node (the second device). The head node then reports the capability information of the second device to the controller. In one possible implementation, the head node proactively reports the capability information of the second device to the controller. In another possible implementation, when the controller needs the capability information of the second device, the controller sends a request to the head node, which is used to request the head node to forward the capability information of the second device. For example, the controller determines that load sharing is required based on the traffic information of each path in the network, and then obtains the capability information of the tail node.

[0366] J2. The tail node (second device) reports the capability information of the second device to the controller (first device).

[0367] In step J2, the egress node may also directly report the capability information of the second device to the controller. Similar to step J1, the egress node may actively send the capability information of the second device to the controller, or the controller may request the egress node to report the capability information of the second device.

[0368] It should be noted that either step J1 or step J2 can be performed selectively.

[0369] J3. The controller (first device) determines first path information based on the capability information of the second device, and the multiple paths indicated by the first path information meet the requirements of the capability information of the second device.

[0370] In one possible implementation, the capability information of the second device is used as a path calculation factor, and N paths whose delay jitter range meets the capability information requirement of the second device are selected from the M paths. Figure 17 As shown, Figure 17 This is a schematic diagram of a path calculation process in an embodiment of the present application.

[0371] T1. The first device determines the first M paths with the best path calculation factors, where M is a positive integer greater than or equal to 2.

[0372] The routing factors include but are not limited to bandwidth, cost, delay, or packet loss rate, etc. The first device may determine the first M paths with the best routing factors in various ways, including but not limited to Dijkstra algorithm.

[0373] T2. The first device determines N paths from the M paths with the optimal path calculation factors, and the delay jitter ranges of the N paths meet the requirements of the capability information of the second device.

[0374] Specifically, the delay jitter range of the N paths is less than or equal to the maximum out-of-sequence time of the second device. N is a positive integer less than or equal to M and greater than or equal to 2.

[0375] T3. The first device generates first path information, where the first path information indicates the N paths.

[0376] An example scenario is Figure 16 As shown, Figure 16This is a schematic diagram of an application scenario in an embodiment of the present application. For example, consider five paths (Path 1 through Path 5) between a head node and an egress node. When the egress node's maximum out-of-sequence time is 5 milliseconds, the five paths that satisfy a delay jitter range less than or equal to the maximum out-of-sequence time are Path 3, Path 4, and Path 5. The delay jitter range for Path 3, Path 4, and Path 5 is 0 less than 5 milliseconds. Therefore, Path 3, Path 4, and Path 5 are determined as the multiple paths for load balancing.

[0377] In another possible implementation, the capability information of the second device is used as a constraint to determine multiple paths.

[0378] An example is Figure 18 As shown, Figure 18 This is a schematic diagram of a path calculation scenario in an embodiment of the present application, taking nodes R1 to R8 between the head node and the tail node as an example for explanation. Figure 18 The cost and delay of the link between any two nodes can be expressed as: cost / delay. For example, the cost and delay of the link between nodes R1 and R2 are expressed as: 1 / 2, which means that the cost of the link is 1 and the delay is 2 milliseconds. Figure 18 It can be seen that there are 4 paths between the head node and the tail node. The overhead and delay distribution of these 4 paths are as follows: Figure 19 As shown, Figure 19 This is another schematic diagram of a path calculation scenario in an embodiment of the present application. The specific path overhead and delay are shown in Table 2:

[0379] Table 2

[0380] path cost Delay ( / ms) Path 1 7 5 Path 2 11 3 Path 3 4 15 Path 4 5 7

[0381] When the head node determines that the delay range of the tail node is [5 (milliseconds), 7 (milliseconds)], the head node can determine the path with the delay within the delay range and the smallest cost from the multiple paths in Table 2 as the working path.

[0382] Optionally, after determining the working path, the first device in the embodiment of the present application may also determine a protection path for the working path based on the capability information of the second device. The protection path means that when a failure occurs in the working path, the message transmitted on the working path can be switched to the protection path for transmission to ensure the normal operation of the service. For ease of understanding, as Figure 20 As shown, Figure 20 This is another schematic diagram of a path calculation process in an embodiment of the present application.

[0383] R1. The first device searches for a path between the head node and the tail node.

[0384] In step R1, after determining the working path between the head node and the tail node, the first device continues to search for other paths between the head node and the tail node. The working path includes at least one path.

[0385] In a possible implementation, the first device uses a depth-first search method to search for a path between a head node and a tail node.

[0386] It should be noted that, in addition to the depth-first search method, the first device can also use other algorithms to search the path between the head node and the tail node, such as the breadth-first search method, etc., which is not limited in the embodiment of the present application.

[0387] After step R1, step R2 is performed.

[0388] R2. The first device detects whether the delay jitter of the currently searched path exceeds a threshold compared with the searched optimal path, or the first device detects whether the path calculation factor of the currently searched path is lower than the path calculation factor of the searched optimal path.

[0389] The first device compares each searched path with the searched optimal path to detect whether it meets condition 1 or condition 2. If condition 1 or condition 2 is met, the search continues between the head node and the tail node, and the process proceeds to step R1. If condition 1 or condition 2 is not met, the search is further checked to see whether all nodes between the head node and the tail node have been searched, and the process proceeds to step R3.

[0390] In a possible implementation, the optimal path refers to a path with an optimal path factor between the head node and the tail node.

[0391] Condition 1: The first device detects whether the delay jitter of the currently searched path compared with the searched optimal path exceeds a threshold, and the threshold is less than or equal to the maximum out-of-sequence time of the second device.

[0392] Condition 2: The first device detects whether the routing factor of the currently searched path is lower than the routing factor of the searched optimal path.

[0393] R3. Check whether the search is completed for all nodes.

[0394] In step R3, if the search has been completed for all nodes between the head node and the tail node, then go to step R4 to determine the currently searched path as the protection path of the optimal path; if the search has not been completed for all nodes between the head node and the tail node, then go to step R1 to continue searching the path between the head node and the tail node.

[0395] R4. Determine the optimal path as the protection path.

[0396] For easier understanding, see Figure 21 , Figure 21 This is another application scenario diagram in the embodiment of the present application. When the working path between the head node and the tail node is determined to be: Using the above method, the protection path from the head node to the tail node is determined to be: The difference between the delay of the working path and the delay of the protection path is less than the maximum out-of-order time of the tail node. Therefore, when the message switches from the working path to the protection path, the tail node can successfully reorder the out-of-order messages that may be generated, ensuring the normal operation of the service.

[0397] Optionally, after the first device obtains the capability information of the second device, it can also convert various indicators included in the capability information of the second device into a maximum out-of-order time, and then determine the first path information based on the maximum out-of-order time, which can simplify the implementation of the second device. The specific method is as follows:

[0398] 1. When the capability information of the second device includes a maximum number of out-of-order bytes, the controller determines the maximum number of bytes of out-of-order messages received by the second device within a unit time based on the obtained out-of-order bandwidth of the second device. Then, based on the maximum number of bytes of out-of-order messages received by the second device within the unit time and the maximum number of out-of-order bytes of the second device, the controller determines the maximum out-of-order time of the second device. Based on the maximum out-of-order time, the delay jitter range of the multiple paths is determined, and the delay jitter range of the multiple paths is less than or equal to the maximum out-of-order time. For example, if the out-of-order bandwidth of the second device is 10 megabytes / second (MB / s), then theoretically, the second device can forward a maximum of 10MB of out-of-order messages within 1 second. If the maximum number of out-of-order bytes of the second device is 1MB, then the maximum out-of-order time of the second device is 1 / 10 = 0.1 seconds = 100 milliseconds. The delay jitter range of the multiple paths is less than 100 milliseconds.

[0399] 2. When the second device's capability information includes a maximum number of out-of-order packets, the first device obtains the average reception interval for received packets. The first device then determines the maximum out-of-order time based on the average reception interval and the maximum number of out-of-order packets. For example, if the maximum number of out-of-order packets is 20 and the average reception interval is 5 milliseconds, the maximum out-of-order time is: 20 * 5 = 100 milliseconds. The delay jitter range of multiple paths is less than 100 milliseconds.

[0400] 3. When the capability information of the second device includes the maximum number of out-of-order messages, the first device obtains the average size of the messages received by the second device and the maximum number of out-of-order messages to determine the maximum number of out-of-order bytes of the second device. Then, based on the maximum number of out-of-order bytes of the second device, the maximum out-of-order time of the second device is determined. For example, if the average size of the messages received by the second device is 0.1MB and the maximum number of out-of-order messages is 10, then the maximum number of out-of-order bytes of the second device is determined to be 1MB. Then, the output port bandwidth of the second device is obtained to be 10MB / s. Based on the link output port bandwidth of the second device and the maximum number of out-of-order bytes of the second device, the maximum out-of-order time of the second device is determined to be 1 / 10 = 0.1 seconds = 100 milliseconds. The delay jitter range of multiple paths is less than 100 milliseconds.

[0401] Next, after the first device obtains the maximum out-of-order time, it determines multiple paths for load sharing based on the maximum out-of-order time. The delay jitter ranges of the multiple paths satisfy the capability information of the second device. This path information of the multiple paths is referred to as first path information. In one possible implementation, the delay jitter range of the multiple paths satisfying the capability information of the second device means that the delay difference of the multiple links is less than or equal to the maximum out-of-order time.

[0402] It should be noted that there are many possible implementation methods for the first path information. For example, the first path information is a forwarding label stack of a segment routing node based on Internet Protocol Version 6-Segment Routing (IPv6 SR or SRv6), and the SRv6 forwarding label stack includes a label of each node passed by each path in multiple paths.

[0403] J4. The controller sends the first path information to the head node.

[0404] J5. The head node performs packet-by-packet load balancing forwarding on the data flow in the multiple paths indicated by the first path information according to the first path information.

[0405] In another example, the first device is a head node and the second device is a tail node. Figure 15 , Figure 15 This is a flow chart of another embodiment of the load sharing method in the embodiment of the present application. The load sharing method proposed in the embodiment of the present application includes:

[0406] K1. The head node (first device) obtains capability information of the second device of the tail node (second device).

[0407] K2. The head node (first device) determines first path information based on the capability information of the second device, and the multiple paths indicated by the first path information meet the requirements of the capability information of the second device.

[0408] Step K2 is similar to the aforementioned step J3 and will not be described in detail here.

[0409] K3. Perform packet-by-packet load balancing forwarding on the data flow in the multiple paths indicated by the first path information according to the first path information.

[0410] The following introduces a communication device in an embodiment of the present application. The communication device introduced below has any function of the first device or the second device in the above method embodiment.

[0411] Figure 22 A schematic diagram of the structure of a communication device 2200 provided in an embodiment of the present application is shown in FIG. Figure 22 As shown, the communication device 2200 includes: a transceiver module 2201, configured to execute step S1; and a processing module 2202, configured to execute step S2.

[0412] The communication device 2200 can correspond to the first device or the second device in the above-mentioned method embodiment. The various units in the communication device 2200 and the above-mentioned other operations and / or functions are respectively for implementing the various steps and methods implemented by the first device or the second device in the method embodiment. For specific details, please refer to the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.

[0413] When the communication device 2200 processes a message, the division of the above functional modules is used as an example for illustration. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the communication device 2200 is divided into different functional modules to complete all or part of the functions described above. Figure 5-Figure 21 The corresponding embodiment methods belong to the same concept, and their specific implementation processes are detailed in the above method embodiments, which will not be repeated here.

[0414] In order to implement the above embodiment, the present application also provides a communication device. Figure 23 , Figure 23 A schematic structural diagram of a communication device 2300 provided in an embodiment of the present application.

[0415] Figure 23 Although the communication device 2300 shown shows certain specific features, those skilled in the art will appreciate from the embodiments of the present application that for the sake of brevity, Figure 23Various other features are not shown to avoid obscuring more relevant aspects of the embodiments disclosed in the embodiments of the present application. To this end, as an example, in some implementations, the communication device 2300 includes one or more processing units (e.g., CPU) 2301, a network interface 2302, a programming interface 2303, a memory 2304, and one or more communication buses 2305 for interconnecting the various components. In other implementations, the communication device 2300 may also omit or add some functional components or units based on the above examples.

[0416] In some implementations, the network interface 2302 is used to connect to one or more other communication devices / servers in the network system. In some implementations, the communication bus 2305 includes circuits for interconnecting and controlling communications between system components. The memory 2304 may include non-volatile memory, such as read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The memory 2304 may also include volatile memory, which may be random access memory (RAM) used as an external cache.

[0417] In some implementations, memory 2304 or the non-transitory computer-readable storage medium of memory 2304 stores the following programs, modules, and data structures, or a subset thereof, including, for example, a transceiver unit (not shown), an acquisition unit 23041, and a processing unit 23042.

[0418] In a possible embodiment, the communication device 2300 may have the above Figure 5-Figure 21 Any function in the first device or the second device in the corresponding method embodiment.

[0419] It should be understood that the communication device 2300 corresponds to the first device or the second device in the above method embodiment, and the modules in the communication device 2300 and the above other operations and / or functions are respectively for implementing the various steps and methods implemented by the first device or the second device in the above method embodiment. For details, please refer to the above Figure 5-Figure 21 For the sake of brevity, the corresponding method embodiments are not described here in detail.

[0420] It should be understood that in this application, the data sending and receiving operations can be completed by the network interface 2302 on the communication device 2300, or the processor can call the program code in the memory and cooperate with the network interface 2302 when necessary to implement the functions of the sending and receiving unit.

[0421] In various implementations, the communication device 2300 is used to perform the load sharing method provided in the embodiment of the present application, for example, to perform the above Figure 5-Figure 21 The load sharing method corresponding to the embodiment shown.

[0422] This application Figure 23 The specific structure of the communication device can be Figure 24 shown.

[0423] Figure 24 A schematic structural diagram of a communication device 2400 provided in an embodiment of the present application.

[0424] The communication device 2400 includes a main control board 2410 and an interface board 2430 .

[0425] Main control board 2410, also known as the main processing unit (MPU) or route processor, is responsible for controlling and managing various components in communication device 2400, including routing calculation, device management, device maintenance, and protocol processing. Main control board 2410 includes a central processing unit (CPU) 2411 and memory 2412.

[0426] Interface board 2430 is also known as a line processing unit (LPU), line card, or service board. It provides various service interfaces and implements data packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces and POS (Packet over SONET / SDH) interfaces. Interface board 2430 includes a central processing unit (CPU) 2431, a network processor (NPU) 2432, a forwarding table memory 2434, and a physical interface card (PIC) 2433.

[0427] The central processing unit 2431 on the interface board 2430 is used to control and manage the interface board 2430 and communicate with the central processing unit 2411 on the main control board 2410 .

[0428] The network processor 2432 is used to implement packet forwarding processing and can be in the form of a forwarding chip.

[0429] The physical interface card 2433 is used to implement the physical layer docking function. The original traffic enters the interface board 2430 from this, and the processed message is sent from the physical interface card 2433. The physical interface card 2433 includes at least one physical interface, which is also called a physical port. The physical interface can be a Flexible Ethernet (FlexE) physical interface. The physical interface card 2433 is also called a daughter card and can be installed on the interface board 2430. It is responsible for converting the optical and electrical signals into messages and performing a validity check on the messages before forwarding them to the network processor 2432 for processing. In some embodiments, the central processing unit 2431 of the interface board 2430 can also perform the functions of the network processor 2432, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2432 is not required in the interface board 2430.

[0430] Optionally, the communication device 2400 includes multiple interface boards. For example, the communication device 2400 further includes an interface board 2440 . The interface board 2440 includes: a central processing unit 2441 , a network processor 2442 , a forwarding table entry memory 2444 and a physical interface card 2443 .

[0431] Optionally, the communication device 2400 further includes a switching fabric board 2420. The switching fabric board 2420 may also be referred to as a switch fabric unit (SFU). If the communication device includes multiple interface boards 2430, the switching fabric board 2420 is used to exchange data between the interface boards. For example, the interface board 2430 and the interface board 2440 can communicate via the switching fabric board 2420.

[0432] The main control board 2410 is coupled to the interface board. For example, the main control board 2410, the interface board 2430, the interface board 2440, and the switching network board 2420 are interconnected via a system bus and / or a system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 2410 and the interface board 2430, and communication between the main control board 2410 and the interface board 2430 is performed via the IPC channel.

[0433] Logically, communication device 2400 comprises a control plane and a forwarding plane. The control plane includes a main control board 2410 and a central processing unit 2431. The forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 2434, a physical interface card 2433, and a network processor 2432. The control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining device status. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2432 forwards messages received by the physical interface card 2433 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2434. In some embodiments, the control plane and forwarding plane can be completely separate and not located on the same device.

[0434] It should be understood that the transceiver unit in the communication device 2300 can be equivalent to the physical interface card 2433 or the physical interface card 2443 in the communication device 2400; the acquisition unit 23041 and the processing unit 23042 in the communication device 2300 can be equivalent to the central processing unit 2411 or the central processing unit 2431 in the communication device 2400, or can be equivalent to the program code or instructions stored in the memory 2412.

[0435] It should be understood that the operations on interface board 2440 in the embodiment of the present application are consistent with those on interface board 2430, and for the sake of brevity, detailed description thereof will not be repeated. It should be understood that the communication device 2400 of this embodiment may correspond to the first device or the second device in each of the above-mentioned method embodiments, and the main control board 2410, interface board 2430, and / or interface board 2440 in the communication device 2400 may implement the functions and / or various steps of the first device or the second device in each of the above-mentioned method embodiments, and for the sake of brevity, detailed description thereof will not be repeated here.

[0436] It's worth noting that there may be one or more main control boards (SBCs), which may include a primary SBC and a backup SBC. There may be one or more interface boards. The higher the data processing capability of a communication device, the more interface boards are provided. An interface board may also have one or more physical interface cards. There may be no SBCs, or one or more. Multiple SBCs can be used to achieve load balancing and redundant backup. In a centralized forwarding architecture, a communication device may not require a SBC; the interface board handles service data processing for the entire system. In a distributed forwarding architecture, a communication device may have at least one SBC, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Alternatively, a communication device may have only one SBC, i.e., no SBC. The functions of the interface board and the SBC are integrated on this single SBC. In this case, the central processing unit (CPU) on the interface board and the CPU on the SBC can be combined into a single CPU on this single SBC, performing the combined functions of the two. The specific architecture to be adopted depends on the specific network deployment scenario and is not intended to be exclusive here.

[0437] In some possible embodiments, the first device or the second device may be implemented as a virtualized device. The virtualized device may be a virtual machine (VM), a virtual router, or a virtual switch running a program for sending messages. The virtualized device is deployed on a hardware device (e.g., a physical server). For example, the first device or the second device may be implemented based on a general-purpose physical server in combination with network function virtualization (NFV) technology.

[0438] It should be understood that the communication devices in the various product forms mentioned above respectively have any functions of the first device or the second device in the above method embodiment, which will not be described in detail here.

[0439] An embodiment of the present application also provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enables the computer to control a network device to execute any one of the implementation methods shown in the aforementioned method embodiments.

[0440] An embodiment of the present application also provides a computer program product, which includes computer program code. When the computer program code runs on a computer, it enables the computer to execute any one of the implementation methods shown in the aforementioned method embodiments.

[0441] Furthermore, the embodiment of the present application also provides a computer program product, which, when executed on a communication device, enables the communication device to execute the above Figure 5-Figure 21 The method performed by the first device or the second device in the corresponding method embodiment.

[0442] The present application also provides a chip system including a processor and an interface circuit, wherein the interface circuit is configured to receive instructions and transmit them to the processor, wherein the processor is configured to implement any of the above method embodiments.

[0443] Optionally, the chip system further includes a memory, and the chip system may include one or more processors. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor that implements any of the above method embodiments by reading software code stored in the memory.

[0444] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.

[0445] See also Figure 25 , Figure 25 This is a schematic diagram of a network system 2500 proposed in an embodiment of the present application. The network system 2500 includes: a first device 2501, a second device 2502, and a controller 2503. The first device 2501 and the second device 2502 can be, for example, physical devices such as routers, switches, or gateways, or virtual devices that support route publishing and message forwarding. This embodiment does not limit the specific types of the first device 2501 and the second device 2502. The controller 2503 can be a server or computing device that manages the first device 2501 and the second device 2502. Optionally, the first device 2501 can be a communication device 2200, a communication device 2300, or a communication device 2400. Optionally, the second device 2502 can be a communication device 2200, a communication device 2300, or a communication device 2400. Optionally, the controller 2503 can be a communication device 2200, a communication device 2300, or a communication device 2400.

[0446] The above describes the embodiments of the present application in detail. The steps in the method of the embodiments of the present application can be scheduled sequentially, merged or deleted according to actual needs; the modules in the device of the embodiments of the present application can be divided, merged or deleted according to actual needs.

[0447] It should be understood that “one embodiment” or “an embodiment” mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, “in one embodiment” or “in an embodiment” appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes 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.

[0448] The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0449] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A, but B can also be determined based on A and / or other information.

[0450] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0451] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0452] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0453] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

Claims

1. A load sharing method, characterized in that: The method is applied to a first device, and includes: receiving a first message sent by a second device, where the first message indicates a reordering capability of the second device for out-of-order messages; Based on the first message, capability information of the second device is determined, where the capability information of the second device is used to determine multiple paths for performing load sharing.

2. The method according to claim 1, characterized in that Receiving the first message sent by the second device includes: sending a second message to the second device; sending a third message to the second device; The first message sent by the second device is received, where the first message is generated by the second device in response to the received second message and the third message.

3. The method according to claim 2, characterized in that Sending the third message to the second device includes: After sending the second message to the second device, waiting for a sending interval, and sending the third message to the second device; Determining capability information of the second device according to the first message includes: Determine the sending interval corresponding to the first message according to the first message.

4. The method according to any one of claims 1 to 3, characterized in that The capability information of the second device includes: a maximum out-of-order time, where the maximum out-of-order time is a maximum reception interval time for the second device to successfully reorder at least two out-of-order messages.

5. The method according to any one of claims 2 to 4, characterized in that The method further comprises: The detection message with the destination address pointing to the second device is fragmented to generate the second message and the third message.

6. The method according to any one of claims 2 to 4, characterized in that The message sequence number of the second message is smaller than the message sequence number of the second message.

7. The method according to any one of claims 2 to 4, characterized in that The second message carries the first identifier; The third message carries a second identifier; The first identifier and the second identifier are used to instruct the second device to trigger out-of-order reordering of the second message and the third message.

8. The method according to any one of claims 3 to 7, characterized in that Sending the second message to the second device includes: step 1: sending the second message to the second device; Waiting for the sending interval and sending the third message to the second device includes: Step 2: Waiting for the sending interval time, and sending the third message to the second device; Step 3: In response to receiving the first message sent by the second device, increasing the sending interval; Repeat steps 1, 2, and 3 above.

9. The method according to any one of claims 3 to 7, characterized in that Sending the second message to the second device includes: Step 1: Sending the second message to the second device; Waiting for the sending interval and sending the third message to the second device includes: Step 2: Waiting for the sending interval time, and sending the third message to the second device; In response to the first message sent by the second device, determining a maximum out-of-sequence time of the second device according to the sending interval, including: Step 3: In response to not receiving the first message sent by the second device within the first time period, reducing the sending interval; Repeat steps 1, 2, and 3 above.

10. The method according to any one of claims 3 to 9, characterized in that Sending the second message to the second device includes: receiving first routing information, where the destination address included in the first routing information points to the second device; Send the second message to the second device according to the first routing information.

11. The method according to any one of claims 3 to 9, characterized in that Sending the second message to the second device includes: receiving a message in a data stream, wherein a destination address of the message points to the second device; The second message is sent to the second device according to the characteristic information of the data stream.

12. The method according to claim 1, characterized in that Determining capability information of the second device according to the first message includes: The capability information of the second device is determined according to a first field included in the first message, where the first field is used to carry the capability information of the second device.

13. The method according to claim 12, characterized in that The first message is a Border Gateway Protocol update BGPupdate message; The first field is an extended BGP routing attribute tag length value TLV field.

14. The method according to any one of claims 1 to 13, characterized in that The method further comprises: sending capability information of the second device to the controller, where the capability information of the second device is used to constrain the controller to generate first path information, where the first path information indicates the multiple paths, and the multiple paths meet requirements of the capability information of the second device; receiving the first path information sent by the controller; According to the first path information, packet-by-packet load balancing forwarding is performed on the data flows in the multiple paths.

15. The method according to any one of claims 1 to 13, characterized in that The method further comprises: determining, according to the capability information of the second device, first path information, where the first path information indicates the plurality of paths, and the plurality of paths meet requirements of the capability information of the second device; According to the first path information, packet-by-packet load balancing forwarding is performed on the data flows in the multiple paths.

16. The method according to claim 14 or 15, characterized in that The multiple paths satisfying the capability information requirement of the second device include: The delay jitter range of the multiple paths is less than or equal to the maximum out-of-order time, and the capability information of the second device indicates the maximum out-of-order time, which is the maximum reception interval time for the second device to successfully reorder at least two out-of-order messages.

17. The method according to claim 11, characterized in that The capability information of the second device includes at least one of the following: a maximum out-of-order time, the maximum out-of-order time being a maximum reception interval time during which the second device successfully reorders at least two out-of-order messages; Alternatively, a maximum number of out-of-order packets, where the maximum number of out-of-order packets indicates a maximum number of packets that differs between at least two out-of-order packets that are successfully reordered by the second apparatus; Alternatively, the maximum number of out-of-order bytes indicates the maximum number of bytes of storage space used by the second device to cache out-of-order messages.

18. The method according to any one of claims 1 to 17, characterized in that The first device is a head node, the second device is a tail node, and the multiple paths are multiple paths between the head node and the tail node.

19. A load sharing method, characterized in that: The method is applied to a second device, and includes: A first message is sent to a first device, where the first message indicates the second device's ability to reorder out-of-order messages, so that the first device determines multiple paths for performing load sharing based on the capability information of the second device.

20. The method according to claim 19, characterized in that Sending the first message includes: receiving a second message sent by the first device; receiving a third message sent by the first device; In response to the received second message and the third message, the first message is sent to the first device.

21. The method according to claim 20, characterized in that In response to the received second message and the received third message, sending the first message to the first device includes: Rearranging the received second and third messages out of order; In response to successfully performing the out-of-order reordering process, generating the first message; Send the first message to the first device.

22. The method according to claim 21, characterized in that The step of reordering the received second message and the received third message includes: Performing out-of-order reordering on the second message and the third message according to the fragment offset of the third message and the fragment offset of the second message, wherein the fragment offset of the third message is smaller than the fragment offset of the second message, the fragment offset of the second message indicates an order of the second message in multiple fragment messages generated by the detection message, and the allocation offset of the third message indicates an order of the third message in the multiple fragment messages generated by the detection message; In response to successfully executing the out-of-order reordering process, generating the first message includes: Merging the second message and the third message after the out-of-order reordering process is successfully performed to generate the detection message; Generate the first message according to the detection message.

23. The method according to claim 21, characterized in that The step of reordering the received second message and the received third message includes: Performing out-of-order reordering on the second message and the third message according to the message sequence number of the third message and the message sequence number of the second message, wherein the message sequence number of the second message is smaller than the message sequence number of the second message.

24. The method according to claim 21, characterized in that The step of reordering the received second message and the received third message includes: According to the second identifier carried by the third message and the first identifier carried by the second message, out-of-order reordering is performed on the second message and the third message.

25. The method according to claim 19 or 20, characterized in that The first message includes a first field, where the first field is used to carry capability information of the second device.

26. The method according to claim 25, characterized in that The capability information of the second device includes at least one of the following: a maximum out-of-order time, the maximum out-of-order time being a maximum reception interval time during which the second device successfully reorders at least two out-of-order messages; Alternatively, a maximum number of out-of-order packets, where the maximum number of out-of-order packets indicates a maximum number of packets that differs between at least two out-of-order packets that are successfully reordered by the second apparatus; Alternatively, the maximum number of out-of-order bytes indicates the maximum number of bytes of storage space used by the second device to cache out-of-order messages.

27. The method according to claim 25 or 26, characterized in that The first message is a Border Gateway Protocol update BGP update message; The first field is an extended BGP routing attribute tag length value TLV field.

28. A communication device, characterized in that: The device includes multiple functional modules, and the multiple functional modules interact with each other to implement the method according to any one of claims 1-18.

29. A communication device, characterized in that: The device includes multiple functional modules, which interact with each other to implement the method according to any one of claims 19 to 27.

30. A communication device comprising a processor and a memory, wherein the memory is configured to store program code, and the processor is configured to call the program code in the memory so that the communication device executes the method according to any one of claims 1 to 27.

31. A computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 27.

32. A computer program product, characterized in that The computer program product comprises program codes, and when a computer runs the computer program product, the computer is caused to perform the method according to any one of claims 1 to 27.

33. A communication system comprising a first device and a second device, wherein the first device is configured to execute the method according to any one of claims 1 to 18, and the second device is configured to execute the method according to any one of claims 19 to 27.