Anti-packet-loss data transmission method based on VRB

By setting the cache area at the kernel layer on the receiving end and retransmitting only the lost packets, the problem of low packet loss efficiency of the RDMA network card transmission layer is solved, improving data transmission efficiency and avoiding packet serial number confusion.

CN120185778APending Publication Date: 2025-06-20VISIONVERA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510166322.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

In the prior art, the transmission layer of the RDMA network card has low packet loss efficiency, resulting in the sending end that when a packet is dropped on the receiving end, the sending end needs to retransmit all packets after the lost packet, thereby reducing the data transmission efficiency.

Method used

The cache area is set up at the kernel layer of the receiving end. After receiving the data packet, it is stored in the cache area. If a certain data packet is not successfully received, the sending end will request to retransmit and only retransmit the lost data packet, rather than retransmitting all data packets after the lost data packet.

Benefits of technology

By retransmitting only lost packets, data transmission efficiency is improved and packet serial number confusion caused by packet loss retransmission is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120185778A_ABST
    Figure CN120185778A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a VRB-based packet loss resistant data transmission method, which is applied to a first device and comprises the following steps: storing a first data packet in a first cache region when the first data packet sent by a second device is successfully received, a kernel layer of the first device is provided with a first cache region; under the condition that the second data packet sent by the second equipment is not successfully received, first indication information is sent to the second equipment, and the first indication information is used for indicating that the second data packet is not successfully received; under the condition that a second data packet retransmitted by the second equipment is successfully received, storing the second data packet into the first cache region; and under the condition that a group of data packets exist in the first cache region, transmitting the group of data packets to a kernel layer according to a sequence number sequence. Therefore, according to the embodiment of the invention, the data transmission efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a packet loss resistant data transmission method based on VRB. Background Art

[0002] In traditional network communication, data usually needs to be copied multiple times between the operating systems of the sending and receiving ends through the protocol stack. However, the Remote Direct Memory Access (RDMA) technology can bypass the operating system and directly transfer data from one memory to another, thus avoiding these copy operations and improving the data transmission efficiency.

[0003] However, the transmission layer of the RDMA network card has low efficiency in handling packet loss. For example, when the receiving end discards a data packet, the sending end needs to retransmit all the data packets after the lost data packet, thereby reducing the data transmission efficiency. Summary of the Invention

[0004] Embodiments of this application provide a packet loss resistant data transmission method based on VRB to solve the problem that the packet loss retransmission strategy in the prior art reduces the data transmission efficiency.

[0005] In a first aspect, embodiments of this application provide a packet loss resistant data transmission method based on VRB, which is applied to a first device. A first buffer area is set in the kernel layer of the first device. The method includes:

[0006] When a first data packet sent by a second device is successfully received, store the first data packet in the first buffer area;

[0007] When a second data packet sent by the second device is not successfully received, send a first indication message to the second device, where the first indication message is used to indicate that the second data packet is not successfully received;

[0008] When the second data packet re - sent by the second device is successfully received, store the second data packet in the first buffer area;

[0009] When a set of data packets exists in the first buffer area, transmit the set of data packets to the kernel layer in sequence number order;

[0010] Wherein, a set of data packets includes N data packets with consecutive sequence numbers, and N is greater than 1.

[0011] In a second aspect, embodiments of this application provide a packet loss resistant data transmission method based on VRB, which is applied to a second device. A second buffer area is set in the kernel layer of the second device. The method includes:

[0012] Send a data packet to the first device and store the sent data packet in the second buffer area;

[0013] In the case of receiving the first indication information sent by the first device, obtain a second data packet from the second buffer area according to the first indication information, and re-send the second data packet to the first device, where the first indication information is used to indicate that the second data packet has not been successfully received.

[0014] In a third aspect, an embodiment of the present application provides a VRB-based data transmission device for anti-packet loss, which is applied to a first device. A first buffer area is provided in the kernel layer set by the first device; the device includes:

[0015] A first storage module, configured to store the first data packet in the first buffer area when the first data packet sent by the second device is successfully received;

[0016] A first sending module, configured to send first indication information to the second device when the second data packet sent by the second device is not successfully received, where the first indication information is used to indicate that the second data packet has not been successfully received;

[0017] A second storage module, configured to store the second data packet in the first buffer area when the second data packet re-sent by the second device is successfully received;

[0018] A transmission module, configured to transmit a group of data packets to the kernel layer in sequence of serial numbers when a group of data packets exists in the first buffer area;

[0019] Wherein, a group of data packets includes N data packets with consecutive serial numbers, and N is greater than 1.

[0020] In a fourth aspect, an embodiment of the present application provides a VRB-based data transmission device for anti-packet loss, which is applied to a second device. A second buffer area is provided in the kernel layer set by the second device; the device includes:

[0021] A second sending module, configured to send a data packet to the first device;

[0022] A third storage module, configured to store the sent data packet in the second buffer area;

[0023] A third sending module, configured to, when receiving first indication information sent by the first device, obtain a second data packet from the second buffer area according to the first indication information, and re-send the second data packet to the first device, where the first indication information is used to indicate that the second data packet has not been successfully received.

[0024] In a fifth aspect, an embodiment of the present application provides an electronic device, including:

[0025] One or more processors; and

[0026] One or more machine-readable media storing instructions, which, when executed by the one or more processors, cause the electronic device to execute the VRB-based packet loss resistant data transmission method described in the first aspect above, or execute the VRB-based packet loss resistant data transmission method described in the second aspect above.

[0027] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, and a computer program stored therein causes a processor to execute the VRB-based packet loss resistant data transmission method described in the first aspect above, or execute the VRB-based packet loss resistant data transmission method described in the second aspect above.

[0028] In some embodiments of the present application, the first device is provided with a kernel layer, and the kernel layer is provided with a first buffer area. Wherein, when the first device successfully receives a first data packet sent by the second device, the first data packet is stored in the first buffer area; when the first device fails to receive a second data packet sent by the second device, the first device sends first indication information to the second device to indicate that the second data packet has not been successfully received, so that the second device re-sends the second data packet to the first device. Thus, when the first device successfully receives the second data packet re-sent by the second device, the second data packet is stored in the first buffer area; and when there is a set of data packets in the first buffer area, the set of data packets is transmitted to the kernel layer of the first device in sequence number order, where a set of data packets includes N data packets with consecutive sequence numbers, and N is greater than 1.

[0029] It can be seen that in some embodiments of the present application, a first buffer area can be set in the kernel layer of the receiving end (i.e., the first device). In this way, when the receiving end receives a data packet, it is stored in the first buffer area. If a certain data packet is not successfully received, the sending end (i.e., the second device) can be requested to retransmit the data packet, rather than retransmitting all data packets after retransmitting the lost data packet as in the prior art, thereby improving the data transmission efficiency. Moreover, every time the data packets stored in the first buffer area form a group, a group of data packets is submitted to the kernel layer of the first device in the order of sequence numbers, which can avoid the confusion of data packet sequence numbers caused by lost packet retransmission and further improve the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a flowchart of the steps of a VRB-based packet loss resistant data transmission method of the present application;

[0031] Figure 2 is a schematic diagram of all data packets after the sending end retransmits the lost data packet;

[0032] Figure 3 is a schematic diagram of the sending end retransmitting the lost data packet;

[0033] Figure 4 is a flowchart of the steps of another VRB-based packet loss resistant data transmission method of the present application;

[0034] Figure 5 is a schematic diagram of the specific implementation manner of the VRB-based packet loss resistant data transmission method of the embodiments of the present application;

[0035] Figure 6 is a block diagram of the structure of a VRB-based packet loss resistant data transmission device of the present application;

[0036] Figure 7 is a block diagram of the structure of another VRB-based packet loss resistant data transmission device of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0037] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0038] It should be noted that "or" in this application means at least one of the connected objects. For example, the protection scope of "A or B" covers at least three scenarios, namely, Scenario 1: including A but not including B; Scenario 2: including B but not including A; Scenario 3: including both A and B. In addition, the terms "A and / or B", "at least one of A and B", and "at least one of A or B" also cover at least the above three scenarios respectively. The character " / " generally indicates an "or" relationship between the associated objects before and after.

[0039] In the prior art, RDMA is a new memory access technology that allows a server to directly read and write the memory data of other servers at high speed without the time-consuming processing of the operating system / Central Processing Unit (CPU).

[0040] Specifically at the protocol level, RDMA can use two protocols: InfiniBand (IB) and Remote Direct Memory Access over Converged Ethernet (RoCE). Among them, Infiniband is a network communication protocol that provides a switched-based architecture with point-to-point bidirectional serial links between processor nodes and between processor nodes and input / output nodes, supporting RDMA technology, allowing remote memory access without operating system intervention, and improving throughput and reducing latency. On the InfiniBand network, the IB link layer uses hop-by-hop, credit-based flow control, and packet loss is very rare. However, Infiniband networking requires a dedicated Network Interface Card (NIC) and a switch to achieve data transmission, resulting in relatively high costs.

[0041] RoCE is a network technology that combines the characteristics of RDMA and Ethernet switches. Among them, RoCEv2 is a tunneling technology based on the Internet Protocol (IP) network. RoCEv2 retains the IB transport layer but replaces the IB network layer with IP and User Datagram Protocol (UDP) encapsulation, where the IP layer is used for routing and the UDP layer is used for Equal-cost multi-path routing (ECMP). However, the transmission layer of the RDMA network card has low efficiency in handling packet loss. For example, when the receiving end discards a data packet, the sending end needs to retransmit all the packets after the lost packet (as shown in Figure 2 When the data packet with sequence number 2 is lost, the sending end needs to retransmit the data packets with sequence numbers 2 to 5), resulting in a sharp reduction in RDMA efficiency.

[0042] In some embodiments of the present application, a first buffer area may be set in the kernel layer of the receiving end (i.e., the first device). In this way, when the receiving end receives a data packet, it is stored in the first buffer area. If a certain data packet is not successfully received, the sending end (i.e., the second device) may be requested to retransmit the data packet (for example Figure 3 as shown, when the data packet with sequence number 3 is lost, only the data packet with sequence number 3 is retransmitted), rather than retransmitting all data packets after the lost data packet as in the prior art, thereby improving the data transmission efficiency; moreover, for each group of data packets stored in the first buffer area, a group of data packets is submitted to the kernel layer in sequence number order, which can avoid the confusion of data packet sequence numbers caused by packet loss retransmission and further improve the data transmission efficiency.

[0043] The anti-packet-loss data transmission method based on VRB in the embodiments of the present application will be introduced in detail below.

[0044] In a first aspect, an embodiment of the present application provides a method for processing data anti-packet-loss based on virtual remote block (V2V RDMA BAND, VRB); the method is applied to a first device, and a first buffer area is set in the kernel layer of the first device; the first buffer area is used to cache data packets received by the first device.

[0045] It should be noted that the VRB protocol is a remote data reading protocol provided to support big data transmission in the intelligent computing center.

[0046] Optionally, the first device is a server.

[0047] It can be understood that in some embodiments of the present application, the first device is used to receive data packets sent by the second device, then the second device can be called the sending end, and the first device can be called the receiving end.

[0048] Optionally, the kernel layer of the first device is a Remote Direct Memory Access (RDMA) kernel layer. That is, in some embodiments of the present application, a first buffer area is set in the RDMA kernel layer of the first device, so that the data packets received by the first device can be cached in the first buffer area of the RDMA kernel layer.

[0049] See Figure 1 , the method may include the following steps 101 to 104:

[0050] Step 101: When the first data packet sent by the second device is successfully received, store the first data packet in the first buffer area.

[0051] Optionally, the second device has a kernel layer, and a second cache area is provided in the kernel layer of the second device. The second cache area in the kernel layer of the second device can be used to back up the data packets sent by the second device. For example, if the second device sends a data packet, the data packet is stored in the second cache area.

[0052] Optionally, the kernel layer of the second device is an RDMA kernel layer. That is, in some embodiments of the present application, a second cache area is provided in the RDMA kernel layer of the second device, so that the second device can back up the sent data packets in the second cache area of its RDMA kernel layer.

[0053] Step 102: In the case where the second data packet sent by the second device is not successfully received, send first indication information to the second device.

[0054] The first indication information is used to indicate that the second data packet is not successfully received.

[0055] It can be seen from Steps 101 to 102 that in some embodiments of the present application, when the second device sends a data packet to the first device, if the first device successfully receives the first data packet, the first data packet can be cached in the first cache area first. If the first device does not successfully receive the second data packet, the above first indication information can be sent to the second device to inform the second device that it has not successfully received the second data packet, so that the second device can re-send the second data packet to the first device based on the first indication information. It can be seen that in some embodiments of the present application, only the data packets that are not successfully received (i.e., lost data packets) can be retransmitted, thereby improving the data transmission efficiency.

[0056] In addition, a second cache area is provided in the kernel layer of the second device to back up the data packets sent by the second device. In this way, after the second device receives the above first indication information, it can directly extract the data packet from the second cache area in the kernel layer of the second device for retransmission, thereby shortening the retransmission time of the data packet and further improving the data transmission efficiency.

[0057] Optionally, the first indication information includes the sequence number of the second data packet. In this way, after the second device receives the first indication information, it can determine the data packet to be retransmitted based on the sequence number in the first indication information. For example, if the data packets can be distinguished by ID numbers, the sequence number of the data packet can be the ID number.

[0058] Step 103: In the case where the second data packet re-sent by the second device is successfully received, store the second data packet in the first cache area.

[0059] As can be seen from steps 101 and 103, in some embodiments of the present application, whether it is a retransmitted data packet or a non-retransmitted data packet, once the first device successfully receives it, it can store it in the first buffer area.

[0060] Step 104: When there is a set of data packets in the first buffer area, transmit the set of data packets to the kernel layer (i.e., the kernel layer of the first device) in sequence number order.

[0061] Wherein, a set of data packets includes N data packets with consecutive sequence numbers, and N is greater than 1.

[0062] It can be seen that in some embodiments of the present application, when the first device successfully receives a data packet, it stores it in the first buffer area. Among them, if the data packets already stored in the current first buffer area can form the above set of data packets, the set of data packets can be transmitted to the kernel layer of the first device in sequence number order, so as to facilitate the kernel layer of the first device to process the data packets.

[0063] For example, taking 6 data packets as a set, the first device stores each received data packet in the first buffer area. If the data packets with sequence numbers from 1 to 6 are already stored in the current first buffer area and the sequence numbers of these 6 data packets are consecutive, they can be submitted to the kernel layer of the first device in the normal sequence number order;

[0064] After that, for the data packets with sequence numbers 7 - 12, if the data packet with sequence number 8 is lost, the retransmission process of the data packet with sequence number 8 is executed (that is, the first device sends the first indication information carrying sequence number 8 to the second device, so that the second device retransmits the data packet with sequence number 8); it should be noted that during the execution of the retransmission process of the data packet with sequence number 8, the data with sequence numbers 9 - 12 is being transmitted normally at the same time. In this way, in the first buffer area, the data packet with sequence number 8 may be located between the data packets with sequence numbers 9 - 12, resulting in the sorting of the data packets not conforming to the sequence number order; in this case, after successfully receiving the data packet with sequence number 8 again and successfully receiving the data packets with sequence numbers 7, 9 - 12, the data packets with sequence numbers 7 - 12 can be sorted in sequence number order and then submitted to the kernel layer of the first device for processing. In this way, the disorder of the data packet sequence numbers caused by packet loss and retransmission can be avoided, and the data transmission efficiency is further improved.

[0065] As can be seen from the above steps 101 to 104, in some embodiments of the present application, the first device is provided with a kernel layer, and the kernel layer is provided with a first cache area. Among them, when the first device successfully receives the first data packet sent by the second device, the first data packet is stored in the first cache area; when the first device fails to receive the second data packet sent by the second device, the first device sends a first indication message to the second device, indicating that the second data packet has not been successfully received, so that the second device can re-send the second data packet to the first device. Thus, when the first device successfully receives the second data packet re-sent by the second device, the second data packet is stored in the first cache area; and when there is a group of data packets in the first cache area, the group of data packets is transmitted to the kernel layer of the first device in the order of sequence numbers, where a group of data packets includes N data packets with consecutive sequence numbers, and N is greater than 1.

[0066] It can be seen that in some embodiments of the present application, a first cache area can be set in the kernel layer of the receiving end (i.e., the first device). In this way, when the receiving end receives a data packet, it is stored in the first cache area. If a certain data packet fails to be received successfully, the receiving end can request the sending end (i.e., the second device) to re-transmit the data packet, rather than re-transmitting all data packets after the previous response packet as in the prior art, thereby improving the data transmission efficiency; and when the data packets stored in the first cache area are grouped into a group, a group of data packets is submitted to the kernel layer of the first device in the order of sequence numbers, which can avoid the disorder of data packet sequence numbers caused by packet loss re-transmission and further improve the data transmission efficiency.

[0067] Optionally, the method further includes:

[0068] When there is a group of data packets in the first cache area, a second indication message is sent to the second device, where the second indication message is used to indicate that the group of data packets has been successfully received.

[0069] It can be seen from this that in some embodiments of the present application, when the first device successfully receives a group of data packets, a second indication message can be sent to the second device to inform the second device that the group of data packets has been successfully received, so as to facilitate the second device to delete the group of data packets backed up in the second cache area, and further avoid occupying the storage space in the second cache area.

[0070] Optionally, the method further includes:

[0071] Obtain the network bandwidth within a first time period, where the first time period is the time period between the moment when the first device starts to receive data packets and the moment when the first device sends the first indication message;

[0072] Adjust the size of the first buffer area according to the network bandwidth within the first time period.

[0073] Wherein, the network bandwidth within the first time period = the number of data packets received by the first device within the first time period / the duration of the first time period.

[0074] It can be seen therefrom that the first buffer area set in the kernel layer of the first device can be adjusted according to the actual network quality, so that the size of the first buffer area can match the actual network quality.

[0075] Optionally, when the network bandwidth within the first time period is less than or equal to the first threshold, reduce the size of the first buffer area.

[0076] Optionally, when the network bandwidth within the first time period is greater than the first threshold, increase the size of the first buffer area.

[0077] It can be understood that the step size for increasing or decreasing the first buffer area can be set in advance.

[0078] In a second aspect, an embodiment of the present application provides a VRB-based anti-packet-loss data transmission method; applied to a second device, a second buffer area is set in the kernel layer of the second device, and the second buffer area is used to back up the data already sent by the second device.

[0079] Optionally, the second device is a server.

[0080] It can be understood that in some embodiments of the present application, the first device is used to receive data packets sent by the second device, then the second device can be referred to as the sending end, and the first device can be referred to as the receiving end.

[0081] Optionally, the kernel layer of the second device is an RDMA kernel layer. That is, in some embodiments of the present application, a second buffer area is set in the RDMA kernel layer of the second device, so that the second device can back up the sent data packets in the second buffer area of its RDMA kernel layer, so that the data packets required for retransmission can be quickly obtained from the second buffer area when packet retransmission is required.

[0082] See Figure 4 , the method may include the following steps 401 to 402:

[0083] Step 401: Send a data packet to the first device and store the sent data packet in the second buffer area.

[0084] Optionally, if the kernel layer of the second device is an RDMA kernel layer, the second device can bypass the operating system and directly read data from the memory. Correspondingly, the data packet sent by the second device may include the data packet read from the memory of the second device.

[0085] As can be seen from step 401, the second buffer area is used to back up the data packets sent by the second device. For example, if the second device sends a data packet, the data packet is stored in the second buffer area.

[0086] Step 402: When receiving the first indication information sent by the first device, obtain a second data packet from the second buffer area according to the first indication information, and re - send the second data packet to the first device.

[0087] Wherein, the first indication information is used to indicate that the second data packet has not been successfully received.

[0088] In addition, a second buffer area is set in the kernel layer of the second device to back up the data packets sent by the second device. In this way, after the second device receives the above - mentioned first indication information, it can directly extract the data packet from the second buffer area in the kernel layer of the second device for re - transmission, thereby shortening the re - transmission time of the data packet and further improving the data transmission efficiency.

[0089] Optionally, the first indication information includes the sequence number of the second data packet. In this way, after the second device receives the first indication information, it can determine the data packet to be re - sent based on the sequence number in the first indication information. For example, if the data packets can be distinguished by ID numbers, the sequence number of the data packet can be the ID number.

[0090] As can be seen from the above steps 401 to 402, in some embodiments of the present application, the second device can send data packets to the first device and store the sent data packets in the second buffer area. Thus, when receiving the first indication information sent by the first device, according to the first indication information, the second data packet is obtained from the second buffer area and re - sent to the first device, where the first indication information is used to indicate that the second data packet has not been successfully received.

[0091] It can be seen that in some embodiments of the present application, a second buffer area can be set in the kernel layer of the receiving end. In this way, when the second device sends a data packet, it is backed up in the second buffer area. As a result, after the second device receives the above - mentioned first indication information, it can directly extract the data packet from the second buffer area for re - transmission, without transmitting the first indication information to the upper layer for parsing and processing (that is, without re - obtaining the data packet to be re - sent from the upper layer), thereby shortening the re - transmission time of the data packet and further improving the data transmission efficiency.

[0092] It should be noted that in the current prior art, when the sending end supporting the RDMA technology needs to re - send a certain or certain data packets, it often needs to re - read the data packets to be re - sent from the memory, that is, to perform a memory read operation again. Among them, when the quantity in the memory is large, it takes a long time to find the data packets to be re - sent, thus prolonging the data re - transmission duration. In some embodiments of the present application, by setting a second cache area in the RDMA kernel layer to back up the data packets already sent by the second device, the data packets to be re - sent can be found more quickly in the second cache area, thereby shortening the data re - transmission duration.

[0093] Optionally, the method further includes:

[0094] When receiving the second indication information, deleting the data packets indicated by the second indication information stored in the second cache area;

[0095] Wherein, the second indication information is used to indicate a set of successfully received data packets, and a set of data packets includes N consecutively numbered data packets, and N is greater than 1.

[0096] It can be seen that in some embodiments of the present application, when the first device successfully receives a set of data packets, it can send the second indication information to the second device to inform the second device that the set of data packets has been successfully received, so as to facilitate the second device to delete the set of data packets backed up in the second cache area, and further avoid occupying the storage space in the second cache area.

[0097] Optionally, the method further includes:

[0098] Obtaining a first parameter within a second time period, where the first parameter includes at least one of the following: network bandwidth, packet loss rate of data packets, network delay generated by re - sent data packets. The second time period is the time period between a first moment and a second moment. The first moment is the moment when the second device starts to send data packets, and the second moment is the moment when the second device receives the first indication information;

[0099] Adjusting at least one of the following according to the first parameter: the packet sending rate of data packets, the size of the second cache area.

[0100] Wherein, the network bandwidth within the above - mentioned second time period = the number of data packets sent within the second time period / the duration of the second time period;

[0101] The packet loss rate within the above - mentioned second time period = the number of lost packets within the second time period / the number of data packets sent within the second time period;

[0102] The network delay caused by the retransmitted data packet = the second moment - the moment when the second device sends the second data packet (i.e., the duration from the moment of first sending the second data packet to the moment of sending the first indication message).

[0103] As can be seen from the above, in some embodiments of the present application, the second device can adjust the packet sending rate according to at least one of the network bandwidth, packet loss rate, and network delay within the second time period, so as to adjust the network congestion situation; and / or adjust the size of the second buffer area according to at least one of the network bandwidth, packet loss rate, and network delay within the second time period, so that the size of the second buffer area can match the actual network quality.

[0104] Optionally, when at least one of the following conditions is met, reduce the packet sending rate and / or reduce the size of the second buffer area:

[0105] The network bandwidth within the second time period is less than or equal to the second threshold;

[0106] The packet loss rate within the second time period is greater than or equal to the third threshold;

[0107] The network delay within the second time period is greater than or equal to the fourth threshold.

[0108] Optionally, when at least one of the following conditions is met, increase the packet sending rate and / or increase the size of the second buffer area:

[0109] The network bandwidth within the second time period is greater than the second threshold;

[0110] The packet loss rate within the second time period is less than the third threshold;

[0111] The network delay within the second time period is less than the fourth threshold.

[0112] That is, when the network bandwidth within the second time period is small, the packet loss rate is large, and the network delay is long, the packet sending rate can be reduced and / or the size of the second buffer area can be reduced; when the network bandwidth within the second time period is large, the packet loss rate is small, and the network delay is short, the packet sending rate can be increased and / or the size of the second buffer area can be increased.

[0113] It can be understood that the step size for increasing or decreasing the packet sending rate of the data packet, and the step size for increasing or decreasing the size of the second buffer area, can be set in advance.

[0114] In summary, the specific implementation manner of the VRB-based packet loss resistant data transmission method in the embodiments of the present application applied to the visual network can be as follows Figure 5 as shown, specifically as follows:

[0115] (1) Visual network management is the basis for remote data reading (V2V RDMA BAND, VRB). Devices in the visual network first need to obtain the authentication qualification of the visual network in order to conduct various services in the visual network.

[0116] Among them, the network access and withdrawal management can achieve the legal authentication of visual network devices;

[0117] The keep-alive management is the dynamic detection of visual network devices;

[0118] The data management is to manage data from the data transmission level, that is, to manage data according to different data requirements;

[0119] The service management is to manage each service to ensure the normal operation of various services, such as meetings, video calls, live broadcasts, etc.

[0120] (2) VRB packet loss resistance management. Among them, the management strategies in the packet loss resistance management are as follows:

[0121] 2.1 Packet sending confirmation management:

[0122] It improves the original packet loss mechanism go-back-N (that is, all packets after the lost packet need to be retransmitted), so as to retransmit specific lost packet data. For example, two devices communicate with each other, one is the sending end and the other is the receiving end; as Figure 3 shown, each packet at the sending end will record the ID number, packet sending time, etc.; if the receiving end fails to receive a packet, such as the packet with ID 3 is lost, the receiving end will send the first indication information carrying the ID number of the lost packet (that is, VRB_ACK, loss_id = 3); in this way, after the sending end receives the first indication information, it can extract the ID number of the lost packet, record the receiving time of the first indication information, and retransmit the packet with ID 3.

[0123] Among them, Figure 3 in VRB_OPEN, ID = 0 represents the packet for establishing a connection; VRB_OPEN_ACK, ID = 0 is used to indicate that the packet for establishing a connection is successfully received, that is, it represents the start of establishing a connection; VRB_PAYLOAD represents data transmission (for example, VRB_PAYLOAD, ID = 1 represents the transmission of the packet with ID 1); VRB_ACK, loss_id = 3 represents that the packet with ID 3 is lost; VRB_ACK represents that a group of packets are successfully received ( Figure 3 10 packets in a group in); VRB_CLOSE, ID = 11 represents the packet for ending the connection, and VRB_CLOSE_ACK, ID = 11 is used to indicate the end of the connection.

[0124] It should be noted that the RDMA kernel layer at the sending end can set a second buffer area for backing up the sent data packets. In this way, after the sending end receives the above first indication information, it can obtain the data packets to be retransmitted based on the sequence numbers carried in the first indication information.

[0125] 2.2 Intelligent network detection management, network quality management, and packet loss calculation management:

[0126] If there are unstable situations in the network environment, such as packet loss and increased latency when there is congestion. For example Figure 3 in the example of

[0127] the moment when the data packet starts to be sent (i.e., the moment when the sending end sends VRB_OPEN_ACK, ID = 0) T1;

[0128] the moment when the first indication information is received (i.e., the moment when VRB_ACK, loss_id = 3 is received) T2;

[0129] and the sending moment of each data packet. For example, the moment when the data packet with ID = 3 is first sent is recorded as T3;

[0130] Thus, the sending end can perform the following calculations:

[0131] Network latency = T2 - T3;

[0132] Network bandwidth = the number of data packets sent during the time period from T1 to T2 / the duration from T1 to T2;

[0133] Packet loss rate = the number of lost data packets during the time period from T1 to T2 / the number of data packets sent during the time period from T1 to T2).

[0134] Then, the sending end can adjust the packet sending rate according to at least one of the network latency, network bandwidth, and packet loss rate, and intelligently and flexibly adjust the network congestion situation.

[0135] It can be understood that the size of the second buffer area of the above sending end can also be adjusted according to at least one of the network latency, network bandwidth, and packet loss rate.

[0136] 2.3 Out-of-order reordering management:

[0137] Set a first buffer area in the RDMA kernel layer at the receiving end. Among them, the first buffer area can be adjusted according to the network quality (such as network bandwidth). For example, in Figure 3 the example of

[0138] the moment when data reception starts (i.e., the moment when the receiving end receives VRB_OPEN_ACK, ID = 0) T4;

[0139] The moment of sending the first indication information (i.e., the moment of sending VRB_ACK with loss_id = 3) T5;

[0140] Then the receiving end can calculate: Network bandwidth = the number of data packets received in the time period from T4 to T5 / the duration from T4 to T5.

[0141] Among them, the data packets received by the receiving end can be cached in the first cache area, and multiple data packets can be divided into a group. Then, if there are no lost data packets in a group of data packets, the group of data packets can be submitted to the RDMA kernel layer of the receiving end in sequence number order; if packet loss occurs within the group, after the lost data packets in the group are received again, the entire group of data packets in the first cache area can be adjusted to the normal sequence and submitted to the RDMA kernel layer for processing.

[0142] 2.4 Log management: Mainly record the operation conditions of the device VRB and alarm information, etc.

[0143] In summary, in the above embodiments, a second buffer can be set at the sending end, so that when network packet loss occurs, the sending end can directly extract data from the second buffer according to the lost packet sequence number for retransmission, without transmitting the instruction to the upper layer for parsing and processing. A first buffer can also be set at the receiving end, which is used to cache the received data packets. When network packet loss occurs, the re - received packets can be verified and re - combined with the data packets already stored in the first cache area, and then provided to the RDMA kernel layer for use to solve the problem of out - of - order re - combination.

[0144] In addition, the packet sending rate can be adjusted in real time according to the actual network quality to solve the network congestion problem.

[0145] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present application.

[0146] In a third aspect, an embodiment of the present application provides a packet - loss - resistant data transmission device based on VRB; it is applied to a first device, and a first cache area is set in the kernel layer set by the first device; as Figure 6 shown, the device may include the following modules:

[0147] The first storage module 601 is configured to store the first data packet in the first buffer area when the first data packet sent by the second device is successfully received;

[0148] The first sending module 602 is configured to send first indication information to the second device when the second data packet sent by the second device is not successfully received, where the first indication information is used to indicate that the second data packet is not successfully received;

[0149] The second storage module 603 is configured to store the second data packet in the first buffer area when the second data packet re - sent by the second device is successfully received;

[0150] The transmission module 604 is configured to transmit a set of data packets to the kernel layer in sequence number order when the set of data packets exists in the first buffer area;

[0151] Wherein, a set of data packets includes N data packets with consecutive sequence numbers, and N is greater than 1.

[0152] Optionally, the sequence number of the second data packet is included in the first indication information.

[0153] Optionally, the first sending module 602 is further configured to:

[0154] Send second indication information to the second device when a set of data packets exists in the first buffer area, where the second indication information is used to indicate that the set of data packets is successfully received.

[0155] Optionally, the apparatus further includes:

[0156] The first acquisition module is configured to acquire the network bandwidth within a first time period, where the first time period is: the time period between the moment when the first device starts receiving data packets and the moment when the first device sends the first indication information;

[0157] The first adjustment module is configured to adjust the size of the first buffer area according to the network bandwidth within the first time period.

[0158] Fourthly, an embodiment of the present application provides a VRB - based anti - packet - loss data transmission apparatus; applied to a second device, a second buffer area is set in the kernel layer of the second device; as Figure 7 shown, the apparatus may include the following modules:

[0159] The second sending module 701 is configured to send data packets to the first device;

[0160] A third storage module 702, configured to store the sent data packets in the second buffer area;

[0161] A third sending module 703, configured to, when receiving first indication information sent by the first device, obtain a second data packet from the second buffer area according to the first indication information, and re-send the second data packet to the first device, where the first indication information is used to indicate that the second data packet has not been successfully received.

[0162] Optionally, the first indication information includes the sequence number of the second data packet.

[0163] Optionally, the apparatus further includes:

[0164] A deletion module, configured to, when receiving second indication information, delete the data packet indicated by the second indication information stored in the second buffer area;

[0165] Wherein, the second indication information is used to indicate a set of successfully received data packets, and a set of data packets includes N consecutively numbered data packets, and N is greater than 1.

[0166] Optionally, the apparatus further includes:

[0167] A second obtaining module, configured to obtain a first parameter within a second time period, where the first parameter includes at least one of the following: network bandwidth, packet loss rate of data packets, network delay generated by re-sending data packets, and the second time period is: a time period between a first moment and a second moment, the first moment is the moment when the second device starts to send data packets, and the second moment is the moment when the second device receives the first indication information;

[0168] A second adjustment module, configured to adjust at least one of the following according to the first parameter: data packet sending rate, size of the second buffer area.

[0169] For the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the related parts, please refer to the partial description of the method embodiment.

[0170] In a fifth aspect, an embodiment of the present application further provides a VRB-based data packet loss resistant processing system, including a first device and a second device. The first device is provided with a kernel layer, and a first buffer area is provided in the kernel layer of the first device; the second device is provided with a kernel layer, and a second buffer area is provided in the kernel layer of the second device; the first device is configured to execute the VRB-based packet loss resistant data transmission method described in the first aspect above; the second device is configured to execute the VRB-based packet loss resistant data transmission method described in the second aspect above.

[0171] In a sixth aspect, an embodiment of the present application further provides an electronic device, including:

[0172] one or more processors; and

[0173] one or more machine-readable media storing instructions, which when executed by the one or more processors, cause the electronic device to execute the VRB-based packet loss resistant data transmission method described in the first aspect above, or execute the VRB-based packet loss resistant data transmission method described in the second aspect above.

[0174] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, and a computer program stored thereon causes a processor to execute the VRB-based packet loss resistant data transmission method described in the first aspect above, or execute the VRB-based packet loss resistant data transmission method described in the second aspect above.

[0175] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is the difference from other embodiments. The same or similar parts among the embodiments can be referred to each other.

[0176] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present 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 memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0177] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and the combination of processes and / or blocks in the flowcharts and / or block diagrams can be realized by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing terminal devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing terminal devices generate a device for realizing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0178] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 or more processes and / or blocks Figure 1 or more blocks specified in one block or more blocks.

[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, such that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one process Figure 1 or more processes and / or blocks Figure 1 or more blocks specified in one block or more blocks.

[0180] Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concept. Therefore, the appended claims are intended to be construed as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0181] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or terminal device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or terminal device including the said element.

[0182] The above has introduced in detail a VRB-based packet loss resistant data transmission method provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A VRB-based anti-packet loss data transmission method, characterized in that: Applied to a first device, the kernel layer of the first device is provided with a first cache area; the method comprises: When a first data packet sent by the second device is successfully received, storing the first data packet in the first cache area; In a case where the second data packet sent by the second device is not successfully received, sending first indication information to the second device, wherein the first indication information is used to indicate that the second data packet is not successfully received; When the second data packet resent by the second device is successfully received, storing the second data packet in the first cache area; When a group of data packets exists in the first cache area, the group of data packets is transmitted to the kernel layer in sequence; A group of data packets includes N data packets with consecutive sequence numbers, where N is greater than 1.

2. The method according to claim 1, characterized in that The method further comprises: In a case where there is a group of data packets in the first cache area, second indication information is sent to the second device, wherein the second indication information is used to indicate that the group of data packets are successfully received.

3. The method according to claim 1, characterized in that The method further comprises: Acquire the network bandwidth within a first time period, wherein the first time period is a time period from the moment when the first device starts to receive the data packet to the moment when the first device sends the first indication information; The size of the first cache area is adjusted according to the network bandwidth in the first time period.

4. A VRB-based anti-packet loss data transmission method, characterized in that: Applied to a second device, the kernel layer of the second device is provided with a second cache area; the method comprises: Sending a data packet to the first device, and storing the sent data packet in the second cache area; Upon receiving first indication information sent by the first device, obtaining a second data packet from the second cache area according to the first indication information, and resending the second data packet to the first device, wherein the first indication information is used to indicate that the second data packet was not successfully received.

5. The method according to claim 4, characterized in that The method further comprises: When receiving the second indication information, deleting the data packet indicated by the second indication information stored in the second cache area; The second indication information is used to indicate a group of data packets that are successfully received, where a group of data packets includes N data packets with consecutive sequence numbers, where N is greater than 1.

6. The method according to claim 4, characterized in that The method further comprises: Acquire a first parameter within a second time period, wherein the first parameter includes at least one of the following: network bandwidth, packet loss rate of data packets, and network delay caused by retransmitting data packets, and the second time period is: a time period between a first moment and a second moment, wherein the first moment is a moment when the second device starts to send a data packet, and the second moment is a moment when the second device receives the first indication information; At least one of the following items is adjusted according to the first parameter: a packet sending rate of data packets and a size of the second cache area.

7. A VRB-based anti-packet loss data transmission device, characterized in that: Applied to a first device, a kernel layer set in the first device is provided with a first cache area; the device comprises: A first storage module, configured to store a first data packet sent by a second device in the first cache area when the first data packet is successfully received; A first sending module, configured to send first indication information to the second device if the second data packet sent by the second device is not successfully received, wherein the first indication information is used to indicate that the second data packet is not successfully received; A second storage module is used to store the second data packet in the first cache area when the second data packet resent by the second device is successfully received; A transmission module, configured to transmit a group of data packets to the kernel layer in sequence of sequence numbers when there is a group of data packets in the first cache area; A group of data packets includes N data packets with consecutive sequence numbers, where N is greater than 1.

8. A VRB-based anti-packet loss data transmission device, characterized in that: Applied to a second device, the kernel layer of the second device is provided with a second cache area; the device comprises: A second sending module, used to send a data packet to the first device; A third storage module, used for storing the sent data packets in the second cache area; A third sending module is used to, upon receiving first indication information sent by the first device, obtain a second data packet from the second cache area according to the first indication information, and resend the second data packet to the first device, wherein the first indication information is used to indicate that the second data packet was not successfully received.

9. An electronic device, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to perform the VRB-based anti-packet loss data transmission method as described in any one of claims 1 to 3, or to perform the VRB-based anti-packet loss data transmission method as described in any one of claims 4 to 6.

10. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the VRB-based anti-packet loss data transmission method as claimed in any one of claims 1 to 3, or to execute the VRB-based anti-packet loss data transmission method as claimed in any one of claims 4 to 6.