WO2024230547A1 - 数据传输方法、装置、设备及计算机可读存储介质 - Google Patents

数据传输方法、装置、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2024230547A1
WO2024230547A1 PCT/CN2024/090516 CN2024090516W WO2024230547A1 WO 2024230547 A1 WO2024230547 A1 WO 2024230547A1 CN 2024090516 W CN2024090516 W CN 2024090516W WO 2024230547 A1 WO2024230547 A1 WO 2024230547A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
packet
data packet
data packets
sequence number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2024/090516
Other languages
English (en)
French (fr)
Inventor
段英杰
徐安民
任首首
刘冰洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP24802831.8A priority Critical patent/EP4694093A4/en
Publication of WO2024230547A1 publication Critical patent/WO2024230547A1/zh
Priority to US19/382,983 priority patent/US20260067236A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1812Hybrid protocols; Hybrid automatic repeat request [HARQ]
    • H04L1/1819Hybrid protocols; Hybrid automatic repeat request [HARQ] with retransmission of additional or different redundancy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/552Prevention, detection or correction of errors by ensuring the integrity of packets received through redundant connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/08Arrangements for detecting or preventing errors in the information received by repeating transmission, e.g. Verdan system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1642Formats specially adapted for sequence numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1835Buffer management
    • H04L1/1841Resequencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/1874Buffer management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/188Time-out mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/1887Scheduling and prioritising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • H04L47/323Discarding or blocking control packets, e.g. ACK packets

Definitions

  • 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.
  • the tail loss probe (TLP) mechanism or the retransmission timeout (RTO) mechanism will be triggered to achieve packet retransmission.
  • the retransmission delay caused by the TLP mechanism and the RTO mechanism is usually large.
  • 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.
  • a data transmission 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.
  • 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.
  • 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.
  • 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.
  • the first data packet and the plurality of second data packets are transmitted based on a quick 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 sequence numbers of the plurality of second data packets are different from those of the first data packet, and the sequence numbers of the plurality of 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 method for setting the sequence numbers of the plurality of 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.
  • QUIC quick user datagram protocol internet connection
  • the first node after the first node sends the 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 loss rate. Delay caused by packet retransmission.
  • a first data packet and multiple second data packets are transmitted based on a 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.
  • TCP transmission control protocol
  • the first node After generating multiple second data packets corresponding to the first data packet, the first node obtains a mapping relationship between the sequence number of the first data packet and a redundant sequence number, where the redundant sequence number is the sum of the sequence number of the first data packet and n, and n can be determined based on a repetition threshold corresponding to TCP.
  • the method provides a method for setting 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.
  • 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.
  • packet retransmission can be quickly triggered by sending redundant tail packets, thereby reducing the delay caused by packet retransmission.
  • the first node 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.
  • a data transmission device 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.
  • 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.
  • 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
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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 T
  • 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.
  • 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.
  • a data transmission device 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.
  • processors there are one or more processors and one or more memories.
  • the memory may be integrated with the processor, or the memory may be provided separately from the processor.
  • 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.
  • ROM read-only memory
  • a communication 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.
  • a computer-readable 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.
  • a computer program comprising: a computer program code, when the computer program code is executed by a computer, the computer executes the methods in the above aspects.
  • a chip 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.
  • another chip 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.
  • the processor is used to execute the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
  • FIG1 is a schematic diagram of a data packet forwarding process provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of an implementation environment of a data transmission method provided in an embodiment of the present application.
  • FIG3 is a flow chart of a data transmission method provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of a data transmission process provided by an embodiment of the present application.
  • FIG5 is a schematic diagram of another data transmission process provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of the structure of another data transmission device provided in an embodiment of the present application.
  • 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.
  • 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.
  • 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.
  • 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.
  • M is a positive integer, and M can be determined according to the total number of data packets included in the data stream.
  • the tail data packets are data packets 9 and 10.
  • the sender sends a data stream to the receiver.
  • 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.
  • the receiving end 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.
  • the receiving end since the receiving end does not receive 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.
  • the TLP method in the related art sets a probe timeout (PTO) timer. After the tail packet of the data stream is sent, it waits for a PTO time. If the confirmation message corresponding to the tail packet is not received, it triggers the sending of one or two probe data packets, and triggers packet loss retransmission 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. For example, taking the data stream shown in Figure 1 as an example, after sending data packet 10, the sender waits for a PTO time.
  • PTO probe timeout
  • ACK10 If ACK10 is not received, it sends a probe data packet, which can be data packet 10, triggering the receiving end to return a corresponding confirmation message to the sender based on the probe data packet. After receiving the confirmation message corresponding to the probe data packet, the sender determines that the unconfirmed data packets sent before data packet 10 meet the packet loss condition. If so, it retransmits data packet 7.
  • the packet loss condition may refer to the difference between the sequence number of the unconfirmed data packet and the sequence number of data packet 10 being greater than or equal to a packet threshold (packet threshold). Taking the packet threshold of 3 as an example, only data packet 7 meets the packet loss condition, and thus only fast retransmission of data packet 7 can be triggered.
  • the TLP method will cause a transmission delay of about PTO plus a round-trip time (RTT), and the PTO is often set to milliseconds.
  • 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.
  • RTT is tens to hundreds of microseconds.
  • PTO is usually set based on RTT.
  • 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.
  • the implementation environment of the data transmission method can be any scenario of transmitting data streams.
  • the method can be executed by the subject of the transmission data stream in any scenario of transmitting data streams.
  • Figure 2 is a schematic diagram of the implementation environment of a data transmission method provided by an embodiment of the present application.
  • the implementation environment may include a cloud server (server) and multiple clients (client).
  • the cloud server and any client may be directly or indirectly connected through wired or wireless communication methods, and this application does not limit this.
  • any client is connected to the cloud server through a network device, and any client and network device may be connected through wireless fidelity (WIFI) technology, fifth generation mobile communication technology (5G) or wired broadband technology.
  • WIFI wireless fidelity
  • 5G fifth generation mobile communication technology
  • 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.
  • PC personal computer
  • PDA personal digital assistant
  • PPC pocket PC
  • tablet computer smart car machine, etc.
  • 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.
  • 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 packet loss triggers the RTO mechanism, which causes a large transmission delay, seriously affecting the overall file transmission completion time and making the data transmission efficiency low.
  • FIG. 3 is a flow chart of a data transmission method provided by an embodiment of the present application.
  • the method can be applied to the implementation environment shown in FIG. 2 , for example, the first node is the cloud server shown in FIG. 2 , wherein the cloud server shown in FIG. 2 corresponds to the sending end of the data stream transmission, and the client shown in FIG. 2 corresponds to the receiving end of the data stream transmission.
  • the data transmission method includes but is not limited to the following steps 301 and 302.
  • the first node 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.
  • 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.
  • 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.
  • 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.
  • the first node 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.
  • the embodiment of the present application does not limit the method for determining whether the first data packet is a tail packet.
  • 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.
  • the first node determines that the first data packet is the tail packet of the data stream.
  • 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.
  • 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.
  • the transmission interruption time is greater than the first time duration
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the correspondence between RTT and the number of redundancies can be obtained based on the historical transmission situation of the network.
  • 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.
  • the method of determining the number of multiple second data packets based on the transmission parameter can be: performing function fitting on the continuous packet loss rate under different unit quantities corresponding to the network to obtain a functional relationship between the redundant number and the success probability, where the success probability is the probability that at least one of the redundant number of data packets sent continuously is received; obtaining the redundant number of the functional relationship when the success probability is greater than or equal to a probability threshold, and determining 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 the plurality of second data packets may also be referred to as the number of redundant packets.
  • the continuous packet loss rate corresponding to any unit number is the probability of continuously losing any unit number of data packets. For example, when the unit number is 1, the continuous packet loss rate corresponding to the unit number is the probability of continuously losing 1 data packet. When the unit number is 2, the continuous packet loss rate corresponding to the unit number is the probability of continuously losing 2 data packets.
  • Different unit numbers may include 1, 2, ..., D, where D is a positive integer greater than 2.
  • 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
  • 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.
  • 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.
  • 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.
  • an independent event model, a Bernoulli model or a logistic regression analysis model can be used for function fitting.
  • 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).
  • Pr succ (K) represents the probability that at least one of the K redundant packets is received, that is, the probability that the K redundant packets work successfully;
  • Pr loss (K) represents the probability of losing K redundant packets continuously;
  • p represents the average packet loss rate corresponding to the network;
  • r represents the network condition factor;
  • e rK refers to an exponential function with e as the base, and e is a natural constant in mathematics.
  • 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.
  • the network condition factor r can be obtained by substituting the continuous packet loss rates corresponding to the known multiple unit quantities into the above formula (1).
  • the redundant number can be solved according to formula (1) when Pr succ (K) is greater than or equal to the probability threshold, that is, the range of K values under the calculated Pr succ (K) ⁇ the probability threshold is the redundant number.
  • the probability threshold can be set according to experience, or flexibly adjusted according to the application scenario.
  • 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 of 0.9999 as an example, according to formula (1), the value range of K when Pr succ (K) is greater than or equal to 0.9999 is greater than or equal to 5.6, and the number of the plurality of second data packets may be 6, 7, 8, etc.
  • the number of the plurality of second data packets thus obtained will not be too small, and it can be ensured that the probability of at least one of the plurality of second data packets being received is greater than or equal to 0.9999, which effectively reduces the probability of packet loss of the tail packet of the data stream, thereby avoiding continuous packet loss of the plurality of tail packets sent.
  • 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.
  • 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.
  • the first node can generate K second data packets corresponding to the first data packet.
  • the sequence numbers corresponding to the plurality of second data packets are also different, and the following two scenarios are used as examples for illustration.
  • Scenario 1 A first data packet and multiple second data packets are transmitted based on QUIC.
  • 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.
  • the value range of n can be further narrowed in combination with the maximum sequence number allowed by QUIC, K and N.
  • 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.
  • the first node corresponds to the QUIC sender shown in FIG4
  • the second node corresponds to the QUIC receiver shown in FIG4 , taking the value of K as 2 and the value of n as 2 as an example.
  • the sending queue of the QUIC sender includes data packets 3 to 7 of the data stream to be sent, and data packet 7 is the tail packet, that is, the first data packet corresponds to data packet 7. Therefore, the QUIC sender generates two second data packets corresponding to data packet 7, namely data packet 9 (7) and data packet 10 (7).
  • the 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.
  • 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.
  • 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.
  • 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.
  • the confirmation of the first second data packet among the multiple second data packets can trigger the rapid retransmission of any data packet.
  • the first data packet and multiple second data packets are transmitted based on TCP.
  • 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.
  • 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).
  • the embodiment of the present application uses sequence numbers instead of byte sequence number ranges for example.
  • the byte sequence number range is (1-9) corresponding to sequence number 1
  • the byte sequence number range is (10-19) corresponding to sequence number 2.
  • the first node corresponds to the TCP sender shown in FIG5
  • the second node corresponds to the TCP receiver shown in FIG5
  • the sending queue of the TCP 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 two second data packets corresponding to data packet 7 generated by the TCP sender are two identical data packets 7.
  • the TCP sender continuously sends data packets 3 to 6 and three identical data packets 7 to the TCP receiver in sequence through the sending queue.
  • the selective acknowledgment (SACK) mechanism is a message from the receiver to the sender. Returns the sequence number range of the received but unacknowledged data packets.
  • the sender needs to receive duplicate ACKs of a duplicate threshold (duplicate threshold, dupthresh) to trigger a fast retransmission.
  • the duplicate threshold can be set based on experience or flexibly adjusted according to the application scenario. For example, the duplicate threshold is 3.
  • 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.
  • the receiving end 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.
  • 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.
  • the sequence numbers of the multiple second data packets are the same as the sequence number of the first data packet.
  • the first node 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.
  • n can be determined based on the repetition threshold corresponding to TCP.
  • the TCP sender records the mapping relationship ⁇ 7, 9 ⁇ , or records the mapping relationship ⁇ 7*MSS, 9*MSS ⁇ .
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the first node determines the packet loss of the data stream in different ways according to the confirmation message.
  • 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.
  • the SACK packet is used to indicate that the first data packet and the received data packets sent before the first data packet are confirmed, and the SACK packet includes the sequence number of the received data packet.
  • the first node 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.
  • the QUIC receiver receives data packets 9, 7 and 4-3 in the data stream in the receiving queue, then the QUIC receiver returns a SACK packet corresponding to the received data packet to the QUIC sender, and the SACK packet includes a maximum acknowledgment number (largest acknowledged) of 9, an acknowledgment range count (ack range count) of 3, a first acknowledgment block (first ack block) of 1, a gap (GAP) (0) of 1, an additional acknowledgment block (additional ack block) (0) of 1, a gap (GAP) (1) of 2, and an additional acknowledgment block (additional ack alock) (1) of 2.
  • the largest acknowledgement number 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 (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
  • data packet 8 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.
  • 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.
  • 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.
  • the retransmission is triggered by waiting for the RTO time or the PTO time, which shortens the time required for triggering the retransmission.
  • the method provided in 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.
  • 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.
  • the second node can directly use the above characteristics to discard the received duplicate payloads, so the second node as the receiving end does not need to be modified, which further facilitates deployment.
  • 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.
  • 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.
  • the TCP receiving end receives data packet 7 and data packet 4-3 in the data stream in the receiving queue, and the TCP receiving end returns a 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 packet 6 and data packet 5 in the data stream can be confirmed according to the received SACK packet. If the number K of the second data packets is 2 and the repetition threshold is 3, it is further determined whether the data packets 6-5 are lost.
  • 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.
  • 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.
  • the confirmation message includes repeated multiple 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 lost confirmation (not acknowledgment, 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.
  • NACK not acknowledgment
  • the first node 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.
  • the second node after receiving the ACK packet corresponding to the confirmation message, the second node can determine that the first data packet in the data stream and the data packet before the first data packet 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.
  • the QUIC receiver after receiving the ACK packet for the SACK packet sent by the QUIC sender, releases the gap record including 5-8, determines that the payload of data packets 5-8 has been received, and no longer carries the GAP in the SACK packet fed back later.
  • 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.
  • 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.
  • Figure 6 is a schematic diagram of the structure of a data transmission device provided in the embodiment of the present application. Based on the following multiple modules shown in Figure 6, the data transmission device shown in Figure 6 can perform all or part of the operations performed by the first node. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown therein, and the embodiment of the present application does not limit this. As shown in Figure 6, the device includes:
  • a generating module 601 configured 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;
  • 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.
  • 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.
  • 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
  • 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 sequence number of the first data packet is N, and K and N are both positive integers; the sequence numbers of the multiple second data packets are different from those of the first data packet, The sequence numbers of the multiple second data packets are N+n, N+n+1,..., N+n+K-1, where n is determined based on the data packet threshold corresponding to QUIC.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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 T
  • 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.
  • 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.
  • the data transmission device 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.
  • 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.
  • the device provided in FIG. 6 above only uses the division of the above functional modules as an example to implement its functions.
  • the above 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.
  • 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.
  • FIG. 7 shows a schematic diagram of the structure of a data transmission device 2000 provided by an exemplary embodiment of the present application.
  • the data transmission device 2000 shown in FIG. 7 is used to perform the operations involved in the data transmission method shown in FIG. 3 above.
  • the data transmission device 2000 is, for example, a cloud server, a switch, a router, etc., and the data transmission device 2000 can be implemented by a general bus architecture.
  • the data transmission device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .
  • 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.
  • 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.
  • the processor 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 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • 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.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus may be divided into an address bus, a data bus, a control bus, etc.
  • FIG. 7 is represented by only one line, but it does not mean that there is only one bus or one type of bus.
  • 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, 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 (EPROM).
  • ROM read-only memory
  • RAM random access memory
  • EPROM electrically erasable programmable read-only memory
  • the memory 2003 may be a memory device including a memory card, ...
  • the communication interface 2004 uses any transceiver-like device for communicating 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 can include a wired communication interface and a wireless communication interface.
  • the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface or a combination thereof.
  • the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
  • the communication interface 2004 can be used for the data transmission device 2000 to communicate with other devices.
  • the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG7 .
  • Each of these processors may be a single-core CPU processor or a multi-core CPU processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
  • the data transmission device 2000 may include multiple processors, such as the processor 2001 and the processor 2005 shown in FIG7 .
  • processors may be a single-core CPU or a multi-core CPU.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
  • 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.
  • 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.
  • the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.
  • the memory 2003 is used to store the program code 2010 for executing the solution of the present application
  • 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.
  • the processor 2001 itself can also store the program code or instruction for executing the solution of the present application.
  • the data transmission device 2000 of the embodiment of the present application may correspond to the data transmission device in each of the above-mentioned method embodiments.
  • the processor 2001 in the data transmission device 2000 reads the instructions in the memory 2003, so that the data transmission device 2000 shown in Figure 7 can execute all or part of the operations performed by the first node.
  • 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.
  • the data transmission device 2000 may also correspond to the data transmission apparatus shown in FIG6 , and each functional module in the data transmission apparatus is implemented by the software of the data transmission device 2000.
  • the functional modules included in the data transmission apparatus are generated after the processor 2001 of the data transmission device 2000 reads the program code 2010 stored in the memory 2003.
  • each step of the data transmission method shown in Figure 3 is completed by the hardware integrated logic circuit or software instructions in the processor of the data transmission device 2000.
  • the steps of the method disclosed in conjunction with the 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.
  • FIG. 8 shows a schematic diagram of the structure of a data transmission device 2100 provided by another exemplary embodiment of the present application.
  • the data transmission device 2100 shown in FIG. 8 is used to perform all or part of the operations involved in the data transmission method shown in FIG. 3 above.
  • 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.
  • the data transmission device 2100 includes: a main control board 2110 and an interface board 2130 .
  • 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 routing calculation, device management, device maintenance, and protocol processing functions.
  • the main control board 2110 includes: a central processing unit 2111 and a memory 2112.
  • the interface board 2130 is also called a line processing unit (LPU), a line card 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.
  • the Ethernet interface is, for example, a Flexible Ethernet Clients (FlexE Clients) service interface.
  • the interface board 2130 includes: a central processor 2131, a network processor 2132, a forwarding table entry memory 2134 and a physical interface card (PIC) 2133.
  • PIC physical interface card
  • 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 .
  • the network processor 2132 is used to implement the forwarding processing of the message.
  • the network processor 2132 may be in the form of a forwarding chip.
  • the forwarding chip may be a network processor (NP).
  • the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • the network processor 2132 is used to forward the received message based on the forwarding table stored in the forwarding table entry memory 2134.
  • 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.
  • 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.
  • the central processing unit may also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that a forwarding chip is not required in the interface board.
  • 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.
  • 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.
  • 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.
  • 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).
  • SFU switch fabric unit
  • the switching fabric board 2120 is used to complete data exchange between the interface boards.
  • the interface board 2130 and the interface board 2140 may communicate through the switching fabric board 2120.
  • the main control board 2110 is coupled to the interface board.
  • 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.
  • 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.
  • IPC inter-process communication
  • 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.
  • 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.
  • main control boards which may include a primary main control board and a backup main control board.
  • interface boards There may be one or more interface boards. The stronger the data processing capability of the data transmission equipment, the more interface boards are provided.
  • data transmission equipment may not need a switching network board, and the interface board is responsible for processing the business data of the entire system.
  • data transmission equipment may have at least one switching network board, and the switching network board is used to realize the communication between multiple interface boards.
  • Data exchange providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of data transmission equipment with a distributed architecture are greater than those of data transmission equipment with a centralized architecture.
  • the data transmission equipment can also be in the form of only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board.
  • 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 equipment has low data exchange and processing capabilities (for example, low-end switches or routers and other data transmission equipment). Which architecture to use depends on the specific networking deployment scenario, and no limitation is made here.
  • the data transmission device 2100 corresponds to the data transmission apparatus shown in Figure 6.
  • the generation module 601 in the data transmission apparatus shown in Figure 6 is equivalent to the network processor 2132 in the data transmission device 2100
  • the sending module 602 is equivalent to the physical interface card 2133 in the data transmission device 2100.
  • 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.
  • 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 data transmission method shown in Figure 3.
  • 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 data transmission method shown in Figure 3.
  • the memory may be integrated with the processor, or the memory may be provided separately from the processor.
  • 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.
  • ROM read-only memory
  • 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.
  • DSP digital signal processors
  • ASIC application specific integrated circuits
  • FPGA field-programmable gate arrays
  • 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 RISC machines (ARM) architecture.
  • 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.
  • the memory may also store information about the device type.
  • the memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory.
  • 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.
  • SRAM static RAM
  • DRAM dynamic random access memory
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • DR RAM direct rambus RAM
  • 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.
  • 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.
  • 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.
  • 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.
  • the processor is used to execute any of the above data transmission methods.
  • all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof.
  • the computer program product includes one or more computer instructions.
  • 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.
  • the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or 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 the computer can access or a data storage device such as a server or 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.
  • the computer program product includes one or more computer program instructions.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.
  • 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.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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, server, or 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.
  • 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.
  • 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.
  • 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.
  • 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

本申请公开了一种数据传输方法、装置、设备及计算机可读存储介质,涉及通信技术领域。在第一数据包为数据流的尾包的情况下,第一节点生成第一数据包对应的多个第二数据包,任一第二数据包的载荷与第一数据包的载荷相同,多个第二数据包的数量由用于传输数据流的网络的传输参数确定;发送第一数据包和多个第二数据包,多个第二数据包用于减小数据流的尾包的丢包概率。该方法针对数据流中的尾包进行冗余保护,以降低尾包的丢包概率,减小了数据流的传输时延,提高了数据传输的质量和性能。并且,确定的多个尾包的冗余数量,既能够避免发送的多个尾包发生连续丢包,也能够防止冗余数量过大造成的传输资源浪费。

Description

数据传输方法、装置、设备及计算机可读存储介质
本申请要求于2023年05月09日提交的申请号为202310518999.8、发明名称为“数据传输方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,特别涉及数据传输方法、装置、设备及计算机可读存储介质。
背景技术
在数据传输过程中,若数据流的尾部的数据包发生丢失,会触发尾部丢失探测(tail loss probe,TLP)机制或重传超时(retransmission timeout,RTO)机制来实现丢包重传,而TLP机制和RTO机制导致的重传时延通常较大。
发明内容
本申请提供了一种数据传输方法、装置、设备及计算机可读存储介质,用于冗余发送数据流的多个尾包。
第一方面,提供了一种数据传输方法,该方法包括:在第一数据包为数据流的尾包的情况下,第一节点生成第一数据包对应的多个第二数据包,任一第二数据包的载荷(payload)与第一数据包的载荷相同,多个第二数据包的数量由用于传输数据流的网络的传输参数确定;第一节点发送第一数据包和多个第二数据包,多个第二数据包用于减小数据流的尾包的丢包概率。
该方法针对数据流中的尾包进行冗余保护,即发送冗余的多个尾包,以降低尾包的丢包概率,避免由尾包丢失触发RTO机制或TLP机制的数据重传,进而避免由触发RTO机制或TLP机制导致的等待时延,因此,减小了数据流的传输时延,提高了数据传输的质量和性能。并且,本申请实施例中多个尾包的冗余数量是根据用于传输数据流的网络的传输参数确定的,既能够避免发送的多个尾包发生连续丢包,也能够防止冗余数量过大造成的传输资源浪费,使得确定的多个尾包的冗余数量更符合数据传输要求。
在一种可能的实施方式中,传输参数包括网络对应的不同单位数量下的连续丢包率;第一节点生成第一数据包对应的多个第二数据包之前,第一节点对该网络对应的不同单位数量下的连续丢包率进行函数拟合,得到冗余数量与成功概率的函数关系,成功概率为连续发送的冗余数量个数据包中的至少一个数据包被接收的概率;获取函数关系在成功概率大于等于概率阈值的情况下的冗余数量,根据该在成功概率大于等于概率阈值的情况下的冗余数量确定多个第二数据包的数量。通过函数拟合的方式来获取更准确的多个第二数据包的数量,使得发送的多个第二数据包中的至少一个数据包被接收的概率大于等于概率阈值,即使得尾包被接收的概率大于等于概率阈值。
在一种可能的实施方式中,第一数据包和多个第二数据包基于快速用户数据报文协议互联网连接(quick user datagram protocol internet connection,QUIC)传输,多个第二数据包的数量为K,第一数据包的序列号为N,K和N均为正整数;多个第二数据包与第一数据包的序列号不同,多个第二数据包的序列号分别为N+n、N+n+1、...、N+n+K-1,n基于QUIC对应的数据包阈值确定。该方法提供了一种QUIC传输场景下设置多个第二数据包的序列号的方式,使该方法可以适用于QUIC传输场景,提高了该方法的实施灵活性。
在一种可能的实施方式中,第一节点发送第一数据包和多个第二数据包之后,在基于QUIC传输的情况下,基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息,对于数据流中在任一数据包之前发送的但未被确认的第三数据包,如果任一数据包的序列号与第三数据包的序列号的差值大于等于数据包阈值,触发重传第三数据包的载荷。该方法使得在基于QUIC传输的数据流的尾部的多个数据包发生连续丢包的情况下,通过发送冗余尾包的方式能够快速触发丢包重传,减小了丢 包重传导致的时延。
在一种可能的实施方式中,第一数据包与多个第二数据包基于传输控制协议(transmission control protocol,TCP)传输;多个第二数据包的序列号与第一数据包的序列号相同。第一节点在生成第一数据包对应的多个第二数据包之后,获取第一数据包的序列号与冗余序列号的映射关系,冗余序列号为第一数据包的序列号与n的和值,n可以基于TCP对应的重复阈值确定。该方法提供了一种TCP传输场景下设置多个第二数据包的序列号的方式,使该方法可以适用于TCP传输场景,提高了该方法的实施灵活性。
在一种可能的实施方式中,第一节点发送第一数据包和多个第二数据包之后,在基于TCP传输的情况下,基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息,对于数据流中在任一数据包之前发送的但未被确认的第三数据包,在映射关系中获取任一数据包的序列号对应的冗余序列号,如果冗余序列号与第三数据包的序列号的差值大于等于重复阈值,触发重传第三数据包的载荷。使得在基于TCP传输的数据流的尾部的多个数据包发生连续丢包的情况下,通过发送冗余尾包的方式能够快速触发丢包重传,减小了丢包重传导致的时延。
在一种可能的实施方式中,第一节点生成第一数据包对应的多个第二数据包之前,确定第一数据包是否为数据流的尾包。确定第一数据包是否为数据流的尾包的方式可以为,在到达第一数据包加入发送队列之后的第一时长的情况下,若发送队列中没有属于数据流的数据包加入,确定第一数据包为数据流的尾包;或者,根据第一数据包中携带的指示尾包的标识确定第一数据包为数据流的尾包。通过发送队列中加入数据包的情况来确定第一数据包是否为数据流的尾包,或者直接通过携带的标识识别尾包,提高了识别尾包的准确性和灵活性。
第二方面,提供了一种数据传输装置,该装置包括:生成模块,用于在第一数据包为数据流的尾包的情况下,生成第一数据包对应的多个第二数据包,任一第二数据包的载荷与第一数据包的载荷相同,多个第二数据包的数量由用于传输数据流的网络的传输参数确定;发送模块,用于发送第一数据包和多个第二数据包,多个第二数据包用于减小数据流的尾包的丢包概率。
在一种可能的实施方式中,传输参数包括不同单位数量下的连续丢包率;该装置还包括:拟合模块,用于对网络对应的不同单位数量下的连续丢包率进行函数拟合,得到冗余数量与成功概率的函数关系,成功概率为连续发送的冗余数量个数据包中的至少一个数据包被接收的概率;第一确定模块,用于获取函数关系在成功概率大于等于概率阈值的情况下的冗余数量,根据在成功概率大于等于概率阈值的情况下的冗余数量确定多个第二数据包的数量。
在一种可能的实施方式中,第一数据包和多个第二数据包基于QUIC传输,多个第二数据包的数量为K,第一数据包的序列号为N,K和N均为正整数;多个第二数据包与第一数据包的序列号不同,多个第二数据包的序列号分别为N+n、N+n+1、...、N+n+K-1,n基于QUIC对应的数据包阈值确定。
在一种可能的实施方式中,该装置还包括:重传模块,用于基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息,对于数据流中在任一数据包之前发送的但未被确认的第三数据包,如果任一数据包的序列号与第三数据包的序列号的差值大于等于数据包阈值,触发重传第三数据包的载荷。
在一种可能的实施方式中,第一数据包与多个第二数据包基于TCP传输;多个第二数据包的序列号与第一数据包的序列号相同;该装置还包括:获取模块,用于获取第一数据包的序列号与冗余序列号的映射关系,冗余序列号为第一数据包的序列号与n的和值,n基于TCP对应的重复阈值确定。
在一种可能的实施方式中,该装置还包括:重传模块,用于基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息,对于数据流中在任一数据包之前发送的但未被确认的第三数据包,在映射关系中获取任一数据包的序列号对应的冗余序列号,如果冗余序列号与第三数据包的序列号的差值大于等于TCP对应的重复阈值,触发重传第三数据包的载荷。
在一种可能的实施方式中,该装置还包括:第二确定模块,用于在到达第一数据包加入发送队列之后的第一时长的情况下,若发送队列中没有属于数据流的数据包加入,确定第一数据包为数据流的尾包;或者,用于根据第一数据包中携带的指示尾包的标识确定第一数据包为数据流的尾包。
第三方面,提供了一种数据传输设备,该数据传输设备包括:处理器,处理器与存储器耦合,存储器中存储有至少一条程序指令或代码,至少一条程序指令或代码由处理器加载并执行,以使数据传输设备实现如上第一方面或第一方面的任一种可能的实施方式中的方法。
可选地,处理器为一个或多个,存储器为一个或多个。
可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不做限定。
第四方面,提供了一种通信装置,该装置包括:收发器、存储器和处理器。其中,该收发器、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制收发器接收信号,并控制收发器发送信号,并且当该处理器执行该存储器存储的指令时,使得该通信装置执行第一方面或第一方面的任一种可能的实施方式中的方法。
第五方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行,以使计算机实现上述第一方面或第一方面的任一种可能的实施方式中的方法。
第六方面,提供了一种计算机程序(产品),所述计算机程序(产品)包括:计算机程序代码,当所述计算机程序代码被计算机运行时,使得所述计算机执行上述各方面中的方法。
第七方面,提供了一种芯片,包括处理器,用于从存储器中调用并运行所述存储器中存储的指令,使得安装有所述芯片的通信设备执行上述第一方面或第一方面的任一种可能的实施方式中的方法。
第八方面,提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,所述输入接口、输出接口、所述处理器以及所述存储器之间通过内部连接通路相连,所述处理器用于执行所述存储器中的代码,当所述代码被执行时,所述处理器用于执行上述第一方面或第一方面的任一种可能的实施方式中的方法。
应当理解的是,本申请的第二方面至第八方面技术方案及对应的可能的实施方式所取得的有益效果可以参见上述对第一方面及其对应的可能的实施方式的技术效果,此处不再赘述。
附图说明
图1为本申请实施例提供的一种数据包转发过程的示意图;
图2为本申请实施例提供的一种数据传输方法的实施环境的示意图;
图3为本申请实施例提供的一种数据传输方法的流程图;
图4为本申请实施例提供的一种数据传输过程的示意图;
图5为本申请实施例提供的另一种数据传输过程的示意图;
图6为本申请实施例提供的一种数据传输装置的结构示意图;
图7为本申请实施例提供的一种数据传输设备的结构示意图;
图8为本申请实施例提供的另一种数据传输设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在通信技术领域,在数据流在传输过程中发生丢包的情况下,当快速重传无法生效时,只能触发RTO机制。RTO机制是发送端在发送数据包后,若等待一个RTO的时间后仍未接收到接收端返回的该数据包对应的确认消息,例如,确认消息为确认(acknowledgement,ACK)包,发送端开始重传该数据包。通常RTO的时间的设定往往为几百毫秒(millisecond,ms),因此,通过RTO机制触发的丢包重传对传输时延的影响较大。
而触发RTO机制的原因主要是发送端在发送数据流后没有接收到针对该数据流中的所有数据包的确认消息,而发送端没有接收到针对该数据流中的所有数据包的确认消息的重要原因之一是数据流的尾部的数据包丢失,也即数据流的尾部的数据包的丢包概率较大。其中,尾部的数据包的数量可以为一个也可以为多个,在尾部的数据包的数量为一个的情况下,尾部的数据包即为尾包,尾包则是指一条按序发送的数据流中排在最后的一个数据包;在尾部的数据包的数量为多个的情况下,尾部的数据包则是指一条按序发送的数据流中排在后M个的数据包。其中,M为正整数,M可以根据数据流包括的数据包的总数量确定,可选地,M为数据流包括的数据包的总数量的20%。例如,数据流包括的数据包的总数量为10,则M为10*20%=2,在按序发送的10个数据包的序列号分别为1-10的情况下,尾部的数据包即为数据包9和数据包10。
示例性地,参见图1所示的数据包转发过程的示意图,发送端(sender)向接收端(receiver)发送数据流,以数据流包括10个数据包为例,10个数据包的序列号分别为1到10,数据流的尾部的数据包可以包括数据包7-数据包10,数据流的尾包是数据包10。如图1所示,接收端在接收到数据包1-数据包6的情况下,接收端会向发送端发送对应的ACK1-ACK6,用以指示数据包1-数据包6被确认。而在尾部的数据包7-数据包10发生丢包的情况下,由于接收端没有接收到数据包6所属数据流的后续的数据包,所以接收端不会触发向发送端发送任何的确认消息,导致发送端在发送数据包10之后需要等待RTO的时间,才能触发RTO机制以数据包7开始重传数据流,由此导致了大约RTO的时间的传输时延。
相关技术中的TLP方法,设置了一个探测超时(probe timeout,PTO)计时器,当该数据流的尾包发送后,等待一个PTO的时间,若未接收到尾包对应的确认消息,触发发送一个或两个探测数据包,基于探测数据包触发丢包重传,从而避免数据流的尾包丢失触发RTO机制的超时重传。例如,以图1所示的数据流为例,发送端在发送数据包10后,等待一个PTO的时间,若未接收到ACK10,发送探测数据包,探测数据包可以为该数据包10,触发接收端基于该探测数据包向发送端返回对应的确认消息。发送端在接收到探测数据包对应的确认消息后,通过判断在数据包10之前发送的未被确认的数据包中满足丢包条件的是数据包7,则重传数据包7。其中,丢包条件可以是指未被确认的数据包的序列号与数据包10的序列号之间的差值大于等于数据包阈值(packet threshold),以数据包阈值为3为例,则满足丢包条件的只有数据包7,也就仅能触发数据包7的快速重传。
因此,TLP方法在尾部的多个数据包连续丢包的情况下,会导致大约PTO加上一次往返时间(round-trip time,RTT)的时间的传输时延,而PTO的设定往往也为毫秒级别的时间。其中,RTT指的是发送端向接收端发送数据包开始,到接收到接收端基于该数据包返回的确认消息之间的时间,一般RTT为几十到几百微秒。也就是说,相关技术中的TLP方法下的传输时延依旧较大。并且,由于丢包条件的判断,使得依旧无法触发不满足丢包条件的丢包的快速重传。此外,通常PTO是基于RTT设定的,例如,RTT越大设定的PTO越大,RTT越小设定的PTO越小,使得PTO的设定的准确性依赖于RTT的准确性,而RTT是根据网络状况的变化而变化的,因此,获取准确的RTT的难度较大,进而导致设置准确的PTO的难度也较大。
本申请实施例提供了一种数据传输方法,通过发送端针对数据流的尾包进行冗余保护,能够减小数据流的尾包的丢包概率,进而降低由数据流的尾包丢失导致的传输时延。本申请实施例不对该数据传输方法的实施环境进行限定,可选地,该数据传输方法的实施环境可以为任意的传输数据流的场景,例如,可以由任意的传输数据流的场景中传输数据流的主体来执行该方法。示例性地,参见图2,图2为本申请实施例提供的一种数据传输方法的实施环境的示意图。
如图2所示,以数据传输方法的实施环境为云服务下载场景为例,该实施环境可以包括云服务器(server)和多个客户端(client)。可选地,云服务器与任一客户端可以通过有线或无线的通信方式进行直接或间接的连接,本申请在此不做限制。例如,任一客户端通过网络设备与云服务器连接,任一客户端与网络设备之间可以通过无线保真(wireless-fidelity,WIFI)技术、第五代移动通信技术(5th generation mobile communication technology,5G)或者有线宽带技术等方式连接。
其中,云服务器可以为网络系统向客户端提供服务的各级网络节点,是客户端发送的数据请求进行路由调度的最小单元。客户端可以是任何一种可与用户通过键盘、触摸板、触摸屏、遥控器、语音交互或手写设备等一种或多种方式进行人机交互的电子产品,例如个人计算机(personal computer,PC)、智能手机、个人数字助手(personal digital assistant,PDA)、可穿戴设备、掌上电脑PPC(pocket PC,PPC)、平板电脑、智能车机等。
在本申请实施例中,客户端与云服务器之间建立连接,客户端发起数据请求,云服务器通过云网络获取数据请求对应的数据,并向客户端传输该数据。示例性地,客户端通过音乐或相册等应用(application,APP)请求对应的文件下载,云服务器向云网络拉取该文件传输给客户端,文件即对应本申请实施例中的数据流。以文件大小为1兆字节(mega byte,MB),有效传输带宽为40兆比特每秒(megabits per second,Mbps)为例,云服务器向客户端传输文件的所需时间为1*8/40=0.2s=200ms。
其中,若文件的尾部的数据包丢包触发RTO机制的超时重传,通常RTO从200ms开始指数增长,即触发一次RTO的重传时延为200ms,触发两次的RTO的重传时延为200+400=600ms,触发三次的RTO的重传时延为200+400+800=1400ms。因此,相较于文件传输的所需时间,由尾部的数据 包丢包触发RTO机制导致的传输时延较大,严重影响文件的整体传输完成时间,使得数据传输的效率较低。
参见图3,以第一节点执行该方法为例,图3为本申请实施例提供的一种数据传输方法的流程图。示例性地,该方法可应用于图2所示的实施环境,例如,第一节点为图2所示的云服务器,其中图2所示的云服务器对应数据流传输的发送端,图2所示的客户端对应数据流传输的接收端。如图3所示,该数据传输方法包括但不限于如下步骤301和302。
301,在第一数据包为数据流的尾包的情况下,第一节点生成第一数据包对应的多个第二数据包,任一第二数据包的载荷与第一数据包的载荷相同,多个第二数据包的数量由用于传输数据流的网络的传输参数确定。
在本申请实施例中,第一节点为数据流传输的发送端,在第一节点在向第二节点传输数据流的情况下,第二节点为数据流传输的接收端。第一节点对于数据流的尾包进行冗余保护,即在发送尾包的基础上,再连续发送多个与尾包载荷相同的冗余包,提高接收端接收到尾包的载荷的概率,也即减小数据流的尾包的丢包概率。其中,任一第二数据包的载荷之外的内容与第一数据包的载荷之外的内容可以相同或不同,本申请实施例不作限定。例如,在基于QUIC传输数据流的场景下,任一第二数据包的载荷之外的内容中的序列号与第一数据包的载荷之外的内容中的序列号不同。
在第一节点生成第一数据包对应的多个第二数据包之前,第一节点对于待发送的第一数据包需要确定该第一数据包是否为尾包。可选地,对于确定第一数据包是否为尾包的方式本申请实施例不做限定。在一种可能的实施方式中,第一节点获取的应用层下发的第一数据包中携带有指示尾包的标识,该标识由应用层添加到第一数据包中,使得第一节点能够直接根据第一数据包中携带的指示尾包的标识确定第一数据包为尾包。例如,若第一数据包中包括操作码且操作码指示第一数据包为尾包,则确定第一数据包为尾包。
在另一种可能的实施方式中,在到达第一数据包加入发送队列之后的第一时长的情况下,若发送队列中没有属于该数据流的任一数据包加入,第一节点确定第一数据包为数据流的尾包。其中,第一时长可以根据经验设置,或者根据应用场景灵活调整,例如,第一时长为2个数据包发送间隔的时间。示例性地,第一节点周期性地扫描发送队列,根据扫描结果确定第一数据包加入发送队列之后的第一时长内是否有其他数据包加入。由于在数据流发送过程中可能存在传输中断的情况,在该情况下,如果传输中断的时间是大于第一时长的,那么通过发送队列识别得到的尾包则不是数据流真正的尾包,将该情况下识别出的尾包称为中断包,使得该方法可以降低中断包的丢包概率,在传输中断的时间小于RTO的时间情况下,同样可以降低数据流的传输时延。
在本申请实施例中,多个第二数据包可以称为多个冗余包,多个冗余包中的任何一个冗余包被接收端接收到,接收端即可根据接收到的冗余包触发确认消息的发送,使得发送端能够接收到返回的确认消息,进而发送端在数据流尾部的多个数据包连续丢包的情况下可以基于接收到的确认消息触发快速重传,也即不会触发基于RTO机制的超时重传,则代表本申请实施例的方法成功发挥了作用。因此,本申请实施例根据用于传输数据流的网络的传输参数来确定冗余包的数量,以使得确定的冗余包的数量既能够避免发送的多个尾包发生连续丢包,也能够防止冗余数量过大造成的传输资源浪费,使得确定的多个尾包的冗余数量更符合数据传输要求。
在一种可能的实施方式中,网络的传输参数可以包括丢包率、速率、带宽、时延、吞吐量、RTT、不同单位数量下的连续丢包率中的至少一种。示例性地,以传输参数包括RTT为例,基于传输参数确定多个第二数据包的数量的方式可以为,获取网络当前的RTT,基于RTT与冗余数量的对应关系确定网络当前的RTT对应的冗余数量,该网络当前的RTT对应的冗余数量即为多个第二数据包的数量。其中,RTT与冗余数量的对应关系可以根据网络的历史传输情况获取,可选地,RTT越大,对应的冗余数量越大,RTT越小,对应的冗余数量越小。例如,对于任一RTT,通过历史传输情况确定在该任一RTT下连续丢包的最大数量,基于该最大数量确定任一RTT对应的冗余数量。
以传输参数包括网络对应的不同单位数量下的连续丢包率为例,第一节点生成第一数据包对应的多个第二数据包之前,基于传输参数确定多个第二数据包的数量的方式可以为,对网络对应的不同单位数量下的连续丢包率进行函数拟合,得到冗余数量与成功概率的函数关系,成功概率为连续发送的冗余数量个数据包中的至少一个数据包被接收的概率;获取函数关系在成功概率大于等于概率阈值的情况下的冗余数量,根据该在成功概率大于等于概率阈值的情况下的冗余数量确定多个第二数据包的数量, 多个第二数据包的数量也可称为冗余包的数量。其中,任一单位数量对应的连续丢包率即为连续丢失任一单位数量个数据包的概率,例如,单位数量为1,单位数量对应的连续丢包率为连续丢失1个数据包的概率,单位数量为2,单位数量对应的连续丢包率为连续丢失2个数据包的概率,不同单位数量可以包括1、2、...、D,D为大于2的正整数。
在本申请实施例中,冗余数量个数据包中的至少一个数据包被接收的概率即是冗余数量个数据包触发快速重传的概率,冗余数量个数据包触发快速重传的概率即是冗余数量个数据包成功发挥作用的概率。由于冗余数量个数据包中的至少一个数据包被接收则代表冗余数量个数据包没有发生连续丢包,也就是说,如果网络中不会连续丢失冗余数量个数据包,那么冗余数量个数据包中的至少一个数据包就会被接收。因此,连续丢失冗余数量个数据包的概率与冗余数量个数据包中的至少一个数据包被接收的概率的和为1,即任一冗余数量对应的成功概率可以通过计算1与连续丢失任一冗余数量个数据包的概率的差值得到。
可选地,本申请实施例不限定对网络对应的不同单位数量下的连续丢包率进行函数拟合的拟合方法,例如,可以采用独立事件模型、伯努利模型或者逻辑(logistic)回归分析模型进行函数拟合。示例性地,以采用logistic回归分析模型为例,拟合得到的冗余数量与成功概率的函数关系可以如公式(1)所示。
其中,Prsucc(K)表示K个冗余包中的至少一个冗余包被接收到的概率,即表示K个冗余包成功发挥作用的概率;Prloss(K)表示连续丢失K个冗余包的概率;p代表网络对应的平均丢包率;r代表网络状况因子;erK是指以e为底的指数函数,e为数学中的自然常数。
在本申请实施例中,平均丢包率p可以基于网络在历史时间内的数据传输情况统计分析得到,例如,统计历史时间内传输的数据包的第一数量和历史时间内发生丢失的数据包的第二数量,计算第二数量与第一数量的比值得到历史时间内的平均丢包率。对于历史时间的长短本申请实施例不做限定,可以为实施该方法之前的任意一段时长。可选地,在对不同单位数量分别对应的连续丢包率进行函数拟合之前,也需要先获取不同单位数量分别对应的连续丢包率,同样可以通过网络在历史时间内的数据传输情况统计分析得到,此处不再赘述。
对于网络状况因子r,可以通过将已知的多个单位数量分别对应的连续丢包率代入上述公式(1)求解得到。例如,使用p2表示前期获取的连续丢失2个数据包的丢包率,即Prloss(K)=p2,将已知的平均丢包率p,K=2,Prsucc(K)=1-p2代入公式(1),求解计算得到r。示例性地,以平均丢包率p=0.05,r=1.2为例,在拟合得到上述公式(1)之后,可以根据公式(1)求解在Prsucc(K)大于等于概率阈值的情况下的冗余数量,即求解计算Prsucc(K)≥概率阈值下的K的取值范围即为冗余数量。其中,概率阈值可以根据经验设置,或者,根据应用场景灵活调整。
可选地,根据冗余数量确定多个第二数据包的数量的方式可以为,将属于冗余数量区间之内的任意一个正整数作为多个第二数据包的数量。例如,以概率阈值为0.9999为例,根据公式(1)求解在Prsucc(K)大于等于0.9999的情况下的K的取值范围为大于等于5.6,则多个第二数据包的数量可以为6、7、8...等。由此获取的多个第二数据包的数量不会过少,能够保证多个第二数据包中的至少一个数据包被接收的概率大于等于0.9999,有效地降低了数据流的尾包的丢包概率,因此,避免了发送的多个尾包发生连续丢包。
或者,根据冗余数量确定多个第二数据包的数量的方式也可以为,对冗余数量进行向上取整,得到多个第二数据包的数量。示例性地,仍以概率阈值为0.9999为例,将K的取值范围进行向上取整,得到的多个第二数据包的数量为6。由此获取的多个第二数据包的数量不会过多,也就不会因发送的多个第二数据包的数量过多导致网络的传输资源浪费,降低了尾包的冗余率。
综上,在确定多个第二数据包的数量之后,以多个第二数据包的数量为K为例,K为正整数,第一节点即可生成第一数据包对应的K个第二数据包。其中,针对不同的数据传输场景,该多个第二数据包分别对应的序列号也不同,下面结合如下两种场景进行举例说明。
场景一,第一数据包和多个第二数据包基于QUIC传输。
在该场景一下,由于QUIC对于每一个数据包,无论是数据流的原始包还是重传包,都会配置一个新的序列号,使得QUIC能够区分返回的确认消息是针对ACK原始包还是重传包,从而避免了TCP重传机制中难以区分数据包是原始包还是重传包的问题。因此,针对场景一,本申请实施例生成的多个第二数据包与第一数据包的序列号不同,以第一数据包的序列号为N,多个第二数据包的数量为K为例。多个第二 数据包的序列号分别为N+n、N+n+1、...、N+n+K-1。其中,K和N均为正整数,n可以基于QUIC对应的数据包阈值确定。例如,(数据包阈值-1)<=n。
在基于QUIC传输的场景下,触发快速重传的过程包括确定任一数据包丢包,并重传该任一数据包。其中,确定任一数据包丢包的条件包括:任一数据包未被确认,且任一数据包早于一个已经被确认的数据包发送,且任一数据包的序列号与被确认的数据包中的最大序列号之间的差值大于等于数据包阈值(packet threshold)。其中,数据包阈值可以根据经验设置,或者,根据应用场景灵活调整,例如,数据包阈值为3。
因此,QUIC对应的数据包阈值用于在基于QUIC传输的场景下,第一节点根据未被确认的数据包的序列号与被确认的数据包的最大序列号之间差值大于等于该数据包阈值,确定该未被确认的数据包发生丢包。由此,n>=(数据包阈值-1),使得多个第二数据包中的第一个第二数据包的序列号N+n不会低于数据包阈值,进而使得在第一数据包之前发送的任一数据包丢包的情况下,通过多个第二数据包中的第一个第二数据包被确认能够触发该任一数据包的快速重传。也即,通过n的应用来设置多个第二数据包的序列号,使得该方法能够触发连续丢失的尾部的多个数据包中的各个数据包的快速重传,提高了数据重传的效率。
可选地,在基于QUIC对应的数据包阈值确定n的基础上,还可以进一步结合QUIC允许最大序列号、K和N来缩小n的取值范围。其中,QUIC允许最大序列号是指QUIC中定义的允许为数据包设置的最大的序列号。例如,(数据包阈值-1)<=n<=(QUIC允许最大序列号-N-K+1)。由此,在使得多个第二数据包中的第一个第二数据包的序列号N+n不会低于数据包阈值的基础上,通过n<=(QUIC允许最大序列号-N-K+1)的限定,还使得多个第二数据包中的最后一个第二数据包的序列号N+n+K-1不会超过QUIC允许最大序列号,进一步提高了多个第二数据包的序列号设置的准确性。
示例性地,参见图4所示的数据传输过程的示意图,第一节点对应图4所示的QUIC发送端(sender),第二节点对应图4所示的QUIC接收端(receiver),以K的值为2,n的值为2为例。QUIC发送端的发送队列中包括待发送的数据流的数据包3-数据包7,数据包7为尾包,即第一数据包对应该数据包7。因此,QUIC发送端生成了数据包7对应的两个第二数据包为数据包9(7)和数据包10(7),数据包9(7)的序列号为7+2=9,数据包9(7)的载荷为数据包7的载荷,数据包10(7)的序列号为7+2+1=10,数据包10(7)的载荷为数据包7的载荷。QUIC发送端通过发送队列连续依次向QUIC接收端发送数据包3-数据包7以及数据包9(7)和数据包10(7)。
在另一种可能的实施方式中,在基于QUIC传输的场景下,确定任一数据包丢包的条件还可以包括:任一数据包未被确认,且任一数据包早于已经被确认的数据包中最大序列号的数据包发送,且早于的时间超过时间阈值。其中,时间阈值均可以根据经验设置,或者,根据应用场景灵活调整,例如,时间阈值为连续发送3个数据包所需的时间。可选地,在该情况下,第一节点生成的多个第二数据包的序列号可以分别为N+1、N+2、...、N+K-1,也即序列号不再需要n的设定,而是在记录多个第二数据包的发送时间时,在原发送时间的基础上增加该时间阈值的时间,同样使得在第一数据包之前发送的任一数据包丢包的情况下,通过多个第二数据包中的第一个第二数据包被确认能够触发该任一数据包的快速重传。
场景二,第一数据包和多个第二数据包基于TCP传输。
在该场景一下,由于TCP对于数据流重传的数据包还使用数据包原本的序列号,不会为重传的数据包重新配置一个新的序列号。因此,本申请实施例生成的多个第二数据包与第一数据包的序列号相同,以第一数据包的序列号为N为例,多个第二数据包的序列号均为N。与场景一中的N不同,由于TCP中数据包的序列号是以字节段来划分的,因此,场景二中的N对应TCP中的数据包所属的字节序列号范围。例如,数据流中的第一个数据包的字节序列号范围为(1-9),数据流中的第二个数据包的字节序列号范围为(10-19),若第一数据包的字节序列范围为(40-49),则本申请实施例中的N对应该字节序列号范围为(40-49)。为方便描述,本申请实施例使用序列号代替字节序列号范围进行举例说明,例如,字节序列号范围为(1-9)对应序列号1,字节序列号范围为(10-19)对应序列号2。
示例性地,参见图5所示的数据传输过程的示意图,第一节点对应图5所示的TCP发送端(sender),第二节点对应图5所示的TCP接收端(receiver)。TCP发送端的发送队列中包括待发送的数据流的数据包3-数据包7,数据包7为尾包,即第一数据包对应该数据包7。因此,TCP发送端生成了数据包7对应的两个第二数据包为两个相同数据包7。TCP发送端通过发送队列连续依次向TCP接收端发送数据包3-数据包6以及3个相同的数据包7。
在基于TCP传输的场景下,选择性确认(selective acknowledgment,SACK)机制是接收端向发送端 返回携带已被接收但未被确认的数据包的序列号范围,在SACK机制中,发送端需要接收到重复阈值(duplicate threshold,dupthresh)个重复的ACK来触发快速重传。其中,重复阈值可以根据经验设置,或者,根据应用场景灵活调整,例如,重复阈值为3。示例性地,发送端依次向接收端发送数据包1(0-9)、数据包2(10-19)、数据包3(20-29)、数据包4(30-39)、数据包5(40-49)。若接收端接收到了数据包1,向发送端返回包括序列号10的ACK包;若接收端接收到了数据包2,向发送端返回包括序列号20的ACK包;若数据包3丢失,接收端接收到了数据包4,向发送端返回包括序列号20的ACK包并携带包括序列号(30-39)的SACK包;若数据包3丢失,接收端接收到了数据包5,向发送端返回包括序列号20的ACK包并携带包括序列号(30-49)的SACK包。发送端基于接收到重复的3个包括序列号20的ACK包,则确认数据包3丢失,进而触发数据包3的快速重传。
在采用SACK机制的基础上,可以进一步基于转发确认(forward acknowledgement,FACK)机制触发快速重传,FACK机制通过记录SACK中的最大序列号(forward-most)来推测数据流的丢包情况。例如,如果被SACK选择性确认的最大序列号和已确认的最大序列号之间的差值大于等于重复阈值倍的最大分段大小(maximum segment size,MSS),则发送端确定已确认的最大序列号之后的序列号对应的数据包丢失并触发快速重传。MSS是TCP中定义的一个数据包对应的字节序列号范围的最大范围。
示例性地,仍以发送端依次向接收端发送数据包1(0-9)、数据包2(10-19)、数据包3(20-29)、数据包4(30-39)、数据包5(40-49)为例,若接收端接收到了数据包1,向发送端返回包括序列号10的ACK包;假设数据包2、数据包3、数据包4由于网络拥塞等原因丢失,接收端在接收到数据包5时会向发送端返回一个包括序列号10的ACK包并携带包括序列号(40-49)的SACK包。发送端在接收到包括序列号10的ACK包并携带包括序列号(40-49)的SACK包后,确定数据包1和数据包5已被接收端接收。其中,被SACK选择性确认的最大序列号为50,已确认的最大序列号为20,MSS为10,由于49-20>=3*10,因此,确定数据包2丢失,并触发数据包2的快速重传。
基于上述TCP中触发快速重传的机制,本申请实施例在生成第一数据包对应的多个第二数据包后,由于多个第二数据包的序列号与第一数据包的序列号相同。第一节点在生成第一数据包对应的多个第二数据包之后,获取第一数据包的序列号与冗余序列号的映射关系,冗余序列号为第一数据包的序列号与n的和值。其中,n可以基于TCP对应的重复阈值确定,该场景二中基于TCP对应的重复阈值确定n的方式,可参见场景一中基于QUIC对应的数据包阈值确定n的方式,例如,(重复阈值-1)<=n<=(QUIC允许最大序列号-N-K+1)。仍以第一数据包的序列号为N为例,冗余序列号为N+n。由此,使得第一节点在接收到针对第一数据包的确认消息时,可以将第一数据包的序列号映射为冗余序列号,进而根据冗余序列号进一步判断数据流的丢包情况。示例性地,如图5所示,以重复阈值为3,n为2为例,TCP发送端在生成冗余的两个数据包7之后,记录映射关系{7,9},或者记录映射关系{7*MSS,9*MSS}。
302,第一节点发送第一数据包和多个第二数据包,多个第二数据包用于减小数据流的尾包的丢包概率。
在本申请实施例中,由于发送的多个第二数据包与第一数据包的载荷相同,而第一数据包为数据流的尾包,因此,该多个第二数据包的发送能够减小数据流的尾包的载荷的丢包概率,进而减小由尾包丢失导致的传输时延。并且,第二数据包的数量是由网络对应的不同单位数量下的连续丢包率确定的,使得发送的多个第二数据包发生连续丢包的概率较小,也即提高了多个第二数据包中的至少一个数据包被接收的概率,充分减小了数据流的尾包的丢包概率,也即尽可能保证了数据流的尾包不会丢失。
在一种可能的实施方式中,以第一节点向第二节点发送第一数据包和多个第二数据包为例,第二节点可以接收到第一数据包和多个第二数据包中的至少一个数据包,则会基于该接收到的至少一个数据包触发向第一节点返回对应的确认消息,该确认消息指示第一数据包被确认,也即指示数据流的尾包被接收。在第一节点接收到第二节点返回的基于第一数据包和多个第二数据包中的任一数据包返回的确认消息的情况下,第一节点可以基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息判断该数据流的丢包情况,也即确定数据流中否存在丢失的数据包,对于确定的丢失的数据包进行快速重传,无需等待RTO机制触发超时重传,避免由等待RTO的时间导致的重传时延,因此有效减小了数据流的传输时延。
在本申请实施例中,对于不同的传输协议或者不同的丢包重传机制,确认消息的类型和内容可能有所不同,因此,第一节点根据确认消息判断该数据流的丢包情况的方式也不同。例如,确认消息包括ACK包,ACK包用于指示第一数据包被确认,ACK包中包括第一数据包的序列号;或者,确认消息包括SACK 包,SACK包用于指示第一数据包以及在第一数据包之前发送的数据包中被接收的数据包被确认,SACK包中包括被接收的数据包的序列号。
可选地,针对上述场景一,第一节点发送第一数据包和多个第二数据包之后,基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息,对于数据流中在该任一数据包之前发送的但未被确认的第三数据包,如果任一数据包的序列号与第三数据包的序列号的差值大于等于数据包阈值,确定第三数据丢包,触发重传第三数据包的载荷。
示例性地,参见图4,QUIC接收端在接收队列中接收到了数据流中的数据包9、数据包7和数据包4-3,则QUIC接收端向QUIC发送端返回接收数据包对应的SACK包,SACK包中包括最大确认号(largest acknowledged)为9、确认范围计数(ack range count)为3、首个确认块(first ack block)为1、缺口(GAP)(0)为1、附加确认块(additional ack block)(0)为1、缺口(GAP)(1)为2、附加确认块(additional ack alock)(1)为2。
在图4所示的SACK包中,最大确认号(largest acknowledged)为9、确认范围计数(ack range count)为3代表了该SACK包中携带的确认块的数量是3;首个确认块(first ack block)为1代表了从9开始的第一个确认块包括一个数据包,即数据包9被接收,数据包9对应触发发送确认消息的任一数据包;缺口(GAP)(0)为1代表了从9开始的第一个缺口块包括一个数据包,即数据包8未被接收;附加确认块(additional ack alock)(0)为1代表了从9开始的第二个确认块包括一个数据包,即数据包7被接收;缺口(GAP)(1)为2代表了从9开始的第二个缺口块包括两个数据包,即数据包6-5未被接收;附加确认块(additional ack alock)(1)为2代表从9开始的第三个确认块包括两个数据包,即数据包4-3被接收。
QUIC发送端根据接收到的SACK包发现数据流中的数据包8、6-5未被接收,也即数据包8、6-5可能丢失,进而以数据包阈值为3为例,计算最大确认号9与数据包6的序列号的差值为9-6=3,最大确认号9与数据包5的序列号的差值为9-5=4,由于3和4满足大于等于数据包阈值3的条件,因此,标记数据包6-5为丢失的数据包,将数据包6和数据包5加入丢失(lost)队列。对于数据包8,可以计算最大确认号9与数据包8的序列号的差值为9-8=1,由于1没有满足大于等于数据包阈值3的条件,因此,不标记数据包8为丢失的数据包;或者,根据数据流的尾包为数据包7,即数据流中原本就不包括数据包8,直接忽略确认消息中的缺口为8的序列号。
进一步地,QUIC发送端重传数据包6-5的载荷,例如在发送队列中增加两个新的序列号的数据包11和数据包12,数据包11的序列号为11,数据包11的载荷为数据包5的载荷,数据包12的序列号为12,数据包12的载荷为数据包6的载荷,实现了数据包6和数据包5的快速重传。QUIC发送端重传数据包11和数据包12,若QUIC接收端接收到重传的数据包11和数据包12,QUIC接收端根据数据包11和数据包12中携带的流偏移(offset)信息确定数据流的数据包6-5被恢复,由此完成了数据流的传输。流偏移用于接收端判断数据包在数据流中的位置。本申请实施例在数据流的尾部的数据包发送丢包的情况下,通过冗余的数据包9的发送触发了快速重传,其中,由传输数据包9导致的重传时延大约是一次RTT的时间。相较于相关技术中,通过等待RTO的时间或者PTO的时间触发的重传,缩短了触发重传所需的时间。
其中,由于QUIC是在用户态实现的,通过修改第一节点的应用程序层面的QUIC的代码库即可实现本申请实施例提供的方法,无需修改操作系统内核,方便部署。并且根据请求评论(request for comments,RFC)9000中的记载,QUIC接收端在多次接收同一数据流中相同的流偏移的数据包的情况下,重复载荷的数据包可以被丢弃。针对本申请实施例发送的多个第二数据包,第二节点可以直接利用上述特性将接收的重复的载荷丢弃,因此作为接收端的第二节点无需改动,进一步方便了部署。
可选地,针对上述场景二,第一节点发送第一数据包和多个第二数据包之后,基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息,对于数据流中在该任一数据包之前发送的但未被确认的第三数据包,在映射关系中获取任一数据包的序列号对应的冗余序列号,如果冗余序列号与第三数据包的序列号的差值小于等于TCP对应的重复阈值,确定第三数据丢包,触发重传第三数据包的载荷。由此,通过n来记录多个第二数据包的序列号对应的映射关系,并根据该映射关系来确定数据包是否丢失,使得该方法能够触发连续丢失的尾部的多个数据包中的各个数据包的快速重传,提高了数据重传的效率。
示例性地,参见图5,TCP接收端在接收队列中接收到了数据流中的数据包7和数据包4-3,则TCP接收端向TCP发送端返回接收数据包对应的SACK包,SACK包中包括序列号{7}和{4-3},指示数据包7被确认以及数据包4-3被确认。TCP发送端根据接收到的SACK包发现数据流中的数据包6和数据包5可 能丢失,将数据包6和数据包5加入丢失队列。进而以多个第二数据包的数量K为2、重复阈值为3为例,进一步判断数据包6-5是否为丢包。
在一种可能的实施方式中,在图5中,第一节点在生成多个第二数据包时记录映射关系{7,9},第一节点在接收到SACK后,在映射关系中读取SACK中的最大序列号7对应的冗余序列号9,计算冗余序列号9与数据包6的序列号的差值为9-6=3,冗余序列号9与数据包5的序列号的差值为9-5=4,由于3和4满足大于等于重复阈值3的条件,因此,标记数据包6-5为丢失的数据包。或者,第一节点在生成多个第二数据包时记录映射关系{7*MSS,9*MSS},则通过映射关系获取数据包7的序列号对应的冗余序列号为9*MSS,计算冗余序列号9与数据包6的序列号的差值为(9-6)*MSS=3*MSS,冗余序列号9与数据包5的序列号的差值为(9-5)*MSS=4*MSS,由于3*MSS和4*MSS满足大于等于重复阈值3*MSS的条件,因此,标记数据包6-5为丢失的数据包。
进一步地,TCP发送端重传数据包6-5的载荷,例如在发送队列中再次增加数据包6和数据包5,然后向TCP接收端重传数据包5和数据包6,实现了数据包5和数据包6的快速重传。若TCP接收端接收到重传的数据包5和数据包6则将丢失的数据包6-5恢复,由此完成了数据流的传输。本申请实施例在数据流的尾部的数据包发送丢包的情况下,通过冗余的第二个数据包7的发送触发了快速重传,其中,由传输冗余的第二个数据包7导致的重传时延大约是一次RTT的时间,同样缩短了触发重传所需的时间。
在另一种可能的实施方式中,确认消息包括重复的多个ACK包,多个ACK包指示第三数据包丢失,则第一节点直接基于NACK包重传第三数据包的载荷;或者,确认消息包括丢失确认(not acknowledgement,NACK)包,NACK包用于指示第三数据包丢失,则第一节点直接基于NACK包重传第三数据包的载荷。
在本申请实施例中,第一节点在接收到第二节点返回的确认消息之后,第一节点向第二节点发送一个确认消息对应的ACK包,指示第二节点返回的确认消息已被接收。由此,第二节点在接收到确认消息对应的ACK包之后,能够根据该确认消息对应的ACK包确定数据流中第一数据包以及第一数据包之前的数据包被成功接收了,第二节点不需要维护该数据流对应的丢包信息。例如,参见图4,QUIC接收端在接收到QUIC发送端发送的针对SACK包的ACK包后,释放包括5-8的缺口记录,确定数据包5-8的载荷已经被接收,在之后反馈的SACK包中不再携带该GAP。
本申请实施例提供的数据传输方法,针对数据流中的尾包进行冗余保护,即发送冗余的多个尾包,以降低尾包的丢包概率,避免由尾包丢失触发的RTO机制或TLP机制的数据重传,进而避免由触发RTO机制或TLP机制导致的等待时延,因此,减小了数据流的传输时延,提高了数据传输的质量和性能。并且,本申请实施例中多个尾包的冗余数量是根据用于传输数据流的网络的传输参数确定的,既能够避免发送的多个尾包发生连续丢包,也能够防止冗余数量过大造成的传输资源浪费,使得确定的多个尾包的冗余数量更符合数据传输要求。
以上介绍了本申请实施例的数据传输方法,与上述方法对应,本申请实施例还提供了数据传输装置。图6是本申请实施例提供的一种数据传输装置的结构示意图,基于图6所示的如下多个模块,该图6所示的数据传输装置能够执行第一节点所执行的全部或部分操作。应理解到,该装置可以包括比所示模块更多的附加模块或者省略其中所示的一部分模块,本申请实施例对此并不进行限制。如图6所示,该装置包括:
生成模块601,用于在第一数据包为数据流的尾包的情况下,生成第一数据包对应的多个第二数据包,任一第二数据包的载荷与第一数据包的载荷相同,多个第二数据包的数量由用于传输数据流的网络的传输参数确定;
发送模块602,用于发送第一数据包和多个第二数据包,多个第二数据包用于减小数据流的尾包的丢包概率。
在一种可能的实施方式中,传输参数包括不同单位数量下的连续丢包率;该装置还包括:拟合模块,用于对网络对应的不同单位数量下的连续丢包率进行函数拟合,得到冗余数量与成功概率的函数关系,成功概率为连续发送的冗余数量个数据包中的至少一个数据包被接收的概率;第一确定模块,用于获取函数关系在成功概率大于等于概率阈值的情况下的冗余数量,根据在成功概率大于等于概率阈值的情况下的冗余数量确定多个第二数据包的数量。
在一种可能的实施方式中,第一数据包和多个第二数据包基于QUIC传输,多个第二数据包的数量为K,第一数据包的序列号为N,K和N均为正整数;多个第二数据包与第一数据包的序列号不同, 多个第二数据包的序列号分别为N+n、N+n+1、...、N+n+K-1,n基于QUIC对应的数据包阈值确定。
在一种可能的实施方式中,该装置还包括:重传模块,用于基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息,对于数据流中在任一数据包之前发送的但未被确认的第三数据包,如果任一数据包的序列号与第三数据包的序列号的差值大于等于数据包阈值,触发重传第三数据包的载荷。
在一种可能的实施方式中,第一数据包与多个第二数据包基于TCP传输;多个第二数据包的序列号与第一数据包的序列号相同;该装置还包括:获取模块,用于获取第一数据包的序列号与冗余序列号的映射关系,冗余序列号为第一数据包的序列号与n的和值,n基于TCP对应的重复阈值确定。
在一种可能的实施方式中,该装置还包括:重传模块,用于基于接收到第一数据包和多个第二数据包中的任一数据包的确认消息,对于数据流中在任一数据包之前发送的但未被确认的第三数据包,在映射关系中获取任一数据包的序列号对应的冗余序列号,如果冗余序列号与第三数据包的序列号的差值大于等于TCP对应的重复阈值,触发重传第三数据包的载荷。
在一种可能的实施方式中,该装置还包括:第二确定模块,用于在到达第一数据包加入发送队列之后的第一时长的情况下,若发送队列中没有属于数据流的数据包加入,确定第一数据包为数据流的尾包;或者,用于根据第一数据包中携带的指示尾包的标识确定第一数据包为数据流的尾包。
本申请实施例提供的数据传输装置,针对数据流中的尾包进行冗余保护,即发送冗余的多个尾包,以降低尾包的丢包概率,避免由尾包丢失触发的RTO机制或TLP机制的数据重传,进而避免由触发RTO机制或TLP机制导致的等待时延,因此,减小了数据流的传输时延,提高了数据传输的质量和性能。并且,本申请实施例中多个尾包的冗余数量是根据用于传输数据流的网络的传输参数确定的,既能够避免发送的多个尾包发生连续丢包,也能够防止冗余数量过大造成的传输资源浪费,使得确定的多个尾包的冗余数量更符合数据传输要求。
应理解的是,上述图6提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
参见图7,图7示出了本申请一个示例性实施例提供的数据传输设备2000的结构示意图。图7所示的数据传输设备2000用于执行上述图3所示的数据传输方法所涉及的操作。该数据传输设备2000例如是云服务器、交换机、路由器等,该数据传输设备2000可以由一般性的总线体系结构来实现。
如图7所示,数据传输设备2000包括至少一个处理器2001、存储器2003以及至少一个通信接口2004。
处理器2001例如是通用中央处理器(central processing unit,CPU)、数字信号处理器(digital signal processor,DSP)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器2001包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。其可以实现或执行结合本发明实施例公开内容所描述的各种逻辑方框、模块和电路。处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。
可选的,数据传输设备2000还包括总线。总线用于在数据传输设备2000的各组件之间传送信息。总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。
存储器2003例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory, EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器2003例如是独立存在,并通过总线与处理器2001相连接。存储器2003也可以和处理器2001集成在一起。
通信接口2004使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(radio access network,RAN)或无线局域网(wireless local area networks,WLAN)等。通信接口2004可以包括有线通信接口,还可以包括无线通信接口。具体的,通信接口2004可以为以太(Ethernet)接口、快速以太(Fast Ethernet,FE)接口、千兆以太(Gigabit Ethernet,GE)接口,异步传输模式(Asynchronous Transfer Mode,ATM)接口,无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合。以太网接口可以是光接口,电接口或其组合。在本申请实施例中,通信接口2004可以用于数据传输设备2000与其他设备进行通信。
在具体实现中,作为一种实施例,处理器2001可以包括一个或多个CPU,如图7中所示的CPU0和CPU1。这些处理器中的每一个可以是一个单核(single-core CPU)处理器,也可以是一个多核(multi-core CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,数据传输设备2000可以包括多个处理器,如图7中所示的处理器2001和处理器2005。这些处理器中的每一个可以是一个单核处理器(single-core CPU),也可以是一个多核处理器(multi-core CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,数据传输设备2000还可以包括输出设备和输入设备。输出设备和处理器2001通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器2001通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。
在一些实施例中,存储器2003用于存储执行本申请方案的程序代码2010,处理器2001可以执行存储器2003中存储的程序代码2010。也即是,数据传输设备2000可以通过处理器2001以及存储器2003中的程序代码2010,来实现方法实施例提供的数据传输方法。程序代码2010中可以包括一个或多个软件模块。可选地,处理器2001自身也可以存储执行本申请方案的程序代码或指令。
本申请实施例的数据传输设备2000可对应于上述各个方法实施例中的数据传输设备,数据传输设备2000中的处理器2001读取存储器2003中的指令,使图7所示的数据传输设备2000能够执行第一节点所执行的全部或部分操作。
具体的,处理器2001用于在第一数据包为数据流的尾包的情况下,第一节点生成第一数据包对应的多个第二数据包,任一第二数据包的载荷与第一数据包的载荷相同,多个第二数据包的数量由用于传输数据流的网络的传输参数确定;第一节点发送第一数据包和多个第二数据包,多个第二数据包用于减小数据流的尾包的丢包概率。
其他可选的实施方式,为了简洁,在此不再赘述。
数据传输设备2000还可以对应于上述图6所示的数据传输装置,数据传输装置中的每个功能模块采用数据传输设备2000的软件实现。换句话说,数据传输装置包括的功能模块为数据传输设备2000的处理器2001读取存储器2003中存储的程序代码2010后生成的。
其中,图3所示的数据传输方法的各步骤通过数据传输设备2000的处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。
参见图8,图8示出了本申请另一个示例性实施例提供的数据传输设备2100的结构示意图,图8所示的数据传输设备2100用于执行上述图3所示的数据传输方法所涉及的全部或部分操作。该数据传输设备 2100例如是云服务器、交换机、路由器等,该数据传输设备2100可以由一般性的总线体系结构来实现。
如图8所示,数据传输设备2100包括:主控板2110和接口板2130。
主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板2110用于对数据传输设备2100中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板2110包括:中央处理器2111和存储器2112。
接口板2130也称为线路接口单元(line processing unit,LPU)、线卡(line card)或业务板。接口板2130用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板2130包括:中央处理器2131、网络处理器2132、转发表项存储器2134和物理接口卡(physical interface card,PIC)2133。
接口板2130上的中央处理器2131用于对接口板2130进行控制管理并与主控板2110上的中央处理器2111进行通信。
网络处理器2132用于实现报文的转发处理。网络处理器2132的形态可以是转发芯片。转发芯片可以是网络处理器(network processor,NP)。在一些实施例中,转发芯片可以通过专用集成电路(application-specific integrated circuit,ASIC)或现场可编程门阵列(field programmable gate array,FPGA)实现。具体而言,网络处理器2132用于基于转发表项存储器2134保存的转发表转发接收到的报文,如果报文的目的地址为数据传输设备2100的地址,则将该报文上送至CPU(如中央处理器2131)处理;如果报文的目的地址不是数据传输设备2100的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理可以包括:报文入接口的处理,转发表查找;下行报文的处理可以包括:转发表查找等等。在一些实施例中,中央处理器也可执行转发芯片的功能,比如基于通用CPU实现软件转发,从而接口板中不需要转发芯片。
物理接口卡2133用于实现物理层的对接功能,原始的流量由此进入接口板2130,以及处理后的报文从该物理接口卡2133发出。物理接口卡2133也称为子卡,可安装在接口板2130上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器2132处理。在一些实施例中,中央处理器2131也可执行网络处理器2132的功能,比如基于通用CPU实现软件转发,从而物理接口卡2133中不需要网络处理器2132。
可选地,数据传输设备2100包括多个接口板,例如数据传输设备2100还包括接口板2140,接口板2140包括:中央处理器2141、网络处理器2142、转发表项存储器2144和物理接口卡2143。接口板2140中各部件的功能和实现方式与接口板2130相同或相似,在此不再赘述。
可选地,数据传输设备2100还包括交换网板2120。交换网板2120也可以称为交换网板单元(switch fabric unit,SFU)。在数据传输设备2100有多个接口板的情况下,交换网板2120用于完成各接口板之间的数据交换。例如,接口板2130和接口板2140之间可以通过交换网板2120通信。
主控板2110和接口板耦合。例如。主控板2110、接口板2130和接口板2140,以及交换网板2120之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板2110和接口板2130及接口板2140之间建立进程间通信协议(inter-process communication,IPC)通道,主控板2110和接口板2130及接口板2140之间通过IPC通道进行通信。
在逻辑上,数据传输设备2100包括控制面和转发面,控制面包括主控板2110和中央处理器2111,转发面包括执行转发的各个组件,比如转发表项存储器2134、物理接口卡2133和网络处理器2132。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护数据传输设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器2132基于控制面下发的转发表对物理接口卡2133收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器2134中。在有些实施例中,控制面和转发面可以完全分离,不在同一数据传输设备上。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,数据传输设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,数据传输设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,数据传输设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的 数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的数据传输设备的数据接入和处理能力要大于集中式架构的数据传输设备。可选地,数据传输设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态数据传输设备的数据交换和处理能力较低(例如,低端交换机或路由器等数据传输设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
在具体实施例中,数据传输设备2100对应于上述图6所示的数据传输装置。在一些实施例中,图6所示的数据传输装置中的生成模块601相当于数据传输设备2100中的网络处理器2132,发送模块602相当于数据传输设备2100中的物理接口卡2133。
本申请实施例还提供了一种通信装置,该装置包括:收发器、存储器和处理器。其中,该收发器、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制收发器接收信号,并控制收发器发送信号,并且当该处理器执行该存储器存储的指令时,使得该处理器执行第一节点所需执行的方法。
本申请实施例还提供了一种数据传输设备,该数据传输设备包括:处理器,处理器与存储器耦合,存储器中存储有至少一条程序指令或代码,至少一条程序指令或代码由处理器加载并执行,以使数据传输设备实现如图3所示的数据传输方法。可选地,所述处理器为一个或多个,所述存储器为一个或多个。
可选地,所述存储器可以与所述处理器集成在一起,或者所述存储器与处理器分离设置。
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不做限定。
应理解的是,上述处理器可以是CPU,还可以是其他通用处理器、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。值得说明的是,处理器可以是支持进阶精简指令集机器(advanced RISC machines,ARM)架构的处理器。
进一步地,在一种可选的实施例中,上述存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。
该存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用。例如,静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic random access memory,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(doubledata rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
本申请实施例还提供了一种计算机可读存储介质,存储介质中存储有至少一条指令,指令由处理器加载并执行,以使计算机实现如上任一的数据传输方法。
本申请实施例还提供了一种计算机程序(产品),当计算机程序被计算机执行时,可以使得处理器或计算机执行上述方法实施例中对应的各个步骤和/或流程。
本申请实施例还提供了一种芯片,包括处理器,用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的通信设备执行如上任一的数据传输方法。
本申请实施例还提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,处理器用于执行如上任一的数据传输方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现 时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk))等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和模块,能够以软件、硬件、固件或者其任意组合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机程序指令。作为示例,本申请实施例的方法可以在机器可执行指令的上下文中被描述,机器可执行指令诸如包括在目标的真实或者虚拟处理器上的器件中执行的程序模块中。一般而言,程序模块包括例程、程序、库、对象、类、组件、数据结构等,其执行特定的任务或者实现特定的抽象数据结构。在各实施例中,程序模块的功能可以在所描述的程序模块之间合并或者分割。用于程序模块的机器可执行指令可以在本地或者分布式设备内执行。在分布式设备中,程序模块可以位于本地和远程存储介质二者中。
用于实现本申请实施例的方法的计算机程序代码可以用一种或多种编程语言编写。这些计算机程序代码可以提供给通用计算机、专用计算机或其他可编程的数据处理装置的处理器,使得程序代码在被计算机或其他可编程的数据处理装置执行的时候,引起在流程图和/或框图中规定的功能/操作被实施。程序代码可以完全在计算机上、部分在计算机上、作为独立的软件包、部分在计算机上且部分在远程计算机上或完全在远程计算机或服务器上执行。
在本申请实施例的上下文中,计算机程序代码或者相关数据可以由任意适当载体承载,以使得设备、装置或者处理器能够执行上文描述的各种处理和操作。载体的示例包括信号、计算机可读介质等等。
信号的示例可以包括电、光、无线电、声音或其它形式的传播信号,诸如载波、红外信号等。
机器可读介质可以是包含或存储用于或有关于指令执行系统、装置或设备的程序的任何有形介质。机器可读介质可以是机器可读信号介质或机器可读存储介质。机器可读介质可以包括但不限于电子的、磁的、光学的、电磁的、红外的或半导体系统、装置或设备,或其任意合适的组合。机器可读存储介质的更详细示例包括带有一根或多根导线的电气连接、便携式计算机磁盘、硬盘、随机存储存取器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或闪存)、光存储设备、磁存储设备,或其任意合适的组合。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、设备和模块的具体工作过程,可以参见前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、设备或模块的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
该作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以是两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”、“第n”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种示例的范围的情况下,第一图像可以被称为第二图像,并且类似地,第二图像可以被称为第一图像。第一图像和第二图像都可以是图像,并且在某些情况下,可以是单独且不同的图像。
还应理解,在本申请的各个实施例中,各个过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本申请中术语“至少一个”的含义是指一个或多个,本申请中术语“多个”的含义是指两个或两个以上,例如,多个第二数据包是指两个或两个以上的第二数据包。本文中术语“系统”和“网络”经常可互换使用。
应理解,在本文中对各种所述示例的描述中所使用的术语只是为了描述特定示例,而并非旨在进行限制。如在对各种所述示例的描述和所附权利要求书中所使用的那样,单数形式“一个(“a”,“an”)”和“该”旨在也包括复数形式,除非上下文另外明确地指示。
还应理解,本文中所使用的术语“和/或”是指并且涵盖相关联的所列出的项目中的一个或多个项目的任何和全部可能的组合。术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中的字符“/”,一般表示前后关联对象是一种“或”的关系。
还应理解,术语“包括”(也称“includes”、“including”、“comprises”和/或“comprising”)当在本说明书中使用时指定存在所陈述的特征、整数、步骤、操作、元素、和/或部件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元素、部件、和/或其分组。
还应理解,术语“若”和“如果”可被解释为意指“当...时”(“when”或“upon”)或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“若确定...”或“若检测到[所陈述的条件或事件]”可被解释为意指“在确定...时”或“响应于确定...”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。
应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
还应理解,说明书通篇中提到的“一个实施例”、“一实施例”、“一种可能的实现方式”意味着与实施例或实现方式有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”、“一种可能的实现方式”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。
以上描述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (17)

  1. 一种数据传输方法,其特征在于,所述方法包括:
    在第一数据包为数据流的尾包的情况下,第一节点生成所述第一数据包对应的多个第二数据包,任一第二数据包的载荷与所述第一数据包的载荷相同,所述多个第二数据包的数量由用于传输所述数据流的网络的传输参数确定;
    所述第一节点发送所述第一数据包和所述多个第二数据包,所述多个第二数据包用于减小所述数据流的尾包的丢包概率。
  2. 根据权利要求1所述的方法,其特征在于,所述传输参数包括所述网络对应的不同单位数量下的连续丢包率;所述第一节点生成所述第一数据包对应的多个第二数据包之前,还包括:
    对所述网络对应的不同单位数量下的连续丢包率进行函数拟合,得到冗余数量与成功概率的函数关系,所述成功概率为连续发送的冗余数量个数据包中的至少一个数据包被接收的概率;
    获取所述函数关系在所述成功概率大于等于概率阈值的情况下的冗余数量,根据所述在所述成功概率大于等于概率阈值的情况下的冗余数量确定所述多个第二数据包的数量。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一数据包和所述多个第二数据包基于快速用户数据报文协议互联网连接QUIC传输,所述多个第二数据包的数量为K,所述第一数据包的序列号为N,所述K和所述N均为正整数;
    所述多个第二数据包与所述第一数据包的序列号不同,所述多个第二数据包的序列号分别为N+n、N+n+1、...、N+n+K-1,所述n基于所述QUIC对应的数据包阈值确定。
  4. 根据权利要求3所述的方法,其特征在于,所述第一节点发送所述第一数据包和所述多个第二数据包之后,还包括:
    基于接收到所述第一数据包和所述多个第二数据包中的任一数据包的确认消息,对于所述数据流中在所述任一数据包之前发送的但未被确认的第三数据包,如果所述任一数据包的序列号与所述第三数据包的序列号的差值大于等于所述数据包阈值,触发重传所述第三数据包的载荷。
  5. 根据权利要求1或2所述的方法,其特征在于,所述第一数据包与所述多个第二数据包基于传输控制协议TCP传输;所述多个第二数据包的序列号与所述第一数据包的序列号相同;
    所述第一节点生成所述第一数据包对应的多个第二数据包之后,还包括:
    获取所述第一数据包的序列号与冗余序列号的映射关系,所述冗余序列号为所述第一数据包的序列号与n的和值,所述n基于所述TCP对应的重复阈值确定。
  6. 根据权利要求5所述的方法,其特征在于,所述第一节点发送所述第一数据包和所述多个第二数据包之后,还包括:
    基于接收到所述第一数据包和所述多个第二数据包中的任一数据包的确认消息,对于所述数据流中在所述任一数据包之前发送的但未被确认的第三数据包,在所述映射关系中获取所述任一数据包的序列号对应的冗余序列号,如果所述冗余序列号与所述第三数据包的序列号的差值大于等于所述重复阈值,触发重传所述第三数据包的载荷。
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述第一节点生成所述第一数据包对应的多个第二数据包之前,还包括:
    在到达所述第一数据包加入发送队列之后的第一时长的情况下,若所述发送队列中没有属于所述数据流中的数据包加入,所述第一节点确定所述第一数据包为所述数据流的尾包;
    或者,所述第一节点根据所述第一数据包中携带的指示尾包的标识确定所述第一数据包为所述数据流 的尾包。
  8. 一种数据传输装置,其特征在于,所述装置包括:
    生成模块,用于在第一数据包为数据流的尾包的情况下,生成所述第一数据包对应的多个第二数据包,任一第二数据包的载荷与所述第一数据包的载荷相同,所述多个第二数据包的数量由用于传输所述数据流的网络的传输参数确定;
    发送模块,用于发送所述第一数据包和所述多个第二数据包,所述多个第二数据包用于减小所述数据流的尾包的丢包概率。
  9. 根据权利要求8所述的装置,其特征在于,所述传输参数包括不同单位数量下的连续丢包率;所述装置还包括:
    拟合模块,用于对所述网络对应的不同单位数量下的连续丢包率进行函数拟合,得到冗余数量与成功概率的函数关系,所述成功概率为连续发送的冗余数量个数据包中的至少一个数据包被接收的概率;
    第一确定模块,用于获取所述函数关系在所述成功概率大于等于概率阈值的情况下的冗余数量,根据所述在所述成功概率大于等于概率阈值的情况下的冗余数量确定所述多个第二数据包的数量。
  10. 根据权利要求8或9所述的装置,其特征在于,所述第一数据包和所述多个第二数据包基于快速用户数据报文协议互联网连接QUIC传输,所述多个第二数据包的数量为K,所述第一数据包的序列号为N,所述K和所述N均为正整数;
    所述多个第二数据包与所述第一数据包的序列号不同,所述多个第二数据包的序列号分别为N+n、N+n+1、...、N+n+K-1,所述n基于所述QUIC对应的数据包阈值确定。
  11. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    重传模块,用于基于接收到所述第一数据包和所述多个第二数据包中的任一数据包的确认消息,对于所述数据流中在所述任一数据包之前发送的但未被确认的第三数据包,如果所述任一数据包的序列号与所述第三数据包的序列号的差值大于等于所述数据包阈值,触发重传所述第三数据包的载荷。
  12. 根据权利要求8或9所述的装置,其特征在于,所述第一数据包与所述多个第二数据包基于传输控制协议TCP传输;所述多个第二数据包的序列号与所述第一数据包的序列号相同;
    所述装置还包括:
    获取模块,用于获取所述第一数据包的序列号与冗余序列号的映射关系,所述冗余序列号为所述第一数据包的序列号与n的和值,所述n基于所述TCP对应的重复阈值确定。
  13. 根据权利要求12所述的装置,其特征在于,所述装置还包括:
    重传模块,用于基于接收到所述第一数据包和所述多个第二数据包中的任一数据包的确认消息,对于所述数据流中在所述任一数据包之前发送的但未被确认的第三数据包,在所述映射关系中获取所述任一数据包的序列号对应的冗余序列号,如果所述冗余序列号与所述第三数据包的序列号的差值大于等于所述重复阈值,触发重传所述第三数据包的载荷。
  14. 根据权利要求8-13任一所述的方法,其特征在于,所述装置还包括:
    第二确定模块,用于在到达所述第一数据包加入发送队列之后的第一时长的情况下,若所述发送队列中没有属于所述数据流的数据包加入,确定所述第一数据包为所述数据流的尾包;或者,用于根据所述第一数据包中携带的指示尾包的标识确定所述第一数据包为所述数据流的尾包。
  15. 一种数据传输设备,其特征在于,所述数据传输设备包括:处理器,所述处理器与存储器耦合,所述存储器中存储有至少一条程序指令或代码,所述至少一条程序指令或代码由所述处理器加载并执行,以使所述数据传输设备实现权利要求1-7中任一所述的数据传输方法。
  16. 一种计算机可读存储介质,其特征在于,所述计算机存储介质中存储有至少一条指令,所述至少一条指令由处理器加载并执行,以使计算机实现如权利要求1-7中任一所述的数据传输方法。
  17. 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序代码,所述计算机程序代码由计算机加载并执行,以使所述计算机实现权利要求1-7中任一所述的数据传输方法。
PCT/CN2024/090516 2023-05-09 2024-04-29 数据传输方法、装置、设备及计算机可读存储介质 Ceased WO2024230547A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP24802831.8A EP4694093A4 (en) 2023-05-09 2024-04-29 METHOD, DATA TRANSMISSION APPARATUS, DEVICE AND COMPUTER-READABLE STORAGE MEDIA
US19/382,983 US20260067236A1 (en) 2023-05-09 2025-11-07 Data Transmission Method, Apparatus, and Device, and Computer-Readable Storage Medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310518999.8 2023-05-09
CN202310518999.8A CN118945244A (zh) 2023-05-09 2023-05-09 数据传输方法、装置、设备及计算机可读存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/382,983 Continuation US20260067236A1 (en) 2023-05-09 2025-11-07 Data Transmission Method, Apparatus, and Device, and Computer-Readable Storage Medium

Publications (1)

Publication Number Publication Date
WO2024230547A1 true WO2024230547A1 (zh) 2024-11-14

Family

ID=93355111

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/090516 Ceased WO2024230547A1 (zh) 2023-05-09 2024-04-29 数据传输方法、装置、设备及计算机可读存储介质

Country Status (4)

Country Link
US (1) US20260067236A1 (zh)
EP (1) EP4694093A4 (zh)
CN (1) CN118945244A (zh)
WO (1) WO2024230547A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119847973A (zh) * 2025-03-20 2025-04-18 上海壁仞科技股份有限公司 数据传输方法、数据传输装置、片上系统及存储介质
CN119996782A (zh) * 2025-04-11 2025-05-13 通号通信信息集团有限公司 一种视频数据传输中的丢包处理方法、装置、设备及介质
CN120200634A (zh) * 2025-05-27 2025-06-24 德力西集团仪器仪表有限公司 基于quic的hplc双模传输方法、装置及网络

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3706371A1 (en) * 2017-12-28 2020-09-09 Huawei Technologies Co., Ltd. Network quality measurement method and apparatus thereof
WO2021035541A1 (zh) * 2019-08-27 2021-03-04 华为技术有限公司 一种数据传输方法及相关设备
CN114389758A (zh) * 2020-10-19 2022-04-22 华为技术有限公司 一种数据传输方法和装置
CN114531212A (zh) * 2020-11-23 2022-05-24 华为技术有限公司 数据传输的方法和装置
CN115734404A (zh) * 2021-08-25 2023-03-03 大唐移动通信设备有限公司 基站内数据传输方法、装置及网络设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580171B (zh) * 2014-12-24 2018-01-12 北京高森明晨信息科技有限公司 Tcp协议的传输方法、装置和系统
CN106878191B (zh) * 2015-12-14 2018-11-16 华为技术有限公司 一种数据传送方法、发送节点、接收节点及数据传送系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3706371A1 (en) * 2017-12-28 2020-09-09 Huawei Technologies Co., Ltd. Network quality measurement method and apparatus thereof
WO2021035541A1 (zh) * 2019-08-27 2021-03-04 华为技术有限公司 一种数据传输方法及相关设备
CN114389758A (zh) * 2020-10-19 2022-04-22 华为技术有限公司 一种数据传输方法和装置
CN114531212A (zh) * 2020-11-23 2022-05-24 华为技术有限公司 数据传输的方法和装置
CN115734404A (zh) * 2021-08-25 2023-03-03 大唐移动通信设备有限公司 基站内数据传输方法、装置及网络设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4694093A1

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119847973A (zh) * 2025-03-20 2025-04-18 上海壁仞科技股份有限公司 数据传输方法、数据传输装置、片上系统及存储介质
CN119996782A (zh) * 2025-04-11 2025-05-13 通号通信信息集团有限公司 一种视频数据传输中的丢包处理方法、装置、设备及介质
CN120200634A (zh) * 2025-05-27 2025-06-24 德力西集团仪器仪表有限公司 基于quic的hplc双模传输方法、装置及网络

Also Published As

Publication number Publication date
EP4694093A1 (en) 2026-02-11
CN118945244A (zh) 2024-11-12
US20260067236A1 (en) 2026-03-05
EP4694093A4 (en) 2026-04-15

Similar Documents

Publication Publication Date Title
WO2024230547A1 (zh) 数据传输方法、装置、设备及计算机可读存储介质
US20060203730A1 (en) Method and system for reducing end station latency in response to network congestion
JP7327730B2 (ja) パケット処理方法および装置
CN108881008A (zh) 一种数据传输的方法、装置和系统
CN118199821A (zh) 数据传输方法、装置、设备及计算机可读存储介质
CN107104902B (zh) 一种rdma数据传输的方法、相关装置与系统
CN105103500A (zh) 通信方法、通信装置以及通信程序
EP4622214A1 (en) Data transmission method, apparatus, device and system, and storage medium
WO2024113459A1 (zh) 基于双单向光闸系统的数据传输方法、装置、设备及介质
CN119166567A (zh) 用于远程直接存储器访问的设备和方法
US10326696B2 (en) Transmission of messages by acceleration components configured to accelerate a service
CN106712908B (zh) 数据传输方法、装置和系统
CN121399907A (zh) 协同拥塞控制和自适应负载均衡
US20260074998A1 (en) Congestion control method, apparatus, and system
CN112737737B (zh) 一种确认报文的处理方法和通信装置以及存储介质
US11962517B2 (en) Communications method, apparatus, and system for recovering lost packets
US8854957B2 (en) Packet retransmission control system, packet retransmission control method and retransmission control program
CN120050005A (zh) 一种基于rdma可编程交换机网关的多级选择重传系统
CN110677871A (zh) 数据发送方法及发送设备、数据接收方法及接收设备
CN118199824A (zh) 数据传输方法、装置、设备、系统及存储介质
TWI839155B (zh) 電腦裝置以及應用於電腦裝置的傳輸控制協定封包處理方法
CN118487721A (zh) 网络报文转发方法、装置、交换机和存储介质
US7450512B1 (en) Recirculating retransmission queuing system and method
US12621088B2 (en) Method and apparatus for transmitting objects based on deadline-aware
US20240154735A1 (en) Method and apparatus for transmitting objects based on deadline-aware

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24802831

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2024802831

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2024802831

Country of ref document: EP

Effective date: 20251107

ENP Entry into the national phase

Ref document number: 2024802831

Country of ref document: EP

Effective date: 20251107

ENP Entry into the national phase

Ref document number: 2024802831

Country of ref document: EP

Effective date: 20251107

ENP Entry into the national phase

Ref document number: 2024802831

Country of ref document: EP

Effective date: 20251107

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2024802831

Country of ref document: EP

Effective date: 20251107

ENP Entry into the national phase

Ref document number: 2024802831

Country of ref document: EP

Effective date: 20251107

ENP Entry into the national phase

Ref document number: 2024802831

Country of ref document: EP

Effective date: 20251107

ENP Entry into the national phase

Ref document number: 2024802831

Country of ref document: EP

Effective date: 20251107

WWP Wipo information: published in national office

Ref document number: 2024802831

Country of ref document: EP