Data transmission method, apparatus, device and computer-readable storage medium

By generating and sending multiple redundant data packets, the number of redundant is determined based on network transmission parameters, the delay problem caused by the high packet loss rate of data flow is solved, and the efficiency and quality of data transmission are improved.

WO2024230547A1PCT designated stage expired Publication Date: 2024-11-14HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/090516
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-09
Filing Date
2024-04-29
Publication Date
2024-11-14

AI Technical Summary

Technical Problem

During data transmission, the abnormal tail packet loss of the data stream results in the triggering of the tail loss detection (TLP) mechanism or the retransmission timeout (RTO) mechanism, resulting in a large retransmission delay. It is difficult for the existing technology to effectively reduce the tail packet. Packet loss probability and avoid timeout retransmission.

Method used

By generating multiple redundant data packets in the case of the end packet of the data stream and determining the number of redundant according to the network transmission parameters, the probability of end packet loss is reduced, the RTO or TLP mechanism is avoided, and the transmission delay of the data stream is reduced.

Benefits of technology

It effectively reduces the packet loss probability of data flow end packets, reduces transmission delay, improves the quality and performance of data transmission, and avoids resource waste caused by excessive redundancy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024090516_14112024_PF_FP_ABST
    Figure CN2024090516_14112024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications. Disclosed are a data transmission method, an apparatus, a device and a computer-readable storage medium. When a first data packet is a tail packet of a data stream, a first node generates a plurality of second data packets corresponding to the first data packet, the load of any second data packet being the same as the load of the first data packet, and the quantity of the plurality of second data packets being determined on the basis of a transmission parameter of a network for transmitting the data stream; and the first node sends the first data packet and the plurality of second data packets, the plurality of second data packets being used for lowering the packet loss probability of the tail packet of the data stream. The present method performs redundancy protection on the tail packet in the data stream, so as to lower the packet loss probability of the tail packet, thereby reducing transmission time delay of the data stream, and improving the quality and performance of data transmission. Moreover, the determined redundancy quantity of the plurality of tail packets can avoid continuous packet loss of the plurality of sent tail packets, and can also prevent transmission resource waste caused by an overlarge redundancy quantity.
Need to check novelty before this filing date? Find Prior Art

Description

Data transmission method, device, equipment and computer-readable storage medium

[0001] This application claims priority to Chinese patent application No. 202310518999.8 filed on May 9, 2023, entitled “Data transmission method, device, equipment and computer-readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a data transmission method, apparatus, device, and computer-readable storage medium. Background Art

[0003] During data transmission, if the tail of the data stream is lost, the tail loss probe (TLP) mechanism or the retransmission timeout (RTO) mechanism will be triggered to retransmit the lost packet. However, the retransmission delay caused by the TLP mechanism and the RTO mechanism is usually large.

[0004] Summary of the Invention

[0005] The present application provides a data transmission method, apparatus, device and computer-readable storage medium for redundantly sending multiple tail packets of a data stream.

[0006] In a first aspect, a data transmission method is provided, the method comprising: when a first data packet is the tail packet of a data stream, a first node generates multiple second data packets corresponding to the first data packet, the payload of any second data packet is the same as the payload of the first data packet, and the number of the multiple second data packets is determined by the transmission parameters of the network used to transmit the data stream; the first node sends the first data packet and the multiple second data packets, and the multiple second data packets are used to reduce the probability of packet loss of the tail packet of the data stream.

[0007] This method performs redundant protection on the tail packets in the data stream, that is, sends multiple redundant tail packets to reduce the probability of tail packet loss, avoid data retransmission caused by the RTO mechanism or TLP mechanism triggered by the loss of the tail packet, and thus avoid the waiting delay caused by the triggering of the RTO mechanism or TLP mechanism, thereby reducing the transmission delay of the data stream and improving the quality and performance of data transmission. In addition, in the embodiment of the present application, the redundant number of multiple tail packets is determined according to the transmission parameters of the network used to transmit the data stream, which can not only avoid the continuous loss of the multiple tail packets sent, but also prevent the waste of transmission resources caused by an excessive number of redundant packets, so that the determined redundant number of multiple tail packets is more in line with the data transmission requirements.

[0008] In one possible embodiment, the transmission parameters include a continuous packet loss rate under different unit quantities corresponding to the network; before the first node generates multiple second data packets corresponding to the first data packet, the first node performs function fitting on the continuous packet loss rate under different unit quantities corresponding to the network to obtain a functional relationship between the redundancy number and the success probability, where the success probability is the probability that at least one of the redundant number of data packets sent continuously is received; the redundancy number of the functional relationship is obtained when the success probability is greater than or equal to a probability threshold, and the number of multiple second data packets is determined based on the redundancy number when the success probability is greater than or equal to the probability threshold. A more accurate number of multiple second data packets is obtained by function fitting, so that the probability of at least one of the multiple second data packets sent being received is greater than or equal to the probability threshold, that is, the probability of the tail packet being received is greater than or equal to the probability threshold.

[0009] In one possible implementation, a first data packet and multiple second data packets are transmitted based on a quick user datagram protocol internet connection (QUIC), the number of the multiple second data packets is K, the sequence number of the first data packet is N, and both K and N are positive integers; the sequence numbers of the multiple second data packets are different from those of the first data packet, and the sequence numbers of the multiple second data packets are N+n, N+n+1, ..., N+n+K-1, respectively, where n is determined based on the packet threshold corresponding to QUIC. This method provides a way to set the sequence numbers of multiple second data packets in a QUIC transmission scenario, so that the method can be applied to QUIC transmission scenarios, thereby improving the implementation flexibility of the method.

[0010] In one possible implementation, after the first node sends a first data packet and multiple second data packets, in the case of QUIC transmission, based on the confirmation message received for any of the first data packet and the multiple second data packets, for a third data packet sent before any data packet in the data stream but not confirmed, if the difference between the sequence number of any data packet and the sequence number of the third data packet is greater than or equal to the data packet threshold, the payload of the third data packet is triggered to be retransmitted. This method enables the retransmission of lost packets to be quickly triggered by sending redundant tail packets when multiple data packets at the tail of a data stream transmitted based on QUIC are continuously lost, thereby reducing the delay caused by packet loss and retransmission.

[0011] In one possible implementation, a first data packet and multiple second data packets are transmitted based on the Transmission Control Protocol (TCP); the sequence numbers of the multiple second data packets are the same as the sequence number of the first data packet. After generating multiple second data packets corresponding to the first data packet, the first node obtains a mapping relationship between the sequence number of the first data packet and a redundant sequence number, where the redundant sequence number is the sum of the sequence number of the first data packet and n, where n can be determined based on a repetition threshold corresponding to TCP. This method provides a method for setting the sequence numbers of multiple second data packets in a TCP transmission scenario, making the method applicable to TCP transmission scenarios and improving the implementation flexibility of the method.

[0012] In one possible implementation, after the first node sends a first data packet and multiple second data packets, in the case of TCP transmission, based on the confirmation message received for any of the first data packet and multiple second data packets, for a third data packet sent before any data packet in the data stream but not confirmed, a redundant sequence number corresponding to the sequence number of any data packet is obtained in the mapping relationship, and if the difference between the redundant sequence number and the sequence number of the third data packet is greater than or equal to a repetition threshold, the retransmission of the payload of the third data packet is triggered. This allows, in the case of continuous packet loss at the tail of a data stream transmitted based on TCP, to quickly trigger packet retransmission by sending redundant tail packets, thereby reducing the delay caused by packet retransmission.

[0013] In one possible embodiment, before the first node generates multiple second data packets corresponding to the first data packet, it determines whether the first data packet is the tail packet of the data stream. The way to determine whether the first data packet is the tail packet of the data stream can be, when the first time length after the first data packet joins the sending queue, if there is no data packet belonging to the data stream added to the sending queue, the first data packet is determined to be the tail packet of the data stream; or, the first data packet is determined to be the tail packet of the data stream based on the identifier indicating the tail packet carried in the first data packet. Determining whether the first data packet is the tail packet of the data stream by the situation of the data packet added to the sending queue, or directly identifying the tail packet by the identifier carried, improves the accuracy and flexibility of identifying the tail packet.

[0014] In a second aspect, a data transmission device is provided, which includes: a generation module for generating multiple second data packets corresponding to the first data packet when the first data packet is the tail packet of the data stream, the payload of any second data packet is the same as the payload of the first data packet, and the number of the multiple second data packets is determined by the transmission parameters of the network used to transmit the data stream; a sending module for sending the first data packet and the multiple second data packets, the multiple second data packets are used to reduce the probability of packet loss of the tail packet of the data stream.

[0015] In one possible embodiment, the transmission parameters include continuous packet loss rates under different unit numbers; the device also includes: a fitting module, used to perform function fitting on the continuous packet loss rates under different unit numbers corresponding to the network to obtain a functional relationship between the redundant number and the success probability, where the success probability is the probability that at least one of the redundant number of data packets sent continuously is received; a first determination module, used to obtain the redundant number of the functional relationship when the success probability is greater than or equal to a probability threshold, and determine the number of multiple second data packets based on the redundant number when the success probability is greater than or equal to the probability threshold.

[0016] In one possible implementation, a first data packet and multiple second data packets are transmitted based on QUIC, the number of the multiple second data packets is K, the serial number of the first data packet is N, and both K and N are positive integers; the serial numbers of the multiple second data packets are different from those of the first data packet, and the serial numbers of the multiple second data packets are N+n, N+n+1, ..., N+n+K-1, respectively, where n is determined based on the packet threshold corresponding to QUIC.

[0017] In a possible embodiment, the device also includes: a retransmission module, which is used to trigger the retransmission of the payload of the third data packet based on the confirmation message received for the first data packet and any data packet among the multiple second data packets, for a third data packet sent before any data packet in the data stream but not confirmed, if the difference between the sequence number of any data packet and the sequence number of the third data packet is greater than or equal to the data packet threshold.

[0018] In one possible implementation, the first data packet and the plurality of second data packets are transmitted based on TCP; the sequence numbers of the plurality of second data packets are the same as the sequence number of the first data packet; the apparatus further comprises: an acquisition module for acquiring a mapping relationship between the sequence number of the first data packet and a redundant sequence number, the redundant sequence number being the sum of the sequence number of the first data packet and n, where n is determined based on a repetition threshold corresponding to TCP.

[0019] In a possible embodiment, the device also includes: a retransmission module, which is used to obtain a redundant sequence number corresponding to the sequence number of any data packet in a mapping relationship for a third data packet sent before any data packet in the data stream but not confirmed, based on the confirmation message received for the first data packet and any data packet among the multiple second data packets; if the difference between the redundant sequence number and the sequence number of the third data packet is greater than or equal to the repetition threshold corresponding to TCP, trigger the retransmission of the payload of the third data packet.

[0020] In one possible embodiment, the device also includes: a second determination module, which is used to determine that the first data packet is the tail packet of the data stream if no data packet belonging to the data stream is added to the sending queue when the first time length after the first data packet is added to the sending queue is reached; or, it is used to determine that the first data packet is the tail packet of the data stream based on an identifier indicating the tail packet carried in the first data packet.

[0021] In a third aspect, a data transmission device is provided, which includes: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor to enable the data transmission device to implement the method in the first aspect or any possible implementation method of the first aspect.

[0022] Optionally, there are one or more processors and one or more memories.

[0023] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0024] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor or be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.

[0025] In a fourth aspect, a communication device is provided, comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory to control the transceiver to receive signals and to control the transceiver to transmit signals. When the processor executes the instructions stored in the memory, the communication device performs the method according to the first aspect or any possible implementation of the first aspect.

[0026] In a fifth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to enable a computer to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0027] In a sixth aspect, a computer program (product) is provided, which includes: computer program code, which, when executed by a computer, enables the computer to execute the methods in the above aspects.

[0028] In the seventh aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0029] In the eighth aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method in the above-mentioned first aspect or any possible implementation method of the first aspect.

[0030] It should be understood that the beneficial effects achieved by the technical solutions of the second to eighth aspects of this application and the corresponding possible implementation methods can be referred to the technical effects of the first aspect and its corresponding possible implementation methods mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] FIG1 is a schematic diagram of a data packet forwarding process provided in an embodiment of the present application;

[0032] FIG2 is a schematic diagram of an implementation environment of a data transmission method provided in an embodiment of the present application;

[0033] FIG3 is a flow chart of a data transmission method provided in an embodiment of the present application;

[0034] FIG4 is a schematic diagram of a data transmission process provided by an embodiment of the present application;

[0035] FIG5 is a schematic diagram of another data transmission process provided in an embodiment of the present application;

[0036] FIG6 is a schematic structural diagram of a data transmission device provided in an embodiment of the present application;

[0037] FIG7 is a schematic structural diagram of a data transmission device provided in an embodiment of the present application;

[0038] FIG8 is a schematic structural diagram of another data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0040] In the field of communications technology, when packet loss occurs during data transmission and fast retransmission is ineffective, the only option is to trigger the RTO mechanism. The RTO mechanism involves the sender retransmitting a packet if it has not received an acknowledgment message (e.g., an ACK packet) from the receiver after waiting for an RTO period. The RTO is typically set to several hundred milliseconds (ms). Therefore, packet retransmission triggered by the RTO mechanism significantly impacts transmission latency.

[0041] The triggering of the RTO mechanism is primarily due to the sender not receiving acknowledgment messages for all packets in a data stream after sending it. One of the key reasons for not receiving acknowledgment messages for all packets in a data stream is the loss of packets at the tail end of the data stream, meaning that packets at the tail end of a data stream have a higher probability of being lost. The number of tail packets can be one or more. If there is one tail packet, the tail packet is the tail packet, which refers to the last packet in a sequentially transmitted data stream. If there are multiple tail packets, the tail packet refers to the last M packets in a sequentially transmitted data stream. M is a positive integer and can be determined based on the total number of packets in the data stream. Optionally, M is 20% of the total number of packets in the data stream. For example, if the total number of packets in a data stream is 10, then M is 10 * 20% = 2. If the sequence numbers of the 10 sequentially transmitted packets are 1-10, the tail packets are packets 9 and 10.

[0042] For example, referring to the schematic diagram of the packet forwarding process shown in FIG1 , a sender sends a data stream to a receiver. For example, the data stream includes 10 data packets, with sequence numbers 1 to 10, respectively. The data packets at the end of the data stream may include packets 7 through 10, with packet 10 being the last packet of the data stream. As shown in FIG1 , upon receiving packets 1 through 6, the receiver sends corresponding ACK1 through ACK6 to the sender, indicating that packets 1 through 6 have been acknowledged. However, if packets 7 through 10 are lost, since the receiver does not receive subsequent packets in the data stream to which packet 6 belongs, it will not trigger any acknowledgment messages to the sender. Consequently, the sender must wait for the RTO (Relay Time Out) after sending packet 10 before triggering the RTO mechanism to retransmit the data stream starting with packet 7, resulting in a transmission delay of approximately the RTO.

[0043] The TLP method in the related art sets a probe timeout (PTO) timer. After the tail packet of the data stream is sent, it waits for a PTO time. If the confirmation message corresponding to the tail packet is not received, it triggers the sending of one or two probe data packets. The packet loss retransmission is triggered based on the probe data packet, thereby avoiding the timeout retransmission of the RTO mechanism triggered by the loss of the tail packet of the data stream. For example, taking the data stream shown in Figure 1 as an example, after sending data packet 10, the sender waits for a PTO time. If ACK10 is not received, it sends a probe data packet. The probe data packet can be data packet 10, triggering the receiving end to return a corresponding confirmation message to the sender based on the probe data packet. After receiving the confirmation message corresponding to the probe data packet, the sender determines that the unconfirmed data packets sent before data packet 10 that meet the packet loss condition are data packet 7, and then retransmits data packet 7. The packet loss condition may refer to the difference between the sequence number of the unconfirmed data packet and the sequence number of data packet 10 being greater than or equal to a packet threshold. Taking a packet threshold of 3 as an example, only data packet 7 meets the packet loss condition, and thus only fast retransmission of data packet 7 can be triggered.

[0044] Therefore, when multiple tail packets are lost continuously, the TLP method will result in a transmission delay of approximately the PTO plus a round-trip time (RTT), and the PTO is often set in milliseconds. RTT refers to the time between the start of a data packet transmission from the sender to the receiver and the receipt of an acknowledgment message based on the data packet from the receiver. RTT is generally tens to hundreds of microseconds. In other words, the transmission delay under the TLP method in the related art is still relatively large. Furthermore, due to the determination of packet loss conditions, it is still impossible to trigger a fast retransmission of lost packets that do not meet the packet loss conditions. Furthermore, the PTO is usually set based on the RTT. For example, the larger the RTT, the larger the PTO, and the smaller the RTT, the smaller the PTO. This makes the accuracy of the PTO setting dependent on the accuracy of the RTT, which changes according to changes in network conditions. Therefore, obtaining an accurate RTT is difficult, which in turn makes setting an accurate PTO more difficult.

[0045] An embodiment of the present application provides a data transmission method, which can reduce the probability of packet loss of the tail packet of the data stream by performing redundant protection on the tail packet of the data stream at the sending end, thereby reducing the transmission delay caused by the loss of the tail packet of the data stream. The embodiment of the present application does not limit the implementation environment of the data transmission method. Optionally, the implementation environment of the data transmission method can be any scenario of transmitting data streams. For example, the method can be executed by the subject of transmitting data streams in any scenario of transmitting data streams. For example, see Figure 2, which is a schematic diagram of the implementation environment of a data transmission method provided by an embodiment of the present application.

[0046] As shown in Figure 2, taking the implementation environment of the data transmission method as a cloud service download scenario as an example, the implementation environment may include a cloud server (server) and multiple clients (client). Optionally, the cloud server and any client can be directly or indirectly connected through a wired or wireless communication method, and this application is not limited here. For example, any client is connected to the cloud server through a network device, and any client and the network device can be connected through wireless fidelity (WIFI) technology, fifth generation mobile communication technology (5G) or wired broadband technology.

[0047] Cloud servers are network nodes at all levels that provide services to clients within a network system and are the smallest unit for routing data requests sent by clients. Clients can be any electronic product that can interact with users through one or more methods, such as keyboards, touchpads, touch screens, remote controls, voice interaction, or handwriting devices. These include personal computers (PCs), smartphones, personal digital assistants (PDAs), wearable devices, pocket PCs (PPCs), tablets, and smart car computers.

[0048] In an embodiment of the present application, a connection is established between a client and a cloud server. The client initiates a data request. The cloud server obtains the data corresponding to the data request through the cloud network and transmits the data to the client. For example, the client requests a corresponding file download through an application (APP) such as music or photo album. The cloud server pulls the file from the cloud network and transmits it to the client. The file corresponds to the data stream in the embodiment of the present application. Taking a file size of 1 megabyte (MB) and an effective transmission bandwidth of 40 megabits per second (Mbps) as an example, the time required for the cloud server to transmit the file to the client is 1*8 / 40=0.2s=200ms.

[0049] If the tail packet loss triggers a retransmission timeout in the RTO mechanism, the RTO typically increases exponentially from 200ms. This means the retransmission delay for a single RTO trigger is 200ms, the retransmission delay for two RTO triggers is 200+400=600ms, and the retransmission delay for three RTO triggers is 200+400+800=1400ms. Therefore, compared to the time required for file transfer, the transmission delay caused by the RTO mechanism being triggered by tail packet loss is significantly longer, significantly impacting the overall file transfer completion time and resulting in lower data transfer efficiency.

[0050] Referring to Figure 3 , FIG3 is a flow chart of a data transmission method provided by an embodiment of the present application, taking the first node executing the method as an example. Exemplarily, the method can be applied to the implementation environment shown in Figure 2 , for example, where the first node is the cloud server shown in Figure 2 , where the cloud server shown in Figure 2 corresponds to the transmitting end of the data stream transmission, and the client shown in Figure 2 corresponds to the receiving end of the data stream transmission. As shown in Figure 3 , the data transmission method includes, but is not limited to, the following steps 301 and 302.

[0051] 301. When the first data packet is the last packet of the data stream, the first node generates multiple second data packets corresponding to the first data packet. The payload of any second data packet is the same as the payload of the first data packet. The number of the multiple second data packets is determined by the transmission parameters of the network used to transmit the data stream.

[0052] In an embodiment of the present application, the first node is the sending end of the data stream transmission, and when the first node transmits the data stream to the second node, the second node is the receiving end of the data stream transmission. The first node performs redundant protection for the tail packet of the data stream, that is, on the basis of sending the tail packet, it continuously sends multiple redundant packets with the same payload as the tail packet, thereby increasing the probability that the receiving end receives the payload of the tail packet, that is, reducing the probability of packet loss of the tail packet of the data stream. Among them, the content outside the payload of any second data packet may be the same as or different from the content outside the payload of the first data packet, and the embodiment of the present application is not limited thereto. For example, in a scenario where a data stream is transmitted based on QUIC, the sequence number in the content outside the payload of any second data packet is different from the sequence number in the content outside the payload of the first data packet.

[0053] Before the first node generates multiple second data packets corresponding to the first data packet, the first node needs to determine whether the first data packet is a tail packet for the first data packet to be sent. Optionally, the embodiment of the present application does not limit the method for determining whether the first data packet is a tail packet. In one possible implementation, the first data packet sent by the application layer obtained by the first node carries an identifier indicating a tail packet, and the identifier is added to the first data packet by the application layer, so that the first node can directly determine that the first data packet is a tail packet based on the identifier indicating the tail packet carried in the first data packet. For example, if the first data packet includes an operation code and the operation code indicates that the first data packet is a tail packet, the first data packet is determined to be a tail packet.

[0054] In another possible embodiment, when the first time duration after the first data packet joins the sending queue is reached, if no data packet belonging to the data stream is added to the sending queue, the first node determines that the first data packet is the tail packet of the data stream. The first time duration can be set based on experience or flexibly adjusted according to the application scenario. For example, the first time duration is the time interval between the sending of two data packets. Exemplarily, the first node periodically scans the sending queue and determines whether there are other data packets added within the first time duration after the first data packet joins the sending queue based on the scanning result. Since there may be a transmission interruption during the data stream transmission process, in this case, if the transmission interruption time is greater than the first time duration, then the tail packet identified by the sending queue is not the real tail packet of the data stream. The tail packet identified in this case is called an interruption packet, so that the method can reduce the probability of packet loss of the interruption packet. When the transmission interruption time is less than the RTO time, the transmission delay of the data stream can also be reduced.

[0055] In an embodiment of the present application, multiple second data packets can be called multiple redundant packets. When any one of the multiple redundant packets is received by the receiving end, the receiving end can trigger the sending of a confirmation message based on the received redundant packet, so that the sending end can receive the returned confirmation message. Then, when multiple data packets at the tail end of the data stream are continuously lost, the sending end can trigger a fast retransmission based on the received confirmation message, that is, it will not trigger a timeout retransmission based on the RTO mechanism, which means that the method of the embodiment of the present application has successfully played its role. Therefore, the embodiment of the present application determines the number of redundant packets based on the transmission parameters of the network used to transmit the data stream, so that the determined number of redundant packets can not only avoid the continuous loss of the multiple tail packets sent, but also prevent the waste of transmission resources caused by an excessive number of redundant packets, so that the determined number of redundant packets of the multiple tail packets is more in line with the data transmission requirements.

[0056] In a possible implementation, the transmission parameters of the network may include at least one of packet loss rate, rate, bandwidth, delay, throughput, RTT, and continuous packet loss rate under different unit quantities. For example, taking the transmission parameter including RTT as an example, the method for determining the number of multiple second data packets based on the transmission parameter may be to obtain the current RTT of the network, and determine the redundancy number corresponding to the current RTT of the network based on the correspondence between RTT and redundancy number, and the redundancy number corresponding to the current RTT of the network is the number of multiple second data packets. The correspondence between RTT and redundancy number can be obtained based on the historical transmission situation of the network. Optionally, the larger the RTT, the larger the corresponding redundancy number, and the smaller the RTT, the smaller the corresponding redundancy number. For example, for any RTT, the maximum number of continuous packet losses under any RTT is determined based on the historical transmission situation, and the redundancy number corresponding to any RTT is determined based on the maximum number.

[0057] Taking the example of a transmission parameter including a continuous packet loss rate for different unit quantities corresponding to the network, before the first node generates multiple second data packets corresponding to the first data packet, the method for determining the number of the multiple second data packets based on the transmission parameters may be to perform function fitting on the continuous packet loss rate for different unit quantities corresponding to the network to obtain a functional relationship between the redundancy number and the success probability, where the success probability is the probability that at least one of the redundant number of data packets continuously sent is received; obtain the redundancy number when the success probability of the functional relationship is greater than or equal to a probability threshold, and determine the number of the multiple second data packets based on the redundancy number when the success probability is greater than or equal to the probability threshold. The number of the multiple second data packets may also be referred to as the number of redundant packets. The continuous packet loss rate corresponding to any unit quantity is the probability of continuously losing any unit quantity of data packets. For example, if the unit quantity is 1, the continuous packet loss rate corresponding to the unit quantity is the probability of continuously losing one data packet; if the unit quantity is 2, the continuous packet loss rate corresponding to the unit quantity is the probability of continuously losing two data packets. The different unit quantities may include 1, 2, ..., D, where D is a positive integer greater than 2.

[0058] In an embodiment of the present application, the probability that at least one of the redundant number of packets is received is the probability that the redundant number of packets triggers fast retransmission, and the probability that the redundant number of packets triggers fast retransmission is the probability that the redundant number of packets successfully functions. Since at least one of the redundant number of packets is received, it means that there is no continuous packet loss of the redundant number of packets. In other words, if the network does not continuously lose the redundant number of packets, then at least one of the redundant number of packets will be received. Therefore, the sum of the probability of continuously losing the redundant number of packets and the probability of receiving at least one of the redundant number of packets is 1. That is, the success probability corresponding to any redundant number can be calculated by calculating the difference between 1 and the probability of continuously losing any redundant number of packets.

[0059] Optionally, the embodiment of the present application does not limit the fitting method for performing function fitting on the continuous packet loss rate under different unit numbers corresponding to the network. For example, an independent event model, a Bernoulli model, or a logistic regression analysis model can be used for function fitting. For example, using the logistic regression analysis model as an example, the functional relationship between the number of redundancies and the success probability obtained by fitting can be shown as formula (1).

[0060] Among them, Pr succ (K) represents the probability that at least one redundant packet among the K redundant packets is received, that is, the probability that the K redundant packets successfully play a role; Pr loss(K) represents the probability of losing K redundant packets continuously; p represents the average packet loss rate of the network; r represents the network condition factor; e rK It refers to an exponential function with e as the base, where e is a natural constant in mathematics.

[0061] In an embodiment of the present application, the average packet loss rate p can be obtained based on a statistical analysis of the data transmission situation of the network in the historical time. For example, the first number of data packets transmitted in the historical time and the second number of data packets lost in the historical time are counted, and the ratio of the second number to the first number is calculated to obtain the average packet loss rate in the historical time. The embodiment of the present application does not limit the length of the historical time, and it can be any period of time before the implementation of the method. Optionally, before performing function fitting on the continuous packet loss rates corresponding to different unit quantities, it is also necessary to first obtain the continuous packet loss rates corresponding to different unit quantities. This can also be obtained through statistical analysis of the data transmission situation of the network in the historical time, which will not be repeated here.

[0062] The network condition factor r can be obtained by substituting the continuous packet loss rates corresponding to the known number of units into the above formula (1). For example, p2 is used to represent the packet loss rate of two consecutive data packets obtained in the early stage, that is, Pr loss (K) = p2, the known average packet loss rate p, K = 2, Pr succ Substitute (K) = 1-p2 into formula (1) and solve to get r. For example, taking the average packet loss rate p = 0.05 and r = 1.2 as an example, after fitting the above formula (1), the value of Pr can be solved according to formula (1). succ (K) is greater than or equal to the probability threshold when the number of redundancies, that is, to solve the calculation of Pr succ The value range of K under (K) ≥ the probability threshold is the redundancy quantity. The probability threshold can be set based on experience or flexibly adjusted according to the application scenario.

[0063] Optionally, the method for determining the number of the plurality of second data packets according to the redundant number may be to use any positive integer within the redundant number interval as the number of the plurality of second data packets. For example, taking the probability threshold as 0.9999 as an example, according to formula (1), the value of Pr succ When (K) is greater than or equal to 0.9999, the value range of K is greater than or equal to 5.6, and the number of the plurality of second data packets can be 6, 7, 8, etc. The number of the plurality of second data packets obtained in this way is not too small, and the probability of at least one of the plurality of second data packets being received is guaranteed to be greater than or equal to 0.9999, effectively reducing the probability of tail packet loss in the data stream, thereby avoiding the continuous loss of the plurality of tail packets sent.

[0064] Alternatively, the number of second data packets can be determined based on the redundant number by rounding up the redundant number to obtain the number of second data packets. For example, using the probability threshold of 0.9999 as an example, rounding up the value range of K yields a number of 6 second data packets. This ensures that the number of second data packets obtained is not excessive, thereby preventing network transmission resources from being wasted due to an excessive number of second data packets being sent, and reducing the redundancy rate of tail packets.

[0065] In summary, after determining the number of the plurality of second data packets, assuming the number of the plurality of second data packets is K, where K is a positive integer, the first node can generate K second data packets corresponding to the first data packet. The sequence numbers corresponding to the plurality of second data packets may vary depending on different data transmission scenarios. The following two scenarios are used as examples for illustration.

[0066] Scenario 1: The first data packet and multiple second data packets are transmitted based on QUIC.

[0067] In this scenario, since QUIC configures a new sequence number for each data packet, whether it is an original packet or a retransmitted packet of the data stream, QUIC can distinguish whether the returned confirmation message is for the ACK original packet or the retransmitted packet, thereby avoiding the problem in the TCP retransmission mechanism that it is difficult to distinguish whether the data packet is an original packet or a retransmitted packet. Therefore, for scenario one, the multiple second data packets generated by the embodiment of the present application have different sequence numbers from the first data packet. For example, the sequence number of the first data packet is N, and the number of the multiple second data packets is K. The sequence numbers of the multiple second data packets are N+n, N+n+1, ..., N+n+K-1, respectively. Among them, K and N are both positive integers, and n can be determined based on the data packet threshold corresponding to QUIC. For example, (data packet threshold -1) <= n.

[0068] In a QUIC-based transmission scenario, the process of triggering fast retransmission includes determining if any data packet is lost and retransmitting the data packet. The conditions for determining if any data packet is lost include: any data packet is unacknowledged, any data packet is sent earlier than an acknowledged data packet, and the difference between the sequence number of any data packet and the maximum sequence number among the acknowledged data packets is greater than or equal to a packet threshold. The packet threshold can be set based on experience or flexibly adjusted according to the application scenario. For example, the packet threshold is 3.

[0069] Therefore, the packet threshold corresponding to QUIC is used in a scenario based on QUIC transmission, where the first node determines that the unconfirmed data packet has been lost based on the difference between the sequence number of the unconfirmed data packet and the maximum sequence number of the confirmed data packet being greater than or equal to the packet threshold. Thus, n>=(packet threshold-1), so that the sequence number N+n of the first second data packet among the multiple second data packets will not be lower than the packet threshold, and thus, in the case of packet loss of any data packet sent before the first data packet, the confirmation of the first second data packet among the multiple second data packets can trigger the rapid retransmission of any data packet. That is, by setting the sequence numbers of multiple second data packets through the application of n, the method can trigger the rapid retransmission of each data packet in the multiple data packets at the end of the consecutive losses, thereby improving the efficiency of data retransmission.

[0070] Optionally, on the basis of determining n based on the packet threshold corresponding to QUIC, the value range of n can be further narrowed in combination with the maximum sequence number allowed by QUIC, K and N. Among them, the maximum sequence number allowed by QUIC refers to the maximum sequence number allowed to be set for the data packet defined in QUIC. For example, (packet threshold - 1) <= n <= (QUIC maximum allowed sequence number - N-K+1). Therefore, on the basis of ensuring that the sequence number N+n of the first second data packet in the multiple second data packets will not be lower than the packet threshold, through the limitation of n<= (QUIC maximum allowed sequence number - N-K+1), the sequence number N+n+K-1 of the last second data packet in the multiple second data packets will not exceed the maximum sequence number allowed by QUIC, thereby further improving the accuracy of the sequence number setting of the multiple second data packets.

[0071] For example, referring to the schematic diagram of the data transmission process shown in FIG4 , the first node corresponds to the QUIC sender shown in FIG4 , and the second node corresponds to the QUIC receiver shown in FIG4 , taking the value of K as 2 and the value of n as 2 as an example. The sending queue of the QUIC sender includes data packets 3 to 7 of the data stream to be sent, and data packet 7 is the tail packet, that is, the first data packet corresponds to data packet 7. Therefore, the QUIC sender generates two second data packets corresponding to data packet 7, namely data packet 9 (7) and data packet 10 (7). The sequence number of data packet 9 (7) is 7+2=9, and the payload of data packet 9 (7) is the payload of data packet 7. The sequence number of data packet 10 (7) is 7+2+1=10, and the payload of data packet 10 (7) is the payload of data packet 7. The QUIC sender sends data packets 3 to 7, data packets 9 (7), and data packets 10 (7) to the QUIC receiver in sequence through the sending queue.

[0072] In another possible embodiment, in a scenario based on QUIC transmission, the conditions for determining whether any data packet is lost may also include: any data packet is not confirmed, and any data packet is sent earlier than the data packet with the largest sequence number among the confirmed data packets, and the time of earlier transmission exceeds a time threshold. The time threshold can be set based on experience, or flexibly adjusted according to the application scenario. For example, the time threshold is the time required to send 3 data packets continuously. Optionally, in this case, the sequence numbers of the multiple second data packets generated by the first node can be N+1, N+2, ..., N+K-1, that is, the sequence number no longer needs to be set to n, but when recording the transmission time of the multiple second data packets, the time threshold is added to the original transmission time. Similarly, in the case that any data packet sent before the first data packet is lost, the confirmation of the first second data packet among the multiple second data packets can trigger the rapid retransmission of any data packet.

[0073] In scenario 2, the first data packet and multiple second data packets are transmitted based on TCP.

[0074] In this scenario, since TCP still uses the original sequence number of the data packet for the retransmitted data packet of the data stream, it will not reconfigure a new sequence number for the retransmitted data packet. Therefore, the multiple second data packets generated by the embodiment of the present application have the same sequence number as the first data packet. Taking the sequence number of the first data packet as N as an example, the sequence numbers of the multiple second data packets are all N. Unlike N in scenario one, since the sequence numbers of the data packets in TCP are divided by byte segments, the N in scenario two corresponds to the byte sequence number range to which the data packet in TCP belongs. For example, the byte sequence number range of the first data packet in the data stream is (1-9), and the byte sequence number range of the second data packet in the data stream is (10-19). If the byte sequence range of the first data packet is (40-49), then the N in the embodiment of the present application corresponds to the byte sequence number range (40-49). For convenience of description, the embodiment of the present application uses sequence numbers instead of byte sequence number ranges for illustration. For example, the byte sequence number range of (1-9) corresponds to sequence number 1, and the byte sequence number range of (10-19) corresponds to sequence number 2.

[0075] For example, referring to the schematic diagram of the data transmission process shown in FIG5 , the first node corresponds to the TCP sender shown in FIG5 , and the second node corresponds to the TCP receiver shown in FIG5 . The TCP sender's send queue includes packets 3 through 7 of the data stream to be sent, with packet 7 being the last packet, meaning that the first packet corresponds to packet 7. Therefore, the TCP sender generates two second packets corresponding to packet 7, which are two identical packets 7. The TCP sender continuously sends packets 3 through 6 and three identical packets 7 to the TCP receiver via the send queue.

[0076] In TCP-based transmission scenarios, the selective acknowledgment (SACK) mechanism involves the receiver returning a sequence number range of received but unacknowledged packets to the sender. In the SACK mechanism, the sender must receive a duplicate ACK threshold (dupthresh) of duplicates to trigger a fast retransmit. The duplication threshold can be set empirically or flexibly adjusted based on the application scenario. For example, the duplication threshold is 3. For example, the sender sends packets 1 (0-9), 2 (10-19), 3 (20-29), 4 (30-39), and 5 (40-49) to the receiver in this order. If the receiver receives packet 1, it returns an ACK packet with sequence number 10 to the sender. If it receives packet 2, it returns an ACK packet with sequence number 20 to the sender. If packet 3 is lost, the receiver receives packet 4 and returns an ACK packet with sequence number 20 to the sender, along with a SACK packet with sequence numbers (30-39). If packet 3 is lost, the receiver receives packet 5 and returns an ACK packet with sequence number 20 to the sender, along with a SACK packet with sequence numbers (30-49). The sender, having received three duplicate ACK packets with sequence number 20, confirms that packet 3 is lost and triggers a fast retransmission of packet 3.

[0077] Based on the SACK mechanism, fast retransmission can be further triggered based on the forward acknowledgement (FACK) mechanism. The FACK mechanism infers packet loss in the data stream by recording the maximum sequence number (forward-most) in the SACK. For example, if the difference between the maximum sequence number selectively acknowledged by the SACK and the confirmed maximum sequence number is greater than or equal to the maximum segment size (MSS) times the repetition threshold, the sender determines that the data packets corresponding to the sequence numbers after the confirmed maximum sequence number are lost and triggers fast retransmission. The MSS is the maximum range of byte sequence numbers corresponding to a data packet defined in TCP.

[0078] For example, let's assume that the sender sequentially sends data packets 1 (0-9), 2 (10-19), 3 (20-29), 4 (30-39), and 5 (40-49) to the receiver. If the receiver receives data packet 1, it returns an ACK packet with sequence number 10 to the sender. Assuming that data packets 2, 3, and 4 are lost due to network congestion or other reasons, upon receiving data packet 5, the receiver returns an ACK packet with sequence number 10 and a SACK packet with sequence numbers (40-49) to the sender. After receiving the ACK packet with sequence number 10 and the SACK packet with sequence numbers (40-49), the sender determines that data packets 1 and 5 have been received by the receiver. The maximum sequence number selectively acknowledged by the SACK is 50, the maximum acknowledged sequence number is 20, and the MSS is 10. Since 49-20 >= 3*10, data packet 2 is determined to be lost, triggering a fast retransmission of data packet 2.

[0079] Based on the mechanism of triggering fast retransmission in the above-mentioned TCP, after the embodiment of the present application generates multiple second data packets corresponding to the first data packet, the sequence numbers of the multiple second data packets are the same as the sequence number of the first data packet. After the first node generates multiple second data packets corresponding to the first data packet, it obtains the mapping relationship between the sequence number of the first data packet and the redundant sequence number, and the redundant sequence number is the sum of the sequence number of the first data packet and n. Among them, n can be determined based on the repetition threshold corresponding to TCP. The method of determining n based on the repetition threshold corresponding to TCP in this scenario two can refer to the method of determining n based on the packet threshold corresponding to QUIC in scenario one, for example, (repetition threshold - 1) <= n <= (QUIC allows the maximum sequence number - N-K+1). Still taking the sequence number of the first data packet as N as an example, the redundant sequence number is N+n. As a result, when the first node receives the confirmation message for the first data packet, it can map the sequence number of the first data packet to the redundant sequence number, and then further judge the packet loss situation of the data stream based on the redundant sequence number. Exemplarily, as shown in FIG5 , taking the repetition threshold as 3 and n as 2 as an example, after generating two redundant data packets 7, the TCP sender records the mapping relationship {7, 9}, or records the mapping relationship {7*MSS, 9*MSS}.

[0080] 302. The first node sends a first data packet and multiple second data packets, where the multiple second data packets are used to reduce a probability of packet loss of a tail packet of a data stream.

[0081] In an embodiment of the present application, since the multiple second data packets sent have the same payload as the first data packet, and the first data packet is the tail packet of the data stream, the sending of the multiple second data packets can reduce the probability of packet loss of the payload of the tail packet of the data stream, thereby reducing the transmission delay caused by the loss of the tail packet. In addition, the number of second data packets is determined by the continuous packet loss rate under different unit quantities corresponding to the network, so that the probability of continuous packet loss of the multiple second data packets sent is small, that is, the probability of at least one data packet in the multiple second data packets being received is increased, and the probability of packet loss of the tail packet of the data stream is fully reduced, that is, the tail packet of the data stream is guaranteed to be not lost as much as possible.

[0082] In a possible implementation, taking the example of a first node sending a first data packet and multiple second data packets to a second node, the second node can receive the first data packet and at least one of the multiple second data packets, and then trigger a corresponding confirmation message to be returned to the first node based on the at least one received data packet, and the confirmation message indicates that the first data packet is confirmed, that is, it indicates that the tail packet of the data stream is received. In the case where the first node receives a confirmation message returned by the second node based on the first data packet and any one of the multiple second data packets, the first node can judge the packet loss situation of the data stream based on the confirmation message received for the first data packet and any one of the multiple second data packets, that is, determine whether there are lost data packets in the data stream, and quickly retransmit the determined lost data packets without waiting for the RTO mechanism to trigger a timeout retransmission, thereby avoiding the retransmission delay caused by the waiting time for the RTO, thereby effectively reducing the transmission delay of the data stream.

[0083] In the embodiments of the present application, the type and content of the confirmation message may vary for different transmission protocols or different packet loss retransmission mechanisms. Therefore, the manner in which the first node determines the packet loss status of the data stream based on the confirmation message may also vary. For example, the confirmation message may include an ACK packet, which indicates that the first data packet has been confirmed and includes the sequence number of the first data packet; or, the confirmation message may include an SACK packet, which indicates that the first data packet and received data packets sent before the first data packet have been confirmed and includes the sequence number of the received data packets.

[0084] Optionally, for the above scenario one, after the first node sends the first data packet and multiple second data packets, based on the confirmation message received for any one of the first data packet and the multiple second data packets, for a third data packet sent before any one of the data packets in the data stream but not confirmed, if the difference between the sequence number of any one of the data packets and the sequence number of the third data packet is greater than or equal to the data packet threshold, it is determined that the third data packet is lost, and the retransmission of the payload of the third data packet is triggered.

[0085] For example, referring to Figure 4, the QUIC receiver receives data packets 9, 7, and 4-3 in the data stream in the receiving queue, and the QUIC receiver returns a SACK packet corresponding to the received data packet to the QUIC sender. The SACK packet includes a maximum acknowledgment number (largest acknowledged) of 9, an acknowledgment range count (ack range count) of 3, a first ack block (first ack block) of 1, a gap (GAP) (0) of 1, an additional ack block (additional ack block) (0) of 1, a gap (GAP) (1) of 2, and an additional ack alock (1) of 2.

[0086] In the SACK packet shown in Figure 4, the largest acknowledged number is 9 and the ack range count is 3, which means that the number of ack blocks carried in the SACK packet is 3; the first ack block is 1, which means that the first ack block starting from 9 includes one data packet, that is, data packet 9 is received, and data packet 9 corresponds to any data packet that triggers the sending of the ack message; the gap (GAP) (0) is 1, which means that the first gap block starting from 9 includes one data packet, that is, data packet 8 is not received; the additional ack alock (0) is 1, which means that the second ack block starting from 9 includes one data packet, that is, data packet 7 is received; the gap (GAP) (1) is 2, which means that the second gap block starting from 9 includes two data packets, that is, data packets 6-5 are not received; the additional ack alock (1) is 2, which means that the third ack block starting from 9 includes two data packets, that is, data packets 4-3 are received.

[0087] Based on the received SACK packet, the QUIC sender discovers that packets 8 and 6-5 in the data stream have not been received, which means that packets 8 and 6-5 may be lost. Taking the packet threshold of 3 as an example, the difference between the maximum acknowledgment number 9 and the sequence number of packet 6 is calculated to be 9-6=3, and the difference between the maximum acknowledgment number 9 and the sequence number of packet 5 is 9-5=4. Since 3 and 4 meet the condition of being greater than or equal to the packet threshold 3, packets 6-5 are marked as lost packets, and packets 6 and 5 are added to the lost queue. For packet 8, the difference between the maximum acknowledgment number 9 and the sequence number of packet 8 can be calculated to be 9-8=1. Since 1 does not meet the condition of being greater than or equal to the packet threshold 3, packet 8 is not marked as a lost packet; or, since the last packet of the data stream is packet 7, that is, the data stream does not originally include packet 8, the sequence number with the gap of 8 in the acknowledgment message is directly ignored.

[0088] Furthermore, the QUIC sender retransmits the payload of data packets 6-5, for example, by adding two new serial numbered data packets 11 and 12 to the sending queue. The serial number of data packet 11 is 11, and the payload of data packet 11 is the payload of data packet 5. The serial number of data packet 12 is 12, and the payload of data packet 12 is the payload of data packet 6, thereby achieving fast retransmission of data packets 6 and 5. The QUIC sender retransmits data packets 11 and 12. If the QUIC receiver receives the retransmitted data packets 11 and 12, the QUIC receiver determines that data packets 6-5 of the data stream have been restored based on the stream offset information carried in data packets 11 and 12, thereby completing the transmission of the data stream. The stream offset is used by the receiving end to determine the position of the data packet in the data stream. In the embodiment of the present application, when the data packet at the end of the data stream is lost, fast retransmission is triggered by sending redundant data packet 9, wherein the retransmission delay caused by transmitting data packet 9 is approximately the time of one RTT. Compared with the related art, the time required for triggering retransmission is shortened by waiting for the RTO time or the PTO time to trigger retransmission.

[0089] Among them, since QUIC is implemented in user mode, the method provided by the embodiment of the present application can be implemented by modifying the QUIC code base at the application level of the first node, without modifying the operating system kernel, which facilitates deployment. And according to the record in Request for Comments (RFC) 9000, when the QUIC receiving end receives data packets with the same stream offset in the same data stream multiple times, the data packets with duplicate payloads can be discarded. For multiple second data packets sent by the embodiment of the present application, the second node can directly use the above-mentioned characteristics to discard the received duplicate payloads. Therefore, the second node as the receiving end does not need to be changed, which further facilitates deployment.

[0090] Optionally, for the second scenario above, after the first node sends the first data packet and multiple second data packets, based on the confirmation message received for any of the first and multiple second data packets, for a third data packet sent before the any data packet in the data stream but not confirmed, the first node obtains the redundant sequence number corresponding to the sequence number of any data packet in the mapping relationship. If the difference between the redundant sequence number and the sequence number of the third data packet is less than or equal to the duplication threshold corresponding to TCP, it is determined that the third data packet is lost, and the retransmission of the payload of the third data packet is triggered. Thus, by recording the mapping relationship corresponding to the sequence numbers of multiple second data packets through n, and determining whether a data packet is lost based on the mapping relationship, the method can trigger the rapid retransmission of each of the multiple data packets at the end of the consecutive loss, thereby improving the efficiency of data retransmission.

[0091] For example, referring to Figure 5, the TCP receiver receives packets 7 and 4-3 in the data stream in the receive queue. The TCP receiver then returns a SACK packet corresponding to the received packets to the TCP sender. The SACK packet includes sequence numbers {7} and {4-3}, indicating that packets 7 and 4-3 have been acknowledged. Based on the received SACK packet, the TCP sender discovers that packets 6 and 5 in the data stream may have been lost and adds them to the lost queue. Furthermore, using the example of a multiple second packet number K of 2 and a duplication threshold of 3, it is determined whether packets 6-5 are lost.

[0092] In one possible implementation, in Figure 5, the first node records the mapping relationship {7, 9} when generating multiple second data packets. After receiving the SACK, the first node reads the redundant sequence number 9 corresponding to the maximum sequence number 7 in the SACK in the mapping relationship, and calculates that the difference between the redundant sequence number 9 and the sequence number of data packet 6 is 9-6=3, and the difference between the redundant sequence number 9 and the sequence number of data packet 5 is 9-5=4. Since 3 and 4 meet the condition of being greater than or equal to the repetition threshold 3, data packets 6-5 are marked as lost data packets. Alternatively, when generating multiple second data packets, the first node records the mapping relationship {7*MSS, 9*MSS}. The redundant sequence number corresponding to the sequence number of data packet 7 obtained through the mapping relationship is 9*MSS. The difference between the redundant sequence number 9 and the sequence number of data packet 6 is calculated to be (9-6)*MSS=3*MSS, and the difference between the redundant sequence number 9 and the sequence number of data packet 5 is (9-5)*MSS=4*MSS. Since 3*MSS and 4*MSS meet the condition of being greater than or equal to the duplication threshold 3*MSS, data packets 6-5 are marked as lost data packets.

[0093] Furthermore, the TCP sender retransmits the payload of data packet 6-5, for example, by adding data packet 6 and data packet 5 to the sending queue again, and then retransmits data packet 5 and data packet 6 to the TCP receiver, thereby achieving fast retransmission of data packet 5 and data packet 6. If the TCP receiver receives the retransmitted data packets 5 and 6, it will restore the lost data packet 6-5, thereby completing the transmission of the data stream. In the embodiment of the present application, when the data packet at the end of the data stream is lost, fast retransmission is triggered by sending the redundant second data packet 7, wherein the retransmission delay caused by transmitting the redundant second data packet 7 is approximately the time of one RTT, which also shortens the time required to trigger retransmission.

[0094] In another possible embodiment, the confirmation message includes multiple repeated ACK packets, and the multiple ACK packets indicate that the third data packet is lost, then the first node directly retransmits the payload of the third data packet based on the NACK packet; or, the confirmation message includes a loss confirmation (not acknowledgement, NACK) packet, and the NACK packet is used to indicate that the third data packet is lost, then the first node directly retransmits the payload of the third data packet based on the NACK packet.

[0095] In an embodiment of the present application, after the first node receives the confirmation message returned by the second node, the first node sends an ACK packet corresponding to the confirmation message to the second node, indicating that the confirmation message returned by the second node has been received. Thus, after the second node receives the ACK packet corresponding to the confirmation message, it can determine that the first data packet in the data stream and the data packet before the first data packet have been successfully received based on the ACK packet corresponding to the confirmation message, and the second node does not need to maintain the packet loss information corresponding to the data stream. For example, referring to Figure 4, after the QUIC receiver receives the ACK packet for the SACK packet sent by the QUIC sender, it releases the gap record including 5-8, determines that the payload of data packet 5-8 has been received, and no longer carries the GAP in the subsequent feedback SACK packet.

[0096] The data transmission method provided in the embodiment of the present application performs redundant protection for the tail packets in the data stream, that is, sends multiple redundant tail packets to reduce the probability of tail packet loss, avoid data retransmission of the RTO mechanism or TLP mechanism triggered by the loss of the tail packet, and thus avoid the waiting delay caused by the triggering of the RTO mechanism or TLP mechanism, thereby reducing the transmission delay of the data stream and improving the quality and performance of data transmission. In addition, the redundant number of multiple tail packets in the embodiment of the present application is determined based on the transmission parameters of the network used to transmit the data stream, which can not only avoid the continuous loss of the multiple tail packets sent, but also prevent the waste of transmission resources caused by an excessive number of redundant packets, so that the determined redundant number of multiple tail packets is more in line with the data transmission requirements.

[0097] The above describes the data transmission method of the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a data transmission device. Figure 6 is a structural diagram of a data transmission device provided by the embodiment of the present application. Based on the following multiple modules shown in Figure 6, the data transmission device shown in Figure 6 can perform all or part of the operations performed by the first node. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown therein, and the embodiment of the present application does not limit this. As shown in Figure 6, the device includes:

[0098] a generating module 601 configured to generate, when the first data packet is the last packet of a data stream, a plurality of second data packets corresponding to the first data packet, wherein a payload of any second data packet is the same as that of the first data packet, and the number of the plurality of second data packets is determined by transmission parameters of a network used to transmit the data stream;

[0099] The sending module 602 is configured to send a first data packet and multiple second data packets, where the multiple second data packets are used to reduce the probability of packet loss of the tail packet of the data stream.

[0100] In one possible embodiment, the transmission parameters include continuous packet loss rates under different unit numbers; the device also includes: a fitting module, used to perform function fitting on the continuous packet loss rates under different unit numbers corresponding to the network to obtain a functional relationship between the redundant number and the success probability, where the success probability is the probability that at least one of the redundant number of data packets sent continuously is received; a first determination module, used to obtain the redundant number of the functional relationship when the success probability is greater than or equal to a probability threshold, and determine the number of multiple second data packets based on the redundant number when the success probability is greater than or equal to the probability threshold.

[0101] In one possible implementation, a first data packet and multiple second data packets are transmitted based on QUIC, the number of the multiple second data packets is K, the serial number of the first data packet is N, and both K and N are positive integers; the serial numbers of the multiple second data packets are different from those of the first data packet, and the serial numbers of the multiple second data packets are N+n, N+n+1, ..., N+n+K-1, respectively, where n is determined based on the packet threshold corresponding to QUIC.

[0102] In a possible embodiment, the device also includes: a retransmission module, which is used to trigger the retransmission of the payload of the third data packet based on the confirmation message received for the first data packet and any data packet among the multiple second data packets, for a third data packet sent before any data packet in the data stream but not confirmed, if the difference between the sequence number of any data packet and the sequence number of the third data packet is greater than or equal to the data packet threshold.

[0103] In one possible implementation, the first data packet and the plurality of second data packets are transmitted based on TCP; the sequence numbers of the plurality of second data packets are the same as the sequence number of the first data packet; the apparatus further comprises: an acquisition module for acquiring a mapping relationship between the sequence number of the first data packet and a redundant sequence number, the redundant sequence number being the sum of the sequence number of the first data packet and n, where n is determined based on a repetition threshold corresponding to TCP.

[0104] In a possible embodiment, the device also includes: a retransmission module, which is used to obtain a redundant sequence number corresponding to the sequence number of any data packet in a mapping relationship for a third data packet sent before any data packet in the data stream but not confirmed, based on the confirmation message received for the first data packet and any data packet among the multiple second data packets; if the difference between the redundant sequence number and the sequence number of the third data packet is greater than or equal to the repetition threshold corresponding to TCP, trigger the retransmission of the payload of the third data packet.

[0105] In one possible embodiment, the device also includes: a second determination module, which is used to determine that the first data packet is the tail packet of the data stream if no data packet belonging to the data stream is added to the sending queue when the first time length after the first data packet is added to the sending queue is reached; or, it is used to determine that the first data packet is the tail packet of the data stream based on an identifier indicating the tail packet carried in the first data packet.

[0106] The data transmission device provided in the embodiment of the present application performs redundant protection for the tail packet in the data stream, that is, sends multiple redundant tail packets to reduce the probability of tail packet loss, avoid data retransmission of the RTO mechanism or TLP mechanism triggered by the loss of the tail packet, and thus avoid the waiting delay caused by the triggering of the RTO mechanism or TLP mechanism, thereby reducing the transmission delay of the data stream and improving the quality and performance of data transmission. In addition, the redundant number of multiple tail packets in the embodiment of the present application is determined according to the transmission parameters of the network used to transmit the data stream, which can not only avoid the continuous loss of the multiple tail packets sent, but also prevent the waste of transmission resources caused by an excessive number of redundant packets, so that the determined redundant number of multiple tail packets is more in line with the data transmission requirements.

[0107] It should be understood that the device provided in FIG6 is merely an example of the division of the functional modules described above when implementing its functions. In actual applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0108] Referring to Figure 7 , a schematic diagram of the structure of a data transmission device 2000 provided in accordance with an exemplary embodiment of the present application is shown. The data transmission device 2000 shown in Figure 7 is configured to perform the operations described in the data transmission method shown in Figure 3 . The data transmission device 2000 may be, for example, a cloud server, a switch, or a router, and may be implemented using a general bus architecture.

[0109] As shown in FIG. 7 , the data transmission device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .

[0110] The processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute the various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0111] Optionally, data transmission device 2000 also includes a bus. The bus is used to transmit information between the various components of data transmission device 2000. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, for example. Buses can be categorized as address buses, data buses, control buses, and the like. For ease of illustration, FIG7 shows only one line, but this does not imply that there is only one bus or only one type of bus.

[0112] The memory 2003 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, or a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 via a bus. The memory 2003 can also be integrated with the processor 2001.

[0113] The communication interface 2004 uses any transceiver-like device to communicate with other devices or communication networks. The communication network can be Ethernet, a radio access network (RAN), or a wireless local area network (WLAN). The communication interface 2004 can include a wired communication interface or a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In the embodiment of the present application, the communication interface 2004 can be used for the data transmission device 2000 to communicate with other devices.

[0114] In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG7 . Each of these processors may be a single-core CPU processor or a multi-core CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0115] In a specific implementation, as an embodiment, the data transmission device 2000 may include multiple processors, such as processor 2001 and processor 2005 shown in FIG7 . Each of these processors may be a single-core CPU or a multi-core CPU. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0116] In a specific implementation, as an embodiment, the data transmission device 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and can display information in a variety of ways. For example, the output device can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 2001 and can receive user input in a variety of ways. For example, the input device can be a mouse, a keyboard, a touch screen device, or a sensor device.

[0117] In some embodiments, the memory 2003 is used to store program code 2010 for executing the solution of the present application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. In other words, the data transmission device 2000 can implement the data transmission method provided in the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself may also store program code or instructions for executing the solution of the present application.

[0118] The data transmission device 2000 of the embodiment of the present application may correspond to the data transmission device in each of the above-mentioned method embodiments. The processor 2001 in the data transmission device 2000 reads the instructions in the memory 2003, so that the data transmission device 2000 shown in Figure 7 can execute all or part of the operations performed by the first node.

[0119] Specifically, the processor 2001 is used to, when the first data packet is the tail packet of the data stream, generate multiple second data packets corresponding to the first data packet by the first node, the payload of any second data packet is the same as the payload of the first data packet, and the number of the multiple second data packets is determined by the transmission parameters of the network used to transmit the data stream; the first node sends the first data packet and multiple second data packets, and the multiple second data packets are used to reduce the probability of packet loss of the tail packet of the data stream.

[0120] For the sake of brevity, other optional implementations will not be described here in detail.

[0121] The data transmission device 2000 may also correspond to the data transmission apparatus shown in FIG6 , and each functional module in the data transmission apparatus is implemented using the software of the data transmission apparatus 2000. In other words, the functional modules included in the data transmission apparatus are generated by the processor 2001 of the data transmission apparatus 2000 after reading the program code 2010 stored in the memory 2003.

[0122] Among them, each step of the data transmission method shown in Figure 3 is completed by the hardware integrated logic circuit or software instructions in the processor of the data transmission device 2000. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0123] Referring to FIG8 , FIG8 shows a schematic diagram of the structure of a data transmission device 2100 provided in another exemplary embodiment of the present application. The data transmission device 2100 shown in FIG8 is configured to perform all or part of the operations involved in the data transmission method shown in FIG3 . The data transmission device 2100 is, for example, a cloud server, a switch, a router, etc., and can be implemented using a general bus architecture.

[0124] As shown in FIG8 , the data transmission device 2100 includes a main control board 2110 and an interface board 2130 .

[0125] The main control board (MCB), also known as the main processing unit (MPU) or route processor card, is used to control and manage various components in data transmission device 2100, including routing calculations, device management, device maintenance, and protocol processing. MCB 2110 includes a central processing unit (CPU) 2111 and memory 2112.

[0126] Interface board 2130 is also known as a line processing unit (LPU), line card, or service board. It provides various service interfaces and implements data packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces and POS (Packet over SONET / SDH) interfaces. Ethernet interfaces, for example, are Flexible Ethernet Clients (FlexE Clients) interfaces. Interface board 2130 includes a central processing unit (CPU) 2131, a network processor (NPU) 2132, a forwarding table memory 2134, and a physical interface card (PIC) 2133.

[0127] The central processing unit 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processing unit 2111 on the main control board 2110 .

[0128] The network processor 2132 is used to implement message forwarding processing. The network processor 2132 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented using an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward received messages based on the forwarding table stored in the forwarding entry memory 2134. If the destination address of the message is the address of the data transmission device 2100, the message is sent to the CPU (such as the central processing unit 2131) for processing. If the destination address of the message is not the address of the data transmission device 2100, the next hop and outgoing interface corresponding to the destination address are searched in the forwarding table based on the destination address, and the message is forwarded to the outgoing interface corresponding to the destination address. The processing of uplink messages may include processing the message inbound interface and forwarding table lookup; the processing of downlink messages may include forwarding table lookup, etc. In some embodiments, the central processing unit may also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, thereby eliminating the need for a forwarding chip in the interface board.

[0129] Physical interface card 2133 implements physical layer interconnection. Raw traffic enters interface board 2130 through this card, and processed packets are sent out from this physical interface card 2133. Physical interface card 2133, also known as a daughter card, can be installed on interface board 2130. It converts optical and electrical signals into packets, performs a validity check on these packets, and then forwards them to network processor 2132 for processing. In some embodiments, central processing unit 2131 can also perform the functions of network processor 2132, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for network processor 2132 in physical interface card 2133.

[0130] Optionally, the data transmission device 2100 includes multiple interface boards. For example, the data transmission device 2100 further includes an interface board 2140. The interface board 2140 includes a central processing unit 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation of each component in the interface board 2140 are the same as or similar to those of the interface board 2130 and are not described in detail here.

[0131] Optionally, data transmission device 2100 further includes a switch fabric unit (SFU) 2120. This unit may also be referred to as a switch fabric unit (SFU). If data transmission device 2100 includes multiple interface boards, SFU 2120 is used to exchange data between the interface boards. For example, interface board 2130 and interface board 2140 can communicate via SFU 2120.

[0132] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane via a system bus to achieve intercommunication. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface boards 2130 and 2140, and communication is performed between the main control board 2110 and the interface boards 2130 and 2140 via the IPC channel.

[0133] Logically, data transmission device 2100 comprises a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit (CPU) 2111. The forwarding plane comprises various components responsible for forwarding, such as a forwarding table entry memory 2134, physical interface cards 2133, and a network processor 2132. The control plane performs routing functions, generates forwarding tables, processes signaling and protocol messages, and configures and maintains the data transmission device's status. The control plane sends the generated forwarding tables to the forwarding plane. On the forwarding plane, the network processor 2132 forwards messages received by the physical interface card 2133 based on the forwarding tables sent by the control plane. The forwarding tables sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and forwarding plane can be completely separate and not located on the same data transmission device.

[0134] It's worth noting that there may be one or more main control boards (SPUs), which can include both active and standby SPUs. There may also be one or more interface boards. The higher the data processing capabilities of a data transmission device, the more interface boards it provides. Interface boards can also have one or more physical interface cards. There may be no SPUs, one or more SPUs, and multiple SPUs can be used to achieve load balancing and redundant backup. In a centralized forwarding architecture, data transmission devices may not require SPUs; the interface boards handle the entire system's service data processing. In a distributed forwarding architecture, data transmission devices can have at least one SPU, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, data access and processing capabilities of distributed architecture data transmission devices are superior to those of centralized architecture data transmission devices. Alternatively, the data transmission device can consist of a single board, without a switching network board. The functions of the interface board and the main control board are integrated on this single board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU on this single board to perform the combined functions of the two. This type of data transmission device has lower data exchange and processing capabilities (for example, low-end data transmission devices such as switches or routers). The specific architecture used depends on the specific networking deployment scenario and is not specified here.

[0135] In a specific embodiment, the data transmission device 2100 corresponds to the data transmission apparatus shown in Figure 6. In some embodiments, the generation module 601 in the data transmission apparatus shown in Figure 6 corresponds to the network processor 2132 in the data transmission device 2100, and the sending module 602 corresponds to the physical interface card 2133 in the data transmission device 2100.

[0136] An embodiment of the present application further provides a communication device, comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. When the processor executes the instructions stored in the memory, the processor executes the method required to be executed by the first node.

[0137] An embodiment of the present application further provides a data transmission device, comprising: a processor coupled to a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor, so that the data transmission device implements the data transmission method shown in FIG3 . Optionally, there are one or more processors and one or more memories.

[0138] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0139] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor or be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.

[0140] It should be understood that the processor may be a CPU, or other general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced Reduced Instruction Set Machine (ARM) architecture.

[0141] Furthermore, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store device type information.

[0142] The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache memory. By way of example and not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0143] An embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to enable a computer to implement any of the above data transmission methods.

[0144] The embodiments of the present application further provide a computer program (product), which, when executed by a computer, can enable a processor or computer to execute the corresponding steps and / or processes in the above method embodiments.

[0145] An embodiment of the present application also provides a chip, including a processor, for calling and executing instructions stored in a memory, so that a communication device equipped with the chip executes any of the above data transmission methods.

[0146] An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute any of the above data transmission methods.

[0147] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive).

[0148] Those skilled in the art will appreciate that the various method steps and modules described in conjunction with the embodiments disclosed herein can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0149] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0150] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or split between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.

[0151] The computer program code for realizing the method for the embodiment of the application can be written in one or more programming languages.These computer program codes can be provided to the processor of general-purpose computer, special-purpose computer or other programmable data processing device, so that program code, when being executed by computer or other programmable data processing device, causes the function / operation specified in flow chart and / or block diagram to be implemented.Program code can be executed completely on computer, partly on computer, as independent software package, partly on computer and partly on remote computer or completely on remote computer or server.

[0152] In the context of the embodiments of the present application, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like.

[0153] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.

[0154] A machine-readable medium may be any tangible medium that contains or stores a program for or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.

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

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

[0157] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0158] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.

[0159] If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0160] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items that have substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity or execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the various examples, a first image may be referred to as a second image, and similarly, a second image may be referred to as a first image. The first image and the second image may both be images, and in some cases, may be separate and different images.

[0161] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0162] As used herein, the term "at least one" means one or more, and the term "plurality" means two or more. For example, "plurality of second data packets" means two or more second data packets. The terms "system" and "network" are often used interchangeably herein.

[0163] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0164] It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the listed items. The term "and / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this application generally indicates that the associated objects are in an "or" relationship.

[0165] It will also be understood that the term “comprise” (also known as “includes,” “including,” “comprises,” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0166] It should also be understood that the terms “if” and “if” may be interpreted to mean “when” or “upon” or “in response to determining” or “in response to detecting.” Similarly, the phrases “if it is determined that ” or “if [stated condition or event] is detected” may be interpreted to mean “upon determining ” or “in response to determining ” or “upon detecting [stated condition or event]” or “in response to detecting [stated condition or event],” depending on the context.

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

[0168] It should also be understood that references throughout this specification to "one embodiment," "an embodiment," or "one possible implementation" mean that specific features, structures, or characteristics associated with that embodiment or implementation are included in at least one embodiment of the present application. Therefore, the appearance of "in one embodiment," "in an embodiment," or "one possible implementation" throughout this specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

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

Claims

1. A data transmission method, characterized in that: The method comprises: In the case where the first data packet is the tail packet of the data stream, the first node generates a plurality of second data packets corresponding to the first data packet, the payload of any second data packet is the same as the payload of the first data packet, and the number of the plurality of second data packets is determined by a transmission parameter of a network used to transmit the data stream; The first node sends the first data packet and the multiple second data packets, where the multiple second data packets are used to reduce the probability of packet loss of a tail packet of the data stream.

2. The method according to claim 1, characterized in that The transmission parameters include continuous packet loss rates under different unit quantities corresponding to the network; Before the first node generates a plurality of second data packets corresponding to the first data packet, the method further includes: Performing function fitting on the continuous packet loss rates under different unit quantities corresponding to the network to obtain a functional relationship between the redundancy quantity and the success probability, wherein the success probability is a probability that at least one data packet among the redundant number of data packets sent continuously is received; The redundant quantity of the functional relationship when the success probability is greater than or equal to a probability threshold is obtained, and the quantity of the plurality of second data packets is determined according to the redundant quantity when the success probability is greater than or equal to the probability threshold.

3. The method according to claim 1 or 2, characterized in that: The first data packet and the plurality of second data packets are transmitted based on a fast user datagram protocol Internet connection QUIC, the number of the plurality of second data packets is K, the sequence number of the first data packet is N, and both K and N are positive integers; The serial numbers of the multiple second data packets are different from those of the first data packet, and the serial numbers of the multiple second data packets are N+n, N+n+1, ..., N+n+K-1, respectively, where n is determined based on the data packet threshold corresponding to the QUIC.

4. The method according to claim 3, characterized in that After the first node sends the first data packet and the plurality of second data packets, the method further includes: Based on receiving a confirmation message of the first data packet and any one of the multiple second data packets, for a third data packet in the data stream that is sent before any of the data packets but has not been confirmed, if the difference between the sequence number of any of the data packets and the sequence number of the third data packet is greater than or equal to the data packet threshold, trigger retransmission of the payload of the third data packet.

5. The method according to claim 1 or 2, characterized in that: The first data packet and the plurality of second data packets are transmitted based on a transmission control protocol TCP; the sequence numbers of the plurality of second data packets are the same as the sequence number of the first data packet; After the first node generates a plurality of second data packets corresponding to the first data packet, the method further includes: Obtain a mapping relationship between the sequence number of the first data packet and a redundant sequence number, where the redundant sequence number is the sum of the sequence number of the first data packet and n, where n is determined based on a repetition threshold corresponding to the TCP.

6. The method according to claim 5, characterized in that After the first node sends the first data packet and the plurality of second data packets, the method further includes: Based on receiving confirmation messages of the first data packet and any data packet among the multiple second data packets, for a third data packet in the data stream that is sent before any data packet but has not been confirmed, obtain a redundant sequence number corresponding to the sequence number of any data packet in the mapping relationship, and if the difference between the redundant sequence number and the sequence number of the third data packet is greater than or equal to the repetition threshold, trigger retransmission of the payload of the third data packet.

7. The method according to any one of claims 1 to 6, characterized in that: Before the first node generates a plurality of second data packets corresponding to the first data packet, the method further includes: When a first time length after the first data packet is added to the sending queue is reached, if no data packet belonging to the data flow is added to the sending queue, the first node determines that the first data packet is the tail packet of the data flow; Alternatively, the first node determines that the first data packet is the data flow according to the identifier indicating the tail packet carried in the first data packet. The tail package.

8. A data transmission device, characterized in that: The device comprises: A generating module, configured to generate, when a first data packet is a tail packet of a data stream, a plurality of second data packets corresponding to the first data packet, wherein a payload of any second data packet is the same as a payload of the first data packet, and the number of the plurality of second data packets is determined by a transmission parameter of a network used to transmit the data stream; The sending module is used to send the first data packet and the multiple second data packets, and the multiple second data packets are used to reduce the probability of packet loss of the tail packet of the data stream.

9. The device according to claim 8, characterized in that The transmission parameters include continuous packet loss rates under different unit quantities; the device also includes: A fitting module, used for performing function fitting on the continuous packet loss rate under different unit quantities corresponding to the network, to obtain a functional relationship between the redundancy quantity and the success probability, wherein the success probability is the probability that at least one data packet among the redundant number of data packets sent continuously is received; The first determination module is used to obtain the redundant number of the functional relationship when the success probability is greater than or equal to the probability threshold, and determine the number of the multiple second data packets according to the redundant number when the success probability is greater than or equal to the probability threshold.

10. The device according to claim 8 or 9, characterized in that The first data packet and the plurality of second data packets are transmitted based on a fast user datagram protocol Internet connection QUIC, the number of the plurality of second data packets is K, the sequence number of the first data packet is N, and both K and N are positive integers; The serial numbers of the multiple second data packets are different from those of the first data packet, and the serial numbers of the multiple second data packets are N+n, N+n+1, ..., N+n+K-1, respectively, where n is determined based on the data packet threshold corresponding to the QUIC.

11. The device according to claim 10, characterized in that The device also includes: A retransmission module is used to trigger retransmission of the payload of a third data packet in the data stream that is sent before any of the data packets but has not been confirmed, based on the confirmation message received for the first data packet and any of the multiple second data packets, if the difference between the sequence number of any of the data packets and the sequence number of the third data packet is greater than or equal to the data packet threshold.

12. The device according to claim 8 or 9, characterized in that The first data packet and the plurality of second data packets are transmitted based on a transmission control protocol TCP; the sequence numbers of the plurality of second data packets are the same as the sequence number of the first data packet; The device also includes: An acquisition module is used to obtain a mapping relationship between the sequence number of the first data packet and a redundant sequence number, where the redundant sequence number is the sum of the sequence number of the first data packet and n, and n is determined based on a repetition threshold corresponding to the TCP.

13. The device according to claim 12, characterized in that The device also includes: A retransmission module is used to obtain, based on the confirmation message received for the first data packet and any data packet among the multiple second data packets, a redundant sequence number corresponding to the sequence number of any data packet in the mapping relationship for a third data packet sent before any data packet in the data stream but not confirmed, and trigger retransmission of the payload of the third data packet if the difference between the redundant sequence number and the sequence number of the third data packet is greater than or equal to the repetition threshold.

14. The method according to any one of claims 8 to 13, characterized in that: The device also includes: A second determination module is used to determine that the first data packet is the tail packet of the data stream if no data packet belonging to the data stream is added to the sending queue when a first time period has passed since the first data packet was added to the sending queue; or to determine that the first data packet is the tail packet of the data stream based on an identifier indicating the tail packet carried in the first data packet.

15. A data transmission device, characterized in that: The data transmission device includes: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor so that the data transmission device implements the data transmission method described in any one of claims 1-7.

16. A computer-readable storage medium, characterized in that: The computer storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor so that the computer implements the data transmission method as described in any one of claims 1 to 7.

17. A computer program product, characterized in that The computer program product comprises: a computer program code, wherein the computer program code is loaded and executed by a computer so as to enable the computer to implement the data transmission method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data transmission method, device and equipment and computer readable storage medium

    CN118945244A

  • Data transmission method and device

    CN114389758A

  • Data transmission method and device

    CN114531212A

  • Data transmission method and device in base station and network equipment

    CN115734404A

  • Network quality measurement method and apparatus thereof

    EP3706371A1

Cited By

  • Data transmission method, data transmission device, system on chip and storage medium

    CN119847973A

  • Packet loss processing method and device in video data transmission, equipment and medium

    CN119996782A

  • QUIC-based HPLC (High Performance Liquid Chromatography) dual-mode transmission method, device and network

    CN120200634A