A data packet transmission method, related equipment, storage medium, and computer program product.
By encapsulating data packets at the sending end and adding container identifiers and index information, the problem of untimely packet loss detection in the intelligent computing center network is solved, enabling rapid packet loss detection and out-of-order reduction, and improving data packet transmission efficiency.
Patent Information
- Application Number
- CN202411060198.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-08-02
AI Technical Summary
Existing packet loss detection mechanisms cannot quickly detect packet loss in intelligent computing center networks, leading to resource waste and performance impact.
At the sending end, the data packet is encapsulated by adding first information and second information. The first information is used to identify the container identification information and transmission path of the data packet, and the second information is used to identify the index information of the data packet. Thus, the receiving end can quickly determine whether there is packet loss based on this information.
By quickly detecting packet loss, the efficiency of packet loss detection is improved, the degree of out-of-order packet loss is reduced, and the pressure on the receiving device is reduced.
Smart Images

Figure CN119052137B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of transmission and Internet Protocol (IP) technology, and in particular to a data packet transmission method, related equipment, storage medium and computer program product. Background Technology
[0002] Currently, in intelligent computing center networks, to avoid network link congestion, packet-by-packet load balancing is preferred. While packet-by-packet load balancing ensures that the load on each network link is basically the same, the data packets in the network link are out of order. Therefore, a highly efficient sorting mechanism and packet loss detection mechanism are needed to rearrange the data packets and detect packet loss. The current packet loss detection mechanism mainly uses a timeout retransmission mechanism. The timeout retransmission mechanism requires starting a timer for each queue pair (QP), and then starting the timer for the packet sequence number (PSN) in sequence. First, the timer starts for the data packet with PSN 0. If the timer exceeds the set time, the data packet with PSN 0 is retransmitted. If the data packet is received within the set time, the pointer of the timer is moved to the data packet with PSN 1, and so on.
[0003] However, the above-mentioned timeout retransmission mechanism only has one timer. When the data packet received by the receiving end is lost, it needs to wait for the timer to expire to trigger retransmission. It cannot quickly detect packet loss, thus wasting a lot of resources. Summary of the Invention
[0004] To address the problem that current packet loss detection mechanisms cannot quickly detect packet loss, embodiments of this application provide a data packet transmission method, related equipment, storage medium, and computer program product that can quickly detect packet loss, thereby improving the efficiency of packet loss detection.
[0005] The technical solution of this application embodiment is implemented as follows:
[0006] In a first aspect, embodiments of this application provide a data packet transmission method, the method being applied to a sending device, the method comprising:
[0007] Obtain N first data packets from the data stream to be transmitted; where N is a positive integer;
[0008] Each first data packet is encapsulated to obtain N second data packets; wherein each second data packet includes first information and second information, the first information is used to identify the first container identification information corresponding to each first data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information;
[0009] The N second data packets are sent to the receiving device.
[0010] Secondly, embodiments of this application provide a data packet transmission method, the method being applied to a receiving device, the method comprising:
[0011] Receive N second data packets sent by the sending device; wherein each second data packet includes first information and second information; the first information is used to identify the first container identification information corresponding to each second data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information;
[0012] Based on the first information and the second information, determine whether packet loss occurs.
[0013] Thirdly, embodiments of this application provide a transmitting end device, which includes: an acquisition unit, an encapsulation unit, and a transmitting unit; wherein,
[0014] The acquisition unit is used to acquire N first data packets in the data stream to be transmitted; wherein, N is a positive integer;
[0015] The encapsulation unit is used to encapsulate each of the first data packets to obtain N second data packets; wherein each second data packet includes first information and second information, the first information is used to identify the first container identification information corresponding to each of the first data packets, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each of the first container identification information.
[0016] The sending unit is used to send the N second data packets to the receiving device.
[0017] Fourthly, embodiments of this application provide a transmitting end device, the transmitting end device comprising: a first processor and a first memory; wherein,
[0018] The first memory is used to store computer programs that can run on the processor;
[0019] The first processor is configured to execute the data packet transmission method as described above when running the computer program.
[0020] Fifthly, embodiments of this application provide a receiving device, which includes: a receiving unit and a judging unit; wherein,
[0021] The receiving unit is used to receive N second data packets sent by the sending device; wherein each second data packet includes first information and second information; the first information is used to identify the first container identification information corresponding to each second data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information;
[0022] The judgment unit is used to determine whether packet loss occurs based on the first information and the second information.
[0023] Sixthly, embodiments of this application provide a receiving end device, the receiving end device comprising: a second processor and a second memory; wherein,
[0024] The second memory is used to store computer programs that can run on the processor;
[0025] The second processor is configured to execute the data packet transmission method as described above when running the computer program.
[0026] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing computer program code, which, when executed by a computer, implements the data packet transmission method described above.
[0027] Eighthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the data packet transmission method as described above.
[0028] This application provides a data packet transmission method, related equipment, storage medium, and computer program product. The sending device acquires N first data packets from a data stream to be transmitted, where N is a positive integer. Each first data packet is encapsulated to obtain N second data packets. Each second data packet includes first information and second information. The first information identifies a first container identifier corresponding to each first data packet, and the first container identifier is associated with the transmission path of the second data packet. The second information identifies a first index of the data packet under each first container identifier. The N second data packets are sent to a receiving device. The receiving device determines whether packet loss occurs based on the first and second information. Therefore, the sending device can encapsulate each first data packet in the data stream to be transmitted to obtain N second data packets. Each second data packet includes first information and second information. The first information is used to identify the first container identifier information corresponding to each first data packet. The first container identifier information is associated with the transmission path of the data packet, so the transmission path of each data packet can be perceived based on the container identifier information, reducing the degree of out-of-order data packets. Then, the N second data packets can be sent to the receiving device. The receiving device can determine whether there is packet loss based on the first information and the second information, so as to quickly detect packet loss and improve the efficiency of packet loss detection. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of a data packet sorting method in related technologies;
[0030] Figure 2 This is a schematic diagram of the data packet transmission method proposed in the embodiments of this application. Figure 1 ;
[0031] Figure 3 This is a schematic diagram of the data packet structure proposed in an embodiment of this application;
[0032] Figure 4 This is a schematic diagram illustrating the number of uplinks proposed in an embodiment of this application;
[0033] Figure 5 This is a schematic diagram illustrating the process of generating container identification information corresponding to data packets according to an embodiment of this application;
[0034] Figure 6 This is a schematic diagram of the process for determining the first index information as proposed in an embodiment of this application;
[0035] Figure 7 This is a schematic diagram of the data packet transmission method proposed in the embodiments of this application. Figure 2 ;
[0036] Figure 8 This is a schematic diagram of the data packet transmission method proposed in the embodiments of this application. Figure 3;
[0037] Figure 9 This is a schematic diagram of the composition structure of the transmitting device proposed in the embodiments of this application. Figure 1 ;
[0038] Figure 10 This is a schematic diagram of the composition structure of the transmitting device proposed in the embodiments of this application. Figure 2 ;
[0039] Figure 11 This is a schematic diagram of the composition structure of the receiving device proposed in the embodiments of this application. Figure 1 ;
[0040] Figure 12 This is a schematic diagram of the composition structure of the receiving device proposed in the embodiments of this application. Figure 2 . Detailed Implementation
[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the relevant application and not for limiting the application. Furthermore, it should be noted that, for ease of description, only the parts related to the relevant application are shown in the accompanying drawings.
[0042] Unlike traditional data centers, intelligent computing centers primarily support artificial intelligence (AI) model training. Their communication traffic is characterized by a small number of flows but high bandwidth per flow. To avoid link congestion, packet-by-packet load balancing is more suitable than flow-by-flow load balancing for intelligent computing center traffic load distribution. While packet-by-packet load balancing can ensure a relatively uniform load across all links, packets in the network are out of order, and the destination side requires an efficient sorting and packet loss detection mechanism to rearrange and detect incoming data packets. Currently, the mainstream end-side rearrangement and packet loss detection solutions are as follows: Figure 1 A diagram illustrating the sorting of data packets, such as... Figure 1 As shown, after receiving out-of-order packets, the destination end places the PSN (Personal Signal Number) from the out-of-order packets in its network interface card (NIC), stores the corresponding data in memory, and caches the PSN information on the NIC. It then sorts the packets according to the PSN information. Once all packets corresponding to PSNs 0-7 are received, it sends an acknowledgment character (ACK) to the sending NIC to indicate that all packets in that segment have been received. If any packet with PSNs 0-7 is not received, even if packets with PSNs 8-15 have been received, it must wait for the PSNs corresponding to the previous packet to be received and an ACK to be sent before sending an ACK for PSNs 8-15 to the sending device.
[0043] For packet loss detection and retransmission schemes, the current main approach is a timeout retransmission mechanism. This mechanism requires enabling a timer for each pair of QPs and starting the timer sequentially for PSNs. First, the timer is started for data packets with PSN of 0. If the timer expires, the data packets with PSN of 0 are retransmitted. If a data packet is received within the timer, the pointer corresponding to the timer is moved to the data packet with PSN of 1, and so on.
[0044] Out-of-order issues in current intelligent computing center networks are one of the key problems affecting the training efficiency of AI clusters. Although the current network card supports out-of-order reordering, the current solution is insufficient to meet the out-of-order reordering and packet loss retransmission requirements of intelligent computing centers based on packet-by-packet traffic load balancing. The current solution has the following main problems: (1) The order of data packets sent by the current sender to the network is random, and it is impossible to perceive the path traversed by each data packet. There are currently no maintenance methods. Furthermore, the more links there are, the greater the out-of-order nature of data packets, and the greater the pressure on the receiving end; (2) In the current solution, the ACK confirmation of the previous data segment is required before the network card buffer can be released and subsequent ACK confirmations can be made for the data segments. Especially when the queue depth and window size of QP are full, if a certain PSN is not received, the entire QP queue's ability to receive data packets will be suspended, and the data packet will be retransmitted to obtain the PSN after the timeout. Therefore, packet interruption will affect performance in this case; (3) The current timeout retransmission mechanism only has one timer. When the data packet received by the receiving network card is lost, it is necessary to wait for the timer to expire and trigger retransmission, which cannot quickly detect the packet loss. Therefore, in scenarios with a high degree of packet loss, resources are wasted. Therefore, it is urgent to propose a technical solution that can quickly detect packet loss.
[0045] To address the issue that current packet loss detection and retransmission schemes cannot quickly detect packet loss, this application provides a data packet transmission method, related equipment, storage medium, and computer program product. The sending device acquires N first data packets from a data stream to be transmitted; where N is a positive integer. Each first data packet is encapsulated to obtain N second data packets; each second data packet includes first information and second information. The first information identifies a first container identifier corresponding to each first data packet, and the first container identifier is associated with the transmission path of the second data packet. The second information identifies a first index of the data packet under each first container identifier. The N second data packets are sent to the receiving device. The receiving device determines whether packet loss exists based on the first and second information. Therefore, the sending device can encapsulate each first data packet in the data stream to be transmitted to obtain N second data packets. Each second data packet includes first information and second information. The first information is used to identify the first container identifier information corresponding to each first data packet. The first container identifier information is associated with the transmission path of the data packet. The second information is used to identify the first index information of data packets under the same first container identifier information. Since the first container identifier information is associated with the transmission path of the data packet, the transmission path of each data packet can be perceived based on the container identifier information, reducing the degree of out-of-order transmission of data packets. Then, the N second data packets can be sent to the receiving device. The receiving device can determine whether there is packet loss based on the first information and the second information, thereby quickly perceiving packet loss and improving the efficiency of packet loss detection.
[0046] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0047] This application provides a data packet transmission method, which is applied to a sending device. Figure 2 This is a schematic diagram of the data packet transmission method proposed in the embodiments of this application. Figure 1 ,like Figure 2 As shown, the data packet transmission method may include the following steps:
[0048] Step 101: Obtain N first data packets from the data stream to be transmitted; where N is a positive integer.
[0049] In embodiments of this application, the sending device can acquire N first data packets from the data stream to be transmitted.
[0050] It should be noted that, in the embodiments of this application, when the sending device obtains N first data packets in the data stream to be transmitted, it can perform packet segmentation processing on the data stream to be transmitted to obtain N first data packets in the data stream to be transmitted.
[0051] Step 102: Encapsulate each first data packet to obtain N second data packets; wherein each second data packet includes first information and second information, the first information is used to identify the first container identification information corresponding to each first data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information.
[0052] In the embodiments of this application, after the sending device obtains N first data packets in the data stream to be transmitted, it can encapsulate each first data packet to obtain N second data packets.
[0053] It should be noted that, in the embodiments of this application, Figure 3 This is a schematic diagram of the data packet structure proposed in an embodiment of this application, as shown below. Figure 3 As shown, each first data packet includes first information (Container_ID) and second information (index); wherein, the first information and the second information are located between the IP header and the Media Access Control (MAC) header of each first data packet; wherein, R is a reserved field, and Header represents a newly added data packet header.
[0054] It should be noted that, in the embodiments of this application, when the sending device encapsulates each first data packet to obtain N second data packets, it can first determine the preset value range corresponding to the first container identifier information; wherein, the preset value range is associated with the number of links; then, it can determine the first container identifier information corresponding to each first data packet based on the preset value range, the packet sequence number corresponding to each first data packet, and the total number of first data packets, and determine the first index information of data packets under the same first container identifier information; then, it can encapsulate each first data packet based on the first container identifier information and the first index information to obtain N second data packets.
[0055] It should be noted that, in the embodiments of this application, the preset value range corresponding to the first container identifier information is associated with the number of links. The number of links can be the number of uplink links from the leaf switch to the spine switch. Figure 4 This is a schematic diagram illustrating the number of uplinks proposed in the embodiments of this application, such as... Figure 4 As shown, the number of uplinks from the leaf switch to the spine switch is 4, so the preset value range of the first container identifier information (Container_ID) can be set to [0, 3]. If the network is a multi-level CLOS architecture, the value range of Container_ID can be expanded according to the network scale, that is, the number of all paths from the leaf switch to the top-level spine switch.
[0056] It should be noted that, in the embodiments of this application, the sending device can obtain the number of links by means of a centralized control system or by means of a notification through the Ethernet Virtual Private Network (EVPN) protocol. This application does not specifically limit the type of method by which the sending device obtains the number of links.
[0057] It should be noted that, in the embodiments of this application, after determining the preset value range corresponding to the first container identifier information, the sending device can determine the first container identifier information corresponding to each first data packet based on the preset value range, the packet sequence number corresponding to each first data packet, and the total number of first data packets, and determine the first index information of data packets under the same first container identifier information.
[0058] It should be noted that, in the embodiments of this application, when the sending device determines the first container identification information corresponding to each first data packet based on a preset value range, the packet sequence number corresponding to each first data packet, and the total number of first data packets, it can determine a first value based on the packet sequence number corresponding to each first data packet and the total number of first data packets; wherein, the first value is obtained by performing a first preset calculation based on the packet sequence number corresponding to each first data packet and the total number of first data packets; and then the first container identification information corresponding to each first data packet can be determined based on the first value and the preset value range.
[0059] For example, in the embodiments of this application, Figure 5 This is a schematic diagram illustrating the process of generating container identification information corresponding to data packets according to an embodiment of this application, such as... Figure 5 As shown, the PSNs corresponding to the segmented first data packets are 0, 1, 2, ..., 15, and the preset value range corresponding to the first container identifier information is [0,3], namely Container_0, Container_1, Container_2, Container_3. Then, the first preset operation can be performed based on the packet sequence number corresponding to each data packet and the total number of the first data packets (16) to obtain the first value. The size of the first value can be correlated with the first container identifier information, so that the first container identifier information corresponding to each first data packet can be determined.
[0060] For example, in the embodiments of this application, the sending device can perform a first preset operation based on the packet sequence number corresponding to each data packet and the total number of first data packets (16) to obtain a first value. The formula for the first preset operation can be as shown in the following formula (1). If the PSN of the first data packet is assumed to be 0, then 0 can be modulo 16 (PSN_num) and the result is 0, that is, the Container_ID corresponding to the data packet with PSN of 0 is 0. If the PSN of the first data packet is assumed to be 1, then 1 modulo 16 is 1, then the Container_ID corresponding to the data packet with PSN of 1 is 1. By analogy, the Container_ID corresponding to each first data packet can be obtained, that is, each first data packet can be put into the container corresponding to the Container_ID in sequence.
[0061] Container_ID=PSN%PSN_num (1)
[0062] Wherein, Container_ID represents the first container identification information, PSN represents the PSN of each first data packet, and PSN_num represents the total number of first data packets.
[0063] It should be noted that, in the embodiments of this application, after determining the first container identifier information corresponding to each first data packet, the sending device can determine the first index information of data packets under the same first container identifier information.
[0064] Furthermore, in the embodiments of this application, when the sending device determines the first index information of data packets under the same first container identification information, it can first determine the packet sequence number corresponding to each data packet under the same first container identification information; then it can determine the first index information based on the packet sequence number and the number of links corresponding to each data packet under the same first container identification information.
[0065] It should be noted that, in the embodiments of this application, when the sending device determines the first index information based on the packet sequence number and link number corresponding to each data packet under the same first container identification information, it can determine the second value based on the packet sequence number and link number corresponding to each data packet under the same first container identification information; wherein, the second value is obtained by performing a second preset calculation based on the packet sequence number and link number corresponding to each data packet under the same first container identification information; and then the first index information can be determined based on the second value.
[0066] For example, in the embodiments of this application, Figure 6 This is a schematic diagram of the process for determining the first index information proposed in an embodiment of this application, as shown below. Figure 6As shown, a second value can be obtained by performing a second preset operation based on the packet sequence number and link number corresponding to each data packet under the same first container identification information. Then, the first index information can be determined based on the size of the second value. The second preset operation can be as shown in the following formula (2). Assuming that the packet sequence number corresponding to one of the data packets under the same first container identification information (Container_1) is 9 and the link number is 4, then the result of 9 / 4 is 2.25. Then, take the integer 2.25 as 2, that is, the size of the second value is 2, and the corresponding index information is also 2. By analogy, the second value corresponding to each data packet under the same first container identification information can be obtained, and thus the index information of each data packet under the same first container identification information can be obtained, which are 0, 1, 2, and 3 in sequence.
[0067] index = PSN / path_num (2)
[0068] Here, path_num represents the number of links, and index represents the first index information.
[0069] In other words, in the embodiments of this application, the sending device can sequentially put each first data packet into the corresponding Container_ID using the above formula (1), and determine the first index information corresponding to each data packet under the same Container_ID using the above formula (2). That is, this application can quickly sort each data packet according to formula (1) and formula (2). Unlike the current sorting method at the traditional hardware level (network card), this application can sort according to the set formula rules, which can greatly improve the efficiency of disordered reordering and reduce the cache pressure on the end side.
[0070] Step 103: Send N second data packets to the receiving device.
[0071] In the embodiments of this application, after the sending device encapsulates each first data packet to obtain N second data packets, it can send the N second data packets to the receiving device.
[0072] It should be noted that, in the embodiments of this application, when the sending device sends N second data packets to the receiving device, the data packets under the same first container identification information can be sent to the receiving device through the same data link.
[0073] In other words, in the embodiments of this application, data packets under the same first container identifier (Container_ID) take the same path, while data packets under different Container_IDs take different paths, so that the data packets are evenly distributed in the network link. This allows the system to perceive the path taken by each data packet, reduce the degree of data packet disorder, and thus alleviate the pressure on the receiving device.
[0074] It should be noted that, in the embodiments of this application, the sending device can receive a first retransmission request sent by the receiving device; wherein, the first retransmission request carries the packet sequence number corresponding to the lost data packet; wherein, the lost data packet includes one or more data packets of the second data packet; and then, the corresponding lost data packet can be retransmitted to the receiving device based on the packet sequence number corresponding to the lost data packet.
[0075] It should be noted that, in the embodiments of this application, the sending device can also receive a second retransmission request sent by the receiving device; wherein, the second retransmission request carries at least one first container identifier information; and the data packet corresponding to at least one first container identifier information is retransmitted to the receiving device.
[0076] It should be noted that, in the embodiments of this application, if the sending device receives a second retransmission request sent by the receiving device that carries at least one first container identifier, it indicates that the link corresponding to the first container identifier has failed. Therefore, the sending device can retransmit all data packets corresponding to at least one first container identifier to the receiving device.
[0077] In summary, the sending device can sequentially place each first data packet into the corresponding Container_ID using the above formula (1), and determine the first index information corresponding to each data packet under the same Container_ID using the above formula (2). That is, this application can quickly sort each data packet according to formula (1) and formula (2). Unlike the current sorting method at the traditional hardware level, this application can sort according to the set formula rules, which can greatly improve the efficiency of out-of-order reordering and reduce the buffer pressure on the end side. Then, data packets under the same first container identifier information (Container_ID) can take the same path, and data packets under different Container_IDs can take different paths, so that data packets can be evenly distributed to the network link. The path traversed by each data packet can be perceived, reducing the degree of out-of-order data packets, thereby alleviating the pressure on the receiving device.
[0078] This application provides a data packet transmission method. The method is applied to a sending device, which acquires N first data packets from a data stream to be transmitted, where N is a positive integer. Each first data packet is encapsulated to obtain N second data packets. Each second data packet includes first information and second information. The first information is used to identify the first container identifier information corresponding to each first data packet, and the first container identifier information is associated with the transmission path of the second data packet. The second information is used to identify the first index information of the data packet under each first container identifier information. The N second data packets are then sent to a receiving device. Therefore, the sending device can encapsulate each first data packet to obtain N second data packets. Each second data packet includes first information and second information. The first information is used to identify the first container identifier information corresponding to each first data packet. The first container identifier information is associated with the transmission path of the data packet. The second information is used to identify the first index information of data packets under the same first container identifier information. That is, this application can identify the first container identifier information corresponding to each first data packet based on the first information, and can also identify the first index information of data packets under the same first container identifier information based on the second information. This allows for rapid sorting of each first data packet, improving the data packet reordering efficiency. Furthermore, since the first container identifier information is associated with the transmission path of the data packet, the transmission path of each data packet can be perceived based on the container identifier information, reducing the degree of data packet disorder.
[0079] Based on the above embodiments, another embodiment of this application provides a data packet transmission method, which is applied to a receiving device. Figure 7 This is a schematic diagram of the data packet transmission method proposed in the embodiments of this application. Figure 2 ,like Figure 7 As shown, the data packet transmission method may include the following steps:
[0080] Step 201: Receive N second data packets sent by the sending device; wherein each second data packet includes first information and second information; the first information is used to identify the first container identification information corresponding to each second data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information.
[0081] In embodiments of this application, the receiving device can receive N second data packets sent by the sending device.
[0082] Step 202: Determine whether packet loss occurs based on the first and second information.
[0083] In the embodiments of this application, after receiving N second data packets sent by the sending device, the receiving device can determine whether there is packet loss based on the first information and the second information.
[0084] It should be noted that, in the embodiments of this application, when the receiving device determines whether packet loss occurs based on the first information and the second information, it can determine the second container identifier information corresponding to the currently received second data packet based on the first information, and determine the second index information of the second data packet under the second container identifier information based on the second information; wherein, the first container identifier information includes the second container identifier information; and then it can determine whether packet loss occurs based on the second index information.
[0085] For example, in an embodiment of this application, the receiving device can determine the second container identifier information corresponding to the currently received second data packet based on the first information. Assuming that the second container identifier information corresponding to the currently received data packet is Container_2, the receiving device can then determine the second index information of the currently received data packet under Container_2, and then determine whether there is packet loss behavior based on the second index information.
[0086] It should be noted that, in the embodiments of this application, when the receiving device determines whether there is packet loss based on the second index information, if the second index information is consistent with the third index information, it is determined that there is no packet loss; wherein, the third index information contains the expected index information; or, if the second index information is inconsistent with the expected third index information, it is determined that there is packet loss.
[0087] For example, in an embodiment of this application, the receiving device can set the expected third index information corresponding to the data packet under each container identifier information to start from 0. Assuming that the second container identifier information corresponding to the currently received data packet is Container_2, it can then determine whether the second index information of the currently received data packet under Container_2 is consistent with the expected third index information. If the second index information is consistent with the third index information, it is determined that there is no packet loss behavior. If the second index information is inconsistent with the third index information, for example, the second index information is greater than the third index information, it is determined that there is packet loss behavior.
[0088] Furthermore, in the embodiments of this application, after determining that packet loss has occurred, the receiving device can determine the packet sequence number of the second data packet corresponding to the second index information; then it can determine the packet sequence number corresponding to the lost data packet based on the packet sequence number of the second data packet and the number of links; and then it can send a first retransmission request to the sending device; wherein the first retransmission request carries the packet sequence number corresponding to the lost data packet.
[0089] For example, in the embodiments of this application, assuming that the second index information of the currently received data packet under the corresponding container identifier information (Container_1) is 3, the expected third index information is 2, and the second index information is greater than the third index information, then it is determined that there is a packet loss behavior. Then, the packet sequence number of the second data packet corresponding to the second index information can be determined to be 13. Assuming that the number of links is 4, the packet sequence number corresponding to the lost data packet can be determined based on the packet sequence number of the second data packet corresponding to the second index information and the number of links. The calculation formula for the packet sequence number corresponding to the lost data packet is shown in the following formula (3). Based on formula (3), the packet sequence number corresponding to the lost data packet can be determined to be 9.
[0090] The PSN corresponding to the lost data packet = PSN_1 - path_num (3)
[0091] Where path_num represents the number of links, and PSN_1 represents the packet sequence number of the second data packet corresponding to the second index information.
[0092] Furthermore, in an embodiment of this application, after the receiving device determines the packet sequence number corresponding to the lost data packet based on the packet sequence number of the second data packet and the number of links, it can send a first retransmission request to the sending device; wherein, the first retransmission request carries the packet sequence number corresponding to the lost data packet.
[0093] In other words, in the embodiments of the application, the receiving device can determine whether packet loss occurs based on the first and second information in each second data packet, thereby quickly sensing whether packet loss occurs. If packet loss occurs, the receiving device can obtain the packet sequence number corresponding to the lost data packet, and then send a first retransmission request carrying the packet sequence number of the lost data packet to the sending device so that the sending device can retransmit. That is, this application can quickly sense whether packet loss occurs based on the first and second information in the second data packet, thereby greatly improving the efficiency of packet loss detection.
[0094] It should be noted that, in the embodiments of this application, the receiving device can traverse the data packets corresponding to each first container identifier; when at least one data packet corresponding to a first container identifier is not received, a second retransmission request can be sent to the sending device; wherein, the second retransmission request carries at least one first container identifier.
[0095] It should be noted that, in the embodiments of this application, if at least one data packet corresponding to the first container identification information is not received, it is considered that the link corresponding to at least one first container identification information has failed, and it is necessary to retransmit all data packets in the container corresponding to at least one first container identification information.
[0096] In summary, the receiving device can determine the second container identifier information corresponding to the currently received second data packet based on the first information, and determine the second index information of the second data packet under the second container identifier information based on the second information; wherein, the first container identifier information contains the second container identifier information; then, it can determine whether there is packet loss based on the second index information. If the second index information is consistent with the third index information, it is determined that there is no packet loss; wherein, the third index information contains the expected index information; or, if the second index information is inconsistent with the expected third index information, it is determined that there is packet loss, and then the packet sequence number of the second data packet corresponding to the second index information can be determined; then, the packet sequence number corresponding to the lost data packet can be determined based on the packet sequence number of the second data packet and the number of links; a first retransmission request can be sent to the sending device; wherein, the first retransmission request carries the packet sequence number corresponding to the lost data packet, so that the sending device can retransmit. That is, this application can quickly detect whether there is packet loss based on the first and second information in the second data packet, thereby greatly improving the efficiency of packet loss detection.
[0097] This application provides a data packet transmission method applied to a receiving device, which receives N second data packets sent by a sending device. Each second data packet includes first information and second information. The first information identifies the first container identifier information corresponding to each second data packet, and the first container identifier information is associated with the transmission path of the second data packet. The second information identifies the first index information of the data packet under each first container identifier information. The method determines whether packet loss occurs based on the first and second information. Therefore, the first information in the second data packet identifies the first container identifier information corresponding to the data packet, and the second information in the second data packet identifies the first index information of the data packet under the same first container identifier information. This allows for the determination of whether packet loss occurs based on the first and second information, thereby improving the efficiency of packet loss detection.
[0098] Based on the above embodiments, another embodiment of this application provides a data packet transmission method, which is applied to a sending end device and a receiving end device. Figure 8 This is a schematic diagram of the data packet transmission method proposed in the embodiments of this application. Figure 3 ,like Figure 8 As shown, the data packet transmission method may include the following steps:
[0099] Step 301: The sending device obtains N first data packets from the data stream to be transmitted; where N is a positive integer.
[0100] It should be noted that, in the embodiments of this application, when the sending device obtains N first data packets in the data stream to be transmitted, it can perform packet segmentation processing on the data stream to be transmitted to obtain N first data packets in the data stream to be transmitted.
[0101] Step 302: The sending device encapsulates each first data packet to obtain N second data packets; wherein each second data packet includes first information and second information, the first information is used to identify the first container identification information corresponding to each first data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information.
[0102] It should be noted that, in the embodiments of this application, as... Figure 3 As shown, each first data packet includes first information (Container_ID) and second information (index); wherein the first information and the second information are located between the IP header and the MAC header of each first data packet.
[0103] It should be noted that, in the embodiments of this application, when the sending device encapsulates each first data packet to obtain N second data packets, it can first determine the preset value range corresponding to the first container identifier information; wherein, the preset value range is associated with the number of links; then, it can determine the first container identifier information corresponding to each first data packet based on the preset value range, the packet sequence number corresponding to each first data packet, and the total number of first data packets, and determine the first index information of data packets under the same first container identifier information; then, it can encapsulate each first data packet based on the first container identifier information and the first index information to obtain N second data packets.
[0104] It should be noted that, in the embodiments of this application, the preset value range corresponding to the first container identifier information is associated with the number of links. The number of links can be the number of uplinks from the leaf switch to the spine switch, such as... Figure 4 As shown, the number of uplinks from the leaf switch to the spine switch is 4, so the preset value range of the first container identifier information (Container_ID) can be set to [0, 3]. If the network is a multi-level CLOS architecture, the value range of Container_ID can be expanded according to the network scale, that is, the number of all paths from the leaf switch to the top-level spine switch.
[0105] It should be noted that, in the embodiments of this application, the sending device can obtain the number of links by means of a centralized control system or by notification through the EVPN protocol. This application does not specifically limit the type of method by which the sending device obtains the number of links.
[0106] It should be noted that, in the embodiments of this application, after determining the preset value range corresponding to the first container identifier information, the sending device can determine the first container identifier information corresponding to each first data packet based on the preset value range, the packet sequence number corresponding to each first data packet, and the total number of first data packets, and determine the first index information of data packets under the same first container identifier information.
[0107] It should be noted that, in the embodiments of this application, when the sending device determines the first container identification information corresponding to each first data packet based on a preset value range, the packet sequence number corresponding to each first data packet, and the total number of first data packets, it can determine a first value based on the packet sequence number corresponding to each first data packet and the total number of first data packets; wherein, the first value is obtained by performing a first preset calculation based on the packet sequence number corresponding to each first data packet and the total number of first data packets; and then the first container identification information corresponding to each first data packet can be determined based on the first value and the preset value range.
[0108] For example, in the embodiments of this application, such as Figure 5 As shown, the PSNs corresponding to the segmented first data packets are 0, 1, 2, ..., 15, and the preset value range corresponding to the first container identifier information is [0,3], namely Container_0, Container_1, Container_2, Container_3. Then, the first preset operation can be performed based on the packet sequence number corresponding to each data packet and the total number of the first data packets (16) to obtain the first value. The size of the first value can be correlated with the first container identifier information, so that the first container identifier information corresponding to each first data packet can be determined.
[0109] For example, in the embodiments of this application, the sending device can perform a first preset operation based on the packet sequence number corresponding to each data packet and the total number of first data packets (16) to obtain a first value. The formula for the first preset operation can be as shown in the formula (1) above. If the PSN of the first data packet is assumed to be 0, then 0 can be modulo 16 (PSN_num) and the result is 0, that is, the Container_ID corresponding to the data packet with PSN of 0 is 0. If the PSN of the first data packet is assumed to be 1, then 1 modulo 16 is 1, then the Container_ID corresponding to the data packet with PSN of 1 is 1. By analogy, the Container_ID corresponding to each first data packet can be obtained, that is, each first data packet can be put into the container corresponding to the Container_ID in turn.
[0110] It should be noted that, in the embodiments of this application, after determining the first container identifier information corresponding to each first data packet, the sending device can determine the first index information of data packets under the same first container identifier information.
[0111] Furthermore, in the embodiments of this application, when the sending device determines the first index information of data packets under the same first container identification information, it can first determine the packet sequence number corresponding to each data packet under the same first container identification information; then it can determine the first index information based on the packet sequence number and the number of links corresponding to each data packet under the same first container identification information.
[0112] It should be noted that, in the embodiments of this application, when the sending device determines the first index information based on the packet sequence number and link number corresponding to each data packet under the same first container identification information, it can determine the second value based on the packet sequence number and link number corresponding to each data packet under the same first container identification information; wherein, the second value is obtained by performing a second preset calculation based on the packet sequence number and link number corresponding to each data packet under the same first container identification information; and then the first index information can be determined based on the second value.
[0113] For example, in the embodiments of this application, such as Figure 6 As shown, a second value can be obtained by performing a second preset operation based on the packet sequence number and link number corresponding to each data packet under the same first container identification information. Then, the first index information can be determined based on the size of the second value. The second preset operation can be as shown in the above formula (2). Assuming that the packet sequence number corresponding to one of the data packets under the same first container identification information (Container_1) is 9 and the link number is 4, then the result of 9 / 4 is 2.25. Then, take the integer 2.25 as 2, that is, the size of the second value is 2, and the corresponding index information is also 2. By analogy, the second value corresponding to each data packet under the same first container identification information can be obtained, and thus the index information of each data packet under the same first container identification information can be obtained, which are 0, 1, 2, and 3 in sequence.
[0114] In other words, in the embodiments of this application, the sending device can sequentially put each first data packet into the corresponding Container_ID using the above formula (1), and determine the first index information corresponding to each data packet under the same Container_ID using the above formula (2). That is, this application can quickly sort each data packet according to formula (1) and formula (2). Unlike the current sorting method at the traditional hardware level (network card), this application can sort according to the set formula rules, which can greatly improve the efficiency of disordered reordering and reduce the cache pressure on the end side.
[0115] Step 303: The sending device sends N second data packets to the receiving device.
[0116] It should be noted that, in the embodiments of this application, when the sending device sends N second data packets to the receiving device, the data packets under the same first container identification information can be sent to the receiving device through the same data link.
[0117] In other words, in the embodiments of this application, data packets under the same first container identifier (Container_ID) take the same path, while data packets under different Container_IDs take different paths, so that the data packets are evenly distributed in the network link. This allows the system to perceive the path taken by each data packet, reduce the degree of data packet disorder, and thus alleviate the pressure on the receiving device.
[0118] It should be noted that, in the embodiments of this application, the sending device can receive a first retransmission request sent by the receiving device; wherein, the first retransmission request carries the packet sequence number corresponding to the lost data packet; wherein, the lost data packet includes one or more data packets of the second data packet; and then, the corresponding lost data packet can be retransmitted to the receiving device based on the packet sequence number corresponding to the lost data packet.
[0119] It should be noted that, in the embodiments of this application, the sending device can also receive a second retransmission request sent by the receiving device; wherein, the second retransmission request carries at least one first container identifier information; and the data packet corresponding to at least one first container identifier information is retransmitted to the receiving device.
[0120] It should be noted that, in the embodiments of this application, if the sending device receives a second retransmission request sent by the receiving device that carries at least one first container identifier, it indicates that the link corresponding to the first container identifier has failed. Therefore, the sending device can retransmit all data packets corresponding to at least one first container identifier to the receiving device.
[0121] Step 304: The receiving device determines whether packet loss occurs based on the first and second information.
[0122] It should be noted that, in the embodiments of this application, when the receiving device determines whether packet loss occurs based on the first information and the second information, it can determine the second container identifier information corresponding to the currently received second data packet based on the first information, and determine the second index information of the second data packet under the second container identifier information based on the second information; wherein, the first container identifier information includes the second container identifier information; and then it can determine whether packet loss occurs based on the second index information.
[0123] For example, in an embodiment of this application, the receiving device can determine the second container identifier information corresponding to the currently received second data packet based on the first information. Assuming that the second container identifier information corresponding to the currently received data packet is Container_2, the receiving device can then determine the second index information of the currently received data packet under Container_2, and then determine whether there is packet loss behavior based on the second index information.
[0124] It should be noted that, in the embodiments of this application, when the receiving device determines whether there is packet loss based on the second index information, if the second index information is consistent with the third index information, it is determined that there is no packet loss; wherein, the third index information contains the expected index information; or, if the second index information is inconsistent with the expected third index information, it is determined that there is packet loss.
[0125] For example, in an embodiment of this application, the receiving device can set the expected third index information corresponding to the data packet under each container identifier information to start from 0. Assuming that the second container identifier information corresponding to the currently received data packet is Container_2, it can then determine whether the second index information of the currently received data packet under Container_2 is consistent with the expected third index information. If the second index information is consistent with the third index information, it is determined that there is no packet loss behavior. If the second index information is inconsistent with the third index information, for example, the second index information is greater than the third index information, it is determined that there is packet loss behavior.
[0126] Furthermore, in the embodiments of this application, after determining that packet loss has occurred, the receiving device can determine the packet sequence number of the second data packet corresponding to the second index information; then it can determine the packet sequence number corresponding to the lost data packet based on the packet sequence number of the second data packet and the number of links; and then it can send a first retransmission request to the sending device; wherein the first retransmission request carries the packet sequence number corresponding to the lost data packet.
[0127] For example, in the embodiments of this application, assuming that the second index information of the currently received data packet under the corresponding container identifier information (Container_1) is 3, the expected third index information is 2, and the second index information is greater than the third index information, then it is determined that there is packet loss. Then, the packet sequence number of the second data packet corresponding to the second index information can be determined to be 13. Assuming that the number of links is 4, the packet sequence number corresponding to the lost data packet can be determined based on the packet sequence number of the second data packet corresponding to the second index information and the number of links. The calculation formula for the packet sequence number corresponding to the lost data packet is as shown in the above formula (3). Based on formula (3), the packet sequence number corresponding to the lost data packet can be determined to be 9.
[0128] Furthermore, in an embodiment of this application, after the receiving device determines the packet sequence number corresponding to the lost data packet based on the packet sequence number of the second data packet and the number of links, it can send a first retransmission request to the sending device; wherein, the first retransmission request carries the packet sequence number corresponding to the lost data packet.
[0129] In other words, in the embodiments of the application, the receiving device can determine whether packet loss occurs based on the first and second information in each second data packet, thereby quickly sensing whether packet loss occurs. If packet loss occurs, the receiving device can obtain the packet sequence number corresponding to the lost data packet, and then send a first retransmission request carrying the packet sequence number of the lost data packet to the sending device so that the sending device can retransmit. That is, this application can quickly sense whether packet loss occurs based on the first and second information in the second data packet, thereby greatly improving the efficiency of packet loss detection.
[0130] It should be noted that, in the embodiments of this application, the receiving device can traverse the data packets corresponding to each first container identifier; when at least one data packet corresponding to a first container identifier is not received, a second retransmission request can be sent to the sending device; wherein, the second retransmission request carries at least one first container identifier.
[0131] It should be noted that, in the embodiments of this application, if at least one data packet corresponding to the first container identification information is not received, it is considered that the link corresponding to at least one first container identification information has failed, and it is necessary to retransmit all data packets in the container corresponding to at least one first container identification information.
[0132] In summary, the sending device can sequentially place each first data packet into the container corresponding to Container_ID using the above formula (1), and determine the first index information corresponding to each data packet under the same Container_ID using the above formula (2). That is, this application can quickly sort each data packet according to formula (1) and formula (2). Unlike the current sorting method at the traditional hardware level, this application can sort according to the set formula rules, which can greatly improve the efficiency of out-of-order reordering and reduce the buffer pressure on the end side. Then, data packets under the same first container identifier information (Container_ID) can take the same path, and data packets under different Container_IDs can take different paths, so that data packets can be evenly distributed to the network link. It can sense the path taken by each data packet, reduce the degree of out-of-order data packets, and thus alleviate the pressure on the receiving device. The receiving device can determine the current receiving device based on the first information. The system obtains second container identification information corresponding to the received second data packet and determines second index information of the second data packet under the second container identification information based on the second information; wherein, the first container identification information contains the second container identification information; then, it can determine whether there is packet loss based on the second index information. If the second index information is consistent with the third index information, it is determined that there is no packet loss; wherein, the third index information contains the expected index information; or, if the second index information is inconsistent with the expected third index information, it is determined that there is packet loss. Then, it can determine the packet sequence number of the second data packet corresponding to the second index information; then, it can determine the packet sequence number corresponding to the lost data packet based on the packet sequence number of the second data packet and the number of links; it can send a first retransmission request to the sending device; wherein, the first retransmission request carries the packet sequence number corresponding to the lost data packet so that the sending device can retransmit. That is, this application can quickly detect whether there is packet loss based on the first and second information in the second data packet, thereby greatly improving the efficiency of packet loss detection.
[0133] This application provides a data packet transmission method. The method is applied to a sending device and a receiving device. The sending device acquires N first data packets from a data stream to be transmitted, where N is a positive integer. Each first data packet is encapsulated to obtain N second data packets. Each second data packet includes first information and second information. The first information identifies a first container identifier corresponding to each first data packet, and the first container identifier is associated with the transmission path of the second data packet. The second information identifies a first index of the data packet under each first container identifier. The N second data packets are sent to the receiving device. The receiving device determines whether packet loss occurs based on the first and second information. Therefore, the sending device can encapsulate each first data packet in the data stream to be transmitted to obtain N second data packets. Each second data packet includes first information and second information. The first information is used to identify the first container identifier information corresponding to each first data packet. The first container identifier information is associated with the transmission path of the second data packet. The second information is used to identify the first index information of the data packet under each first container identifier information. Since the first container identifier information is associated with the transmission path of the data packet, the transmission path of each data packet can be perceived based on the container identifier information, reducing the degree of out-of-order data packets. Then, the N second data packets can be sent to the receiving device. The receiving device can determine whether there is packet loss based on the first information and the second information, thereby quickly perceiving packet loss and improving the efficiency of packet loss detection.
[0134] Based on the above embodiments, another embodiment of this application provides a data packet transmission method, which can achieve high-efficiency end-side out-of-order reordering by adding data packets to a container and designing data packet distribution, fast packet loss detection and retransmission principles; Next, taking the write operation of Remote Direct Memory Access (RDMA) as an example, it can specifically include the following process: (1) message encapsulation; (2) data packet link distribution; (3) end-side network card packet loss judgment and retransmission; (4) ACK reception and data uploading; wherein, message encapsulation can include the following: when the sending end (sending device) starts to send traffic to the receiving end (receiving device), the sending end card needs to cut the data stream (the data stream to be transmitted) into packets, and add Container_ID (first information), index (second information) and R field between the IP and MAC headers of each data packet, the specific message format is as above. Figure 3As shown, Container_ID (first information) is used to identify the path ID of the data packet forwarding, index (second information) is used to identify the index of the data packet in Container (first container identification information) (first index information), R is a reserved field, and Header represents the newly added data packet header.
[0135] It should be noted that, in the embodiments of this application, the value retrieval process of ContainerID and index is as follows: the value of Container_ID (first container identification information) is related to path_num (number of links); where, PSN is the PSN value in the RDMA BTH header (assuming that the RDMA BTH PSN of each data packet is 0, 1, 2, 3, ...); PSN_num (number of links) is the number of uplinks from the leaf switch to the spine switch (the number of uplinks can be issued by the centralized control system or notified to the leaf switch through the EVPN protocol), as above. Figure 4 As shown, the number of uplink links in the leaf is 4, so the value range of Container_ID (first container identification information) can be set to [0, 3] (preset value range); if the network is a multi-level CLOS architecture, the value range of Container_ID is expanded according to the network scale, that is, the number of all paths from the leaf to the root aggregation device.
[0136] It should be noted that, in the embodiments of this application, the sending device can obtain the number of links by means of a centralized control system or by notification through the EVPN protocol. This application does not specifically limit the type of method by which the sending device obtains the number of links.
[0137] It should be noted that, in the embodiments of this application, the sending end can sequentially place each data packet (first data packet) of the data stream into Container_0, Container_1, Container_2, and Container_3 in a loop. That is, the Container_ID where the data packet is stored can be represented by the above formula (1). Assuming the PSN sequence is [0, 15], the division method is as above. Figure 5 As shown.
[0138] For example, in the embodiments of this application, such as Figure 5As shown, the PSNs corresponding to the segmented first data packets are 0, 1, 2, ..., 15, and the preset value range corresponding to the first container identifier information is [0,3], namely Container_0, Container_1, Container_2, Container_3. Then, the first preset operation can be performed based on the packet sequence number corresponding to each data packet and the total number of the first data packets (16) to obtain the first value. The size of the first value can be correlated with the first container identifier information, so that the first container identifier information corresponding to each first data packet can be determined.
[0139] For example, in the embodiments of this application, the sending device can perform a first preset operation based on the packet sequence number corresponding to each data packet and the total number of first data packets (16) to obtain a first value. The formula for the first preset operation can be as shown in the formula (1) above. If the PSN of the first data packet is assumed to be 0, then 0 can be modulo 16 (PSN_num) and the result is 0, that is, the Container_ID corresponding to the data packet with PSN of 0 is 0. If the PSN of the first data packet is assumed to be 1, then 1 can be modulo 16 (PSN_num) and the result is 1, then the Container_ID corresponding to the data packet with PSN of 1 is 1. By analogy, the Container_ID corresponding to each first data packet can be obtained, that is, each first data packet can be put into the container corresponding to the Container_ID in sequence.
[0140] It should be noted that, in the embodiments of this application, after determining the first container identifier information corresponding to each first data packet, the sending device also needs to mark an index value (first index information) for the data packet corresponding to each Container_ID, that is, the container corresponding to each Container_ID is set with 0, 1, ... 3 in sequence according to the storage order of the data packets.
[0141] Furthermore, in the embodiments of this application, when the sending device determines the first index information of data packets under the same first container identification information, it can first determine the packet sequence number corresponding to each data packet under the same first container identification information (Container_ID); then it can determine the first index information based on the packet sequence number and the number of links corresponding to each data packet under the same first container identification information.
[0142] It should be noted that, in the embodiments of this application, when the sending device determines the first index information based on the packet sequence number and link number corresponding to each data packet under the same first container identification information, it can determine the second value based on the packet sequence number and link number corresponding to each data packet under the same first container identification information; wherein, the second value is obtained by performing a second preset calculation based on the packet sequence number and link number corresponding to each data packet under the same first container identification information; and then the first index information can be determined based on the second value.
[0143] For example, in the embodiments of this application, such as Figure 6 As shown, a second value can be obtained by performing a second preset operation based on the packet sequence number and link number corresponding to each data packet under the same first container identification information. Then, the first index information can be determined based on the size of the second value. The second preset operation can be as shown in the above formula (2). Assuming that the packet sequence number corresponding to one of the data packets under the same first container identification information (Container_1) is 9 and the link number is 4, then the result of 9 / 4 is 2.25. Then, take the integer 2.25 as 2, that is, the size of the second value is 2, and the corresponding index information is also 2. By analogy, the second value corresponding to each data packet under the same first container identification information can be obtained, and thus the index information of each data packet under the same first container identification information can be obtained, which are 0, 1, 2, and 3 in sequence.
[0144] In other words, in the embodiments of this application, the sending device can sequentially put each first data packet into the corresponding Container_ID using the above formula (1), and determine the first index information corresponding to each data packet under the same Container_ID using the above formula (2). That is, this application can be based on the formula...
[0145] Formulas (1) and (2) are used to quickly sort each data packet. Unlike the current sorting method at the traditional hardware level (network card), this application can sort according to the set formula rules, which can greatly improve the efficiency of disordered reordering and reduce the cache pressure on the end side.
[0146] It should be noted that, in the embodiments of this application, packet link distribution may include the following: encapsulating a packet carrying a Container_ID (first information) and an index field (second information).
[0147] After the first data packet, the encapsulated data packet (second data packet) is distributed to the network-side device. Data packets under the same Container_ID (first container identification information) follow the same path, while data packets under different Container_IDs follow different paths, so that the data packets are evenly distributed to the network link.
[0148] In other words, in the embodiments of this application, data packets under the same first container identifier (Container_ID) take the same path, while data packets under different Container_IDs take different paths, so that the data packets are evenly distributed in the network link. This allows the system to perceive the path taken by each data packet, reduce the degree of data packet disorder, and thus alleviate the pressure on the receiving device.
[0149] Further, in the embodiments of this application, the packet loss judgment and retransmission of the end-side network card may include the following: After the receiving end (receiving end device) receives the Container from the network side, the NIC (receiving end network card) will verify the PSN in the newly added header inside the Container to determine whether there is packet loss. The judgment principle is as follows: 1. The receiving end device determines the Container_ID (second container identification information) to which the received data packet (the currently received second data packet) belongs. The Container_ID to which the received data packet belongs can be determined by the above formula (1); 2. Set the expected index (third index information) of each Container_ID to start from 0, according to the above formula. (2) Determine whether the second index information under the second container identification information of the currently received second data packet is the expected index (third index information). If so, continue to check. If the index (second index information) > the expected index, the PSN of the lost data packet can be obtained by the above formula (3), and then the data packet with the lost PSN can be retransmitted. If there are multiple consecutive indexes corresponding to lost PSNs, the above formula (3) needs to be looped continuously. 3. If it is detected that all data packets corresponding to a certain Container_ID have not been received, it is considered that the link corresponding to Container_ID has failed, and all data packets in the Container corresponding to Container_ID need to be retransmitted.
[0150] It should be noted that, in the embodiments of this application, the first container identification information includes the second container identification information. The second container identification information may be the container identification information corresponding to the currently received data packet. The preset value range corresponding to the first container identification information is associated with the number of links, such as... Figure 4 As shown, the number of uplinks from the leaf switch to the spine switch is 4, so the preset value range of the first container identifier information (Container_ID) can be set to [0, 3], which are Container_0, Container_1, Container_2, and Container_3 respectively.
[0151] For example, in an embodiment of this application, the receiving device can determine the second container identifier information corresponding to the currently received second data packet based on the first information. Assuming that the second container identifier information corresponding to the currently received data packet is Container_2, the receiving device can then determine the second index information of the currently received data packet under Container_2, and then determine whether there is packet loss behavior based on the second index information.
[0152] It should be noted that, in the embodiments of this application, when the receiving device determines whether there is packet loss based on the second index information, if the second index information is consistent with the third index information, it is determined that there is no packet loss; wherein, the third index information contains the expected index information; or, if the second index information is inconsistent with the expected third index information, it is determined that there is packet loss.
[0153] For example, in an embodiment of this application, the receiving device can set the expected third index information corresponding to the data packet under each container identifier information to start from 0. Assuming that the second container identifier information corresponding to the currently received data packet is Container_2, it can then determine whether the second index information of the currently received data packet under Container_2 is consistent with the expected third index information. If the second index information is consistent with the third index information, it is determined that there is no packet loss behavior. If the second index information is inconsistent with the third index information, for example, the second index information is greater than the third index information, it is determined that there is packet loss behavior.
[0154] Furthermore, in the embodiments of this application, after determining that packet loss has occurred, the receiving device can determine the packet sequence number of the second data packet corresponding to the second index information; then it can determine the packet sequence number corresponding to the lost data packet based on the packet sequence number of the second data packet and the number of links; and then it can send a first retransmission request to the sending device; wherein the first retransmission request carries the packet sequence number corresponding to the lost data packet.
[0155] For example, in the embodiments of this application, assuming that the second index information of the currently received data packet under the corresponding container identifier information (Container_1) is 3, the expected third index information is 2, and the second index information is greater than the third index information, then it is determined that there is packet loss. Then, the packet sequence number of the second data packet corresponding to the second index information can be determined to be 13. Assuming that the number of links is 4, the packet sequence number corresponding to the lost data packet can be determined based on the packet sequence number of the second data packet corresponding to the second index information and the number of links. The calculation formula for the packet sequence number corresponding to the lost data packet is as shown in the above formula (3). Based on formula (3), the packet sequence number corresponding to the lost data packet can be determined to be 9.
[0156] In other words, in the embodiments of the application, the receiving device can determine whether packet loss occurs based on the first and second information in each second data packet, thereby quickly sensing whether packet loss occurs. If packet loss occurs, the receiving device can obtain the packet sequence number corresponding to the lost data packet, and then send a first retransmission request carrying the packet sequence number of the lost data packet to the sending device so that the sending device can retransmit. That is, this application can quickly sense whether packet loss occurs based on the first and second information in the second data packet, thereby greatly improving the efficiency of packet loss detection.
[0157] It should be noted that, in the embodiments of this application, the receiving device can traverse the data packets corresponding to each first container identifier; when at least one data packet corresponding to a first container identifier is not received, a second retransmission request can be sent to the sending device; wherein, the second retransmission request carries at least one first container identifier.
[0158] It should be noted that in the embodiments of this application, if at least one data packet corresponding to the first container identification information is not received, it is considered that the link corresponding to at least one first container identification information has failed, and it is necessary to retransmit all data packets in the container corresponding to at least one first container identification information. For example, the receiving device can traverse the data packets corresponding to Container_0, Container_1, Container_2, and Container_3. If the data packets corresponding to Container_0, Container_1, and Container_2 are all received, but the data packets corresponding to Container_3 are not received, it means that all data packets corresponding to Container_3 are lost, and it is necessary to retransmit all data packets corresponding to Container_3.
[0159] It should be noted that, in the embodiments of this application, ACK reception and data transmission may include the following: the NIC (receiving network card) caches the PSN in each verified data packet into the NIC's QP queue and caches the data in memory. When the data packet of the corresponding data segment is completely received, the receiving network card (NIC) sends an ACK message to the sending network card (NIC), releases the cache of the corresponding PSN in the QP queue of the receiving NIC, and after the sending end receives the ACK of the last packet, it sends CQE to the application; after the receiving end receives the write immediatedata message, it sends the data to memory and completes the RDMA Write operation.
[0160] It should be noted that in the embodiments of this application, the NIC (receiving network card) caches the PSN in each verified data packet into the NIC's QP queue and caches the data in memory. The data packets cached in the NIC's QP queue in this embodiment are already sorted data packets. That is, the received data packets can be automatically sorted by the above formula (1) and above formula (2), and then the already sorted data packets can be cached in the network card without the network card re-sorting the data packets. This avoids sorting the data packets at a fixed hardware level, greatly improves the efficiency of out-of-order reordering, and reduces the cache pressure on the end side.
[0161] In summary, the sending device can sequentially place each first data packet into the container corresponding to Container_ID using the above formula (1), and determine the first index information corresponding to each data packet under the same Container_ID using the above formula (2). That is, this application can quickly sort each data packet according to formula (1) and formula (2). Unlike the current sorting method at the traditional hardware level, this application can sort according to the set formula rules, which can greatly improve the efficiency of out-of-order reordering and reduce the buffer pressure on the end side. Then, data packets under the same first container identifier information (Container_ID) can take the same path, and data packets under different Container_IDs can take different paths, so that data packets can be evenly distributed to the network link. It can sense the path taken by each data packet, reduce the degree of out-of-order data packets, and thus alleviate the pressure on the receiving device. The receiving device can determine the current receiving device based on the first information. The system obtains second container identification information corresponding to the received second data packet and determines second index information of the second data packet under the second container identification information based on the second information; wherein, the first container identification information contains the second container identification information; then, it can determine whether there is packet loss based on the second index information. If the second index information is consistent with the third index information, it is determined that there is no packet loss; wherein, the third index information contains the expected index information; or, if the second index information is inconsistent with the expected third index information, it is determined that there is packet loss. Then, it can determine the packet sequence number of the second data packet corresponding to the second index information; then, it can determine the packet sequence number corresponding to the lost data packet based on the packet sequence number of the second data packet and the number of links; it can send a first retransmission request to the sending device; wherein, the first retransmission request carries the packet sequence number corresponding to the lost data packet so that the sending device can retransmit. That is, this application can quickly detect whether there is packet loss based on the first and second information in the second data packet, thereby greatly improving the efficiency of packet loss detection.
[0162] This application provides a data packet transmission method. The method is applied to a sending device and a receiving device. The sending device acquires N first data packets from a data stream to be transmitted, where N is a positive integer. Each first data packet is encapsulated to obtain N second data packets. Each second data packet includes first information and second information. The first information identifies a first container identifier corresponding to each first data packet, and the first container identifier is associated with the transmission path of the second data packet. The second information identifies a first index of the data packet under each first container identifier. The N second data packets are sent to the receiving device. The receiving device determines whether packet loss occurs based on the first and second information. Therefore, the sending device can encapsulate each first data packet in the data stream to be transmitted to obtain N second data packets. Each second data packet includes first information and second information. The first information is used to identify the first container identifier information corresponding to each first data packet. The first container identifier information is associated with the transmission path of the data packet. The second information is used to identify the first index information of data packets under the same first container identifier information. Since the first container identifier information is associated with the transmission path of the data packet, the transmission path of each data packet can be perceived based on the container identifier information, reducing the degree of out-of-order transmission of data packets. Then, the N second data packets can be sent to the receiving device. The receiving device can determine whether there is packet loss based on the first information and the second information, thereby quickly perceiving packet loss and improving the efficiency of packet loss detection.
[0163] Based on the above embodiments, this application provides a transmitting device. Figure 9 A schematic diagram of the composition of the transmitting device. Figure 1 ,like Figure 9 As shown, the transmitting device 10 includes: an acquisition unit 11, an encapsulation unit 12, and a transmitting unit 13; wherein,
[0164] The acquisition unit 11 is used to acquire N first data packets in the data stream to be transmitted; wherein, N is a positive integer;
[0165] The encapsulation unit 12 is used to encapsulate each of the first data packets to obtain N second data packets; wherein each second data packet includes first information and second information, the first information is used to identify the first container identification information corresponding to each of the first data packets, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each of the first container identification information.
[0166] The sending unit 13 is used to send the N second data packets to the receiving device.
[0167] In the embodiments of this application, further, Figure 10 A schematic diagram of the composition of the transmitting device. Figure 2 ,like Figure 10 As shown, the transmitting device 10 proposed in this application embodiment may further include a first processor 14, a first memory 15 storing instructions executable by the first processor 14, and further, the transmitting device 10 may further include a first communication interface 16 and a first bus 17 for connecting the first processor 14, the first memory 15 and the first communication interface 16.
[0168] In the embodiments of this application, the first processor 14 can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and this application embodiment does not specifically limit it. The transmitting end device 10 may further include a first memory 15, which can be connected to the first processor 14. The first memory 15 is used to store executable program code, which includes computer operation instructions. The first memory 15 may include high-speed RAM memory and may also include non-volatile memory, such as at least two disk drives.
[0169] In embodiments of this application, the first bus 17 is used to connect the first communication interface 16, the first processor 14, and the first memory 15, as well as the mutual communication between these devices.
[0170] In embodiments of this application, the first memory 15 is used to store instructions and data.
[0171] Further, in an embodiment of this application, the first processor 14 is configured to acquire N first data packets from a data stream to be transmitted; wherein N is a positive integer; encapsulate each first data packet to obtain N second data packets; wherein each second data packet includes first information and second information, the first information being used to identify the first container identification information corresponding to each first data packet, the first container identification information being associated with the transmission path of the second data packet, and the second information being used to identify the first index information of the data packet under each first container identification information; and send the N second data packets to the receiving device.
[0172] In practical applications, the first memory 15 can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the first processor 14.
[0173] This application provides a transmitting device that acquires N first data packets from a data stream to be transmitted, where N is a positive integer; encapsulates each first data packet to obtain N second data packets; each second data packet includes first information and second information, the first information being used to identify the first container identifier information corresponding to each first data packet, the first container identifier information being associated with the transmission path of the second data packet, and the second information being used to identify the first index information of the data packet under each first container identifier information; and sends the N second data packets to a receiving device. Therefore, the sending device can encapsulate each first data packet to obtain N second data packets. Each second data packet includes first information and second information. The first information is used to identify the first container identifier information corresponding to each first data packet. The first container identifier information is associated with the transmission path of the data packet. The second information is used to identify the first index information of data packets under the same first container identifier information. That is, this application can identify the first container identifier information corresponding to each first data packet based on the first information, and can also identify the first index information of data packets under the same first container identifier information based on the second information. This allows for rapid sorting of each first data packet, improving the data packet reordering efficiency. Furthermore, since the first container identifier information is associated with the transmission path of the data packet, the transmission path of each data packet can be perceived based on the container identifier information, reducing the degree of data packet disorder.
[0174] This application provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the data packet transmission method described above.
[0175] Specifically, the program instructions corresponding to a data packet transmission method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to a data packet transmission method in the storage media are read or executed by an electronic device, the following steps are included:
[0176] Obtain N first data packets from the data stream to be transmitted; where N is a positive integer;
[0177] Each first data packet is encapsulated to obtain N second data packets; wherein each second data packet includes first information and second information, the first information is used to identify the first container identification information corresponding to each first data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information;
[0178] The N second data packets are sent to the receiving device.
[0179] This application also provides a computer program product, including a computer program that can be executed by a first processor 14 of a transmitting device 10 to perform the steps described in any of the foregoing methods.
[0180] In the embodiments of this application, further, Figure 11 A schematic diagram of the composition of the receiving device. Figure 1 ,like Figure 11 As shown, the receiving device 20 includes: a receiving unit 21 and a judging unit 22; wherein,
[0181] The receiving unit 21 is used to receive N second data packets sent by the sending device; wherein each second data packet includes first information and second information; the first information is used to identify the first container identification information corresponding to each second data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information;
[0182] The judgment unit 22 is used to determine whether packet loss occurs based on the first information and the second information.
[0183] In the embodiments of this application, further, Figure 12 A schematic diagram of the composition of the receiving device. Figure 2 ,like Figure 12 As shown, the receiving device 20 proposed in this application embodiment may further include a second processor 23, a second memory 24 storing instructions executable by the second processor 23, and further, the receiving device 20 may further include a second communication interface 25 and a second bus 26 for connecting the second processor 23, the second memory 24 and the second communication interface 25.
[0184] In the embodiments of this application, the second processor 23 can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other types, and this application embodiment does not specifically limit this. The receiving end device 20 may further include a second memory 24, which can be connected to the second processor 23. The second memory 24 is used to store executable program code, which includes computer operation instructions. The second memory 24 may include high-speed RAM memory and may also include non-volatile memory, such as at least two disk drives.
[0185] In embodiments of this application, the second bus 26 is used to connect the second communication interface 25, the second processor 23, and the second memory 24, as well as the mutual communication between these devices.
[0186] In embodiments of this application, the second memory 24 is used to store instructions and data.
[0187] Furthermore, in an embodiment of this application, the second processor 23 is configured to receive N second data packets sent by the sending device; wherein each second data packet includes first information and second information; the first information is used to identify the first container identification information corresponding to each second data packet, the first container identification information being associated with the transmission path of the data packet, and the second information is used to identify the first index information of data packets under the same first container identification information; and a determination is made based on the first information and the second information to determine whether packet loss occurs.
[0188] In practical applications, the aforementioned second memory 24 can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the second processor 23.
[0189] This application provides a receiving device that receives N second data packets sent by a sending device. Each second data packet includes first information and second information. The first information identifies the first container identifier information corresponding to each second data packet, and the first container identifier information is associated with the transmission path of the data packet. The second information identifies the first index information of data packets under the same first container identifier information. The existence of packet loss is determined based on the first and second information. Therefore, the first information in the second data packet identifies the first container identifier information corresponding to the data packet, and the second information in the second data packet identifies the first index information of data packets under the same first container identifier information. This allows for the determination of whether packet loss occurs based on the first and second information, thereby improving the efficiency of packet loss detection.
[0190] This application provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the data packet transmission method described above.
[0191] Specifically, the program instructions corresponding to a data packet transmission method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to a data packet transmission method in the storage media are read or executed by an electronic device, the following steps are included:
[0192] Receive N second data packets sent by the sending device; wherein each second data packet includes first information and second information; the first information is used to identify the first container identification information corresponding to each second data packet, the first container identification information is associated with the transmission path of the second data packet, and the second information is used to identify the first index information of the data packet under each first container identification information;
[0193] Based on the first information and the second information, determine whether packet loss occurs.
[0194] This application also provides a computer program product, including a computer program that can be executed by a second processor 23 of a receiving device 20 to perform the steps described in any of the foregoing methods.
[0195] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0196] This application is described with reference to schematic and / or block diagrams of implementations of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the schematic and / or block diagrams can be implemented by computer program instructions, and combinations of blocks in the schematic and / or block diagrams can be implemented. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the schematic and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0197] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the implementation flow diagram. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0198] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0199] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A method of data packet transmission, characterized by, The method is applied to a sending end device, and the method comprises: obtaining N first data packets in a data stream to be transmitted; wherein N is a positive integer; performing encapsulation processing on each first data packet to obtain N second data packets; wherein each second data packet comprises first information and second information, the first information is used to identify first container identification information corresponding to each first data packet, the first container identification information is associated with a transmission path of the second data packet, and the second information is used to identify first index information of data packets under each first container identification information; each first data packet comprises the first information and the second information; wherein the first information and the second information are located between an Internet Protocol (IP) header and a Media Access Control (MAC) header of each first data packet, and the encapsulation processing on each first data packet to obtain N second data packets comprises: determining a preset value interval corresponding to the first container identification information; wherein the preset value interval is associated with a link quantity; determining the first container identification information corresponding to each first data packet and the first index information of data packets under the same first container identification information based on the preset value interval, a packet sequence number corresponding to each first data packet, and a total number of the first data packets; performing encapsulation processing on each first data packet based on the first container identification information and the first index information to obtain the N second data packets; sending the N second data packets to a receiving end device.
2. The method of claim 1, wherein, The determination of the first container identification information corresponding to each first data packet based on the preset value interval, the packet sequence number corresponding to each first data packet, and the total number of the first data packets comprises: determining a first value based on the packet sequence number corresponding to each first data packet and the total number of the first data packets; wherein the first value is obtained by performing first preset operation based on the packet sequence number corresponding to each first data packet and the total number of the first data packets; determining the first container identification information corresponding to each first data packet based on the first value and the preset value interval.
3. The method of claim 1, wherein, The determination of the first index information of data packets under the same first container identification information comprises: determining a packet sequence number corresponding to each data packet under the same first container identification information; determining the first index information based on the packet sequence number corresponding to each data packet under the same first container identification information and the link quantity.
4. The method of claim 3, wherein, The determination of the first index information based on the packet sequence number corresponding to each data packet under the same first container identification information and the link quantity comprises: determining a second value based on the packet sequence number corresponding to each data packet under the same first container identification information and the link quantity; wherein the second value is obtained by performing second preset operation based on the packet sequence number corresponding to each data packet under the same first container identification information and the link quantity; determining the first index information based on the second value.
5. The method of claim 1, wherein, The sending of the N second data packets to the receiving end device comprises: sending the data packet under the same first container identification information to the receiving end device through the same data link.
6. The method of claim 1, wherein, The method further comprises: receiving a first retransmission request sent by the receiving end device; wherein the first retransmission request carries a packet sequence number corresponding to a missing data packet; wherein the missing data packet contains one or more data packets in the second data packet; retransmitting the corresponding missing data packet to the receiving end device based on the packet sequence number corresponding to the missing data packet.
7. The method of claim 1, wherein, The method further comprises: receiving a second retransmission request sent by the receiving end device; wherein the second retransmission request carries at least one first container identification information; retransmitting the data packet corresponding to the at least one first container identification information to the receiving end device.
8. A data packet transmission method, characterized by, The method is applied to a receiving end device, and the method comprises: receiving N second data packets sent by a sending end device; wherein each second data packet comprises first information and second information; the first information is used to identify first container identification information corresponding to each second data packet, the first container identification information is associated with a transmission path of the second data packet, and the second information is used to identify first index information of data packets under each first container identification information; determining second container identification information corresponding to the currently received second data packet based on the first information, and determining second index information of the second data packet under the second container identification information based on the second information; wherein the first container identification information contains the second container identification information; judging whether there is a packet loss behavior based on the second index information; wherein the judgment of whether there is a packet loss behavior based on the second index information comprises: if the second index information is consistent with third index information, it is determined that there is no packet loss behavior; wherein the third index information contains expected index information; or if the second index information is inconsistent with the expected third index information, it is determined that there is a packet loss behavior; determining a packet sequence number of the second data packet corresponding to the second index information; determining a packet sequence number corresponding to a missing data packet based on the packet sequence number of the second data packet and the number of links; sending the first retransmission request to the sending end device; wherein the first retransmission request carries the packet sequence number corresponding to the missing data packet.
9. The method of claim 8, wherein, The method further comprises: traversing data packets corresponding to each first container identification information; when there is at least one first container identification information corresponding to a data packet that has not been received, sending a second retransmission request to the sending end device; wherein the second retransmission request carries the at least one first container identification information.
10. A transmitting device, comprising: The sending end device comprises an acquisition unit, an encapsulation unit and a sending unit; wherein the acquisition unit is configured to acquire N first data packets in a data stream to be transmitted; wherein N is a positive integer; the encapsulation unit is configured to encapsulate the N first data packets into N second data packets; wherein each second data packet comprises first information and second information; the first information is used to identify first container identification information corresponding to each second data packet, the first container identification information is associated with a transmission path of the second data packet, and the second information is used to identify first index information of data packets under each first container identification information; The encapsulation unit is configured to perform encapsulation processing on each of the first data packets to obtain N second data packets; each of the second data packets comprises first information and second information; the first information is used to identify first container identification information corresponding to each of the first data packets, the first container identification information is associated with a transmission path of the second data packet, and the second information is used to identify first index information of data packets under each of the first container identification information; each of the first data packets comprises the first information and the second information; the first information and the second information are located between an Internet Protocol (IP) header and a Media Access Control (MAC) header of each of the first data packets; the encapsulation processing on each of the first data packets to obtain the N second data packets comprises: determining a preset value interval corresponding to the first container identification information; the preset value interval is associated with a number of links; determining the first container identification information corresponding to each of the first data packets based on the preset value interval, a packet sequence number corresponding to each of the first data packets, and a total number of the first data packets, and determining the first index information of data packets under the same first container identification information; performing encapsulation processing on each of the first data packets based on the first container identification information and the first index information to obtain the N second data packets. The sending unit is configured to send the N second data packets to a receiving end device.
11. A transmitting device, comprising: The sending end device comprises a first processor and a first memory; wherein, The first memory is configured to store a computer program capable of running on the processor; The first processor is configured to execute the method in any one of claims 1-7 when running the computer program.
12. A receiving end device, characterized by The receiving end device comprises a receiving unit and a judging unit; wherein, The receiving unit is configured to receive N second data packets sent by a sending end device; each of the second data packets comprises first information and second information; the first information is used to identify first container identification information corresponding to each of the second data packets, the first container identification information is associated with a transmission path of the second data packet, and the second information is used to identify first index information of data packets under each of the first container identification information. The judging unit is configured to determine second container identification information corresponding to the currently received second data packet based on the first information, and determine second index information of the second data packet under the second container identification information based on the second information; the first container identification information contains the second container identification information; judge whether there is a packet loss behavior based on the second index information; the judgment whether there is a packet loss behavior based on the second index information includes: if the second index information is consistent with third index information, it is determined that there is no packet loss behavior; the third index information contains expected index information; or, if the second index information is inconsistent with the expected third index information, it is determined that there is a packet loss behavior; determine a packet sequence number of the second data packet corresponding to the second index information; determine a packet sequence number corresponding to a lost data packet based on the packet sequence number of the second data packet and the number of links; send the first retransmission request to the sending end device; the first retransmission request carries the packet sequence number corresponding to the lost data packet.
13. A receiving end device, characterized by The receiving end device comprises a second processor and a second memory; wherein, The second memory is configured to store a computer program capable of running on the processor; The second processor is configured to execute the method of any one of claims 8-9 when running the computer program.
14. A computer-readable storage medium, characterized in that, The storage medium has computer program code stored thereon, which, when executed by a computer, executes the method of any one of claims 1-7 or 8-9.
15. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the method of any one of claims 1-7 or 8-9.
Citation Information
Patent Citations
Communication method between containers, electronic equipment and computer readable storage medium
CN113489770A
Packet loss detection method and device, and storage medium
CN114389972A