Data transmission method, device and equipment and computer readable storage medium
By generating multiple redundant data packets and determining their number according to network transmission parameters, the delay problem caused by the loss of tail packets is solved, and data transmission efficiency and quality are improved.
Patent Information
- Application Number
- CN202310518999.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, the tail packet loss of the data stream will trigger the tail loss detection (TLP) mechanism or the retransmission timeout (RTO) mechanism, resulting in a large retransmission delay and affecting the data transmission efficiency.
In the case of the end packet of the data stream, multiple redundant data packets are generated, with the same payload as the original data packet. The number of redundant packets is determined according to the network transmission parameters to reduce the probability of packet loss of the end packet and avoid triggering the RTO or TLP mechanism. , reduce transmission delay.
By sending the tail packets redundantly, the probability of packet loss of the data stream is reduced, the transmission delay is reduced, the quality and performance of data transmission is improved, and resource waste caused by excessive redundant packets is avoided.
Smart Images

Figure CN118945244A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] During data transmission, if the data packet at the tail of the data stream is lost, the tail loss probe (TLP) mechanism or the retransmission timeout (RTO) mechanism will be triggered to implement packet retransmission. However, the retransmission delay caused by the TLP mechanism and the RTO mechanism is usually large. Summary of the invention
[0003] 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.
[0004] In a first aspect, a data transmission method is provided, the method comprising: when a first data packet is a 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, the multiple second data packets are used to reduce the probability of packet loss of the tail packet of the data stream.
[0005] The method 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 caused by the RTO mechanism or TLP mechanism triggered by the tail packet loss, and then 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 avoid continuous packet loss of multiple tail packets sent, and can also prevent the waste of transmission resources caused by excessive redundant number, so that the determined redundant number of multiple tail packets is more in line with the data transmission requirements.
[0006] In a possible implementation, the transmission parameters include the 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 number of redundancies and the probability of success, where the probability of success 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 probability of success 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 probability of success 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.
[0007] In a 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 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, and n is determined based on the packet threshold corresponding to QUIC. The 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 the QUIC transmission scenario, and the implementation flexibility of the method is improved.
[0008] In a 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 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, trigger the retransmission of the payload of the third data packet. 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 the retransmission of lost packets.
[0009] In a possible implementation, the first data packet and the 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 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, where the redundant sequence number is the sum of the sequence number of the first data packet and n, and n can be determined based on the repetition threshold corresponding to TCP. The method provides a way to set the sequence numbers of multiple second data packets in a TCP transmission scenario, so that the method can be applied to TCP transmission scenarios, and the implementation flexibility of the method is improved.
[0010] In a possible implementation, after the first node sends the 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 the third data packet sent before any data packet in the data stream but not confirmed, the 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 the repetition threshold, the retransmission of the payload of the third data packet is triggered. In this way, in the case of continuous packet loss at the tail of the data stream based on TCP transmission, packet retransmission can be quickly triggered by sending redundant tail packets, thereby reducing the delay caused by packet retransmission.
[0011] In a possible implementation, 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 method for determining 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 according to 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 adding a data packet to the sending queue, or directly identifying the tail packet by the carried identifier improves the accuracy and flexibility of identifying the tail packet.
[0012] In a second aspect, a data transmission device is provided, which includes: a generating module, used to generate 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, used to send 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.
[0013] In one possible implementation, the transmission parameters include continuous packet loss rates under different unit quantities; the device also includes: a fitting module, used to perform function fitting on the continuous packet loss rates under different unit quantities corresponding to the network, to obtain a functional relationship between the redundant quantity and the success probability, where the success probability is the probability that at least one of the redundant quantity data packets sent continuously is received; a first determination module, used to obtain the redundant quantity 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 according to the redundant quantity when the success probability is greater than or equal to the probability threshold.
[0014] In a 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 data packet threshold corresponding to QUIC.
[0015] 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 a data packet threshold.
[0016] In a possible implementation, a first data packet and multiple second data packets are transmitted based on TCP; the sequence numbers of the multiple second data packets are the same as the sequence number of the first data packet; the device also includes: an acquisition module, used to obtain a mapping relationship between the sequence number of the first data packet and a redundant sequence number, 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 TCP.
[0017] 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, and trigger the 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 corresponding to TCP.
[0018] 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 a first time period has passed after the first data packet is 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.
[0019] In a third aspect, a data transmission device is provided, comprising: a processor, the processor being 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 method in the first aspect or any possible implementation manner of the first aspect.
[0020] Optionally, there are one or more processors and one or more memories.
[0021] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0022] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0023] In a fourth aspect, a communication device is provided, the device comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other through an internal connection path, the memory is used to store instructions, 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, and when the processor executes the instructions stored in the memory, the communication device executes the method in the first aspect or any possible implementation of the first aspect.
[0024] 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.
[0025] In a sixth aspect, a computer program (product) is provided, the computer program (product) comprising: a computer program code, when the computer program code is executed by a computer, the computer executes the methods in the above aspects.
[0026] In a 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 manner of the first aspect.
[0027] In an 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 manner of the first aspect.
[0028] It should be understood that the beneficial effects achieved by the technical solutions of the second to eighth aspects of the present 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
[0029] Figure 1 A schematic diagram of a data packet forwarding process provided in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of an implementation environment of a data transmission method provided in an embodiment of the present application;
[0031] Figure 3 A flowchart of a data transmission method provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of a data transmission process provided in an embodiment of the present application;
[0033] Figure 5 A schematic diagram of another data transmission process provided in an embodiment of the present application;
[0034] Figure 6 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0035] Figure 7 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0036] Figure 8 A schematic diagram of the structure of another data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0038] In the field of communication technology, when packet loss occurs during the transmission of a data stream, when fast retransmission cannot take effect, the only option is to trigger the RTO mechanism. The RTO mechanism is that after the sender sends a data packet, if it has not received a confirmation message corresponding to the data packet returned by the receiver after waiting for an RTO period, for example, the confirmation message is an ACK packet, the sender starts to retransmit the data packet. Usually, the RTO time is often set to several hundred milliseconds (ms). Therefore, the packet retransmission triggered by the RTO mechanism has a greater impact on the transmission delay.
[0039] The main reason for triggering the RTO mechanism is that the sender does not receive a confirmation message for all the data packets in the data stream after sending the data stream. One of the important reasons why the sender does not receive a confirmation message for all the data packets in the data stream is that the data packets at the end of the data stream are lost, that is, the probability of packet loss at the end of the data stream is relatively high. Among them, the number of tail data packets can be one or more. When the number of tail data packets is one, the tail data packet is the tail packet, and the tail packet refers to the last data packet in a data stream sent in sequence; when the number of tail data packets is multiple, the tail data packet refers to the last M data packets in a data stream sent in sequence. Among them, M is a positive integer, and M can be determined according to the total number of data packets included in the data stream. Optionally, M is 20% of the total number of data packets included in the data stream. For example, if the total number of data packets included in the data stream is 10, then M is 10*20%=2. When the sequence numbers of the 10 data packets sent in sequence are 1-10 respectively, the tail data packets are data packets 9 and 10.
[0040] For example, see Figure 1 As shown in the schematic diagram of the packet forwarding process, the sender sends a data stream to the receiver. For example, the data stream includes 10 data packets, and the sequence numbers of the 10 data packets are 1 to 10 respectively. The data packets at the end of the data stream may include data packets 7 to 10, and the end packet of the data stream is data packet 10. Figure 1 As shown, when the receiving end receives data packets 1 to 6, the receiving end will send corresponding ACK1 to ACK6 to the sending end to indicate that data packets 1 to 6 are confirmed. In the case of packet loss at the end of data packets 7 to 10, since the receiving end has not received the subsequent data packets of the data stream to which data packet 6 belongs, the receiving end will not trigger any confirmation message to the sending end, resulting in the sending end having to wait for the RTO time after sending data packet 10 to trigger the RTO mechanism to retransmit the data stream starting with data packet 7, thereby causing a transmission delay of approximately the RTO time.
[0041] The TLP method in the related art sets a probe timeout (PTO) timer. When 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 packets, thereby avoiding the timeout retransmission of the RTO mechanism triggered by the loss of the tail packet of the data stream. Figure 1 Taking the data flow shown as an example, after sending data packet 10, the sender waits for a PTO time. If ACK10 is not received, it sends a detection data packet, which can be data packet 10, triggering the receiving end to return a corresponding confirmation message to the sender based on the detection data packet. After receiving the confirmation message corresponding to the detection data packet, the sender determines that the data packet 7 meets the packet loss condition among the unconfirmed data packets sent before data packet 10, and then retransmits data packet 7. Among them, the packet loss condition can 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 the packet threshold (packet threshold). Taking the packet threshold of 3 as an example, only data packet 7 meets the packet loss condition, and only the fast retransmission of data packet 7 can be triggered.
[0042] Therefore, the TLP method will cause a transmission delay of about PTO plus a round-trip time (RTT) when multiple data packets at the tail are lost continuously, and the PTO is often set to a time in milliseconds. Among them, RTT refers to the time between the start of the sender sending a data packet to the receiver and the receipt of the confirmation message returned by the receiver based on the data packet. Generally, RTT is tens to hundreds of microseconds. In other words, the transmission delay under the TLP method in the related art is still large. In addition, due to the judgment of the packet loss condition, it is still impossible to trigger the fast retransmission of the lost packet that does not meet the packet loss condition. In addition, PTO is usually set based on RTT. For example, the larger the RTT, the larger the PTO is set, and the smaller the RTT, the smaller the PTO is set, so that the accuracy of the PTO setting depends on the accuracy of RTT, and RTT changes according to changes in network conditions. Therefore, it is difficult to obtain an accurate RTT, which leads to greater difficulty in setting an accurate PTO.
[0043] The 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 the data stream in any scenario of transmitting data streams. For example, see Figure 2 , Figure 2 A schematic diagram of an implementation environment of a data transmission method provided in an embodiment of the present application.
[0044] like Figure 2 As shown, 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 may be directly or indirectly connected via a wired or wireless communication method, and this application is not limited here. For example, any client is connected to the cloud server via a network device, and any client and network device may be connected via wireless fidelity (wireless-fidelity, WIFI) technology, fifth generation mobile communication technology (5th generation mobile communication technology, 5G) or wired broadband technology.
[0045] Among them, the cloud server can be the network nodes at all levels that provide services to the client for the network system, and is the smallest unit for routing and scheduling the data requests sent by the client. The client can be any electronic product that can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device, such as personal computer (PC), smart phone, personal digital assistant (PDA), wearable device, pocket PC (PPC), tablet computer, smart car machine, etc.
[0046] In an embodiment of the present application, a connection is established between the client and the 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 the corresponding file download through an application (APP) such as music or photo album, and 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.
[0047] Among them, if the packet loss at the end of the file triggers the timeout retransmission of the RTO mechanism, the RTO usually starts to increase exponentially from 200ms, that is, the retransmission delay for triggering RTO once is 200ms, the retransmission delay for triggering RTO twice is 200+400=600ms, and the retransmission delay for triggering RTO three times is 200+400+800=1400ms. Therefore, compared with the time required for file transmission, the transmission delay caused by the RTO mechanism triggered by the packet loss at the end is large, which seriously affects the overall transmission completion time of the file, making the data transmission efficiency low.
[0048] See also Figure 3 , taking the first node executing this method as an example, Figure 3 Flow chart of a data transmission method provided in an embodiment of the present application. For example, the method can be applied to Figure 2 In the implementation environment shown, for example, the first node is Figure 2 The cloud server shown in FIG. Figure 2 The cloud server shown corresponds to the sending end of the data stream transmission. Figure 2 The client shown corresponds to the receiving end of the data stream transmission. Figure 3 As shown, the data transmission method includes but is not limited to the following steps 301 and 302.
[0049] 301. When the first data packet is the tail 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.
[0050] In an embodiment of the present application, the first node is a transmitting end of data stream transmission, and when the first node transmits a data stream to the second node, the second node is a receiving end of 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 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.
[0051] 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 a 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.
[0052] In another possible implementation, 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. Among them, the first time duration can be set according to experience, or flexibly adjusted according to the application scenario, for example, the first time duration is the time interval between the sending of 2 data packets. Exemplarily, the first node periodically scans the sending queue, and determines whether other data packets are added within the first time duration after the first data packet joins the sending queue according to 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, and 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, and when the transmission interruption time is less than the RTO time, the transmission delay of the data stream can also be reduced.
[0053] In an embodiment of the present application, multiple second data packets can be called multiple redundant packets. If 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, and then the sending end can trigger fast retransmission based on the received confirmation message when multiple data packets at the tail of the data stream are continuously lost, 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 a role. Therefore, the embodiment of the present application determines the number of redundant packets according to the transmission parameters of the network used to transmit the data stream, so that the determined number of redundant packets can not only avoid continuous packet loss of multiple tail packets sent, but also prevent waste of transmission resources caused by excessive redundant number, so that the determined number of redundant tail packets is more in line with data transmission requirements.
[0054] 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. Exemplarily, taking the case where the transmission parameters include RTT as an example, the method for determining the number of multiple second data packets based on the transmission parameters may be to obtain the current RTT of the network, and determine the number of redundancies corresponding to the current RTT of the network based on the correspondence between RTT and the number of redundancies, where the number of redundancies corresponding to the current RTT of the network is the number of multiple second data packets. Among them, the correspondence between RTT and the number of redundancies can be obtained based on the historical transmission situation of the network. Optionally, the larger the RTT, the larger the corresponding number of redundancies, and the smaller the RTT, the smaller the corresponding number of redundancies. 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 number of redundancies corresponding to any RTT is determined based on the maximum number.
[0055] Taking the transmission parameter including the continuous packet loss rate under different unit quantities corresponding to the network as an example, before the first node generates multiple second data packets corresponding to the first data packet, the method of determining the number of multiple second data packets based on the transmission parameter can be to perform function fitting on the continuous packet loss rate under different unit quantities corresponding to the network to obtain the 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; 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 multiple second data packets according to the redundant number when the success probability is greater than or equal to the probability threshold. The number of multiple second data packets can also be called the number of redundant packets. Among them, the continuous packet loss rate corresponding to any unit quantity is the probability of continuously losing any unit quantity of data packets. For example, when the unit quantity is 1, the continuous packet loss rate corresponding to the unit quantity is the probability of continuously losing 1 data packet. When the unit quantity is 2, the continuous packet loss rate corresponding to the unit quantity is the probability of continuously losing 2 data packets. Different unit quantities can include 1, 2, ..., D, and D is a positive integer greater than 2.
[0056] In the embodiment of the present application, the probability that at least one of the redundant number of data packets is received is the probability that the redundant number of data packets triggers fast retransmission, and the probability that the redundant number of data packets triggers fast retransmission is the probability that the redundant number of data packets successfully function. Since at least one of the redundant number of data packets is received, it means that there is no continuous packet loss of the redundant number of data packets, that is, if the redundant number of data packets will not be lost continuously in the network, then at least one of the redundant number of data packets will be received. Therefore, the sum of the probability of continuously losing the redundant number of data packets and the probability of receiving at least one of the redundant number of data packets is 1, that is, the success probability corresponding to any redundant number can be obtained by calculating the difference between 1 and the probability of continuously losing any redundant number of data packets.
[0057] Optionally, the embodiment of the present application does not limit the fitting method for fitting the function of 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. Exemplarily, taking the logistic regression analysis model as an example, the functional relationship between the redundant number and the success probability obtained by fitting can be shown as formula (1).
[0058]
[0059] 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 function; Pr iods(K) represents the probability of losing K redundant packets in succession; 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.
[0060] In an embodiment of the present application, the average packet loss rate p can be obtained based on the 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 fitting the function of 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, which can also be obtained by statistical analysis of the data transmission situation of the network in the historical time, which will not be repeated here.
[0061] 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 earlier, 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 obtain 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, that is, solving and calculating Pr succ The value range of K under (K)≥probability threshold is the redundancy quantity. The probability threshold can be set based on experience or flexibly adjusted according to the application scenario.
[0062] Optionally, the method of 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 thus obtained will not be too small, and the probability of at least one of the plurality of second data packets being received can be ensured to be greater than or equal to 0.9999, effectively reducing the probability of loss of the tail packet of the data stream, thereby avoiding continuous loss of the plurality of tail packets sent.
[0063] Alternatively, the method for determining the number of the plurality of second data packets according to the redundant number may also be to round up the redundant number to obtain the number of the plurality of second data packets. Exemplarily, still taking the probability threshold of 0.9999 as an example, the value range of K is rounded up, and the number of the plurality of second data packets obtained is 6. The number of the plurality of second data packets thus obtained will not be too large, and the transmission resources of the network will not be wasted due to the excessive number of the plurality of second data packets sent, thereby reducing the redundancy rate of the tail packet.
[0064] In summary, after determining the number of the plurality of second data packets, taking the number of the plurality of second data packets as K as an example, where K is a positive integer, the first node can generate K second data packets corresponding to the first data packet. In particular, for different data transmission scenarios, the sequence numbers corresponding to the plurality of second data packets are also different, and the following two scenarios are used as examples for illustration.
[0065] Scenario 1: A first data packet and multiple second data packets are transmitted based on QUIC.
[0066] 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 that it is difficult to distinguish whether the data packet is an original packet or a retransmitted packet in the TCP retransmission mechanism. 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.
[0067] In the scenario based on QUIC transmission, the process of triggering fast retransmission includes determining that any data packet is lost and retransmitting the data packet. The conditions for determining that any data packet is lost include: any data packet is not confirmed, and any data packet is sent earlier than a confirmed data packet, and the difference between the sequence number of any data packet and the maximum sequence number in the confirmed data packet is greater than or equal to the 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.
[0068] 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. Therefore, n>=(packet threshold-1), so that the sequence number N+n of the first second data packet among multiple second data packets will not be lower than the packet threshold, and further, in the event that any data packet sent before the first data packet is lost, the first second data packet among multiple second data packets is confirmed to trigger the fast 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 fast retransmission of each of the multiple data packets at the tail of the consecutive loss, thereby improving the efficiency of data retransmission.
[0069] 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 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.
[0070] For example, see Figure 4 The schematic diagram of the data transmission process shown in FIG. 1 corresponds to the first node. Figure 4 The QUIC sender shown in Figure 1 corresponds to the second node. Figure 4 The QUIC receiver shown in the figure takes 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 continuously sends data packets 3 to 7, data packets 9 (7) and data packets 10 (7) to the QUIC receiver through the sending queue.
[0071] In another possible implementation, 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 earlier than that exceeds the time threshold. Among them, the time threshold can be set according to 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 sending time of multiple second data packets, the time threshold is added to the original sending time. Similarly, in the case of a 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.
[0072] In scenario 2, the first data packet and multiple second data packets are transmitted based on TCP.
[0073] In this scenario, since TCP still uses the original sequence number of the data packet for the data packet retransmitted by the data stream, a new sequence number will not be reconfigured 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 number of the data packet in TCP is divided by byte segments, 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 N in the embodiment of the present application corresponds to the byte sequence number range (40-49). For the convenience of description, the embodiment of the present application uses sequence numbers instead of byte sequence number ranges for example. For example, the byte sequence number range is (1-9) corresponding to sequence number 1, and the byte sequence number range is (10-19) corresponding to sequence number 2.
[0074] For example, see Figure 5 The schematic diagram of the data transmission process shown in FIG. 1 corresponds to the first node. Figure 5 The TCP sender shown in the figure, the second node corresponds to Figure 5The TCP receiving end (receiver) shown. The sending queue of the TCP sending end 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 TCP sending end generates two second data packets corresponding to data packet 7, which are two identical data packets 7. The TCP sending end continuously sends data packets 3 to 6 and three identical data packets 7 to the TCP receiving end through the sending queue.
[0075] In the scenario based on TCP transmission, the selective acknowledgment (SACK) mechanism is that the receiver returns to the sender the sequence number range of the data packets that have been received but not confirmed. In the SACK mechanism, the sender needs to receive a duplicate ACK of a duplication threshold (dupthresh) to trigger a fast retransmission. The duplication threshold can be set based on experience, or flexibly adjusted according to the application scenario. For example, the duplication threshold is 3. Exemplarily, the sender sends data packets 1 (0-9), 2 (10-19), 3 (20-29), 4 (30-39), and 5 (40-49) to the receiver in sequence. If the receiving end receives data packet 1, it returns an ACK packet including sequence number 10 to the sending end; if the receiving end receives data packet 2, it returns an ACK packet including sequence number 20 to the sending end; if data packet 3 is lost, the receiving end receives data packet 4, and returns an ACK packet including sequence number 20 and a SACK packet including sequence numbers (30-39) to the sending end; if data packet 3 is lost, the receiving end receives data packet 5, and returns an ACK packet including sequence number 20 and a SACK packet including sequence numbers (30-49) to the sending end. The sending end confirms that data packet 3 is lost based on the receipt of three repeated ACK packets including sequence number 20, thereby triggering a fast retransmission of data packet 3.
[0076] On the basis of adopting the SACK mechanism, fast retransmission can be further triggered based on the forward acknowledgment (FACK) mechanism. The FACK mechanism infers the packet loss of 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 confirmed by 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 packet corresponding to the sequence number after the confirmed maximum sequence number is lost and triggers fast retransmission. MSS is the maximum range of the byte sequence number range corresponding to a data packet defined in TCP.
[0077] For example, the sender still sends data packets 1 (0-9), 2 (10-19), 3 (20-29), 4 (30-39), and 5 (40-49) to the receiver in sequence. If the receiver receives data packet 1, it returns an ACK packet including sequence number 10 to the sender. Assuming that data packets 2, 3, and 4 are lost due to network congestion, the receiver will return an ACK packet including sequence number 10 and a SACK packet including sequence number (40-49) to the sender when receiving data packet 5. After receiving the ACK packet including sequence number 10 and the SACK packet including sequence number (40-49), the sender determines that data packets 1 and 5 have been received by the receiver. Among them, the maximum sequence number selectively confirmed by SACK is 50, the maximum sequence number confirmed is 20, and the MSS is 10. Since 49-20>=3*10, it is determined that data packet 2 is lost and the fast retransmission of data packet 2 is triggered.
[0078] Based on the mechanism for 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 a 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 determine the packet loss situation of the data stream according to the redundant sequence number. For example, as Figure 5 As shown, taking the repetition threshold as 3 and n as 2 as an example, after the TCP sender generates two redundant data packets 7, it records the mapping relationship {7, 9}, or records the mapping relationship {7*MSS, 9*MSS}.
[0079] 302. A 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.
[0080] In the embodiment of the present application, since the payload of the multiple second data packets sent is the same as that of 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 numbers corresponding to the network, so that the probability of continuous packet loss of the multiple second data packets sent is relatively 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 as much as possible not to be lost.
[0081] 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 at least one of the first data packet and the multiple second data packets, and based on the at least one received data packet, it will trigger the return of a corresponding confirmation message to the first node, 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 determine the packet loss 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.
[0082] In the embodiment of the present application, for different transmission protocols or different packet loss retransmission mechanisms, the type and content of the confirmation message may be different, and therefore, the first node determines the packet loss situation of the data stream according to the confirmation message in different ways. For example, the confirmation message includes an ACK packet, which is used to indicate that the first data packet is confirmed, and the ACK packet includes the sequence number of the first data packet; or, the confirmation message includes a SACK packet, which is used to indicate that the first data packet and the received data packet among the data packets sent before the first data packet are confirmed, and the SACK packet includes the sequence number of the received data packet.
[0083] 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 the first data packet and any one of the multiple second data packets, for a third data packet sent before any of the data packets 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, it is determined that the third data packet is lost, and the retransmission of the payload of the third data packet is triggered.
[0084] For example, see Figure 4 , the QUIC receiver receives data packets 9, 7, and 4-3 in the data stream in the receiving queue, and then the QUIC receiver returns the SACK packet corresponding to the received data packet to the QUIC sender. The SACK packet includes the largest acknowledgement number (largest acknowledged) of 9, the acknowledgment range count (ack range count) of 3, the first acknowledgment block (first ack block) of 1, the gap (GAP) (0) of 1, the additional acknowledgment block (additional ack block) (0) of 1, the gap (GAP) (1) of 2, and the additional acknowledgment block (additional ack alock) (1) of 2.
[0085] exist Figure 4 In the SACK packet shown, the largest acknowledgement number (largest acknowledged) is 9 and the ack range count (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 an 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.
[0086] The QUIC sender finds out from the received SACK packet that data packets 8 and 6-5 in the data stream have not been received, that is, data packets 8 and 6-5 may be lost. Then, taking the data packet threshold of 3 as an example, the difference between the maximum confirmation number 9 and the sequence number of data packet 6 is calculated to be 9-6=3, and the difference between the maximum confirmation 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 data packet threshold 3, data packets 6-5 are marked as lost data packets, and data packets 6 and 5 are added to the lost queue. For data packet 8, the difference between the maximum confirmation number 9 and the sequence number of data 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 data packet threshold 3, data packet 8 is not marked as a lost data packet; or, since the tail packet of the data stream is data packet 7, that is, data packet 8 is not originally included in the data stream, the sequence number with the gap of 8 in the confirmation message is directly ignored.
[0087] Further, the QUIC sender retransmits the payload of data packets 6-5, for example, adds two new serial numbered data packets 11 and 12 in the sending queue, the serial number of data packet 11 is 11, 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 realizing the 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 are restored according to 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, in the case of packet loss at the tail of the data stream, fast retransmission is triggered by sending redundant data packets 9, wherein the retransmission delay caused by transmitting data packet 9 is approximately the time of one RTT. Compared with the related art, the retransmission is triggered by waiting for the RTO time or the PTO time, which shortens the time required for triggering the retransmission.
[0088] 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 is convenient for deployment. And according to the record in request for comments (RFC) 9000, when the QUIC receiver receives multiple packets with the same stream offset in the same data stream, the 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, so the second node as the receiving end does not need to be changed, which further facilitates deployment.
[0089] Optionally, for the above scenario 2, 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 data packet and multiple second data packets, for the third data packet sent before any of the data packets in the data stream but not confirmed, the 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 less than or equal to the repetition threshold corresponding to TCP, it is determined that the third data packet is lost, and the payload of the third data packet is triggered to be retransmitted. Thus, the mapping relationship corresponding to the sequence numbers of multiple second data packets is recorded by n, and whether the data packet is lost is determined based on the mapping relationship, so that the method can trigger the rapid retransmission of each of the multiple data packets at the end of the continuous loss, thereby improving the efficiency of data retransmission.
[0090] For example, see Figure 5 , the TCP receiving end receives data packets 7 and 4-3 in the data stream in the receiving queue, and the TCP receiving end returns the SACK packet corresponding to the received data packet to the TCP sending end. The SACK packet includes sequence numbers {7} and {4-3}, indicating that data packet 7 is confirmed and data packet 4-3 is confirmed. The TCP sending end finds that data packets 6 and 5 in the data stream may be lost based on the received SACK packet, and adds data packets 6 and 5 to the lost queue. Taking the number K of multiple second data packets as 2 and the repetition threshold as 3 as an example, it is further determined whether data packet 6-5 is a lost packet.
[0091] In one possible implementation, Figure 5 In the example, 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, calculates the difference between the redundant sequence number 9 and the sequence number of data packet 6 as 9-6=3, and the difference between the redundant sequence number 9 and the sequence number of data packet 5 as 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, the first node records the mapping relationship {7*MSS, 9*MSS} when generating multiple second data packets, and obtains the redundant sequence number corresponding to the sequence number of data packet 7 as 9*MSS through the mapping relationship, calculates the difference between the redundant sequence number 9 and the sequence number of data packet 6 as (9-6)*MSS=3*MSS, and the difference between the redundant sequence number 9 and the sequence number of data packet 5 as (9-5)*MSS=4*MSS. Since 3*MSS and 4*MSS meet the condition of being greater than or equal to the repetition threshold 3*MSS, data packets 6-5 are marked as lost data packets.
[0092] Furthermore, the TCP sending end retransmits the payload of data packet 6-5, for example, adds data packet 6 and data packet 5 again to the sending queue, and then retransmits data packet 5 and data packet 6 to the TCP receiving end, thereby realizing fast retransmission of data packet 5 and data packet 6. If the TCP receiving end receives the retransmitted data packet 5 and data packet 6, the lost data packet 6-5 is restored, thereby completing the transmission of the data stream. In the embodiment of the present application, in the case of packet loss at the tail of the data stream, fast retransmission is triggered by sending a 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.
[0093] In another possible implementation, the confirmation message includes multiple repeated ACK packets, and the multiple ACK packets indicate that the third data packet is lost, and 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, and the first node directly retransmits the payload of the third data packet based on the NACK packet.
[0094] In the 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. Therefore, after the second node receives the ACK packet corresponding to the confirmation message, it can determine that the first data packet and the data packets before the first data packet in the data stream have been successfully received according to 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, see Figure 4 After receiving the ACK packet for the SACK packet sent by the QUIC sender, the QUIC receiver releases the gap record including 5-8, confirms that the payload of data packet 5-8 has been received, and no longer carries the GAP in the subsequent feedback SACK packet.
[0095] The data transmission method 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 then 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 avoid continuous packet loss of multiple tail packets sent, and can also prevent the waste of transmission resources caused by excessive redundant number, so that the determined redundant number of multiple tail packets is more in line with the data transmission requirements.
[0096] 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 schematic diagram of a data transmission device provided in an embodiment of the present application, based on Figure 6 As shown in the following multiple modules, the Figure 6 The data transmission device shown 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, and the embodiments of the present application are not limited to this. Figure 6 As shown, the device comprises:
[0097] A generating module 601 is used to generate a plurality of second data packets corresponding to the first data packet when the first data packet is the tail packet of the data stream, wherein 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;
[0098] The sending module 602 is used 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.
[0099] In one possible implementation, the transmission parameters include continuous packet loss rates under different unit quantities; the device also includes: a fitting module, used to perform function fitting on the continuous packet loss rates under different unit quantities corresponding to the network, to obtain a functional relationship between the redundant quantity and the success probability, where the success probability is the probability that at least one of the redundant quantity data packets sent continuously is received; a first determination module, used to obtain the redundant quantity 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 according to the redundant quantity when the success probability is greater than or equal to the probability threshold.
[0100] In a 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 data packet threshold corresponding to QUIC.
[0101] 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 a data packet threshold.
[0102] In a possible implementation, a first data packet and multiple second data packets are transmitted based on TCP; the sequence numbers of the multiple second data packets are the same as the sequence number of the first data packet; the device also includes: an acquisition module, used to obtain a mapping relationship between the sequence number of the first data packet and a redundant sequence number, 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 TCP.
[0103] 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, and trigger the 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 corresponding to TCP.
[0104] 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 a first time period has passed after the first data packet is 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.
[0105] 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 then 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 avoid continuous packet loss of multiple tail packets sent, and can also prevent the waste of transmission resources caused by excessive redundant number, so that the determined redundant number of multiple tail packets is more in line with the data transmission requirements.
[0106] It should be understood that the above Figure 6 When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is 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 belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0107] See also Figure 7 , Figure 7A schematic structural diagram of a data transmission device 2000 provided by an exemplary embodiment of the present application is shown. Figure 7 The data transmission device 2000 shown is used to perform the above Figure 3 The operations involved in the data transmission method shown. The data transmission device 2000 is, for example, a cloud server, a switch, a router, etc. The data transmission device 2000 can be implemented by a general bus architecture.
[0108] like Figure 7 As shown, the data transmission device 2000 includes at least one processor 2001 , a memory 2003 and at least one communication interface 2004 .
[0109] 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 units (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 devices, transistor logic devices, hardware components, 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 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 a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0110] Optionally, the data transmission device 2000 further includes a bus. The bus is used to transmit information between the components of the data transmission device 2000. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.
[0111] The memory 2003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices 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 compressed optical 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 the 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.
[0112] The communication interface 2004 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The communication interface 2004 may include a wired communication interface and may also include a wireless communication interface. Specifically, the communication interface 2004 may 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 may be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 2004 may be used for the data transmission device 2000 to communicate with other devices.
[0113] In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as Figure 7 0 and CPU1 shown in FIG. Each of these processors may be a single-core CPU processor or a multi-core CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0114] In a specific implementation, as an embodiment, the data transmission device 2000 may include multiple processors, such as Figure 7 2001 and 2005 are shown in FIG. Each of these processors may be a single-core CPU or a multi-core CPU. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0115] In a specific implementation, as an embodiment, the data transmission device 2000 may also 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 may 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 may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0116] In some embodiments, the memory 2003 is used to store the 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. That is, the data transmission device 2000 can implement the data transmission method provided by 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 can also store the program code or instruction for executing the solution of the present application.
[0117] The data transmission device 2000 of the embodiment of the present application may correspond to the data transmission device in each of the above method embodiments. The processor 2001 in the data transmission device 2000 reads the instruction in the memory 2003, so that Figure 7 The data transmission device 2000 shown is capable of performing all or part of the operations performed by the first node.
[0118] Specifically, processor 2001 is used for, when the first data packet is the tail 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, 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.
[0119] For the sake of brevity, other optional implementations are not described here in detail.
[0120] The data transmission device 2000 may also correspond to the above Figure 6 In the data transmission device shown, each functional module in the data transmission device is implemented by the software of the data transmission device 2000. In other words, the functional modules included in the data transmission device are generated after the processor 2001 of the data transmission device 2000 reads the program code 2010 stored in the memory 2003.
[0121] in, Figure 3 Each step of the data transmission method shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the data transmission device 2000. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, 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 conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0122] See also Figure 8 , Figure 8 FIG. 2 shows a schematic diagram of the structure of a data transmission device 2100 provided by another exemplary embodiment of the present application. Figure 8 The data transmission device 2100 shown is used to perform the above Figure 3 All or part of the operations involved in the data transmission method shown. The data transmission device 2100 is, for example, a cloud server, a switch, a router, etc. The data transmission device 2100 can be implemented by a general bus architecture.
[0123] like Figure 8 As shown, the data transmission device 2100 includes: a main control board 2110 and an interface board 2130 .
[0124] The main control board is also called the main processing unit (MPU) or route processor card. The main control board 2110 is used to control and manage various components in the data transmission device 2100, including route calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processing unit 2111 and a memory 2112.
[0125] The interface board 2130 is also called a line processing unit (LPU), a line card (linecard) or a service board. The interface board 2130 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 2130 includes: a central processing unit 2131, a network processor 2132, a forwarding table entry memory 2134 and a physical interface card (physical interface card, PIC) 2133.
[0126] The central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main control board 2110 .
[0127] The network processor 2132 is used to implement the forwarding processing of the message. 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 by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward the received message based on the forwarding table stored in the forwarding table 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 processor 2131) for processing; if the destination address of the message is not the address of the data transmission device 2100, the next hop and the output interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address. Among them, the processing of the uplink message may include: processing of the message input interface, forwarding table search; the processing of the downlink message may include: forwarding table search, etc. In some embodiments, the central processor can also perform the function of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the forwarding chip is not required in the interface board.
[0128] The physical interface card 2133 is used to implement the physical layer docking function, whereby the original traffic enters the interface board 2130, and the processed message is sent out from the physical interface card 2133. The physical interface card 2133, also called a daughter card, can be installed on the interface board 2130, and is responsible for converting the photoelectric signal into a message and forwarding the message to the network processor 2132 for processing after checking the legitimacy of the message. In some embodiments, the central processor 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.
[0129] Optionally, the data transmission device 2100 includes a plurality of interface boards, for example, the data transmission device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation methods of the components in the interface board 2140 are the same or similar to those of the interface board 2130, and are not described in detail herein.
[0130] Optionally, the data transmission device 2100 further includes a switching fabric board 2120. The switching fabric board 2120 may also be referred to as a switch fabric unit (SFU). When the data transmission device 2100 has multiple interface boards, the switching fabric board 2120 is used to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 may communicate through the switching fabric board 2120.
[0131] 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 through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 and the interface board 2130 and the interface board 2140 communicate through the IPC channel.
[0132] Logically, the data transmission device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the data transmission device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2132 forwards the message received by the physical interface card 2133 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same data transmission device.
[0133] It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the data transmission device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, the data transmission device may not need a switching network board, and the interface board is responsible for the processing function of the service data of the entire system. In a distributed forwarding architecture, the data transmission device may have at least one switching network board, and the switching network board is used to realize data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the data transmission device with a distributed architecture are greater than those of the data transmission device with a centralized architecture. Optionally, the data transmission device may also be in the form of only one board, that is, without a switching network board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two superimposed. This form of data transmission device has low data exchange and processing capabilities (for example, low-end switches or routers and other data transmission devices). Which architecture to use depends on the specific networking deployment scenario, and no limitation is made here.
[0134] In a specific embodiment, the data transmission device 2100 corresponds to the above Figure 6 In some embodiments, Figure 6 The generating module 601 in the data transmission device shown is equivalent to the network processor 2132 in the data transmission device 2100 , and the sending module 602 is equivalent to the physical interface card 2133 in the data transmission device 2100 .
[0135] The embodiment of the present application also provides a communication device, which includes: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other through 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, and when the processor executes the instructions stored in the memory, the processor executes the method required to be executed by the first node.
[0136] The embodiment of the present application also provides a data transmission device, 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, so that the data transmission device implements the following Figure 3 The data transmission method shown. Optionally, the number of the processor is one or more, and the number of the memory is one or more.
[0137] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0138] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0139] It should be understood that the processor may be a CPU, or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, 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 supporting the advanced reduced instruction set machine (ARM) architecture.
[0140] Further, 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 information about the device type.
[0141] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but 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 RAM bus random access memory (DR RAM).
[0142] An embodiment of the present application further provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor so that a computer implements any of the above data transmission methods.
[0143] The embodiments of the present application also provide a computer program (product), which, when executed by a computer, can enable a processor or a computer to execute the corresponding steps and / or processes in the above method embodiments.
[0144] An embodiment of the present application also provides a chip, including a processor, for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes any of the above data transmission methods.
[0145] 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 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 any of the above data transmission methods.
[0146] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, 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 instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. 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 a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (solid state disk)), etc.
[0147] Those of ordinary skill in the art will appreciate that, in conjunction with the various method steps and modules described in the embodiments disclosed herein, they 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 of ordinary skill 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.
[0148] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, 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.
[0149] 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 divided 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.
[0150] The computer program code for realizing the method for the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0151] In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate 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.
[0152] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0153] A machine-readable medium may be any tangible medium that contains or stores a program for or related to 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.
[0154] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0155] In the several embodiments provided in the present 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 only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, 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 it can be an electrical, mechanical or other form of connection.
[0156] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on 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.
[0157] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0158] If the integrated module is implemented in the form of a software function 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 to enable 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: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0159] In the present application, the terms "first", "second", etc. are used to distinguish between identical or similar items having 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 a limitation on quantity and 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 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. Both the first image and the second image may be images, and in some cases, may be separate and different images.
[0160] 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.
[0161] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second data packets means two or more second data packets. The terms "system" and "network" are often used interchangeably herein.
[0162] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are 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.
[0163] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0164] It should 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.
[0165] 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 [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.
[0166] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0167] It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0168] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope 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 tail packet of the data flow according to an identifier indicating the tail packet carried in the first data packet.
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
Cited By
Data transmission method, apparatus, device and computer-readable storage medium
EP4694093A1
Data transmission method, apparatus, device and computer-readable storage medium
WO2024230547A1
