Communication method and device, and communication system

By generating and sending assurance messages in the communication network, the reliability problem caused by packet loss during traffic transmission is solved, achieving efficient communication reliability assurance and avoiding the negative impact of TCP congestion avoidance mechanism.

CN121966787APending Publication Date: 2026-05-01HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-10-31
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In communication networks, packet loss is inevitable during traffic transmission, resulting in low reliability of communication between end devices. Existing technologies that use TCP congestion avoidance mechanisms to handle this issue can lead to reduced network throughput and decreased efficiency of end devices.

Method used

The first device generates at least one safeguard message and sends data packets and safeguard messages through multiple paths so that the second device can recover lost data packets and ensure communication reliability.

Benefits of technology

By generating safeguard messages to recover lost data packets, the reliability of communication between end devices is ensured, while avoiding the reduction in throughput and work efficiency caused by the TCP congestion avoidance mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121966787A_ABST
    Figure CN121966787A_ABST
Patent Text Reader

Abstract

The invention discloses a communication method and device and a communication system, and belongs to the technical field of communication. In the method, a first device generates at least one guarantee message based on a plurality of data messages of a first data stream, and sends the plurality of data messages and the at least one guarantee message through a plurality of first paths used for transmitting the first data stream between the first device and a second device, the at least one guarantee message is used for the second device to recover the lost message in the plurality of data messages. And after the second equipment receives the at least one guarantee message and at least one data message in the plurality of data messages, the lost message in the plurality of data messages can be recovered based on the at least one guarantee message. According to the invention, the communication reliability can be guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a communication method, apparatus, and system. Background Technology

[0002] A communication network can forward traffic between different end-side devices (such as terminal devices, servers, etc.) that are connected to the network, thereby enabling communication between these different end-side devices.

[0003] However, packet loss is inevitable during the transmission of traffic in the communication network, resulting in low reliability of communication between end devices. Summary of the Invention

[0004] This application provides a communication method, apparatus, and system. The technical solution of this application is as follows.

[0005] A first aspect provides a communication method, comprising: a first device acquiring multiple data packets of a first data stream; the first device generating at least one safeguard message based on the multiple data packets, the at least one safeguard message being used by a second device to recover lost packets from the multiple data packets, the sum of the number of the multiple data packets and the number of the at least one safeguard message being equal to the number of multiple first paths between the first device and the second device for transmitting the first data stream; and the first device transmitting the multiple data packets and the at least one safeguard message through the multiple first paths. The multiple first paths may be all paths between the first device and the second device for transmitting the first data stream, or they may be partial paths between the first device and the second device for transmitting the first data stream.

[0006] The technical solution provided in this application involves a first device generating at least one guarantee message based on multiple data packets of a first data stream. The first device then transmits the multiple data packets and the at least one guarantee message through multiple first paths used for transmitting the first data stream between the first and second devices. The at least one guarantee message is used by the second device to recover lost packets from the multiple data packets. Therefore, after receiving the at least one guarantee message and at least one data packet from the multiple data packets, the second device can recover lost packets from the multiple data packets based on the at least one guarantee message. Thus, this application ensures that the second device can recover lost packets from the multiple data packets by generating at least one guarantee message based on multiple data packets, thereby guaranteeing the reliability of communication between the first and second devices.

[0007] Optionally, the first device generates at least one safeguard message based on the plurality of data packets, including: the first device generating the payload of the at least one safeguard message based on the payload of the plurality of data packets; and the first device generating the header of the at least one safeguard message based on the header of the plurality of data packets.

[0008] Optionally, the first device generates the payload of the at least one safeguard message based on the payloads of the plurality of data packets, including: the first device performing an exclusive OR (XOR) operation on the payloads of the plurality of data packets to obtain verification data; and the first device obtaining the payload of the at least one safeguard message based on the verification data.

[0009] Optionally, the first device generates the payload of the at least one safeguard message based on the payloads of the plurality of data packets, including: the first device performs forward error correction (FEC) encoding on the payloads of the plurality of data packets to obtain verification data; and the first device obtains the payload of the at least one safeguard message based on the verification data.

[0010] Optionally, the payload of the at least one guarantee message is the verification data; or, the payload of each guarantee message in the at least one guarantee message is a part of the verification data, and the payloads of different guarantee messages in the at least one guarantee message are different.

[0011] That is, the first device uses the verification data as the payload of the at least one guarantee message, and the different guarantee messages in the at least one guarantee message have the same payload. Alternatively, the first device divides the verification data into at least one part (e.g., multiple parts) and uses each of the at least one part as the payload of a guarantee message, and the different guarantee messages in the at least one guarantee message have different payloads.

[0012] Optionally, the header of any safeguard message includes an identifier for that safeguard message, the identifier of which is determined based on the number of the plurality of data messages.

[0013] Optionally, the plurality of data packets constitute a balance group, and the identifier of the at least one protection packet is determined based on the number of the plurality of data packets and the identifier of the balance group.

[0014] Optionally, the message identifier is the message sequence number (SN), and the equalization group identifier is the equalization group SN.

[0015] Optionally, the source device and the destination device of the first data stream are connected to the communication network through different access network devices in the communication network. The communication network includes multiple access network devices and multiple aggregation network devices, and each access network device is communicatively connected to at least one aggregation network device. The first device includes any one of the following: the source device, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device. The second device includes any one of the following: the destination device, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device. Wherein, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device; the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

[0016] Optionally, the communication network is a data center network.

[0017] Optionally, the first device sends the multiple data packets and the at least one guarantee message through the multiple first paths, including: the first device uses a per-packet load balancing method to send the multiple data packets and the at least one guarantee message through the multiple first paths. Wherein, the multiple data packets and the at least one guarantee message correspond one-to-one with the multiple first paths (that is, each packet in the multiple data packets and the at least one guarantee message corresponds to one path in the multiple first paths, and any two packets in the multiple data packets and the at least one guarantee message correspond to different paths), and each packet in the multiple data packets and the at least one guarantee message is sent through its corresponding path.

[0018] In a second aspect, a communication method is provided, the method comprising: a second device receiving at least one safeguard message and at least one data packet of a first data stream, the at least one safeguard message being generated by the first device based on multiple data packets of the first data stream, the multiple data packets including the at least one data packet, the at least one safeguard message being used by the second device to recover lost packets among the multiple data packets, the sum of the number of the multiple data packets and the number of the at least one safeguard message being equal to the number of multiple first paths between the first device and the second device for transmitting the first data stream; the second device determining, based on the at least one data packet, that a first data packet among the multiple data packets is lost; and the second device recovering the first data packet based on the at least one safeguard message.

[0019] The technical solution provided in this application involves a second device receiving at least one safeguard message, which is generated by the first device based on multiple data packets from a first data stream. The at least one data packet received by the second device belongs to these multiple data packets, and the at least one safeguard message is used by the second device to recover lost packets from these multiple data packets. Therefore, the second device can recover lost packets from these multiple data packets based on the at least one safeguard message. Thus, this application ensures that the second device can recover lost packets from these multiple data packets by generating at least one safeguard message based on multiple data packets, thereby guaranteeing the reliability of communication between the first device and the second device.

[0020] Optionally, the second device recovers the first data packet based on the at least one safeguard message, including: the second device recovers the first data packet based on the at least one safeguard message and the at least one data packet.

[0021] Optionally, the second device recovers the first data packet based on the at least one safeguard message and the at least one data packet, including: the second device recovers the payload of the first data packet based on the payload of the at least one safeguard message and the payload of the at least one data packet; the second device recovers the header of the first data packet based on the header of the at least one safeguard message and the header of the at least one data packet.

[0022] Optionally, the payload of the at least one safeguard message is obtained by the first device based on the verification data obtained by performing an XOR operation on the payloads of the plurality of data packets. The second device recovers the payload of the first data packet based on the payload of the at least one safeguard message and the payload of the at least one data packet, including: the second device obtaining the verification data based on the payload of the at least one safeguard message; and the second device performing an XOR operation on the verification data and the payload of the at least one data packet to obtain the payload of the first data packet.

[0023] Optionally, the payload of the at least one safeguard message is obtained by the first device based on the verification data obtained by FEC encoding the payloads of the plurality of data packets. The second device recovers the payload of the first data packet based on the payload of the at least one safeguard message and the payload of the at least one data packet, including: the second device obtaining the verification data based on the payload of the at least one safeguard message; and the second device performing FEC decoding on the verification data and the payload of the at least one data packet to obtain the payload of the first data packet.

[0024] Optionally, the payload of the at least one protection message is the verification data, or the payload of each of the at least one protection messages is a part of the verification data, and the payloads of different protection messages in the at least one protection message are different.

[0025] Optionally, the header of any safeguard message includes an identifier for that safeguard message, the identifier of which is determined based on the number of the plurality of data messages.

[0026] Optionally, the plurality of data packets constitute a balance group, and the identifier of the at least one protection packet is determined based on the number of the plurality of data packets and the identifier of the balance group.

[0027] Optionally, the message identifier is the message's serial number (SN), and the balancer group identifier is the balancer group's serial number (SN).

[0028] Optionally, the source device and the destination device of the first data stream are connected to the communication network through different access network devices in the communication network. The communication network includes multiple access network devices and multiple aggregation network devices, and each access network device is communicatively connected to at least one aggregation network device. The first device includes any one of the following: the source device, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device. The second device includes any one of the following: the destination device, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device. Wherein, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device; the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

[0029] Optionally, the communication network is a data center network.

[0030] Thirdly, a communication device is provided for use with a first device. The communication device includes at least one functional module for performing the method provided in the first aspect or any alternative method thereof. The at least one functional module may be implemented based on software, hardware, or a combination of both, and may be combined or divided based on a specific implementation.

[0031] Fourthly, a communication device is provided for use with a second device. The communication device includes at least one functional module for performing the method provided in the second aspect or any alternative method thereof. The at least one functional module may be implemented based on software, hardware, or a combination of both, and may be combined or divided based on a specific implementation.

[0032] Fifthly, a communication device is provided, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory to cause the communication device to perform the method provided by the first aspect or any alternative of the first aspect, or to perform the method provided by the second aspect or any alternative of the second aspect.

[0033] In a sixth aspect, a communication device is provided, including a main control board and an interface board, the main control board and the interface board being used to implement the method provided by the first aspect or any alternative method of the first aspect, or to implement the method provided by the second aspect or any alternative method of the second aspect.

[0034] A seventh aspect provides a communication system, including a first device and a second device; the first device includes a communication apparatus as provided in the third, fifth, or sixth aspects above; the second device includes a communication apparatus as provided in the fourth, fifth, or sixth aspects above.

[0035] Eighthly, a computer-readable storage medium is provided that stores a computer program, which, when executed, implements the method provided by the first aspect or any alternative method of the first aspect, or implements the method provided by the second aspect or any alternative method of the second aspect.

[0036] Ninthly, a computer program product is provided, the computer program product comprising a program or code that, when executed, implements the method provided as in the first aspect or any alternative method of the first aspect, or implements the method provided as in the second aspect or any alternative method of the second aspect.

[0037] In a tenth aspect, a chip is provided, the chip including programmable logic circuitry and / or program instructions, the chip being used to implement the method provided by the first aspect or any alternative of the first aspect above, or to implement the method provided by the second aspect or any alternative of the second aspect above.

[0038] The technical effects of the third to tenth aspects mentioned above can be referred to the technical effects of the first to second aspects, and will not be elaborated here. Attached Figure Description

[0039] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application;

[0040] Figure 2 This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;

[0041] Figure 3This is a flowchart of a communication method provided in an embodiment of this application;

[0042] Figure 4 This is a schematic diagram of multiple data packets provided in an embodiment of this application;

[0043] Figure 5 This is a schematic diagram illustrating the generation of a security message according to an embodiment of this application;

[0044] Figure 6 This is a schematic diagram illustrating a method for recovering data packets according to an embodiment of this application;

[0045] Figure 7 This is a schematic diagram of a communication method provided in an embodiment of this application;

[0046] Figure 8 This is a schematic diagram of another communication method provided in an embodiment of this application;

[0047] Figure 9 This is a schematic diagram of another communication method provided in an embodiment of this application;

[0048] Figure 10 This is a schematic diagram of yet another communication method provided in an embodiment of this application;

[0049] Figure 11 This is a schematic diagram of a communication device provided in an embodiment of this application;

[0050] Figure 12 This is a schematic diagram of another communication device provided in an embodiment of this application;

[0051] Figure 13 This is a schematic diagram of another communication device provided in the embodiments of this application;

[0052] Figure 14 This is a schematic diagram of another communication device provided in the embodiments of this application. Detailed Implementation

[0053] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0054] The application scenarios of this application include communication networks and end-side devices accessing the communication network. The communication network is used to forward traffic between different end-side devices accessing the communication network, so as to realize communication between the different end-side devices.

[0055] The communication network can be any type of network, such as a data center network (DCN), an artificial intelligence (AI) training network, a metropolitan area network (MAN), a wide area network (WAN), or a campus network. This communication network includes multiple network devices, which can be switches, routers, virtual switches, or virtual routers, and are also called forwarding devices. The network devices in this communication network can be of the same type; for example, all the network devices in the communication network can be switches. Alternatively, the communication network can include different types of network devices; for example, some of the network devices in the communication network are routers, and others are switches.

[0056] The communication network may include multiple network layers, each including at least one network device, and the network devices in the multiple network layers are communicatively connected. Furthermore, the multiple network layers may include an access layer, through which end-side devices access the communication network. In one embodiment, the communication network is a Layer 2 network (also called a two-level network), including two network layers: an access layer and an aggregation layer. Each access layer and aggregation layer includes at least one network device, and the network devices in the access layer are communicatively connected to the network devices in the aggregation layer. End-side devices are communicatively connected to the network devices in the access layer to access the communication network. In another embodiment, the communication network is a Layer 3 network (also called a three-level network), including three network layers: an access layer, an aggregation layer, and a core layer. Each access layer, aggregation layer, and core layer includes at least one network device, and the network devices in the aggregation layer are communicatively connected to the network devices in the access layer and the core layer, respectively. End-side devices are communicatively connected to the network devices in the access layer to access the communication network. In an optional embodiment, network devices in the access layer are fully interconnected with network devices in the aggregation layer, and network devices in the aggregation layer are fully interconnected with network devices in the core layer. That is, each network device in the access layer is communicatively connected to all network devices in the aggregation layer, and each network device in the aggregation layer is communicatively connected to all network devices in the core layer.

[0057] In this context, network devices located in the access layer are also called access network devices or access equipment; network devices located in the aggregation layer are also called aggregation network devices or aggregation equipment; and network devices located in the core layer are also called core network devices or core equipment. For example, access network devices are access switches, aggregation network devices are aggregation switches, and core network devices are core switches. Access switches can be top-of-rack (TOR) switches or leaf switches, and aggregation switches can be spine switches.

[0058] In this context, the edge device can be a server, a virtual machine (VM) deployed on a server, or a container deployed on a server. The server can be any type of server, such as a computing server or a storage server. The computing server provides computing services. The storage server provides storage services. The computing server can be a general-purpose computing server or a dedicated computing server. A general-purpose computing server provides general-purpose computing services. A dedicated computing server provides dedicated computing services. For example, a general-purpose computing server is a central processing unit (CPU) server, and a dedicated computing server is an AI training server; further, an AI training server can be a graphics processing unit (GPU) server. A storage server can be a solid-state drive (SSD) server or a hard disk drive (HDD) server, etc. In some embodiments, the edge device can also be a terminal device. The terminal device can be a host, mobile phone, tablet computer, laptop computer, desktop computer, television, in-vehicle terminal, or personal digital assistant (PDA), etc. In this embodiment, the edge devices accessing the communication network can form an edge device cluster. For example, the end-side devices connected to this communication network are all servers, and the servers connected to this communication network constitute a server cluster.

[0059] This explanation uses a Layer 2 communication network as an example. For further details, please refer to [link / reference]. Figure 1 This illustration shows a schematic diagram of an application scenario provided by an embodiment of this application. The application scenario includes a communication network 10 and end-side devices 201-206 accessing the communication network 10. The communication network 10 is used for traffic forwarding between end-side devices 201-206 to enable communication between them. The communication network 10 includes network devices 101-111, and the communication network 10 includes an access layer (…). Figure 1 (not marked in the text) and convergence layer ( Figure 1(Not shown in the diagram). Network devices 101-106 are located in the access layer, and network devices 107-111 are located in the aggregation layer. Therefore, network devices 101-106 are access network devices, and network devices 107-111 are aggregation network devices. Each network device 101-106 is communicatively connected to all network devices 107-111, meaning that network devices 101-106 are fully interconnected with network devices 107-111. End-side device 201 is communicatively connected to network device 101 to access communication network 10 through network device 101. End-side device 202 is communicatively connected to network device 102 to access communication network 10 through network device 102. End-side device 203 is communicatively connected to network device 103 to access communication network 10 through network device 103. And so on. That is, the end devices 201 to 206 are connected to the network devices 101 to 106 in a one-to-one communication connection so as to access the communication network 10 through the network devices 101 to 106.

[0060] Let's take a three-layer communication network as an example. For further details, please refer to... Figure 2 This illustration shows a schematic diagram of another application scenario provided by an embodiment of this application. This application scenario includes a communication network 10 and end-side devices 201-206 accessing the communication network 10. The communication network 10 is used for traffic forwarding between end-side devices 201-206 to enable communication between them. The communication network 10 includes network devices 101-113, and the communication network 10 includes an access layer (…). Figure 2 (not marked in the text), convergence layer ( Figure 2 (not marked in the text) and core layer ( Figure 2 (Not shown in the diagram). Network devices 101-106 are located in the access layer, network devices 107-111 are located in the aggregation layer, and network devices 112-113 are located in the core layer. Therefore, network devices 101-106 are access network devices, network devices 107-111 are aggregation network devices, and network devices 112-113 are core network devices. Each network device in network devices 101-106 is communicatively connected to all network devices in network devices 107-111, and each network device in network devices 107-111 is communicatively connected to all network devices in network devices 112-113. That is, network devices 101-106 are fully interconnected with network devices 107-111, and network devices 107-111 are fully interconnected with network devices 112-113. End-side devices 201-206 are communicatively connected to network devices 101-106 in a one-to-one correspondence to access the communication network 10 through network devices 101-106.

[0061] It should be noted that, Figure 1 and Figure 2The application scenarios illustrated are for illustrative purposes only and are not intended to limit the technical solutions of the embodiments of this application. In practical applications, these application scenarios may also include other devices, and the application scenario can be configured as needed. For example, in some embodiments, the application scenario further includes a network manager for managing the communication network, which can also be used to manage end-side devices accessing the communication network. If the network manager cannot manage the end-side devices accessing the communication network, the application scenario may further include a manager for managing the end-side devices, and the manager for managing the end-side devices and the network manager for managing the communication network can communicate with each other. For another example... Figure 1 and Figure 2 Taking the example of each access network device having one end-side device attached, and each end-side device accessing the communication network through one access network device, in practical applications, each access network device can have one or more end-side devices attached, and an end-side device can access the communication network through one or more access network devices. Different end-side devices attached to the same access network device can communicate through that access network device without the involvement of upper-layer network devices such as aggregation network devices or core network devices. Different end-side devices attached to different access network devices require access network devices, aggregation network devices, and core network devices to communicate. Furthermore, the communication network topology can also be other topologies. For example, aggregation network devices and access network devices may not be fully interconnected, and / or, aggregation network devices and core network devices may not be fully interconnected. Figure 1 Taking a Layer 2 communication network as an example, Figure 2 Taking a three-layer communication network as an example, the communication network can also be a network with more than three layers, which will not be elaborated here in the embodiments of this application.

[0062] To improve the throughput of communication networks and reduce message transmission and task completion times, communication networks increasingly employ packet spray (PS) load balancing (LB) technology for multi-path load balancing of traffic. For example, the end-side devices accessing a communication network include source and destination devices. The communication network uses packet spray load balancing to forward traffic from the source device to the destination device. Specifically, after receiving traffic from the source device (i.e., the access network device directly connected to the source device), the access network device uses packet spray load balancing to forward multiple packets belonging to that traffic through multiple links between the access network device and multiple aggregation switching devices. Finally, these multiple packets reach the destination device through multiple paths. After receiving these multiple packets, the destination device performs order-preserving processing to restore the order of the multiple packets. For example... Figure 1 or Figure 2 As shown, the source device is end-side device 201, the destination device is end-side device 206, and the access network device corresponding to the source device is network device 101. After receiving the traffic from end-side device 201, network device 101 uses per-packet load balancing technology to forward packets belonging to the traffic through the five links between network device 101 and network devices 107 to 111.

[0063] However, packet loss is inevitable during traffic transmission in communication networks, leading to lower reliability of communication between end-devices. For example, in practical applications, communication networks inevitably experience link interruptions, interface interruptions, and other faults. These faults may cause packet loss in traffic sent from the source device to the destination device, resulting in lower reliability of communication between the source and destination devices.

[0064] Typically, after a packet loss is detected, the destination device handles it according to the Transmission Control Protocol (TCP) congestion avoidance mechanism. For example, the destination device might instruct the source device to retransmit lost packets or reduce its transmission rate. However, this significantly reduces the throughput of the communication network and decreases the efficiency of the end-side devices (e.g., reducing their computational efficiency). This is especially true in large communication networks, where the impact of TCP congestion avoidance on network throughput and end-side device efficiency is more pronounced. Specifically, large communication networks have numerous interfaces and links, each susceptible to intermittent outages. Packet loss due to link or interface outages is significant in large networks, thus the impact of TCP congestion avoidance on network throughput and end-side device efficiency is substantial. For instance, links between network devices and between network devices and end-side devices are primarily fiber optic links; statistics show that the failure rate of fiber optic cables and optical modules is 0.057% per month. A communication network includes an access layer and an aggregation layer. The access layer includes 1,000 network devices, and the aggregation layer includes 250 network devices. 100,000 end-side devices (such as servers) are connected to this communication network. Considering only the link between the access layer and the aggregation layer, the number of intermittent outages exceeds 100 times per month, and the number of intermittent outages is about 3 to 4 times per day. Therefore, packet loss caused by link intermittent outages, interface intermittent outages, and other faults is more pronounced in large-scale communication networks.

[0065] This application provides a communication method, apparatus, and system that can ensure communication reliability (e.g., ensure the reliability of communication between end-side devices). Specifically, after a first device acquires multiple data packets of a first data stream, it generates at least one safeguard message based on the multiple data packets and sends the multiple data packets and the at least one safeguard message through multiple first paths used for transmitting the first data stream between the first device and a second device. The at least one safeguard message is used by the second device to recover lost packets from the multiple data packets. After receiving the at least one safeguard message and at least one data packet from the multiple data packets, the second device can recover the lost packets from the multiple data packets based on the at least one safeguard message. Thus, this application provides that the second device can recover lost packets from the multiple data packets by generating at least one safeguard message based on the multiple data packets, thereby ensuring the reliability of communication between the first device and the second device. Furthermore, this application does not require processing according to the TCP congestion avoidance mechanism, which can ensure the throughput of the communication network and the working efficiency of the end-side devices.

[0066] In this embodiment, the source device and destination device of the first data stream are connected to the communication network through different access network devices. The communication network includes multiple access network devices and multiple aggregation network devices, with each access network device communicatively connected to at least one aggregation network device. The first device may be the source device of the first data stream, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device. The second device may be the destination device of the first data stream, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device. Specifically, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device. Similarly, the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

[0067] It should be noted that the number of aggregation network devices directly connected to the access network device corresponding to the source device can be one or more. If there are multiple aggregation network devices directly connected to the access network device corresponding to the source device, the aggregation network device corresponding to the source device is one of these multiple aggregation network devices, and the specific one can be specified by the network controller. Similarly, the number of aggregation network devices directly connected to the access network device corresponding to the destination device can be one or more. If there are multiple aggregation network devices directly connected to the access network device corresponding to the destination device, the aggregation network device corresponding to the destination device is one of these multiple aggregation network devices, and the specific one can be specified by the network controller. The aggregation network device corresponding to the source device and the aggregation network device corresponding to the destination device are not the same device. In some embodiments, the access network device corresponding to the source device is also called the source access network device, the access network device corresponding to the destination device is also called the destination access network device, the aggregation network device corresponding to the source device is also called the source aggregation network device, and the aggregation network device corresponding to the destination device is also called the destination aggregation network device. For example, the access network device is a TOR switch, the source access network device can be called the source TOR (STOR), and the destination access network device can be called the destination TOR (DTOR). This application does not limit this.

[0068] For example Figure 1 As shown, the source device of the first data stream is end-side device 201, and the destination device of the first data stream is end-side device 206. The access network device corresponding to end-side device 201 is network device 101, and the access network device corresponding to end-side device 206 is network device 106. The first device can be either end-side device 201 or network device 101, and the second device can be either end-side device 206 or network device 106.

[0069] For example Figure 2As shown, the source device of the first data stream is end-side device 201, and the destination device of the first data stream is end-side device 206. The access network device corresponding to end-side device 201 is network device 101, and the aggregation network device corresponding to end-side device 201 is any one of network devices 107 to 111. The access network device corresponding to end-side device 206 is network device 106, and the aggregation network device corresponding to end-side device 206 is any one of network devices 107 to 111, and the aggregation network device corresponding to end-side device 201 is different from the aggregation network device corresponding to end-side device 206. The first device can be any one of end-side device 201, network device 101, or network devices 107 to 111; the second device can be any one of end-side device 206, network device 105, or network devices 107 to 111; and the first device is different from the second device.

[0070] In one example, the first device is the source device of the first data stream, and the second device is the destination device of the first data stream. For example... Figure 1 or Figure 2 As shown, the first device is end-side device 201, and the second device is end-side device 206.

[0071] In another example, the first device is the access network device corresponding to the source device of the first data stream, and the second device is the access network device corresponding to the destination device of the first data stream. For example Figure 1 or Figure 2 As shown, the first device is network device 101, and the second device is network device 106.

[0072] In another example, the first device is the aggregation network device corresponding to the source device of the first data stream, and the second device is the aggregation network device corresponding to the destination device of the first data stream. For example Figure 2 As shown, the first device is any one of network devices 107 to 111, the second device is any one of network devices 107 to 111, and the first device is different from the second device.

[0073] The following describes the method embodiments of this application.

[0074] Please refer to Figure 3 This document illustrates a flowchart of a communication method provided in an embodiment of this application. The communication method is applied to a communication system including a first device and a second device. The first device may be a source device for a first data stream, an access network device corresponding to the source device, or an aggregation network device corresponding to the source device. The second device may be a destination device for the first data stream, an access network device corresponding to the destination device, or an aggregation network device corresponding to the destination device. See also... Figure 3 The communication method includes the following steps S301 to S306.

[0075] S301. The first device acquires multiple data packets X from the first data stream.

[0076] The plurality of data packets X can be multiple consecutive packets in the first data stream. Multiple first paths exist between the first device and the second device for transmitting the first data stream, and the number of the plurality of data packets X is less than the number of the multiple first paths. In a specific embodiment, this application uses guarantee messages to ensure reliable transmission of the first data stream; the sum of the number of the plurality of data packets X and the number of guarantee messages used to ensure reliable transmission of the plurality of data packets X is equal to the number of the multiple first paths.

[0077] The plurality of first paths can be all paths between the first device and the second device used to transmit the first data stream, or it can be a subset of the paths between the first device and the second device used to transmit the first data stream; this embodiment of the application does not limit this. For example, the plurality of first paths can be all paths between the first device and the second device used to transmit the first data stream. When the plurality of first paths are a subset of the paths between the first device and the second device used to transmit the first data stream, the plurality of first paths belong to the same path group (or balanced path group, guaranteed path group). For example, the plurality of first paths can be all paths in the first path group.

[0078] In an optional embodiment, the first device obtains the plurality of data packets X of the first data stream according to the transmission guarantee policy of the first data stream. The transmission guarantee policy is the transmission guarantee policy corresponding to the plurality of first paths. For example, the plurality of first paths constitute a first path group, and the transmission guarantee policy is the transmission guarantee policy corresponding to the first path group. In a specific embodiment, the transmission guarantee policy includes a number of data packets (for ease of description, this number of data packets is referred to as the first quantity), and the first quantity is less than the number of the plurality of first paths. The first device obtains the plurality of data packets X of the first data stream according to the first quantity included in the transmission guarantee policy, and the number of the plurality of data packets X is equal to the first quantity.

[0079] In an optional embodiment, the transmission guarantee strategy further includes a number of guarantee messages corresponding to the first quantity (for ease of description, this number of guarantee messages is referred to as the second quantity). The second quantity is the number of guarantee messages used to guarantee the reliable transmission of the first quantity of data packets. The sum of the first quantity and the second quantity is equal to the number of the multiple first paths between the first device and the second device. As an example, the transmission guarantee strategy includes a correspondence between the first quantity and the second quantity, which indicates that the number of guarantee messages used to guarantee the reliable transmission of the first quantity of data packets is the second quantity. In this embodiment, the second quantity is less than the first quantity, and the difference between the first quantity and the second quantity is less than a preset difference. That is, the difference between the first quantity and the second quantity is large, and the second quantity is much smaller than the first quantity.

[0080] In an optional embodiment, this application divides the data packets of the first data stream into balanced groups for packet-based balanced transmission, and uses guarantee messages to ensure reliable transmission of data packets in each balanced group. For example, the multiple first paths used to transmit the first data stream between the first device and the second device are equal cost multiple paths (ECMP). These multiple first paths are used to load balance the packets of the first data stream using a packet-by-packet load balancing method to achieve balanced transmission. Thus, this application divides the data packets of the first data stream into balanced groups, and uses a packet-by-packet load balancing method to transmit the packets in the balanced groups through these multiple first paths. The first quantity is the number of data packets in a single balanced group, and the second quantity is the number of guarantee messages used to ensure reliable transmission of data packets in a single balanced group. In S301, the multiple data packets X obtained by the first device constitute a balanced group (for example, this balanced group is called the first balanced group).

[0081] In this embodiment, the first quantity and the second quantity are determined based on the number of the plurality of first paths between the first device and the second device used for transmitting the first data stream. The transmission guarantee policy can be generated by the first device or by the network controller. If the transmission guarantee policy is generated by the network controller, the network controller generates the transmission guarantee policy and then sends it to both the first and second devices. If the transmission guarantee policy is generated by the first device, the first device generates the transmission guarantee policy and then sends it to the second device. Regardless of whether the transmission guarantee policy is generated by the first device or the network controller, the number of the plurality of first paths between the first device and the second device used for transmitting the first data stream needs to be known before generating the transmission guarantee policy.

[0082] The following explanation uses the example of a transmission guarantee strategy generated by a first device. As mentioned earlier, the first device can be the source device of the first data stream, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device. Depending on the first device, the number of multiple first paths used to transmit the first data stream between the first device and the second device may differ. Two scenarios are described below.

[0083] In the first scenario: the first device is the source device of the first data stream. The number of multiple first paths between the first device and the second device for transmitting the first data stream is equal to the number of multiple first links between the access network device corresponding to the first device and its upper-layer network device for transmitting the first data stream. The first device determines the number of multiple first links between the access network device corresponding to the first device and its upper-layer network device for transmitting the first data stream, and the first device defines the number of these multiple first links as the number of multiple first paths between the first device and the second device for transmitting the first data stream.

[0084] In one embodiment, the first device obtains the network topology of the communication network where the access network device corresponding to the first device is located. Based on the network topology, the first device determines the number of multiple first links between the access network device and its upper-layer network device used for transmitting the first data stream. For example, before obtaining the multiple data packets X of the first data stream, the first device obtains the network topology of the communication network from the network controller. In another embodiment, the first device obtains the number of multiple first links between the access network device corresponding to the first device and its upper-layer network device used for transmitting the first data stream from the network controller. For example, before obtaining the multiple data packets X of the first data stream, the first device negotiates with the network controller for the transmission of the first data stream. During the negotiation process, the network controller informs the first device of the number of multiple first links between the access network device corresponding to the first device and its upper-layer network device used for transmitting the first data stream.

[0085] In this context, the network layer where the access network device corresponding to the first device resides is the access layer, and the network layer above this access layer is the aggregation layer. Therefore, the upper-layer network device of the access network device is an aggregation network device. The multiple first links used for transmitting the first data stream between the access network device corresponding to the first device and its upper-layer network device can be all links used for transmitting the first data stream between the access network device and its upper-layer network device, or they can be a subset of the links used for transmitting the first data stream between the access network device and its upper-layer network device. For example, the multiple first links are all links used for transmitting the first data stream between the access network device corresponding to the first device and its upper-layer network device. When the multiple first links are a subset of the links used for transmitting the first data stream between the access network device corresponding to the first device and its upper-layer network device, the multiple first links belong to the same link group (or a balanced link group, a guaranteed link group). For example, the multiple first links belong to a first link group, and the multiple first links are all links in the first link group.

[0086] In the first case, S301 can be understood as follows: the first device obtains the multiple data packets X of the first data stream based on the number of multiple first links between the access network device corresponding to the first device and the upper-layer network device of the access network device for transmitting the first data stream, and the sum of the number of multiple data packets X and the number of guarantee packets used to ensure the reliable transmission of the multiple data packets X is equal to the number of multiple first links.

[0087] In the second scenario: the first device is either the access network device corresponding to the source device of the first data stream, or the first device is the aggregation network device corresponding to the source device of the first data stream. The number of the multiple first paths used to transmit the first data stream between the first device and the second device is equal to the number of the multiple first links used to transmit the first data stream between the first device and its upper-layer network device. The first device determines the number of the multiple first links used to transmit the first data stream between itself and its upper-layer network device, and the first device defines this number of first links as the number of the multiple first paths used to transmit the first data stream between itself and the second device.

[0088] In an optional embodiment, the first device obtains the network topology of the communication network in which it resides, and determines the number of multiple first links between the first device and its upper-layer network devices for transmitting the first data stream based on the network topology. For example, before obtaining the multiple data packets X of the first data stream, the first device obtains the network topology of the communication network from the network controller, or the first device obtains the network topology of the communication network based on a topology diffusion protocol. This embodiment of the application does not limit this approach.

[0089] In the case where the first device is the access network device corresponding to the source device of the first data stream, the network layer where the first device resides is the access layer, the network layer above the access layer is the aggregation layer, and the network device above the first device is the aggregation network device. In the case where the first device is the aggregation network device corresponding to the source device of the first data stream, the network layer where the first device resides is the aggregation layer, the network layer above the aggregation layer can be the core layer, and the network device above the first device can be the core network device. The multiple first links between the first device and its upper-level network devices for transmitting the first data stream can be all links between the first device and its upper-level network devices for transmitting the first data stream, or they can be a subset of the links between the first device and its upper-level network devices for transmitting the first data stream. For example, the multiple first links are all links between the first device and its upper-level network devices for transmitting the first data stream. When the multiple first links are a subset of the links between the first device and its upper-level network devices for transmitting the first data stream, the multiple first links belong to the same link group (or balanced link group, guarantee link group). For example, the multiple first links belong to the first link group, and the multiple first links are all the links in the first link group.

[0090] Regarding the second scenario, S301 can be understood as follows: The first device obtains the multiple data packets X of the first data stream based on the number of the multiple first links between the first device and the upper-layer network device of the first device for transmitting the first data stream, and the sum of the number of the multiple data packets X and the number of guarantee packets used to ensure the reliable transmission of the multiple data packets X is equal to the number of the multiple first links.

[0091] For ease of description, let "n" represent the first quantity, "m" represent the second quantity, and "w" represent the number of first paths between the first and second devices used to transmit the first data stream. Then n + m = w, where n, m, and w are all positive integers, m is less than n, and the difference between n and m is greater than a preset difference. It can be understood that the multiple data packets X acquired by the first device are n data packets X, and the number of guarantee packets used to ensure the reliable transmission of these n data packets X is m. In the first case, the first device is the source device of the first data stream, and the first device generates the n data packets X of the first data stream. In the second case, the first device is the access network device corresponding to the source device of the first data stream, or the first device is the aggregation network device corresponding to the source device of the first data stream, and the first device acquires the n data packets X from the received first data stream.

[0092] In the embodiments of this application, using a guarantee message to ensure the reliable transmission of the first data stream can mean that the guarantee message ensures the second device can recover the packets lost during the transmission of the first data stream. Using m guarantee messages to ensure the reliable transmission of n data packets can mean that the m guarantee messages ensure the second device can recover the packets lost during the transmission of the n data packets. For ease of description, in some of the following descriptions, the guarantee message used to ensure the reliable transmission of data packets will be referred to as the guarantee message corresponding to the data packet. When the data packets of the first data stream are divided into balanced groups for packet balanced transmission, the number of data packets in a single balanced group is n. The guarantee message used to ensure the reliable transmission of the data packets in the balanced group can be referred to as the guarantee message corresponding to the balanced group.

[0093] In optional embodiments, the above transmission guarantee strategy further includes a guarantee message generation strategy, which is used to generate guarantee messages corresponding to data packets (i.e., guarantee messages used to ensure reliable transmission of data packets). For example, in an embodiment of this application, data packets of the first data stream are divided into balanced groups for packet balanced transmission, and the guarantee message generation strategy is used to generate guarantee messages corresponding to the balanced groups. In a specific embodiment, the guarantee message generation strategy includes a payload generation strategy and a header generation strategy. The payload generation strategy is used to generate the payload of the guarantee message corresponding to the data packet, and the header generation strategy is used to generate the header of the guarantee message corresponding to the data packet. For example, in an embodiment of this application, data packets of the first data stream are divided into balanced groups for packet balanced transmission, and the payload generation strategy is used to generate the payload of the guarantee message corresponding to the balanced group, and the header generation strategy is used to generate the header of the guarantee message corresponding to the balanced group.

[0094] In an optional embodiment, the payload generation strategy is used to indicate whether to generate the payload of the safeguard message using an XOR operation or to generate the payload of the safeguard message using forward error correction (FEC) coding. FEC coding can be Reed-Solomon (RS) coding, Raptor coding, Bose-Chaudhuri-Hocquenghem (BCH) coding, low-density parity-check (LDPC) coding, Reed-Muller coding, etc.

[0095] In one embodiment, the payload generation strategy instructs that: an XOR operation be performed on the payloads of n data packets to obtain check data, and the payloads of m guarantee packets corresponding to the n data packets are obtained based on the check data. In one example, the payload generation strategy instructs that: an XOR operation be performed on the payloads of n data packets to obtain check data, and the check data is used as the payload of the m guarantee packets corresponding to the n data packets (the payload of the guarantee packets is the check data). In another example, the payload generation strategy instructs that: an XOR operation be performed on the payloads of n data packets to obtain check data, the check data is divided into m parts, and the m parts are used as the payloads of the m guarantee packets corresponding to the n data packets (the m parts correspond one-to-one with the m guarantee packets, and each of the m parts is used as the payload of the corresponding guarantee packet). The XOR operation on the payloads of the n data packets can be performed bit-by-bit on the payloads of the n data packets. For example, an XOR operation is performed on the first bit of the payload of n data packets, the second bit of the payload of n data packets, the third bit of the payload of n data packets, and so on. When the data packets of the first data stream are divided into equalization groups for packet equalization transmission, the n data packets belong to the same equalization group, and the m guarantee packets corresponding to the n data packets are the m guarantee packets corresponding to that equalization group.

[0096] In another embodiment, the payload generation strategy is used to instruct: FEC encoding of the payloads of n data packets to obtain check data, and obtaining the payloads of m guarantee packets corresponding to the n data packets based on the check data. In one example, the payload generation strategy is used to instruct: FEC encoding of the payloads of n data packets to obtain check data, and using the check data as the payload of the m guarantee packets corresponding to the n data packets (the payload of the guarantee packets is the check data). In another example, the payload generation strategy is used to instruct: FEC encoding of the payloads of n data packets to obtain check data, dividing the check data into m parts, and using the m parts as the payload of the m guarantee packets corresponding to the n data packets (the m parts correspond one-to-one with the m guarantee packets, and each of the m parts is the payload of the corresponding guarantee packet). When the data packets of the first data stream are divided into equalization groups for packet equalization transmission, the n data packets belong to the same equalization group, and the m guarantee packets corresponding to the n data packets are the m guarantee packets corresponding to the equalization group.

[0097] In this embodiment, the header of the guarantee message may include an identifier for the guarantee message, and the header generation strategy may include an identifier generation strategy for generating identifiers for the guarantee messages. For example, the identifier generation strategy may instruct that identifiers for m guarantee messages corresponding to the n data packets be generated based on the number of n data packets. In an optional embodiment, this application divides the data packets of the first data stream into equalization groups for packet equalization transmission, where the number of data packets in a single equalization group is n. The identifier generation strategy may instruct that identifiers for m guarantee messages corresponding to the equalization group be generated based on the identifier of the equalization group and the number of data packets in the equalization group. As an example, both the packet identifier and the balancer group identifier are sequence numbers (SNs). The identifier generation strategy indicates that SNs for the m guarantee packets corresponding to the balancer group are generated based on the balancer group's SN and the number of data packets in that balancer group. The SNs of the m guarantee packets corresponding to the balancer group belong to [k*(n+m)+n, k*(n+m)+(n+m-1)]. When m is greater than 1, the SNs of the m guarantee packets are consecutive. Here, k represents the balancer group's SN, n represents the number of data packets in the balancer group, and m represents the number of guarantee packets used to ensure reliable transmission of data packets in the balancer group. k is a natural number (i.e., 0, 1, 2, 3...), and n and m are both positive integers (i.e., 1, 2, 3...).

[0098] In an optional embodiment, the header generation strategy further includes a header structure generation strategy, which instructs that the header of the corresponding guarantee message (i.e., the guarantee message used to guarantee the reliable transmission of the n data packets) be generated based on the structure of the headers of the n data packets. The headers of the n data packets may have the same structure, and the header structure of the guarantee message corresponding to the n data packets may be the same as the header structure of the n data packets; this embodiment does not limit this.

[0099] The identifier generation strategy described above is used to generate identifiers for guarantee messages. This identifier generation strategy is also called the guarantee message identifier generation strategy. In an optional embodiment, the header of a data packet includes an identifier for the data packet. The aforementioned transmission guarantee strategy also includes a data packet identifier generation strategy (hereinafter referred to as the data packet identifier generation strategy), which is used to generate identifiers for data packets. For example, the data packet identifier generation strategy indicates that identifiers for the n data packets are generated based on the number of n data packets. In an optional embodiment, this application divides the data packets of the first data stream into equalization groups for packet equalization transmission. The number of data packets in a single equalization group is n. The data packet identifier generation strategy indicates that identifiers for the data packets in the equalization group are generated based on the identifier of the equalization group and the number of data packets in the equalization group. As an example, both the packet identifier and the balance group identifier are SNs. This packet identifier generation strategy indicates that the SNs of the data packets in the balance group are generated based on the SN of the balance group and the number of data packets in the balance group. The SNs of the n data packets in the balance group belong to [k*(n+m), k*(n+m)+(n-1)], and the SNs of the n data packets are consecutive. The meanings and values ​​of k, n, and m can be found in the previous description. As can be seen from the previous text, for any balance group, the SNs of the n data packets in the balance group belong to [k*(n+m), k*(n+m)+(n-1)], and the SNs of the m guaranteed packets corresponding to the balance group belong to [k*(n+m)+n, k*(n+m)+(n+m-1)].

[0100] In an optional embodiment, the above transmission guarantee strategy further includes a data packet recovery strategy, which corresponds to the above guarantee packet generation strategy. This data packet recovery strategy is used to recover the data packet based on the guarantee packet corresponding to the data packet. In a specific embodiment, the data packet recovery strategy includes a payload recovery strategy and a header recovery strategy. The payload recovery strategy is used to recover the payload of the data packet based on the payload of the guarantee packet corresponding to the data packet, and the header recovery strategy is used to recover the header of the data packet based on the header of the guarantee packet corresponding to the data packet. In an optional embodiment, the data packet recovery strategy is used to instruct the recovery of lost data packets from the n data packets based on the m guarantee packets corresponding to the n data packets and the unlost data packets among the n data packets; the payload recovery strategy is used to instruct the recovery of the payload of the lost data packets from the n data packets based on the payload of the m guarantee packets corresponding to the n data packets and the payload of the unlost data packets among the n data packets; the header recovery strategy is used to instruct the recovery of the header of the lost data packets from the n data packets based on the header of the m guarantee packets corresponding to the n data packets and the header of the unlost data packets among the n data packets. When the data packets of the first data stream are divided into equalization groups for packet equalization transmission, the n data packets constitute an equalization group, and the m guarantee packets corresponding to the n data packets are also the m guarantee packets corresponding to the equalization group formed by the n data packets.

[0101] In an optional embodiment, the payload recovery strategy indicates whether to recover the data packet payload using an XOR operation or to recover the data packet payload using FEC decoding. FEC decoding can be RS decoding, Raptor decoding, BCH decoding, LDPC decoding, Reed-Muller decoding, etc.

[0102] In one embodiment, the payloads of m safeguard messages corresponding to n data packets are obtained based on verification data obtained by XORing the payloads of the n data packets. The payload recovery strategy instructs that: verification data is obtained based on the payloads of the m safeguard messages corresponding to the n data packets; and an XOR operation is performed between the verification data and the payloads of the unlost data packets among the n data packets to obtain the payloads of the lost data packets among the n data packets. In one example, the payload of each safeguard message among the m safeguard messages corresponding to the n data packets is verification data obtained by XORing the payloads of the n data packets, and the payloads of the m safeguard messages are identical. The payload recovery strategy instructs that: the payload of any one safeguard message among the m safeguard messages corresponding to the n data packets is determined as verification data; and an XOR operation is performed between the verification data and the payloads of the unlost data packets among the n data packets to obtain the payloads of the lost data packets among the n data packets. In another example, the payload of each of the m guarantee packets corresponding to n data packets is a portion of the check data obtained by XORing the payloads of the n data packets. The payload of the m guarantee packets is obtained by dividing the check data into m parts. The payload recovery strategy indicates that the check data is recovered based on the payloads of the m guarantee packets corresponding to the n data packets. An XOR operation is performed between the check data and the payloads of the unlost data packets among the n data packets to obtain the payloads of the lost data packets among the n data packets. When the data packets of the first data stream are divided into equalization groups for packet equalization transmission, the n data packets belong to the same equalization group, and the m guarantee packets corresponding to the n data packets are the m guarantee packets corresponding to that equalization group.

[0103] In another embodiment, the payloads of the m safeguard messages corresponding to the n data packets are obtained based on check data obtained by FEC encoding the payloads of the n data packets. The payload recovery strategy instructs that: check data be obtained based on the payloads of the m safeguard messages corresponding to the n data packets; and FEC decoding be performed on the check data and the payloads of the unlost data packets among the n data packets to obtain the payloads of the lost data packets among the n data packets. In one example, the payload of each safeguard message among the m safeguard messages corresponding to the n data packets is check data obtained by FEC encoding the payloads of the n data packets, and the payloads of the m safeguard messages are identical; the payload recovery strategy instructs that: the payload of any one safeguard message among the m safeguard messages corresponding to the n data packets be determined as check data; and FEC decoding be performed on the check data and the payloads of the unlost data packets among the n data packets to obtain the payloads of the lost data packets among the n data packets. In another example, the payload of each of the m guarantee packets corresponding to n data packets is a portion of the check data obtained by FEC encoding the payload of the n data packets. The payload of the m guarantee packets is obtained by dividing the check data into m parts. The payload recovery strategy is used to indicate: recover the check data based on the payload of the m guarantee packets corresponding to the n data packets, and perform FEC decoding on the check data and the payload of the unlost data packets among the n data packets to obtain the payload of the lost data packets among the n data packets. When the data packets of the first data stream are divided into equalization groups for packet equalization transmission, the n data packets belong to the same equalization group, and the m guarantee packets corresponding to the n data packets are the m guarantee packets corresponding to the equalization group.

[0104] The header recovery strategy includes an identifier recovery strategy, which is used to recover the identifier of a data packet. For example, this identifier recovery strategy instructs that the identifier of a lost data packet be recovered from among n data packets, based on the identifiers of the unlost data packets. When data packets in a first data stream are divided into equalization groups for packet equalization transmission, this identifier recovery strategy instructs that the identifier of a lost data packet in the equalization group be recovered from the identifiers of the unlost data packets in that equalization group. For example, the identifier of a packet is an SN, and the SNs of data packets within the same equalization group are consecutive.

[0105] In an optional embodiment, the header recovery strategy further includes a header structure recovery strategy, which instructs that the headers of the lost data packets in the n data packets be recovered based on the header structure of the guarantee message (i.e., the guarantee message used to ensure the reliable transmission of the n data packets) corresponding to the n data packets. The header structures of the n data packets can be the same, and the header structure of the guarantee message corresponding to the n data packets can be the same as the header structure of the n data packets. This application embodiment does not limit this.

[0106] After acquiring the aforementioned multiple (i.e., n) data packets X, the first device can process these n data packets X. For example, the first device generates identifiers for the n data packets X and adds each data packet X's identifier to the header of each data packet X. The first device can generate identifiers for the n data packets X according to the aforementioned data packet identifier generation strategy. In a specific embodiment, the data packet identifier generation strategy is used to instruct: generate identifiers for the data packets in the balance group based on the identifier of the balance group and the number of data packets in the balance group. The n data packets X constitute a first balance group, and the first device generates the identifiers for the n data packets X based on the identifier of the first balance group and the number of the n data packets X. As an example, both the packet identifier and the balancer group identifier are SNs. The packet identifier generation strategy is used to indicate that: the SNs of the data packets in the balancer group are generated based on the SN of the balancer group and the number of data packets in the balancer group. The SNs of the n data packets in the balancer group belong to [k*(n+m), k*(n+m)+(n-1)]. The first device generates the SNs of the n data packets X based on the SN of the first balancer group and the number of the n data packets X. For example, if the SN of the first balancer group is 0, n is 4, and m is 1 (that is, using 1 guarantee packet to guarantee the reliable transmission of 4 data packets), then the SNs of the 4 data packets X in the first balancer group belong to [k*(n+m), k*(n+m)+(n-1)] = [0, 3], and the SNs of the 4 data packets X are 0, 1, 2, and 3 respectively.

[0107] As an example, the four data packets X in the first equalization group are packets X0 to X3 (i.e., packets X0, X1, X2, and X3). The serial number (SN) of packet X0 is 0, the SN of packet X1 is 1, the SN of packet X2 is 2, and the SN of packet X3 is 3. Then packets X0 to X3 can be processed as follows: Figure 4 As shown. See also Figure 4Each message in the X0-X3 sequence includes a payload and a header. The header of each message in the X0-X3 sequence includes a Layer 2 (L2) header and a Layer 3 (L3) header, and may also include other headers. The L2 header is the Ethernet header, and the L3 header is the Internet Protocol (IP) header. The header of message X0 includes the message's serial number (SN) (if the SN of message X0 is 0, in...). Figure 4 In this context, "SN=0" is used to represent the data type. The payload of message X0 is "10101101101011......". The header of message X1 includes the SN of message X1 (the SN of message X1 is 1, in...). Figure 4 In this context, "SN=1" is used to represent the sequence number (SN=1). The payload of message X1 is "11001000001000......". The header of message X2 includes the SN of message X2 (if the SN of message X2 is 0, in...). Figure 4 (In this context, "SN=2" is used to represent this), and the payload of message X2 is "01100111011100......". The header of message X3 includes the SN of message X3 (if the SN of message X3 is 0, in...). Figure 4 (In Chinese, “SN=3” is used to represent this). The payload of message X3 is “11110010000100......”.

[0108] S302. The first device generates at least one guarantee message Y based on the plurality of data packets X. The at least one guarantee message Y is used by the second device to recover lost packets in the plurality of data packets X. The sum of the number of the plurality of data packets X and the number of the at least one guarantee message Y is equal to the number of the plurality of first paths between the first device and the second device for transmitting the first data stream.

[0109] In this configuration, the at least one guarantee message Y corresponds to the plurality of data packets X. The at least one guarantee message Y is used by the second device to recover packets lost during transmission from the plurality of data packets X, thereby ensuring the reliable transmission of the plurality of data packets X. The number of the plurality of data packets X is n, and the number of the at least one guarantee message Y is m. The following description uses n data packets X and m guarantee messages Y. When the data packets of the first data stream are divided into equalization groups for packet equalization transmission, the n data packets X constitute the first equalization group.

[0110] In an optional embodiment, the first device generates the payloads of the m protection messages Y based on the payloads of the n data packets X, generates the headers of the m protection messages Y based on the headers of the n data packets X, and generates the m protection messages Y based on the payloads and headers of the m protection messages Y. For example, the first device encapsulates the header of each protection message Y outside the payload of each protection message Y to obtain each protection message Y.

[0111] In an optional embodiment, the first device generates m protection messages Y based on the n data packets X according to the protection message generation strategy. Specifically, the protection message generation strategy includes a payload generation strategy and a header generation strategy; the first device generates the payloads of the m protection messages Y based on the payloads of the n data packets X according to the payload generation strategy; and the first device generates the headers of the m protection messages Y based on the headers of the n data packets X according to the header generation strategy.

[0112] In one embodiment, the payload generation strategy is used to instruct the generation of the payload of the safeguard messages using an XOR operation. The first device generates the payload of the m safeguard messages Y based on the payloads of the n data packets X using an XOR operation. In a specific embodiment, the payload generation strategy instructs: performing an XOR operation on the payloads of the n data packets to obtain checksum data, and then obtaining the payload of the m safeguard messages corresponding to the n data packets based on the checksum data. According to this payload generation strategy, the first device performs an XOR operation on the payloads of the n data packets X to obtain checksum data A, and then obtains the payload of the m safeguard messages Y based on the checksum data A. In one example, the payload generation strategy instructs: performing an XOR operation on the payloads of the n data packets to obtain checksum data, and then using the checksum data as the payload of the m safeguard messages corresponding to the n data packets. According to this payload generation strategy, the first device performs an XOR operation on the payloads of the n data packets X to obtain check data A. The first device uses check data A as the payload of the m guarantee packets Y, and the payloads of the m guarantee packets Y are all check data A. When m is greater than 1, the payloads of the m guarantee packets Y are the same. In this way, even if a guarantee packet Y is lost during transmission, the second device can recover the lost packet from the n data packets X based on the unlost guarantee packets Y. In another example, this payload generation strategy is used to instruct: perform an XOR operation on the payloads of the n data packets to obtain check data, divide the check data into m parts, and use the m parts as the payloads of the m guarantee packets corresponding to the n data packets. According to this payload generation strategy, the first device performs an XOR operation on the payloads of the n data packets X to obtain check data A, divides check data A into m parts, and uses the m parts of check data A as the payloads of the m guarantee packets Y. In this system, each of the m parts of the verification data A corresponds one-to-one with one of the m guarantee messages Y. The first device uses each of these m parts as the payload of the corresponding guarantee message Y. When m equals 1, the payload of the m guarantee messages Y is the verification data A; when m is greater than 1, the payload of each of the m guarantee messages Y is a part of the verification data A. The payloads of the m guarantee messages Y are different, which avoids the payload of a single guarantee message Y being too large, thereby preventing a single guarantee message Y from occupying too much network bandwidth. The XOR operation on the payloads of the n data packets can be performed bit-by-bit.

[0113] In another embodiment, the payload generation strategy is used to instruct the generation of the payload of the safeguard messages using FEC encoding. The first device generates the payload of the m safeguard messages Y based on the payloads of the n data packets X using FEC encoding. Specifically, in this embodiment, the payload generation strategy instructs: to perform FEC encoding on the payloads of the n data packets to obtain check data, and to obtain the payloads of the m safeguard messages corresponding to the n data packets based on the check data. According to this payload generation strategy, the first device performs FEC encoding on the payloads of the n data packets X to obtain check data A, and the first device obtains the payloads of the m safeguard messages Y based on the check data A. In one example, the payload generation strategy instructs: to perform FEC encoding on the payloads of the n data packets to obtain check data, and to use the check data as the payload of the m safeguard messages corresponding to the n data packets. According to this payload generation strategy, the first device performs FEC encoding on the payloads of the n data packets X to obtain check data A. The first device uses check data A as the payload of the m guarantee packets Y, and the payload of the m guarantee packets Y is check data A. When m is greater than 1, the payloads of the m guarantee packets Y are the same. In this way, even if a guarantee packet Y is lost during transmission, the second device can recover the lost packet from the n data packets X based on the unlost guarantee packet Y. In another example, this payload generation strategy is used to instruct: perform FEC encoding on the payloads of n data packets to obtain check data, divide the check data into m parts, and use the m parts as the payload of the m guarantee packets corresponding to the n data packets. According to this payload generation strategy, the first device performs FEC encoding on the payloads of the n data packets X to obtain check data A, divides check data A into m parts, and uses the m parts of check data A as the payload of the m guarantee packets Y. In this system, each of the m parts of the verification data A corresponds one-to-one with one of the m guarantee messages Y. The first device uses each of these m parts as the payload of the corresponding guarantee message Y. When m equals 1, the payload of the m guarantee messages Y is the verification data A; when m is greater than 1, the payload of each of the m guarantee messages Y is a part of the verification data A. The payloads of the m guarantee messages Y are different, which avoids the payload of a single guarantee message Y being too large, thereby preventing a single guarantee message Y from occupying too much network bandwidth.

[0114] In an optional embodiment, the header of each of the m protection messages Y includes an identifier for that protection message Y, and the identifiers of the m protection messages Y are determined based on the number of the n data packets X. For example, the n data packets X constitute a first equalization group, and the identifiers of the m protection messages Y are determined based on the number of the n data packets X and the identifier of the first equalization group. The above-mentioned header generation strategy may include an identifier generation strategy (i.e., a protection message identifier generation strategy), and the first device may generate the identifiers of the m protection messages Y according to the identifier generation strategy. For example, the identifier generation strategy is used to instruct the generation of identifiers for the m protection messages corresponding to the n data packets based on the number of the n data packets. According to the identifier generation strategy, the first device generates the identifiers of the m protection messages Y based on the number of the n data packets X. In an optional embodiment, this application divides the data packets of the first data stream into equalization groups for packet equalization transmission. The number of data packets in a single equalization group is n. The identifier generation strategy is used to instruct the generation of identifiers for m guarantee packets corresponding to the equalization group based on the identifier of the equalization group and the number of data packets in the equalization group. The n data packets X constitute the first equalization group. According to the identifier generation strategy, the first device generates the identifiers for the m guarantee packets Y based on the identifier of the first equalization group and the number of the n data packets X. As an example, both the packet identifier and the equalization group identifier are SN. The identifier generation strategy is used to instruct the generation of SNs for the m guarantee packets corresponding to the equalization group based on the SN of the equalization group and the number of data packets in the equalization group. The SNs for the m guarantee packets corresponding to the equalization group belong to [k*(n+m)+n, k*(n+m)+(n+m-1)]. According to the identifier generation strategy, the first device generates the SNs for the m guarantee packets Y based on the SN of the first equalization group and the number of the n data packets X. For example, if the SN of the first balanced group is 0, n is 4, and m is 1, then the SN of the 1 guarantee message Y belongs to [k*(n+m)+n, k*(n+m)+(n+m-1)]=[4], and the SN of the 1 guarantee message Y is 4.

[0115] In an optional embodiment, the header generation strategy further includes a header structure generation strategy. This header structure generation strategy instructs the generation of headers for the corresponding safeguard messages (i.e., safeguard messages used to ensure reliable transmission of the n data packets) based on the header structures of the n data packets X. The first device generates headers for the m safeguard messages Y based on the header structures of the n data packets X. The header structures of the m safeguard messages Y are the same as those of the headers of the n data packets X. For example, the headers of the n data packets X all include L2 and L3 headers, and the headers of the m safeguard messages Y all include L2 and L3 headers. Furthermore, the information carried in the L2 headers of the m safeguard messages Y is wholly or partially the same as the information carried in the L2 headers of the n data packets X, and the information carried in the L3 headers of the m safeguard messages Y is wholly or partially the same as the information carried in the L3 headers of the n data packets X. For example, each of the n data packets X carries a 5-tuple in its header, and each of the m guarantee packets Y carries a 5-tuple in its header. The 5-tuple information in the headers of the m guarantee packets Y is the same as that in the n data packets X. The 5-tuple information includes the source IP address, destination IP address, source port number, destination port number, and protocol number.

[0116] As an example, with n = 4 and m = 1, the first device generates one guarantee message Y based on four data packets X. These four data packets X are... Figure 4 The examples shown are messages X0 to X3, where the single guarantee message Y is message Y0, and the payload of message Y0 is generated by the first device using an XOR operation. Please refer to [link / reference]. Figure 5 The diagram illustrates how a first device generates message Y0 based on messages X0 to X3. The first device generates the message header of message Y0 based on the message headers of messages X0 to X3. The message header of each message in X0 to X3 includes an L2 header and an L3 header, and the message header of each message in X0 to X3 includes the SN of that message. The message header of message Y0 includes an L2 header and an L3 header, and the message header of message Y0 includes the SN of message Y0 (the SN of message Y0 is 4, in...). Figure 5 (In this example, "SN=4" is used). The first device performs an XOR operation on the payloads of messages X0 to X3 to obtain checksum data, which is then used as the payload of message Y0. Specifically, the first device performs an XOR operation on each bit of the payloads of messages X0 to X3. That is, the first device performs an XOR operation on the first bit of the payloads of messages X0 to X3, the second bit of the payloads of messages X0 to X3, the third bit of the payloads of messages X0 to X3, and so on. Figure 5As shown, the first bit of the payload of message X0 is 1, the first bit of the payload of message X1 is 1, the first bit of the payload of message X2 is 0, and the first bit of the payload of message X3 is 1. The result of an XOR operation on the first bit of the payloads of messages X0 to X3 is 1. The second bit of the payload of message X0 is 0, the second bit of the payload of message X1 is 1, the second bit of the payload of message X2 is 1, and the second bit of the payload of message X3 is 1. The result of an XOR operation on the second bit of the payloads of messages X0 to X3 is 1. The third bit of the payload of message X0 is 1, the third bit of the payload of message X1 is 0, the third bit of the payload of message X2 is 1, and the third bit of the payload of message X3 is 1. The result of an XOR operation on the third bit of the payloads of messages X0 to X3 is 1. And so on.

[0117] Figure 5 Taking the example of using the XOR operation of the payloads of n data packets X to obtain the checksum data as the payload of m guarantee packets, this method applies to both cases where m equals 1 and cases where m is greater than 1. When m is greater than 1, the checksum data obtained by XORing the payloads of the n data packets X can also be divided into m parts as the payloads of the m guarantee packets. Furthermore, the checksum data can be obtained by FEC encoding the payloads of the n data packets X. In addition, any other possible methods can be used to encode and / or calculate the payloads of the n data packets X to obtain the checksum data; these will not be elaborated upon in this embodiment.

[0118] S303. The first device sends the multiple data packets X and the at least one security packet Y through the multiple first paths.

[0119] The multiple data packets X are the aforementioned n data packets X, and the at least one guarantee packet Y is the aforementioned m guarantee packets. For ease of description, this step is described using n data packets X and m guarantee packets Y. The sum of the number of the n data packets X and the number of the m guarantee packets Y equals the number of the multiple first paths between the first device and the second device.

[0120] In an optional embodiment, the first device employs a per-packet load balancing method, sending the n data packets X and the m guarantee packets Y through the multiple first paths. The n data packets X and the m guarantee packets Y (a total of n+m packets) correspond one-to-one with the multiple first paths. That is, each of the n+m packets corresponds to one of the multiple first paths, and any two packets correspond to different paths. The first device sends each packet through the corresponding path within the multiple first paths.

[0121] In one embodiment, the first device is the source device of the first data stream. The first device sends the n+m packets (i.e., the n data packets and the m guarantee packets) to the access network device through the link between the first device and the access network device corresponding to the first device. After receiving the n+m packets, the access network device uses a per-packet load balancing method to send the n+m packets through the aforementioned multiple first links (the number of the multiple first links is equal to n+m) used for transmitting the first data stream between the access network device and the upper-layer network device of the access network device, thereby realizing the transmission of the n+m packets through the aforementioned multiple first paths using a per-packet load balancing method.

[0122] In another embodiment, the first device is an access network device corresponding to the source device of the first data stream or an aggregation network device corresponding to the source device. The first device adopts a packet-by-packet load balancing method, and sends the n+m packets (i.e., the n data packets and the m guarantee packets) through the multiple first links (the number of the multiple first links is equal to n+m) used to transmit the first data stream between the first device and the upper-layer network device of the first device, thereby realizing the transmission of the n+m packets through the multiple first paths using a packet-by-packet load balancing method.

[0123] S304. The second device receives at least one safeguard message Y and at least one data message X of the first data stream, wherein the at least one safeguard message Y is generated by the first device based on a plurality of data messages X of the first data stream, and the plurality of data messages X includes the at least one data message X.

[0124] The multiple data packets X are the same as the aforementioned n data packets X, and the at least one guarantee packet Y is the same as the aforementioned m guarantee packets. For ease of description, this step is described using n data packets X and m guarantee packets Y.

[0125] The at least one data packet X received by the second device may be all or part of the n data packets X. For example, if no packet loss occurs during the transmission of the n data packets X from the first device to the second device, the at least one data packet X is all of the n data packets X. If packet loss occurs during the transmission of the n data packets X from the first device to the second device, the at least one data packet X is part of the n data packets X.

[0126] S305. The second device determines, based on the at least one data packet X, that the first data packet among the plurality of data packets X is lost.

[0127] The multiple data packets X are the same as the aforementioned n data packets X, and this step is still described using n data packets X. The first data packet is any one of the n data packets X. That is, during the transmission of the n data packets X from the first device to the second device, any one of the n data packets X may be lost.

[0128] After receiving the m guarantee messages Y and the at least one data message X, the second device identifies each data message X based on the identifier of each data message X in the at least one data message X. After identifying the at least one data message X, the second device determines whether the n data messages X have been lost based on the at least one data message X. In an optional embodiment, the second device determines whether the n data messages X have been lost based on the at least one data message X and the transmission guarantee policy of the first data stream. For example, the transmission guarantee policy includes a first quantity (i.e., n), and the second device determines whether the quantity of the at least one data message X is less than n. If the quantity of the at least one data message X is less than n, the second device determines that the n data messages X have been lost. If the quantity of the at least one data message X is equal to n, the second device determines that the n data messages X have not been lost. In the case of n data messages X being lost, the second device can also determine the lost messages among the n data messages X based on the at least one data message X. For example, the second device determines the lost packets among the n data packets X based on the identifier of the at least one data packet X and the distribution of the identifiers of the n data packets X. This embodiment of the application uses the second device determining the loss of the first data packet among the n data packets X as an example.

[0129] The second device can also identify each of the m guarantee messages Y based on the identifier of each guarantee message Y. For ease of description, let's take the example where the at least one data packet X consists of v data packets X, where v is a positive integer not greater than n. That is, in S304, the second device receives m+v packets, which include m guarantee messages Y and v data packets X. The following describes the implementation process of the second device identifying the m guarantee messages Y and the v data packets X from the m+v packets, and the implementation process of the second device determining the lost data packets (e.g., the first data packet) among the n data packets X based on the v data packets X.

[0130] In an optional embodiment, this application divides the data packets of the first data stream into equalization groups for packet equalization transmission. The number of data packets in a single equalization group is n, and m guarantee packets are used to ensure reliable transmission of the data packets in a single equalization group. The n data packets X constitute the first equalization group, and the m guarantee packets Y are the guarantee packets corresponding to the n data packets X, and also the guarantee packets corresponding to the first equalization group. The identifiers of the n data packets X and the identifiers of the m guarantee packets Y are generated by the first device based on the identifier of the first equalization group and the number of the n data packets X (that is, the number of data packets in the first equalization group, or the number of data packets in a single equalization group). For each of the m+v packets: the second device determines the load balancer group associated with the packet based on its identifier (if the packet is a data packet, the associated load balancer group is the load balancer group to which the packet belongs; if the packet is a guarantee packet, the associated load balancer group is the load balancer group to which the packet corresponds); the second device identifies the packet (i.e., determines whether the packet is a data packet or a guarantee packet) based on the packet's identifier, the identifier distribution of data packets in the associated load balancer group, and the identifier distribution of guarantee packets corresponding to the associated load balancer group. In this way, the second device can identify the m guarantee packets Y and the v data packets X from the m+v packets. After identifying the v data packets X, the second device determines the lost packets among the n data packets X based on the identifiers of the v data packets X and the identifier distribution of data packets in the load balancer groups to which the v data packets X belong.

[0131] As an example, both the packet identifier and the balance group identifier are SNs. The SNs of the n data packets in any balance group belong to [k*(n+m), k*(n+m)+(n-1)], and the SNs of the m guarantee packets corresponding to any balance group belong to [k*(n+m)+n, k*(n+m)+(n+m-1)], where the SNs of the n data packets in the same balance group are consecutive. When m is greater than 1, the SNs of the m guarantee packets corresponding to the same balance group are consecutive. k represents the SN of the balance group, n represents the number of data packets in the balance group, and m represents the number of guarantee packets, where n and m are both positive integers. The SN distribution of data packets in a balance group (i.e., the identifier distribution) can be represented by the range of SN remainders corresponding to the data packets, and the SN distribution of guarantee packets corresponding to a balance group (i.e., the identifier distribution) can be represented by the range of SN remainders corresponding to the guarantee packets. For example, the range of the SN remainder for a data packet is [0, n-1], while the range of the SN remainder for a guarantee packet is [n, n+m-1]. Specifically, the range of the SN remainder for a data packet consists of consecutive natural numbers within [0, n-1], while the range of the SN remainder for a guarantee packet consists of consecutive natural numbers within [n, n+m-1]. For each of the m+v packets: the second device divides the packet's SN by n+m (the second device can know the specific values ​​of n and m in advance; for example, the second device can obtain the transmission guarantee policy of the first data stream in advance, which includes the specific values ​​of n and m); the second device determines the quotient and remainder obtained by dividing the packet's SN by n+m; the second device determines the quotient obtained by dividing the packet's SN by n+m as the SN of the balance group associated with the packet (that is, the second device identifies the balance group associated with the packet); the second device determines the SN remainder range of the remainder obtained by dividing the packet's SN by n+m; if the remainder obtained by dividing the packet's SN by n+m is within the SN remainder range corresponding to a data packet, the second device determines that the packet is a data packet; if the remainder obtained by dividing the packet's SN by n+m is within the SN remainder range corresponding to a guarantee packet, the second device determines that the packet is a guarantee packet. In this way, the second device can identify the m guarantee messages Y and the v data messages X from the m+v messages, and determine that the v data messages X belong to the first equalization group. The second device determines the SN of all data messages in the first equalization group (i.e., the SN distribution of data messages in the first equalization group) based on the SN of the first equalization group, n+m, and the SN remainder range of the corresponding data messages. The second device then determines the lost messages in the first equalization group (i.e., the lost messages among the n data messages) based on the SNs of the v data messages X and the SNs of all data messages in the first equalization group.For example, for each remainder in the range of SN remainders corresponding to a data packet, the second device adds the product of the SN of the first equalization group and n+m to the remainder to obtain the SN of a data packet in the first equalization group. In this way, the second device can obtain the SNs of all data packets in the first equalization group.

[0132] As an example, if n is 4 and m is 1, then n + m = 5, and the range of the SN remainder for the data packet is [0, n-1] = [0, 3]. This ensures that the range of the SN remainder for the guaranteed packet is [n, n+m-1] = [4]. Let the n data packets X be... Figure 5 The messages X0 to X3 shown are the same as the single guarantee message Y. Figure 5The following example illustrates message Y0. Assume that during the transmission of messages X0~X3 and Y0 from the first device to the second device, message X0 is lost. Then, the v data messages X are messages X1~X3. In S304, the m+v messages received by the second device are messages X1~X3 and message Y0. The SN of message X1 is 1, the SN of message X2 is 2, the SN of message X3 is 3, and the SN of message Y0 is 4. For message X1: The second device divides the SN of message X1 by n+m (i.e., 1 divided by 5) to obtain a quotient of 0 and a remainder of 1. Therefore, the second device determines that the SN of the equalization group associated with message X1 is 0 (for example, the equalization group with SN 0 is called equalization group 0). Since the remainder "1" obtained by dividing the SN of message X1 by n+m is within the remainder range "[0, 3]" of the SN corresponding to the data message, the second device determines that message X1 is a data message in equalization group 0. For message X2: The second device divides the SN of message X2 by n+m (i.e., 2 divided by 5) to obtain a quotient of 0 and a remainder of 2; therefore, the second device determines that the balance group associated with message X2 is balance group 0; since the remainder "2" obtained by dividing the SN of message X2 by n+m is within the range "[0, 3]" of the SN remainder corresponding to the data message, the second device determines that message X2 is a data message in balance group 0. For message X3: The second device divides the SN of message X3 by n+m (i.e., 3 divided by 5) to obtain a quotient of 0 and a remainder of 3; therefore, the second device determines that the balance group associated with message X3 is balance group 0; since the remainder "3" obtained by dividing the SN of message X3 by n+m is within the range "[0, 3]" of the SN remainder corresponding to the data message, the second device determines that message X3 is a data message in balance group 0. For message Y0: The second device divides the SN of message Y0 by n+m (i.e., 4 divided by 5) to obtain a quotient of 0 and a remainder of 4; therefore, the second device determines that the balance group associated with message Y0 is balance group 0; since the remainder "4" obtained by dividing the SN of message Y0 by n+m is within the range "[4]" of the SN remainder corresponding to the guarantee message, the second device determines that message Y0 is the guarantee message corresponding to balance group 0. In this way, the second device can identify the 1 guarantee message Y and the 3 data messages X from the m+v messages, and determine that the 3 data messages X all belong to balance group 0. For each remainder in the range "[0, 3]" of the SN remainder corresponding to the data message, the second device adds the product of the SN of balance group 0 and n+m to the remainder to obtain the SN of a data message in balance group 0, and the second device can determine that the SNs of all data messages in balance group 0 are 0, 1, 2 and 3. Since there is no packet with SN 0 among the three data packets X (i.e., packets X1 to X3), the second device determines that the data packet with SN 0 (i.e., packet X0) in equalization group 0 is lost.

[0133] S306. The second device recovers the first data packet based on the at least one safeguard message Y.

[0134] The at least one protection message Y is the same as the aforementioned m protection messages Y, and this step is described using m protection messages Y. The m protection messages Y are generated by the first device based on the aforementioned n data messages X, and the first data message is one of the n data messages X.

[0135] In an optional embodiment, the second device recovers the payload of the first data packet based on the payloads of the m protection messages Y, the second device recovers the header of the first data packet based on the headers of the m protection messages Y, and the second device recovers the first data packet based on the payload and header of the first data packet. For example, the first device encapsulates the header of the first data packet outside the payload of the first data packet to obtain the first data packet.

[0136] In an optional embodiment, the second device recovers the first data packet based on the m protection messages Y according to the data packet recovery strategy. Specifically, the data packet recovery strategy includes a payload recovery strategy and a header recovery strategy; the second device recovers the payload of the first data packet based on the payload of the m protection messages Y according to the payload recovery strategy; and the second device recovers the header of the first data packet based on the header of the m protection messages Y according to the header recovery strategy.

[0137] In an optional embodiment, the data packet recovery strategy is used to instruct the recovery of lost data packets from the n data packets based on m guarantee packets corresponding to the n data packets and the unlost data packets from the n data packets. According to the data packet recovery strategy, the second device recovers the first data packet based on the m guarantee packets Y and at least one data packet X received by the second device. In a specific embodiment, the data packet recovery strategy includes a payload recovery strategy and a header recovery strategy. The payload recovery strategy is used to instruct the recovery of the payload of the lost data packet among the n data packets based on the payloads of the m safeguard packets corresponding to the n data packets and the payloads of the unlost data packets among the n data packets. The header recovery strategy is used to instruct the recovery of the header of the lost data packet among the n data packets based on the headers of the m safeguard packets corresponding to the n data packets and the headers of the unlost data packets among the n data packets. The second device recovers the payload of the first data packet based on the payloads of the m safeguard packets Y and the payloads of the at least one data packet X. According to the data packet recovery strategy, the second device recovers the header of the first data packet based on the headers of the m safeguard packets Y and the headers of the at least one data packet X, and according to the header recovery strategy.

[0138] In one embodiment, the payload recovery strategy is used to instruct the use of an XOR operation to recover the payload of a data packet. The second device recovers the payload of the first data packet by using an XOR operation based on the payloads of the m safeguard packets Y and the payload of the at least one data packet X. In a specific embodiment, the payload recovery strategy is used to instruct: obtaining verification data based on the payloads of the m safeguard packets corresponding to the n data packets; performing an XOR operation on the verification data and the payloads of the non-lost data packets among the n data packets to obtain the payloads of the lost data packets among the n data packets; the second device obtains verification data A based on the payloads of the m safeguard packets Y; and the second device performs an XOR operation on the verification data A and the payload of the at least one data packet X to obtain the payload of the first data packet. In one example, the payload of each of the m safeguard messages corresponding to n data packets is check data obtained by XORing the payloads of the n data packets. This payload recovery strategy instructs that: the payload of any one of the m safeguard messages corresponding to the n data packets be determined as check data; and an XOR operation is performed between this check data and the payloads of the unlost data packets among the n data packets to obtain the payload of the lost data packets among the n data packets. According to this payload recovery strategy, the second device determines the payload of any one of the m safeguard messages Y as check data A; the second device then performs an XOR operation between check data A and the payload of at least one data packet X to obtain the payload of the first data packet. In another example, the payload of each of the m safeguard messages corresponding to n data packets is a portion of the verification data obtained by XORing the payloads of the n data packets. The payloads of the m safeguard messages are divided into m parts from the verification data. The payload recovery strategy indicates that: based on the payloads of the m safeguard messages corresponding to the n data packets, the verification data is recovered; the verification data and the payloads of the unlost data packets among the n data packets are XORed to obtain the payloads of the lost data packets among the n data packets. According to this payload recovery strategy, the second device recovers the verification data A based on the payloads in the m safeguard messages Y; the second device XORs the verification data A and the payload of the at least one data packet X to obtain the payload of the first data packet.

[0139] In another embodiment, the payload recovery strategy is used to instruct the use of FEC decoding to recover the payload of the data packet. The second device uses FEC decoding to recover the payload of the first data packet based on the payloads of the m safeguard packets Y and the payload of the at least one data packet X. In a specific embodiment, the payload recovery strategy is used to instruct: to obtain verification data based on the payloads of the m safeguard packets corresponding to the n data packets; to perform FEC decoding on the verification data and the payloads of the unlost data packets among the n data packets to obtain the payloads of the lost data packets among the n data packets; the second device obtains verification data A based on the payloads of the m safeguard packets Y; and the second device performs FEC decoding on the verification data A and the payload of the at least one data packet X to obtain the payload of the first data packet. In one example, the payload of each of the m guarantee packets corresponding to n data packets is check data obtained by FEC encoding the payloads of the n data packets. The payload recovery strategy instructs that the payload of any one of the m guarantee packets corresponding to the n data packets be determined as check data, and that FEC decoding be performed on the check data and the payloads of the unlost data packets among the n data packets to obtain the payload of the lost data packets among the n data packets. According to this payload recovery strategy, the second device determines the payload of any one of the m guarantee packets Y as check data A, and the second device performs FEC decoding on check data A and the payload of at least one data packet X to obtain the payload of the first data packet. In another example, the payload of each of the m safeguard messages corresponding to n data packets is a portion of the check data obtained by FEC encoding the payloads of the n data packets. The payloads of the m safeguard messages are divided into m parts from the check data. The payload recovery strategy indicates that: based on the payloads of the m safeguard messages corresponding to the n data packets, the check data is recovered; and FEC decoding is performed on the check data and the payloads of the unlost data packets among the n data packets to obtain the payloads of the lost data packets among the n data packets. According to this payload recovery strategy, the second device recovers the check data A based on the payloads in the m safeguard messages Y. The second device performs FEC decoding on the check data A and the payload of the at least one data packet X to obtain the payload of the first data packet.

[0140] In an optional embodiment, the header of each of the m guarantee messages Y includes an identifier for that guarantee message Y, and the header of each of the n data messages X includes an identifier for that data message X. The header recovery strategy includes an identifier recovery strategy, which is used to recover the identifier of a data message. The second device recovers the identifier of the first data message according to this identifier recovery strategy. For example, the identifier recovery strategy can instruct the recovery of the identifier of a lost data message from the n data messages based on the identifiers of the unlost data messages. According to this identifier recovery strategy, the second device recovers the identifier of the first data message based on the identifier of the at least one data message X. When the data messages of the first data stream are divided into equalization groups for packet equalization transmission, the identifier recovery strategy can instruct the recovery of the identifiers of lost data messages from the equalization groups based on the identifiers of the unlost data messages in the equalization groups. For example, the identifier of a message is SN. Data packets in the same equalization group have consecutive SNs. The second device determines the SNs of the n data packets X based on the SN of the at least one data packet X (that is, it determines that the at least one data packet X belongs to the first equalization group, and the second device determines the SNs of each data packet in the first equalization group based on the SN of the at least one data packet X). The second device determines the SN of the first data packet as the SN of the at least one data packet X that is missing compared to the SNs of each data packet in the first equalization group.

[0141] In an optional embodiment, the header recovery strategy further includes a header structure recovery strategy. This header structure recovery strategy instructs the recovery of the headers of the lost data packets among the n data packets based on the structure of the headers of the guarantee messages (i.e., guarantee messages used to ensure reliable transmission of the n data packets) corresponding to the n data packets. According to this header recovery strategy, the second device recovers the header of the first data packet based on the structure of the headers of the m guarantee messages Y. For example, according to this header recovery strategy, the second device recovers the header of the first data packet based on the structure of the headers of the m guarantee messages Y and the structure of the header of the at least one data packet X.

[0142] As an example, n is 4, m is 1, and the n data packets X are Figure 5 The messages X0 to X3 shown are the same as the single guarantee message Y. Figure 5 The following example illustrates message Y0. The payload of message Y0 is obtained by the first device performing an XOR operation on the payloads of messages X0 to X3 to obtain checksum data. During the transmission of messages X0 to X3 and message Y0 from the first device to the second device, message X0 is lost (i.e., the first data message is X0). The second device recovers the payload of message X0 by performing an XOR operation on the payloads of messages X1 to X3 and the payload of message Y0. Please refer to [reference needed]. Figure 6The diagram illustrates how a second device reconstructs the header of message X0 based on messages X1-X3 and message Y0. The second device reconstructs the header of message X0 based on the headers of messages X1-X3 and message Y0. The header of each message in X1-X3 and message Y0 includes an L2 header and an L3 header, and the header of each message in X1-X3 and message Y0 includes the serial number (SN) of that message. The header of message X0 includes an L2 header and an L3 header, and the header of message X0 includes the SN of message X0. The second device performs an XOR operation on the payloads of messages X1-X3 and message Y0, and uses the result of the XOR operation as the payload of message X0. Specifically, the second device performs a bit-by-bit XOR operation on the payloads of messages X1-X3 and message Y0. That is, the second device performs an XOR operation on the first bit of the payload of messages X1-X3 and the first bit of the payload of message Y0; the second device performs an XOR operation on the second bit of the payload of messages X1-X3 and the second bit of the payload of message Y0; the second device performs an XOR operation on the third bit of the payload of messages X1-X3 and the third bit of the payload of message Y0, and so on. Figure 6 As shown, the first bit of the payload of message X1 is 1, the first bit of the payload of message X2 is 0, the first bit of the payload of message X3 is 1, and the first bit of the payload of message Y0 is 1. The result of an XOR operation between the first bit of the payloads of messages X1-X3 and the first bit of the payload of message Y0 is 1. The second bit of the payload of message X1 is 1, the second bit of the payload of message X2 is 1, the second bit of the payload of message X3 is 1, and the second bit of the payload of message Y0 is 1. The result of an XOR operation between the second bit of the payloads of messages X1-X3 and the second bit of the payload of message Y0 is 0. The third bit of the payload of message X1 is 0, the third bit of the payload of message X2 is 1, the third bit of the payload of message X3 is 1, the third bit of the payload of message Y0 is 1, and the result of XORing the third bit of the payload of messages X1 to X3 with the third bit of the payload of message Y0 is 1. And so on.

[0143] Figure 5Taking the example where the payload of message Y0 is the check data obtained by XORing the payloads of messages X0 to X3, the second device recovers the check data based on the payloads of the m guarantee messages (including message Y0) corresponding to messages X0 to X3, and performs an XOR operation on the check data and the payloads of messages X1 to X3 to recover the payload of the first data message. Furthermore, if the payload of message Y0 is the check data obtained by FEC encoding the payloads of messages X0 to X3, after obtaining the check data based on the payload of message Y0, the second device performs FEC decoding on the check data and the payload of the at least one data message X to recover the payload of the first data message. This will not be elaborated further in this embodiment.

[0144] In this embodiment, the second device may be the destination device of the first data stream, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device. When the second device is either the access network device or the aggregation network device corresponding to the destination device, after the second device recovers the lost packets from the n data packets X based on the m guarantee messages Y, the second device sends the n data packets X to the destination device and discards the m guarantee messages Y. Before sending the n data packets X to the destination device, the second device may perform processing on the n data packets X corresponding to that of the first device; for example, the second device may delete the identifier added by the first device in the header of each data packet X. This embodiment does not limit this process.

[0145] The above description uses the example of packet loss during the transmission of n data packets X from the first device to the second device. If no packet loss occurs during the transmission of the n data packets X from the first device to the second device, the at least one data packet X received by the second device represents all packets in the n data packets X. Based on this at least one data packet X, the second device determines that no packet loss has occurred in the n data packets X, and the second device does not perform a recovery operation. In this embodiment, if the second device is the access network device corresponding to the destination device of the first data stream or the aggregation network device corresponding to the destination device, the second device does not perform a recovery operation and sends the n data packets X to the destination device, while discarding the m guarantee packets Y. Before sending the n data packets X to the destination device, the second device may perform the processing corresponding to that of the first device on the n data packets X; this embodiment does not limit this.

[0146] In summary, the technical solution provided in this application involves a first device generating at least one guarantee message based on multiple data packets of a first data stream. The first device then transmits the multiple data packets and the at least one guarantee message through multiple first paths used for transmitting the first data stream between the first and second devices. The at least one guarantee message is used by the second device to recover lost packets from the multiple data packets. After receiving the at least one guarantee message and at least one data packet from the multiple data packets, the second device can recover the lost packets based on the at least one guarantee message. Therefore, this application embodiment ensures that the second device can recover lost packets from the multiple data packets by using at least one guarantee message generated based on multiple data packets, thereby ensuring the reliability of communication between the first and second devices. This application embodiment employs a guarantee message combined with a load balancing strategy, so even if packet loss occurs during the transmission of the first data stream from the first device to the second device due to link interruptions, interface interruptions, or other faults, the second device can still recover the lost packets, ensuring the reliability of communication.

[0147] To facilitate understanding of the technical solutions of the embodiments of this application, the technical solutions of the embodiments of this application are described below with reference to the accompanying drawings using four examples.

[0148] The following four examples illustrate how the technical solutions of this application are applied to... Figure 1 The application scenarios shown are illustrated using examples. For the sake of brevity, the accompanying diagrams for each example only show content relevant to that example. The first and second examples illustrate how the first device is the source device of the first data stream and the second device is the destination device of the first data stream. The third and fourth examples illustrate how the first device is the access network device corresponding to the source device of the first data stream and the second device is the access network device corresponding to the destination device of the first data stream.

[0149] First example: Please refer to Figure 7 This diagram illustrates a communication method provided in an embodiment of this application. End-side device 201 is the source device of the first data stream, end-side device 206 is the destination device of the first data stream, network device 101 is the access network device corresponding to end-side device 201, and network device 106 is the access network device corresponding to end-side device 206. There are five paths between end-side device 201 and end-side device 206 for transmitting the first data stream. Taking as an example, these five paths are the aforementioned multiple first paths, and n equals 4, m equals 1.

[0150] According to the transmission guarantee strategy of the first data stream, the end-side device 201 determines that n equals 4 and m equals 1. Therefore, the end-side device 201 acquires four data packets from the first data stream and generates one guarantee packet based on these four data packets. The four data packets are packets X0 to X3, and the one guarantee packet is packet Y0. The end-side device 201 sends packets X0 to X3 and packet Y0 to the network device 101.

[0151] After receiving packets X0-X3 and packet Y0, network device 101 uses a per-packet load balancing method to send packets X0-X3 and packet Y0 through the five links between network device 101 and network devices 107-111. Specifically, network device 101 sends packet X0 to network device 107 through the link between network device 101 and network device 107; network device 101 sends packet X1 to network device 108 through the link between network device 101 and network device 108; network device 101 sends packet X2 to network device 109 through the link between network device 101 and network device 109; network device 101 sends packet X3 to network device 110 through the link between network device 101 and network device 111; and network device 101 sends packet Y0 to network device 111 through the link between network device 101 and network device 111. Assuming all links between network devices 101 and network devices 107-111 are functioning correctly, network device 107 can receive message X0, network device 108 can receive message X1, network device 109 can receive message X2, network device 110 can receive message X3, and network device 111 can receive message Y0. After receiving message X0, network device 107 sends message X0 to network device 106 via the link between network device 107 and network device 106. After receiving message X1, network device 108 sends message X1 to network device 106 via the link between network device 108 and network device 106. After receiving message X2, network device 109 sends message X2 to network device 106 via the link between network device 109 and network device 106. After receiving message X3, network device 110 sends message X3 to network device 106 via the link between network device 110 and network device 106. After receiving message Y0, network device 111 sends message Y0 to network device 106 via the link between network device 111 and network device 106. After receiving messages X0-X3 and message Y0, network device 106 sends messages X0-X3 and message Y0 to end-side device 206. After receiving messages X0-X3 and message Y0, end-side device 206 determines that messages X0-X3 have not been lost, and discards message Y0.

[0152] However, as Figure 7 As shown, a link failure between network device 101 and network device 107 causes packet X0 to be lost. Therefore, network device 107 cannot receive packet X0. Network device 106 can receive packets X1-X3 and packet Y0 but cannot receive packet X0. End-side device 206 can receive packets X1-X3 and packet Y0 but cannot receive packet X0. After receiving packets X1-X3 and packet Y0, end-side device 206 determines that packet X0 is lost based on packets X1-X3, and recovers packet X0 based on packet Y0. Because end-side device 206 recovers packet X0 based on packet Y0, the communication reliability between end-side device 201 and end-side device 206 is high.

[0153] Second example: Please refer to Figure 8 This diagram illustrates another communication method provided in an embodiment of this application. End-side device 201 is the source device of the first data stream, end-side device 206 is the destination device of the first data stream, network device 101 is the access network device corresponding to end-side device 201, and network device 106 is the access network device corresponding to end-side device 206. There are five paths between end-side device 201 and end-side device 206 for transmitting the first data stream. Taking as an example that these five paths are the aforementioned multiple first paths, and n equals 4 and m equals 1.

[0154] According to the transmission guarantee strategy of the first data stream, the end-side device 201 determines that n equals 4 and m equals 1. Therefore, the end-side device 201 acquires four data packets from the first data stream and generates one guarantee packet based on these four data packets. The four data packets are packets X0 to X3, and the one guarantee packet is packet Y0. The end-side device 201 sends packets X0 to X3 and packet Y0 to the network device 101.

[0155] After receiving packets X0-X3 and packet Y0, network device 101 uses a per-packet load balancing method to send packets X0-X3 and packet Y0 through the five links between network device 101 and network devices 107-111. After receiving packet X0, network device 107 sends packet X0 to network device 106 through the link between network device 107 and network device 106. After receiving packet X1, network device 108 sends packet X1 to network device 106 through the link between network device 108 and network device 106. After receiving packet X2, network device 109 sends packet X2 to network device 106 through the link between network device 109 and network device 106. After receiving packet X3, network device 110 sends packet X3 to network device 106 through the link between network device 110 and network device 106. After receiving message Y0, network device 111 sends message Y0 to network device 106 via the link between network device 111 and network device 106. Assuming the links between network devices 107-111 and network device 106 are all functioning normally, network device 106 can receive messages X0-X3 and message Y0. Network device 106 then sends messages X0-X3 and message Y0 to end-side device 206. After receiving messages X0-X3 and message Y0, end-side device 206 determines that messages X0-X3 have not been lost and discards message Y0.

[0156] However, as Figure 8 As shown, a link failure between network device 107 and network device 106 causes packet X0 to be lost. Therefore, network device 106 can receive packets X1-X3 and packet Y0 but cannot receive packet X0. End-side device 206 can receive packets X1-X3 and packet Y0 but cannot receive packet X0. After receiving packets X1-X3 and packet Y0, end-side device 206 determines that packet X0 is lost based on packets X1-X3, and recovers packet X0 based on packet Y0. Because end-side device 206 recovers packet X0 based on packet Y0, the communication reliability between end-side device 201 and end-side device 206 is high.

[0157] The third example: Please refer to Figure 9 This diagram illustrates another communication method provided in an embodiment of this application. End-side device 201 is the source device of the first data stream, end-side device 206 is the destination device of the first data stream, network device 101 is the access network device corresponding to end-side device 201, and network device 106 is the access network device corresponding to end-side device 206. There are five paths between end-side device 201 and end-side device 206 for transmitting the first data stream. Taking as an example that these five paths are the aforementioned multiple first paths, and n equals 4 and m equals 1.

[0158] End-side device 201 sends a first data stream to network device 101. Network device 101 receives the first data stream. Based on the transmission guarantee policy of the first data stream, network device 101 determines that n equals 4 and m equals 1. Therefore, network device 101 acquires four data packets from the first data stream and generates one guarantee packet based on these four data packets. The four data packets are packets X0 to X3, and the one guarantee packet is packet Y0.

[0159] Network device 101 uses a per-packet load balancing method, sending packets X0-X3 and packet Y0 through five links between network device 101 and network devices 107-111. Assuming all links between network device 101 and network devices 107-111 are functioning normally, network device 107 can receive packet X0, network device 108 can receive packet X1, network device 109 can receive packet X2, network device 110 can receive packet X3, and network device 111 can receive packet Y0. After receiving packet X0, network device 107 sends packet X0 to network device 106 through the link between network device 107 and network device 106. After receiving packet X1, network device 108 sends packet X1 to network device 106 through the link between network device 108 and network device 106. After receiving packet X2, network device 109 sends packet X2 to network device 106 through the link between network device 109 and network device 106. After receiving message X3, network device 110 sends message X3 to network device 106 via the link between network device 110 and network device 106. After receiving message Y0, network device 111 sends message Y0 to network device 106 via the link between network device 111 and network device 106. After receiving messages X0-X3 and message Y0, network device 106 determines that messages X0-X3 have not been lost, and then sends messages X0-X3 to end-side device 206.

[0160] However, as Figure 9 As shown, a link failure between network device 101 and network device 107 causes packet X0 to be lost. Therefore, network device 107 cannot receive packet X0, while network device 106 can receive packets X1-X3 and packet Y0 but cannot receive packet X0. After receiving packets X1-X3 and packet Y0, network device 106 determines that packet X0 is lost based on packets X1-X3. Network device 106 recovers packet X0 based on packet Y0 and sends packets X0-X3 to end-side device 206. Because network device 106 recovered packet X0 based on packet Y0, the communication reliability between end-side device 201 and end-side device 206 is high.

[0161] Fourth example: Please refer to Figure 10 This diagram illustrates another communication method provided in an embodiment of this application. End-side device 201 is the source device of the first data stream, end-side device 206 is the destination device of the first data stream, network device 101 is the access network device corresponding to end-side device 201, and network device 106 is the access network device corresponding to end-side device 206. There are five paths between end-side device 201 and end-side device 206 for transmitting the first data stream. Taking as an example that these five paths are the aforementioned multiple first paths, and n equals 4 and m equals 1.

[0162] End-side device 201 sends a first data stream to network device 101. Network device 101 receives the first data stream. Based on the transmission guarantee policy of the first data stream, network device 101 determines that n equals 4 and m equals 1. Therefore, network device 101 acquires four data packets from the first data stream and generates one guarantee packet based on these four data packets. The four data packets are packets X0 to X3, and the one guarantee packet is packet Y0.

[0163] Network device 101 uses a per-packet load balancing method, sending packets X0-X3 and packet Y0 through five links between network device 101 and network devices 107-111. After receiving packet X0, network device 107 sends packet X0 to network device 106 through the link between network device 107 and network device 106. After receiving packet X1, network device 108 sends packet X1 to network device 106 through the link between network device 108 and network device 106. After receiving packet X2, network device 109 sends packet X2 to network device 106 through the link between network device 109 and network device 106. After receiving packet X3, network device 110 sends packet X3 to network device 106 through the link between network device 110 and network device 106. After receiving packet Y0, network device 111 sends packet Y0 to network device 106 through the link between network device 111 and network device 106. Assuming the links between network devices 107-111 and network device 106 are functioning normally, network device 106 can receive packets X0-X3 and packet Y0. After receiving packets X0-X3 and packet Y0, network device 106 determines that packets X0-X3 have not been lost, and then sends packets X0-X3 to end-side device 206.

[0164] However, as Figure 10As shown, a link failure between network device 101 and network device 107 causes packet X0 to be lost. Therefore, network device 106 can receive packets X1-X3 and packet Y0 but cannot receive packet X0. After receiving packets X1-X3 and packet Y0, network device 106 determines that packet X0 is lost based on packets X1-X3. Network device 106 recovers packet X0 based on packet Y0 and sends packets X0-X3 to end-side device 206. Because network device 106 recovered packet X0 based on packet Y0, the communication reliability between end-side device 201 and end-side device 206 is high.

[0165] It should be noted that the structures of messages X0 to X3 and message Y0 in the four examples above can be referenced. Figure 5 and Figure 6 The process by which end-side device 201 and network device 101 generate packet Y0 based on packets X0 to X3 can be referred to the relevant description in S302 above. The process by which end-side device 206 and network device 106 recover packet X0 based on packet Y0 can be referred to the relevant description in S306 above.

[0166] It should also be noted that, in this embodiment, the guarantee messages consume network resources during transmission. For example, m guarantee messages generated from n data packets may occupy m paths during transmission, which may cause some throughput loss to the communication network and increase network load. Therefore, in actual implementation, the reliable transmission guarantee scheme of this embodiment can be deployed according to actual needs.

[0167] In one implementation, the reliable transmission guarantee scheme of this application embodiment is deployed for services with high reliability requirements. For example, the reliable transmission guarantee scheme of this application embodiment is deployed on the source and destination devices of the data stream with high reliability requirements. Another example is deploying the reliable transmission guarantee scheme of this application embodiment on the access network device corresponding to the source device and the access network device corresponding to the destination device of the data stream with high reliability requirements. Yet another example is deploying the reliable transmission guarantee scheme of this application embodiment on the aggregation network device corresponding to the source device and the aggregation network device corresponding to the destination device of the data stream with high reliability requirements.

[0168] In another implementation, the reliable transmission guarantee scheme of this application embodiment is deployed for communication networks with high reliability requirements. For example, the reliable transmission guarantee scheme of this application embodiment is deployed in all access network devices in a communication network with high reliability requirements.

[0169] In another implementation, the reliable transmission guarantee scheme of this application embodiment is deployed and dynamically adjusted according to the quality of the communication network. For example, the reliable transmission guarantee scheme of this application embodiment is deployed in the communication network, and the reliable transmission guarantee scheme is enabled when the quality of the communication network is poor and disabled when the quality of the communication network is good. For example, the reliable transmission guarantee scheme is enabled when the frequency of link intermittent failures, interface intermittent failures, etc., in the communication network is high, and disabled when the frequency of link intermittent failures, interface intermittent failures, etc., in the communication network is low. The dynamic adjustment process can be controlled and executed by the network controller, or it can be manually controlled and executed; this application embodiment does not limit this.

[0170] The above is a description of the method embodiments of this application. The following describes the apparatus embodiments of this application, which are used to execute the method of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments.

[0171] This application provides a communication device applied to the aforementioned first device. The communication device includes at least one functional module, which is used to perform actions such as… Figure 3 The communication method provided in the illustrated embodiment is performed by the first device. The at least one functional module can be implemented based on software, hardware, or a combination of both, and can be arbitrarily combined or divided based on specific implementations. The communication device can be the first device or a functional component within the first device. For example, the communication device can be a chip, interface board, line card, or software-based communication device within the first device; this application embodiment does not limit this.

[0172] As an example, please refer to Figure 11 The diagram illustrates a communication device 1100 provided in an embodiment of this application. The communication device 1100 is applied to a first device. The communication device 1100 includes an acquisition module 1110, a generation module 1120, and a transmission module 1130.

[0173] The acquisition module 1110 is used to acquire multiple data packets from the first data stream.

[0174] The generation module 1120 is used to generate at least one safeguard message based on the plurality of data packets. The at least one safeguard message is used by the second device to recover lost messages in the plurality of data packets. The sum of the number of the plurality of data packets and the number of the at least one safeguard message is equal to the number of multiple first paths between the first device and the second device for transmitting the first data stream.

[0175] The sending module 1130 is used to send the multiple data packets and the at least one security packet through the multiple first paths.

[0176] The implementation of the acquisition module 1110 can be referred to the relevant description in S301 above. The implementation of the generation module 1120 can be referred to the relevant description in S302 above. The implementation of the sending module 1130 can be referred to the relevant description in S303 above.

[0177] In an optional embodiment, the generation module 1120 is configured to: generate the payload of the at least one safeguard message based on the payloads of the plurality of data packets; and generate the header of the at least one safeguard message based on the headers of the plurality of data packets.

[0178] In an optional embodiment, the generation module 1120 is configured to: perform an XOR operation on the payloads of the plurality of data packets to obtain verification data; and obtain the payload of the at least one safeguard packet based on the verification data.

[0179] In an optional embodiment, the generation module 1120 is configured to: perform FEC encoding on the payloads of the plurality of data packets to obtain check data;

[0180] The payload of the at least one safeguard message is obtained based on the verification data.

[0181] In an optional embodiment, the payload of the at least one safeguard message is the verification data; or, the payload of each safeguard message in the at least one safeguard message is a part of the verification data.

[0182] In an optional embodiment, the header of any safeguard message includes an identifier for the safeguard message, and the identifier of the at least one safeguard message is determined based on the number of the plurality of data packets.

[0183] In an optional embodiment, the plurality of data packets constitute a balance group, and the identifier of the at least one protection packet is determined based on the number of the plurality of data packets and the identifier of the balance group.

[0184] In an optional embodiment, the source device and the destination device of the first data stream are connected to the communication network through different access network devices in the communication network. The communication network includes multiple access network devices and multiple aggregation network devices, and each access network device is communicatively connected to at least one aggregation network device. The first device includes any one of the following: the source device, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device. The second device includes any one of the following: the destination device, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device. Specifically, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device; the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

[0185] In an optional embodiment, the communication network is a data center network.

[0186] In an optional embodiment, the sending module 1130 is configured to: send the multiple data packets and the at least one guarantee packet through the multiple first paths using a per-packet load balancing method.

[0187] In summary, the technical solution provided in this application involves a first device generating at least one guarantee message based on multiple data packets of a first data stream. The first device then transmits the multiple data packets and the at least one guarantee message through multiple first paths used for transmitting the first data stream between the first and second devices. The at least one guarantee message is used by the second device to recover lost packets from the multiple data packets. After receiving the at least one guarantee message and at least one data packet from the multiple data packets, the second device can recover the lost packets based on the at least one guarantee message. Therefore, this application embodiment ensures that the second device can recover lost packets from the multiple data packets by using at least one guarantee message generated based on multiple data packets, thereby ensuring the reliability of communication between the first and second devices. This application embodiment employs a guarantee message combined with a load balancing strategy, so even if packet loss occurs during the transmission of the first data stream from the first device to the second device due to link interruptions, interface interruptions, or other faults, the second device can still recover the lost packets, ensuring the reliability of communication.

[0188] This application provides another communication device applied to the second device described above. The communication device includes at least one functional module, which is used to perform, for example... Figure 3The communication method provided in the illustrated embodiment is an operation performed by a second device. The at least one functional module can be implemented based on software, hardware, or a combination of both, and can be arbitrarily combined or divided based on specific implementations. The communication device can be the second device or a functional component within the second device. For example, the communication device can be a chip, interface board, line card, or software-based communication device within the second device; this application embodiment does not limit this.

[0189] As an example, please refer to Figure 12 This illustration shows a schematic diagram of another communication device 1200 provided in an embodiment of this application. The communication device 1200 is applied to a second device. The communication device 1200 includes a receiving module 1210, a determining module 1220, and a recovery module 1230.

[0190] The receiving module 1210 is configured to receive at least one safeguard message and at least one data packet of the first data stream. The at least one safeguard message is generated by the first device based on multiple data packets of the first data stream. The multiple data packets include the at least one data packet. The at least one safeguard message is used by the second device to recover lost packets in the multiple data packets. The sum of the number of the multiple data packets and the number of the at least one safeguard message is equal to the number of multiple first paths between the first device and the second device for transmitting the first data stream.

[0191] The determination module 1220 is used to determine, based on the at least one data packet, that the first data packet among the plurality of data packets is lost.

[0192] Recovery module 1230 is used to recover the first data packet based on the at least one safeguard message.

[0193] The functionality of the receiving module 1210 can be found in the description in S304. The functionality of the determining module 1220 can be found in the description in S305. The functionality of the recovery module 1230 can be found in the description in S306.

[0194] In an optional embodiment, the recovery module 1230 is configured to: recover the first data packet based on the at least one safeguard message and the at least one data packet.

[0195] In an optional embodiment, the recovery module 1230 is configured to: recover the payload of the first data packet based on the payload of the at least one safeguard message and the payload of the at least one data packet; and recover the header of the first data packet based on the header of the at least one safeguard message and the header of the at least one data packet.

[0196] In an optional embodiment, the payload of the at least one safeguard message is obtained by the first device based on the verification data obtained by performing an XOR operation on the payloads of the plurality of data packets. The recovery module 1230 is used to: obtain the verification data based on the payload of the at least one safeguard message; and perform an XOR operation on the verification data and the payload of the at least one data packet to obtain the payload of the first data packet.

[0197] In an optional embodiment, the payload of the at least one safeguard message is obtained by the first device based on the verification data obtained by FEC encoding the payloads of the plurality of data packets. The recovery module 1230 is used to: obtain the verification data based on the payload of the at least one safeguard message; and perform FEC decoding on the verification data and the payload of the at least one data packet to obtain the payload of the first data packet.

[0198] In an optional embodiment, the payload of the at least one safeguard message is the verification data, or the payload of each safeguard message in the at least one safeguard message is a part of the verification data.

[0199] In an optional embodiment, the source device and the destination device of the first data stream are connected to the communication network through different access network devices in the communication network. The communication network includes multiple access network devices and multiple aggregation network devices, and each access network device is communicatively connected to at least one aggregation network device. The first device includes any one of the following: the source device, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device. The second device includes any one of the following: the destination device, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device. Specifically, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device; the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

[0200] In an optional embodiment, the communication network is a data center network.

[0201] In summary, the technical solution provided in this application embodiment involves a second device receiving at least one safeguard message generated by the first device based on multiple data packets from the first data stream. The at least one data packet received by the second device belongs to these multiple data packets, and the at least one safeguard message is used by the second device to recover lost packets from these multiple data packets. Therefore, the second device can recover lost packets from these multiple data packets based on the at least one safeguard message. Thus, this application embodiment ensures that the second device can recover lost packets from these multiple data packets by generating at least one safeguard message based on multiple data packets, thereby guaranteeing the reliability of communication between the first device and the second device.

[0202] The communication device provided in this application embodiment can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The communication method provided in the above method embodiments can also be implemented in software. When the communication method provided in the above method embodiments is implemented in software, each functional module in the communication device can be a software module.

[0203] This application provides another communication device, including a memory and a processor. The memory is used to store a computer program. The processor is used to execute the computer program stored in the memory to cause the communication device to perform actions such as... Figure 3 The illustrated embodiment provides a communication method. This communication device can be applied to a first device or a second device. For example, the communication device can be a first device, a functional component within the first device, a second device, or a functional component within the second device. The first device can be a source device for the first data stream, an access network device corresponding to the source device, or an aggregation network device corresponding to the source device. The second device can be a destination device for the first data stream, an access network device corresponding to the destination device, or an aggregation network device corresponding to the destination device. Both the source device and the destination device can be a server, a VM deployed on a server, or a container deployed on a server.

[0204] As an example, please refer to Figure 13This illustration shows a schematic diagram of another communication device 1300 provided in an embodiment of this application. The communication device 1300 may be a network device (e.g., an access network device or an aggregation network device) or a functional component within a network device. The communication device 1300 can implement... Figure 3 The method provided in the illustrated embodiment. (As shown) Figure 13 As shown, the communication device 1300 includes a main control board 1310, an interface board 1330, and an interface board 1340. In cases where the communication device 1300 includes multiple interface boards (interface boards are also called line cards or service boards), the communication device 1300 also includes a switching network board (…). Figure 13 (Not shown in the image), the switching network board is used to complete the data exchange between interface boards.

[0205] The main control board 1310 is used for system management, equipment maintenance, and protocol processing. Interface boards 1330 and 1340 provide various service interfaces and implement service forwarding, such as POS interfaces, Gigabit Ethernet (GE) interfaces, and asynchronous transfer mode (ATM) interfaces. The main control board 1310 mainly has three types of functional units: a system management control unit, a system clock unit, and a system maintenance unit. The main control board 1310, interface boards 1330, and interface boards 1340 communicate with each other via a system bus connected to the system backplane. Interface board 1330 includes one or more processors 1331. Processors 1331 control and manage interface board 1330 and communicate with the central processing unit 1312 on the main control board 1310. The memory 1332 on interface board 1330 stores various table entries related to forwarding. Interface board 1330 includes one or more network interfaces 1333 for transmitting and receiving data. The main control board 1310 also includes a memory 1314, which is used to store system management information, protocols, etc. Figure 13 As shown, this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operation on interface board 1340 is basically similar to the operation on interface board 1330. For example, interface board 1340 includes one or more network interfaces 1343 for transmitting and receiving, interface board 1340 includes a memory 1342 for storing various table entries related to forwarding, and interface board 1340 includes a processor 1341 for controlling and managing interface board 1340 and communicating with the central processing unit 1312 on the main control board 1310.

[0206] In this implementation, the processor 1331 in interface board 1330 and / or the processor 1341 in interface board 1340 can be dedicated hardware or chips, such as network processors or application-specific integrated circuits (ASICs), to implement the above functions. This implementation method is commonly referred to as using dedicated hardware or chips for the forwarding plane. In another embodiment, the processor 1331 in interface board 1330 and / or the processor 1341 in interface board 1340 can also be a general-purpose processor, such as a general-purpose central processing unit (CPU).

[0207] The communication device may have one or more main control boards, including a primary and a backup main control board. It may also have one or more interface boards; the more powerful the data processing capability of the communication device, the more interface boards it provides. With multiple interface boards, they can communicate through one or more switching network boards, enabling load sharing and redundancy. In a centralized forwarding architecture, the communication device may not require a switching network board; the interface boards handle the processing of the entire system's business data. In a distributed forwarding architecture, the communication device includes multiple interface boards, which can exchange data through a switching network board, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture communication device are greater than those of a centralized architecture. The specific architecture used depends on the network deployment scenario and is not limited here.

[0208] In optional embodiments, memory 1332 and / or memory 1342 may be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions. It may also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1332 may exist independently and be connected to processor 1331 via a communication bus, or it may be integrated with processor 1331. Memory 1342 may exist independently and be connected to processor 1341 via a communication bus, or it may be integrated with processor 1341.

[0209] In an optional embodiment, the memory 1332 is used to store program code, and its execution is controlled by the processor 1331 to perform some or all of the steps of the communication method provided in the above embodiments. The processor 1331 is used to execute the program code stored in the memory 1332. The program code may include one or more software modules. These one or more software modules can be the ones described above. Figure 11 or Figure 12 At least one functional module is provided in the illustrated embodiment. The memory 1342 can also be used to store program code, which is controlled by the processor 1341 to execute some or all of the steps of the communication method provided in the above embodiments. Similarly, the memory 1314 can also be used to store program code, which is controlled by the central processing unit 1312 to execute some or all of the steps of the communication method provided in the above embodiments.

[0210] In optional embodiments, network interface 1333 and network interface 1343 are transceiver-like devices used for communication device 1300 to communicate with other devices or networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), data center network, AI training network, metropolitan area network, wide area network, campus network, etc.

[0211] As another example, please refer to Figure 14 This illustration shows a schematic diagram of another communication device 1400 provided in an embodiment of this application. The communication device 1400 can be a network device (e.g., an access network device or an aggregation network device) or a functional component within a network device, or it can be an end-side device (e.g., a source end device of the first data stream or a destination end device of the first data stream) or a functional component within an end-side device. The communication device 1400 can implement... Figure 3 The method provided in the illustrated embodiment. The communication device 1400 includes a processor 1402, a memory 1404, a communication interface 1406, and a bus 1408, wherein the processor 1402, the memory 1404, and the communication interface 1406 are communicatively connected via the bus 1408. Figure 14 The connection method between the processor 1402, memory 1404 and communication interface 1406 shown is merely exemplary. In the implementation process, the processor 1402, memory 1404 and communication interface 1406 may also be connected in a way other than bus 1408. This application embodiment does not limit this.

[0212] The memory 1404 is used to store the computer program 14042, which may include instructions and data. The memory 1404 can be various types of storage media, such as RAM, ROM, non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical memory, and registers.

[0213] The processor 1402 can be a general-purpose processor or a dedicated processor. A general-purpose processor is a processor that performs specific steps and / or operations by reading and executing a computer program (e.g., computer program 14042) stored in a memory (e.g., memory 1404). The general-purpose processor may use data stored in the memory (e.g., memory 1404) during the execution of these steps and / or operations. The computer program can be executed to implement the relevant functions of the aforementioned acquisition module 1110, generation module 1120, determination module 1220, and recovery module 1230. The general-purpose processor can be a CPU. A dedicated processor is a processor specifically designed to perform specific steps and / or operations. A dedicated processor can be a digital signal processor (DSP), ASIC, or FPGA, etc. The processor 1402 can also be a combination of multiple processors, such as a multi-core processor. The processor 1402 includes at least one circuit to perform all or part of the steps of the above method embodiments.

[0214] The communication interface 1406 includes input / output (I / O) interfaces, physical interfaces, and logical interfaces for interconnecting devices within the communication device 1400, as well as interfaces for interconnecting the communication device 1400 with other devices (e.g., network devices, end-side devices). The physical interface can be a GE interface, used for interconnecting the communication device 1400 with other devices. The logical interface is an internal interface of the communication device 1400, used for interconnecting devices within the communication device 1400. The communication interface 1406 can be used for communication between the communication device 1400 and other devices, and can implement the functions of the aforementioned transmitting module 1130 and receiving module 1210. The communication interface 1406 may also include a transceiver for transmitting and receiving, which can also implement the functions of the aforementioned transmitting module 1130 and receiving module 1210.

[0215] Bus 1408 can be any type of communication bus used to interconnect processor 1402, memory 1404, and communication interface 1406. Examples include a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Bus 1408 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 14 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0216] The aforementioned devices in the communication device 1400 can be disposed on separate chips, or at least partially or entirely on the same chip. Whether the devices are disposed independently on different chips or integrated on one or more chips often depends on the needs of the product design. This application does not limit the specific implementation of the aforementioned devices.

[0217] Figure 14 The communication device 1400 shown is merely exemplary. In the implementation process, the communication device 1400 may also include other components, which will not be listed one by one here. Figure 14 The communication device 1400 shown realizes communication between different end-side devices by executing all or part of the steps of the communication method provided in the above embodiments, and can ensure the reliability of communication between end-side devices.

[0218] Based on the same inventive concept, embodiments of this application provide a communication system. The communication system includes a first device and a second device. The first device includes, as described above... Figure 11 The communication device 1100 shown includes a second device such as Figure 12 The communication device 1200 shown. Alternatively, at least one of the first device and the second device includes, as shown in the diagram. Figure 13 The communication device 1300 shown or such Figure 14 The communication device 1400 shown.

[0219] The first device can be a source device for the first data stream, an access network device corresponding to the source device, or an aggregation network device corresponding to the source device. The second device can be a destination device for the first data stream, an access network device corresponding to the destination device, or an aggregation network device corresponding to the destination device. The access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device. The access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

[0220] For example, the communication system such as Figure 1 As shown, the source device of the first data stream is end-side device 201, and the destination device of the first data stream is end-side device 206. The access network device corresponding to end-side device 201 is network device 101, and the access network device corresponding to end-side device 206 is network device 106. The first device can be either end-side device 201 or network device 101, and the second device can be either end-side device 206 or network device 106.

[0221] For example, the communication system such as Figure 2 As shown, the source device of the first data stream is end-side device 201, and the destination device of the first data stream is end-side device 206. The access network device corresponding to end-side device 201 is network device 101, and the aggregation network device corresponding to end-side device 201 is any one of network devices 107 to 111. The access network device corresponding to end-side device 206 is network device 106, and the aggregation network device corresponding to end-side device 206 is any one of network devices 107 to 111. The aggregation network device corresponding to end-side device 201 is different from the aggregation network device corresponding to end-side device 206. The first device can be any one of end-side device 201, network device 101, or network devices 107 to 111; the second device can be any one of end-side device 206, network device 105, or network devices 107 to 111; and the first device is different from the second device.

[0222] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program. When the computer program is executed (e.g., by a network device, an end-side device, a communication device, one or more processors, etc.), it implements the following... Figure 3 The illustrated method embodiments provide all or part of the steps of the communication method.

[0223] Based on the same inventive concept, embodiments of this application provide a computer program product, which includes a program or code. When the program or code is executed (e.g., executed by a network device, an end-side device, a communication device, one or more processors, etc.), it implements the following: Figure 3 The illustrated method embodiments provide all or part of the steps of the communication method.

[0224] Based on the same inventive concept, embodiments of this application provide a chip, which includes programmable logic circuitry and / or program instructions, and which, when running, is used to implement, as... Figure 3 The method embodiments provide all or part of the steps of the communication method. The chip may be a forwarding chip.

[0225] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented entirely or partially as a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., solid-state drive), etc.

[0226] It should be understood that the term "at least one" in this application refers to one or more, and "multiple" refers to two or more. In this application, unless otherwise stated, the symbol " / " generally means "or," for example, A / B can mean A or B. The term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, for clarity, this application uses terms such as "first," "second," and "third" to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," and "third" do not limit the quantity or order of execution.

[0227] The different types of embodiments, such as the method embodiments and device embodiments provided in this application, can be referenced to each other. The order of operations in the method embodiments can be adjusted appropriately, and the operations can be added or removed in response to the situation. Any variations that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application, and therefore will not be described in detail.

[0228] In the corresponding embodiments provided in this application, it should be understood that the disclosed devices, etc., can be implemented through other configurations. For example, the device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed between each other may be through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical or other forms. Modules described as separate components may or may not be physically separate, and components described as modules may or may not be physical modules; they may be located in one place or distributed across multiple devices. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0229] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any equivalent modifications or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A communication method, characterized in that, The method includes: The first device acquires multiple data packets from the first data stream; The first device generates at least one guarantee message based on the plurality of data packets. The at least one guarantee message is used by the second device to recover lost packets in the plurality of data packets. The sum of the number of the plurality of data packets and the number of the at least one guarantee message is equal to the number of multiple first paths between the first device and the second device for transmitting the first data stream. The first device sends the multiple data packets and the at least one security packet through the multiple first paths.

2. The method according to claim 1, characterized in that, The first device generates at least one safeguard message based on the plurality of data packets, including: The first device generates the payload of the at least one safeguard message based on the payloads of the plurality of data packets; The first device generates the header of the at least one safeguard message based on the headers of the plurality of data packets.

3. The method according to claim 2, characterized in that, The first device generates the payload of the at least one safeguard message based on the payloads of the plurality of data packets, including: The first device performs an XOR operation on the payloads of the plurality of data packets to obtain verification data; The first device obtains the payload of the at least one safeguard message based on the verification data.

4. The method according to claim 2, characterized in that, The first device generates the payload of the at least one safeguard message based on the payloads of the plurality of data packets, including: The first device performs forward error correction (FEC) encoding on the payloads of the plurality of data packets to obtain check data; The first device obtains the payload of the at least one safeguard message based on the verification data.

5. The method according to claim 3 or 4, characterized in that, The payload of the at least one guarantee message is the verification data; or, the payload of each guarantee message in the at least one guarantee message is a part of the verification data.

6. The method according to any one of claims 1 to 5, characterized in that, The header of any of the protection messages includes an identifier for the protection message, and the identifier of the at least one protection message is determined based on the number of the plurality of data messages.

7. The method according to claim 6, characterized in that, The plurality of data packets constitute a balance group, and the identifier of the at least one guarantee packet is determined based on the number of the plurality of data packets and the identifier of the balance group.

8. The method according to any one of claims 1 to 7, characterized in that, The source device and the destination device of the first data stream are connected to the communication network through different access network devices in the communication network. The communication network includes multiple access network devices and multiple aggregation network devices, and each access network device is communicatively connected to at least one aggregation network device. The first device includes any one of the following: the source device, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device; The second device includes any one of the following: the destination device, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device; Wherein, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device; the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

9. The method according to claim 8, characterized in that, The communication network is a data center network.

10. The method according to any one of claims 1 to 9, characterized in that, The first device sends the plurality of data packets and the at least one security packet through the plurality of first paths, including: The first device adopts a per-packet load balancing method to send the multiple data packets and the at least one guarantee packet through the multiple first paths.

11. A communication method, characterized in that, The method includes: The second device receives at least one guarantee message and at least one data packet of the first data stream. The at least one guarantee message is generated by the first device based on multiple data packets of the first data stream. The multiple data packets include the at least one data packet. The at least one guarantee message is used by the second device to recover lost packets in the multiple data packets. The sum of the number of the multiple data packets and the number of the at least one guarantee message is equal to the number of multiple first paths between the first device and the second device for transmitting the first data stream. The second device determines, based on the at least one data packet, that the first data packet among the plurality of data packets is lost; The second device recovers the first data packet based on the at least one safeguard message.

12. The method according to claim 11, characterized in that, The second device recovers the first data packet based on the at least one safeguard message, including: The second device recovers the first data packet based on the at least one safeguard message and the at least one data packet.

13. The method according to claim 12, characterized in that, The second device recovers the first data packet based on the at least one safeguard message and the at least one data packet, including: The second device recovers the payload of the first data packet based on the payload of the at least one safeguard message and the payload of the at least one data packet; The second device recovers the header of the first data packet based on the header of the at least one safeguard message and the header of the at least one data packet.

14. The method according to claim 13, characterized in that, The payload of the at least one safeguard message is obtained by the first device based on the verification data obtained by performing an XOR operation on the payloads of the plurality of data packets. The second device recovers the payload of the first data packet based on the payload of the at least one safeguard message and the payload of the at least one data packet, including: The second device obtains the verification data based on the payload of the at least one safeguard message; The second device performs an XOR operation on the verification data and the payload of the at least one data packet to obtain the payload of the first data packet.

15. The method according to claim 13, characterized in that, The payload of the at least one safeguard message is obtained by the first device based on the check data obtained by performing forward error correction (FEC) encoding on the payloads of the plurality of data packets. The second device recovers the payload of the first data packet based on the payload of the at least one safeguard message and the payload of the at least one data packet, including: The second device obtains the verification data based on the payload of the at least one safeguard message; The second device performs FEC decoding on the verification data and the payload of the at least one data packet to obtain the payload of the first data packet.

16. The method according to claim 14 or 15, characterized in that, The payload of the at least one guarantee message is the verification data, or the payload of each of the at least one guarantee message is a portion of the verification data.

17. The method according to any one of claims 11 to 16, characterized in that, The source device and the destination device of the first data stream are connected to the communication network through different access network devices in the communication network. The communication network includes multiple access network devices and multiple aggregation network devices, and each access network device is communicatively connected to at least one aggregation network device. The first device includes any one of the following: the source device, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device; The second device includes any one of the following: the destination device, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device; Wherein, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device; the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

18. The method according to claim 17, characterized in that, The communication network is a data center network.

19. A communication device, characterized in that, Applied to a first device, the communication device includes: The acquisition module is used to acquire multiple data packets from the first data stream; A generation module is used to generate at least one guarantee message based on the plurality of data packets. The at least one guarantee message is used by the second device to recover lost messages in the plurality of data packets. The sum of the number of the plurality of data packets and the number of the at least one guarantee message is equal to the number of multiple first paths between the first device and the second device for transmitting the first data stream. The sending module is used to send the multiple data packets and the at least one guarantee packet through the multiple first paths.

20. The communication device according to claim 19, characterized in that, The generation module is used for: The payload of the at least one safeguard message is generated based on the payloads of the multiple data packets; The header of the at least one safeguard message is generated based on the headers of the plurality of data packets.

21. The communication device according to claim 20, characterized in that, The generation module is used for: Perform an XOR operation on the payloads of the multiple data packets to obtain check data; The payload of the at least one safeguard message is obtained based on the verification data.

22. The communication device according to claim 20, characterized in that, The generation module is used for: Forward error correction (FEC) encoding is performed on the payloads of the multiple data packets to obtain check data; The payload of the at least one safeguard message is obtained based on the verification data.

23. The communication device according to claim 21 or 22, characterized in that, The payload of the at least one guarantee message is the verification data; or, the payload of each guarantee message in the at least one guarantee message is a part of the verification data.

24. The communication device according to any one of claims 19 to 23, characterized in that, The header of any of the protection messages includes an identifier for the protection message, and the identifier of the at least one protection message is determined based on the number of the plurality of data messages.

25. The communication device according to claim 24, characterized in that, The plurality of data packets constitute a balance group, and the identifier of the at least one guarantee packet is determined based on the number of the plurality of data packets and the identifier of the balance group.

26. The communication apparatus according to any one of claims 19 to 25, characterized in that, The source device and the destination device of the first data stream are connected to the communication network through different access network devices in the communication network. The communication network includes multiple access network devices and multiple aggregation network devices, and each access network device is communicatively connected to at least one aggregation network device. The first device includes any one of the following: the source device, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device; The second device includes any one of the following: the destination device, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device; Wherein, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device; the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

27. The communication device according to claim 26, characterized in that, The communication network is a data center network.

28. The communication device according to any one of claims 19 to 27, characterized in that, The sending module is used for: The data packets and at least one guarantee packet are sent through the multiple first paths using a per-packet load balancing method.

29. A communication device, characterized in that, Applied to a second device, the communication device includes: A receiving module is configured to receive at least one guarantee message and at least one data packet of a first data stream, wherein the at least one guarantee message is generated by a first device based on multiple data packets of the first data stream, the multiple data packets include the at least one data packet, the at least one guarantee message is used by a second device to recover lost packets in the multiple data packets, and the sum of the number of the multiple data packets and the number of the at least one guarantee message is equal to the number of multiple first paths between the first device and the second device for transmitting the first data stream; The determination module is used to determine, based on the at least one data packet, that a first data packet among the plurality of data packets is lost; The recovery module is used to recover the first data packet based on the at least one protection message.

30. The communication device according to claim 29, characterized in that, The recovery module is used for: The first data packet is recovered based on the at least one safeguard message and the at least one data packet.

31. The communication device according to claim 30, characterized in that, The recovery module is used for: The payload of the first data packet is recovered based on the payload of the at least one safeguard message and the payload of the at least one data packet; The header of the first data packet is recovered based on the header of the at least one safeguard message and the header of the at least one data packet.

32. The communication device according to claim 31, characterized in that, The payload of the at least one safeguard message is obtained by the first device based on the verification data obtained by performing an XOR operation on the payloads of the plurality of data packets. The recovery module is used for: The verification data is obtained based on the payload of the at least one guarantee message; The payload of the first data packet is obtained by performing an XOR operation on the verification data and the payload of the at least one data packet.

33. The communication device according to claim 31, characterized in that, The payload of the at least one safeguard message is obtained by the first device based on the check data obtained by performing forward error correction (FEC) encoding on the payloads of the plurality of data packets. The recovery module is used for: The verification data is obtained based on the payload of the at least one guarantee message; The verification data and the payload of the at least one data packet are subjected to FEC decoding to obtain the payload of the first data packet.

34. The communication device according to claim 32 or 33, characterized in that, The payload of the at least one guarantee message is the verification data, or the payload of each of the at least one guarantee message is a portion of the verification data.

35. The communication device according to any one of claims 19 to 34, characterized in that, The source device and the destination device of the first data stream are connected to the communication network through different access network devices in the communication network. The communication network includes multiple access network devices and multiple aggregation network devices, and each access network device is communicatively connected to at least one aggregation network device. The first device includes any one of the following: the source device, the access network device corresponding to the source device, or the aggregation network device corresponding to the source device; The second device includes any one of the following: the destination device, the access network device corresponding to the destination device, or the aggregation network device corresponding to the destination device; Wherein, the access network device corresponding to the source device is directly connected to the source device, and the aggregation network device corresponding to the source device is directly connected to the access network device corresponding to the source device; the access network device corresponding to the destination device is directly connected to the destination device, and the aggregation network device corresponding to the destination device is directly connected to the access network device corresponding to the destination device.

36. The communication device according to claim 35, characterized in that, The communication network is a data center network.

37. A communication device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to execute a computer program stored in the memory to cause the communication device to perform the communication method as described in any one of claims 1 to 18.

38. A communication system, characterized in that, Including the first device and the second device; The first device includes the communication device as described in any one of claims 19 to 28 and 37; The second device includes the communication apparatus as described in any one of claims 29 to 37.

39. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the communication method as described in any one of claims 1 to 18.

40. A computer program product, characterized in that, The computer program product includes a program or code that, when executed, implements the communication method as described in any one of claims 1 to 18.