WO2023155690A1 - 数据传输方法以及装置 - Google Patents

数据传输方法以及装置 Download PDF

Info

Publication number
WO2023155690A1
WO2023155690A1 PCT/CN2023/074265 CN2023074265W WO2023155690A1 WO 2023155690 A1 WO2023155690 A1 WO 2023155690A1 CN 2023074265 W CN2023074265 W CN 2023074265W WO 2023155690 A1 WO2023155690 A1 WO 2023155690A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
information
packet
sending
data
Prior art date
Application number
PCT/CN2023/074265
Other languages
English (en)
French (fr)
Inventor
马舒
Original Assignee
阿里巴巴(中国)有限公司
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 阿里巴巴(中国)有限公司 filed Critical 阿里巴巴(中国)有限公司
Publication of WO2023155690A1 publication Critical patent/WO2023155690A1/zh

Links

Classifications

    • 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/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Definitions

  • the embodiments of this specification relate to the field of Internet technologies, and in particular, to a data transmission method and device.
  • the embodiment of this specification provides a data transmission method.
  • One or more embodiments of this specification also relate to a data transmission device, a computing device, a computer-readable storage medium and a computer program, so as to solve technical defects in the prior art.
  • a data transmission method applied to the sending end including:
  • the table includes a second preset number of fields, and the first subpacket is any subpacket in the first preset number of subpackets;
  • the second sub-packet In the case of receiving the acknowledgment information returned by the receiving end, determine the second sub-packet corresponding to the acknowledgment information, and determine the second sending status information corresponding to the second sub-packet, and cancel the second sending status information and the sending information maintenance table
  • the second sub-packet is a sub-packet for which the receiving end returns confirmation information among the first preset number of sub-packets.
  • a data transmission method applied to a receiving end including:
  • the target data identifier is greater than the current maximum data identifier to be received, according to the target data identifier, determine the fourth sub-packet that has not been received before the third sub-packet, wherein the current maximum data identifier to be received is currently received The next data identifier of the largest data identifier;
  • the table includes a third predetermined number of fields.
  • a data transmission device applied to the sending end including:
  • the sending module is configured to send a first preset number of sub-packets to the receiving end;
  • the first building module is configured to set the data information of the first sub-packet in the initial sending status information, obtain the first sending status information, and construct the relationship between the first sending status information and the corresponding fields in the sending information maintenance table Association relationship, wherein the sending information maintenance table includes a second preset number of fields, and the first subpacket is any one of the first preset number of subpackets;
  • the release module is configured to, in the case of receiving the confirmation information returned by the receiving end, determine the second sub-packet corresponding to the confirmation information, and determine the second sending state information corresponding to the second sub-packet, and release the second sending state
  • a data transmission device applied to a receiving end including:
  • the receiving module is configured to receive the third sub-packet and obtain the target data identifier of the third sub-packet;
  • the first determining module is configured to determine, according to the target data identifier, the fourth sub-packet that has not been received before the third sub-packet when the target data identifier is greater than the current maximum pending data identifier, wherein the current maximum pending The received data identifier is the next data identifier of the largest currently received data identifier;
  • the second building module is configured to set the data information of the fourth sub-packet in the initial receiving status information, obtain the first receiving status information, and construct the relationship between the first receiving status information and the corresponding fields in the receiving information maintenance table Associative relationship, wherein, the received information maintenance table includes a third preset number of fields.
  • a computing device including:
  • the memory is used to store computer-executable instructions
  • the processor is used to execute the computer-executable instructions.
  • the steps of the above-mentioned data transmission method are realized.
  • a computer-readable storage medium which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned data transmission method are implemented.
  • a computer program wherein, when the computer program is executed in a computer, it causes the computer to execute the steps of the above data transmission method.
  • An embodiment of this specification provides a data transmission method.
  • the sending end can send a first preset number of sub-packets to the receiving end, and then set the data information of the first sub-packet in the initial sending status information to obtain the first sending state information, and construct the association relationship between the first sending state information and the corresponding fields in the sending information maintenance table, wherein the sending information maintenance table includes a second preset number of fields, and the first subpacket is the first preset Any sub-packet in the number of sub-packets; in the case of receiving the acknowledgment information returned by the receiving end, determine the second sub-packet corresponding to the acknowledgment information, and determine the second sending status information corresponding to the second sub-packet Disassociation between the second sending status information and the corresponding field in the sending information maintenance table, wherein the second sub-packet is a sub-packet of the first preset number of sub-packets for which the receiving end returns confirmation information.
  • the sending end after the sending end sends sub-packets to the receiving end, it can maintain the sending status of each sub-packet based on the sending information maintenance table, and the receiving end does not need to receive each sub-packet in order.
  • the data packet can return the confirmation information of which sub-data packet to the sending end.
  • the sending end After the sending end receives the confirmation information returned by the receiving end, it means that the sub-data packet has been successfully sent.
  • the sending status information and sending status information corresponding to the sub-data packet can be released.
  • the association relationship between the corresponding fields in the information maintenance table does not need to continue to pay attention to the sending status of the sub-packet.
  • the sending end can know the status of each sub-packet based on the sending information maintenance table, so as to know which sub-packet has not been sent successfully.
  • the sub-packet behind the packet loss point can be successfully sent to the receiver end, and can continue to send subsequent sub-packets without affecting the subsequent bandwidth of the connection at all, that is, the loss of a certain sub-packet will not affect the sending of subsequent sub-packets, avoiding head-of-line blocking, and can clearly know Which sub-packet is not sent successfully, improving the reliability of data transmission.
  • An embodiment of this specification provides a data transmission method.
  • the receiving end can receive the third sub-packet and obtain the target data identifier of the third sub-packet.
  • the target data identifier is greater than the current maximum data identifier to be received
  • the receiving end can obtain the target data identifier of the third sub-packet, and based on the target data identifier, determine the subsequent recording method for the third sub-packet.
  • the data identifier is greater than the current maximum data identifier to be received
  • the fourth sub-packet that has not been received before the third sub-packet can be determined according to the target data identifier, and each sequence that should be received but not received is maintained based on the received information maintenance table. The reception status of the fourth sub-packet that was not actually received, so as to know which sub-packet was not successfully received.
  • FIG. 1 is a flowchart of a data transmission method provided by an embodiment of this specification
  • Fig. 2a is a schematic diagram of the first sending information maintenance table provided by an embodiment of this specification.
  • Fig. 2b is a schematic diagram of a second sending information maintenance table provided by an embodiment of this specification.
  • Fig. 2c is a schematic diagram of a third sending information maintenance table provided by an embodiment of this specification.
  • Fig. 2d is a schematic diagram of the fourth sending information maintenance table provided by an embodiment of this specification.
  • Fig. 2e is a schematic diagram of a fifth sending information maintenance table provided by an embodiment of this specification.
  • Fig. 2f is a schematic diagram of the sixth sending information maintenance table provided by an embodiment of this specification.
  • Fig. 2g is a schematic diagram of the seventh sending information maintenance table provided by an embodiment of this specification.
  • Fig. 3 is a flowchart of another data transmission method provided by an embodiment of this specification.
  • Fig. 4 is a schematic diagram of a reception information maintenance table provided by an embodiment of this specification.
  • Fig. 5 is a schematic structural diagram of a data transmission device provided by an embodiment of this specification.
  • Fig. 6 is a schematic structural diagram of another data transmission device provided by an embodiment of this specification.
  • Fig. 7 is a structural block diagram of a computing device provided by an embodiment of this specification.
  • first, second, etc. may be used to describe various information in one or more embodiments of the present specification, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another.
  • the first may also be referred to as the second, and similarly, the second may also be referred to as the first without departing from the scope of one or more embodiments of the present specification.
  • the word "if” as used herein may be interpreted as “at” or "when” or "in response to a determination.”
  • Orderly reporting at the receiving end of the communication, the received data is handed over to the upper layer in the order in which it was sent.
  • Out-of-order reporting the receiving end of the communication, the received data does not need to be handed over to the upper layer in the order of sending
  • Head-of-line blocking When the two ends of the communication are communicating, some messages are affected by the lack of delivery or loss of the previous messages, so that they cannot be delivered to the upper layer. This is called head-of-line blocking, which is HOL (head-of-line blocking) in English.
  • Reliable transmission A mechanism to ensure that messages from one end can be delivered to the other end completely, without loss, without error, and without repetition.
  • Typical solutions include TCP and QUIC.
  • TCP Transmission Control Protocol
  • Transmission Control Protocol TCP is a connection-oriented (connection-oriented), reliable, byte stream-based transport layer (Transport layer) communication protocol.
  • UDP It is the abbreviation of User Datagram Protocol.
  • the Chinese name is User Datagram Protocol.
  • It is a connectionless transport layer protocol that provides transaction-oriented simple and unreliable information transmission services.
  • the UDP protocol is used to process data packets like the TCP protocol.
  • UDP provides a way for applications to send encapsulated IP packets without establishing a connection.
  • the transport layer of the Internet has two main protocols that complement each other, and the connectionless one is UDP, which does little special beyond giving applications the ability to send packets and allowing them to architect their own protocols at the desired level
  • the connection-oriented thing is TCP, which does pretty much everything.
  • ACK Acknowledgment: It is an acknowledgment character.
  • data communication a transmission type control character sent by the receiving end to the sending end, indicating that the sent data has been confirmed to be received correctly.
  • the receiver if the receiver successfully receives the data, it will reply with an ACK data.
  • the ACK signal has its own fixed format and length, and the receiver will reply to the sender.
  • a data transmission method is provided.
  • This specification also relates to a data transmission device, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments one by one.
  • FIG. 1 shows a flow chart of a data transmission method according to an embodiment of the present specification, which is applied to a sending end, and specifically includes the following steps.
  • Step 102 Send a first preset number of sub-packets to the receiving end.
  • the first preset value may refer to the preset maximum number of sending windows, that is, the maximum number of subpackets to be sent each time.
  • the first preset value may be 4, 8, 16, etc.
  • the subpacket sent to the receiving end may be a UDP packet, thereby supporting out-of-sequence reporting.
  • the data packet to be transmitted can be split to obtain a plurality of sub-packets, and then each sub-packet is sent to the receiving end, that is, the first preset number of sub-packets is sent to the receiving end.
  • a corresponding data identifier is set for a subpacket after the first subpacket in at least two subpackets.
  • the initial data identification is the data identification of the first sub-packet in at least two sub-packets
  • the data identification of the sub-packets may refer to numbers, letters, etc. used to identify the order of the sub-packets, such as sub-packets
  • the data identifier of can be the sequence number of the subpacket.
  • the size of the data packet to be transmitted is limited by the IP layer MTU (the maximum size of the data packet that can be transmitted).
  • the data packet to be transmitted can be split into at least two sub-packets, and subsequently send the at least two sub-packets obtained by splitting to the receiving end in sequence.
  • the initial data identifier can be set for the first sub-packet in the at least two sub-packets, and then based on the set initial data identifier, it can be used for at least two sub-packets.
  • Sub-packets after the first sub-packet in the data packet are set with corresponding data identifiers.
  • the first sub-data can be randomly set The packet sets the start data identifier, and then sets the data identifiers of the subpackets after the first subpacket in the at least two subpackets to increase sequentially.
  • the data packet to be transmitted is divided into 7 sub-packets, the starting data identifier of the first sub-packet is 12, and the data identifiers of the 6 sub-packets after the first sub-packet are 13, 14, 15, 16 in sequence , 17, 18.
  • the data packet to be transmitted can also be split into at least two sub-packets, and corresponding data identifiers can be set for each sub-packet, and the split data can be obtained later.
  • Each sub-packet is sent to the receiving end, and when the sub-packet is sent to the receiving end, it may also carry a corresponding data identifier, so as to inform the receiving end which sub-packet is received.
  • Step 104 Set the data information of the first subpacket in the initial sending status information, obtain the first sending status information, and construct the association relationship between the first sending status information and the corresponding fields in the sending information maintenance table, wherein,
  • the sending information maintenance table includes a second preset number of fields, and the first sub-packet is any sub-packet in the first preset number of sub-packets.
  • the initial sending status information is a preset sending status record structure with empty content;
  • the first subpacket is any subpacket in the first preset number of subpackets, that is, the first preset
  • Each sub-packet in the number of sub-packets can be used as the first sub-packet, and related sending status information is recorded;
  • the first sending status information is information that records the sending status of the first sub-packet.
  • the sending information maintenance table may be a preset recording table capable of maintaining the sending status of each subpacket, such as the sending information maintenance table may be a hash table including a second preset number of fields, wherein the second preset number It may be a preset number of fields included in the sending information maintenance table, and the second preset value may be the same as or different from the first preset value, for example, the second preset value may be 4, 8, 16, etc.
  • the first sending status information recording the sending status of the first sub-packet can be obtained, and the first sending status information and The association relationship between the corresponding fields in the sending information maintenance table is used to maintain the sending status of each subpacket through the sending information maintenance table.
  • a plurality of initial sending state information whose content is empty may also be set in advance, that is, the first subpacket is set in the initial sending state information.
  • the data information of the data packet, before obtaining the first sending status information may also include:
  • Each initial sending state information is set as an idle information table.
  • the initial sending state information is a structure that is pre-set and can record the sending state of the sent sub-packet, such as the initial sending state information is a slot (slot) that can record information, so the sending end sends a message to the receiving end
  • the sending status of several sub-packets that is, the number of initial sending status information whose preset content is empty should be the same as the maximum sending window (the first preset value), that is, the preset
  • each initial sending status information is set as an idle information table
  • an association relationship between each initial sending status information and the idle information table can be constructed, that is, each initial sending status information is bound to the idle information table.
  • Figure 2a is a schematic diagram of the first transmission information maintenance table provided by an embodiment of this specification.
  • the transmission information maintenance table is a hash table including 4 fields, and the field numbers of the 4 fields are respectively It is 0, 1, 2, 3.
  • the initial state none of the four fields of the sending information maintenance table is bound to the slot corresponding to the subpacket.
  • the 4 pre-created slots with empty content are bound to the free slot.
  • the initial sending state information whose content is empty can be set in advance, and each initial sending state information can be set as an idle information table.
  • the sending end sends the sub-packet to the receiving end
  • the The data information of each sub-packet to be sent is set in the initial sending status information to record the sending status of each sub-packet to improve the reliability of data transmission.
  • the initial sending status information may include a data identification field and an acknowledgment information identification field, and the acknowledgment information identification field is used to identify whether the acknowledgment information returned by the receiving end for the first sub-data packet has been received.
  • the first sending state information is obtained, and the specific implementation process can be as follows:
  • the confirmation information identification field of the initial sending status information is set to the confirmation information not received, and the first sending status information is obtained.
  • the sending end sends a sub-packet to the receiving end
  • the receiving end if the receiving end receives the sub-packet, it will return corresponding confirmation information for the sub-packet to inform the sending end that it has received the sub-packet it sent. data pack.
  • the acknowledgment information returned by the receiving end to the sending end may be ACK.
  • the data identification of the sub-packet can be recorded in the initial sending status information, and whether the confirmation information returned by the receiving end for the first sub-packet can be recorded based on the confirmation information identification field.
  • the sending end sends the sub-packet to the receiving end, it can determine the data identifier of the first sub-packet, and set the data identifier of the first sub-packet in the data identifier field in the initial sending state information, and set the initial The acknowledgment information identification field of the sending status information is set to no confirmation information received, and the first sending status information is obtained. That is, the first sending status information may indicate that the first sub-data packet has not received the confirmation information returned by the receiving end.
  • the confirmation information identification field may be set to a first preset value (such as 1), indicating that the confirmation information is received, and the confirmation information identification field may be set to a second preset value (such as 0), Indicates that no confirmation message has been received.
  • the confirmation information identification field can be set to empty, indicating that the confirmation information is received, and the confirmation information identification field can be set to a preset value (such as 0), indicating that the confirmation information has not been received.
  • the confirmation information identification field of the initial sending state information may also be set as no confirmation information received in other ways, which is not limited in this embodiment of the specification.
  • each sub-packet can be used as the first sub-packet, and then the data identifier of the first sub-packet is determined, and in the initial sending state
  • the data identification field in the information is set to the data identification of the first sub-packet
  • the confirmation information identification field of the initial transmission state information is set to the confirmation information not received, and the first transmission state information is obtained.
  • each sub-packet sent from the sending end to the receiving end can generate corresponding first sending status information, so as to record the sending status of each sub-packet to ensure the reliability of data transmission.
  • the corresponding fields in the sending information maintenance table may be determined according to the order of the first sub-packets in the first preset number of sub-packets sent, so as to build an association relationship, or That is, construct the association relationship between the first sending status information and the corresponding fields in the sending information maintenance table, and the specific implementation process can be as follows:
  • An association relationship between the first sending status information and the field indicated by the field number in the sending information maintenance table is constructed.
  • sub-packets of different sequences in the first preset number of sub-packets can be bound to different fields in the sending information maintenance table, so it can be determined first that the first sub-packet is in the first preset number of sub-data
  • the sequence number in the packet and then based on the sequence number and the second preset value, determine the corresponding
  • the field number of the first sending status information and the field indicated by the field number in the sending information maintenance table are constructed to bind the first sending status information with the field indicated by the field number in the sending information maintenance table .
  • the second preset value is the number of fields included in the sending information maintenance table, and it is also possible to pre-set which field of the sending information maintenance table the sending status information corresponding to which sequence numbered subpacket should be bound to, that is, to pre-set Set the determination rule for the field number.
  • the sending status information of each sub-packet can be bound to the fields in the sending information maintenance table in sequence, and at this time, the sequence number can be subtracted from the second preset value, and the obtained remainder That is, it is the corresponding field number of the first sub-packet in the sending information maintenance table, and then the association between the first sending status information and the field indicated by the field number in the sending information maintenance table can be constructed.
  • the sending end sends 4 sub-packets to the receiving end, which are the sub-packets whose data identifiers are 12, 13, 14, and 15 in sequence.
  • the first sub-packet (that is, the sub-packet corresponding to data identifier 12) in the 4 sub-packets is used as the first sub-packet, that is, the sequence number of the first sub-packet in the 4 sub-packets is 0, and the second The default value is 4, and the sequence number 0 is taken as the remainder of the second preset value 4.
  • the corresponding field number of the first sub-data packet in the sending information maintenance table can be obtained as 0.
  • the first sub-data can be The first sending status information slot(12) of the packet is bound to field 0 of the sending information maintenance table.
  • the second sub-packet (that is, the sub-packet corresponding to the data identifier 13) in the 4 sub-packets is used as the first sub-packet, that is, the sequence number of the first sub-packet in the first preset number of sub-packets is 1, the second preset value is 4, take the remainder of the sequence number 1 from the second preset value 4, at this time, the field number corresponding to the first subpacket in the sending information maintenance table can be obtained as 1, and at this time Bind the first sending status information slot(13) of the first sub-data packet to field 1 of the sending information maintenance table.
  • the third sub-packet (that is, the sub-packet corresponding to the data identifier 14) in the 4 sub-packets is used as the first sub-packet, that is, the sequence number of the first sub-packet in the first preset number of sub-packets is 2, the second preset value is 4, take the remainder of the sequence number 2 to the second preset value 4, at this time, the field number corresponding to the first subpacket in the sending information maintenance table can be obtained as 2, and at this time, Bind the first sending state information slot(14) of the first sub-packet to field 2 of the sending information maintenance table.
  • the 4th sub-packet (that is, the sub-packet corresponding to the data identifier 15) in the 4 sub-packets is used as the first sub-packet, that is, the sequence number of the first sub-packet in the first preset number of sub-packets is 3, the second preset value is 4, take the remainder of the sequence number 3 from the second preset value 4, at this time, the field number corresponding to the first subpacket in the sending information maintenance table can be obtained as 3, and at this time Bind the first sending state information slot(15) of the first sub-packet to field 3 of the sending information maintenance table. In this way, the sending status information of the four sub-packets sent can be bound to the sending information maintenance table. At this time, all the slots on the free slot have been used, and there is no empty slot, as shown in Figure 2b, and Figure 2b is A schematic diagram of the second sending information maintenance table provided by an embodiment of this specification.
  • the field indicated by the field number may already be associated with other To send status information, at this time, the association relationship between the first sent status information and the field indicated by the field number in the sent information maintenance table is constructed.
  • the specific implementation process can be as follows:
  • the first transmission state information and the third transmission state information are jointly constructed in series or in parallel to form an association relationship with the field indicated by the field number
  • the third sending state information is the sending state information corresponding to the subpacket that has been sent to the receiving end but has not received the confirmation information returned by the receiving end.
  • constructing the association relationship between the first sending state information and the third sending state information in series or in parallel with the field indicated by the field number may refer to combining the first sending state information and the third sending state information letter The information is bound together on the field indicated by the field number; or, since the third sending status information is bound to the field indicated by the field number, the first sending status information can continue to be bound to the third sending status information above, that is, the sending status information corresponding to the field number is serially bound in a link manner.
  • Figure 2c is a schematic diagram of the third transmission information maintenance table provided by an embodiment of this specification, assuming that the first transmission status information is slot (16), and the field number corresponding to slot (16) is 0, that is, it needs Slot (16) is associated with field 0 in the sending information maintenance table shown in Figure 2c, slot (12) is associated with this field 0, and slot (16) can continue to be associated with slot (12) at this time, As shown in Figure 2c.
  • the sending end can know the status of each sub-packet based on the sending information maintenance table, so as to know which sub-packet has not been sent successfully.
  • the subpacket that has not received the confirmation information returned by the receiving end for a long time can be resent, that is, construct the first transmission status information and the corresponding field in the transmission information maintenance table After the relationship between, it can also include:
  • the first sub-packet is resent to the receiving end.
  • the preset duration may be a preset time interval for resending the subpacket, such as 5 minutes, 10 minutes, and so on.
  • the sending end does not receive the confirmation information returned by the receiving end for the first sub-packet within the preset time period after sending the first sub-packet to the receiving end, it means that the first sub-packet may be lost , the receiving end has not received it, so the first sub-packet can be resent to the receiving end at this time.
  • the sending end when the sending end sends the first sub-packet to the receiving end, it can record the sending time and start the timer. When the preset time is reached, it can be queried in the sending information maintenance table to see whether each field is associated with the first sub-packet.
  • the sending status information of the sub-packet if it is, it means that the confirmation information returned by the receiving end for the first sub-packet has not been received, and the first sub-packet can be resent to the receiving end at this time; if not, it means that it has been received To the acknowledgment information returned by the receiving end for the first sub-packet.
  • the sending end can know the status of each sub-packet based on the sending information maintenance table, so as to know which sub-packet has not been sent successfully.
  • the sending information maintenance table can continue to send subsequent sub-packets without affecting the subsequent bandwidth of the connection at all, that is, the loss of a certain sub-packet will not affect the sending of subsequent sub-packets, avoiding head-of-line blocking.
  • Step 106 In the case of receiving the acknowledgment information returned by the receiving end, determine the second sub-packet corresponding to the acknowledgment information, and determine the second sending status information corresponding to the second sub-packet, and release the second sending status information from the sending The association relationship between the corresponding fields in the information maintenance table, wherein the second sub-packet is a sub-packet for which the receiving end returns confirmation information among the first preset number of sub-packets.
  • the sending end after the sending end sends the first preset number of sub-packets to the receiving end, it can maintain the sending status of each sub-packet sent based on the sending information maintenance table. In the case of receiving the confirmation information returned by the receiving end , it is possible to determine the second sub-packet for which the received acknowledgment information is directed, and the second sub-packet is sent from the sending end to the receiving end subpackets that are successfully received by the receiving end.
  • the receiving end when the receiving end receives a sub-packet, it can return confirmation information for the sub-packet to the sending end, that is, the confirmation information returned by the receiving end can carry a data identifier to inform the sending end that it has received the sub-packet. which subpacket. Therefore, when the sending end receives the acknowledgment information returned by the receiving end, it can determine the second sub-packet corresponding to the acknowledgment information according to the data identifier carried in the acknowledgment information. Received subpackets.
  • the second sending status information corresponding to the second sub-packet can be determined, and the second sending status information and sending information maintenance table can be released.
  • the second sub-packet corresponding to the confirmation information can be determined, and the second sending status information corresponding to the second sub-packet can be determined, and the second sending status information can be released.
  • the association relationship between the status information and the corresponding fields in the sending information maintenance table In this way, only the sending status of each subpacket that has not received confirmation information needs to be maintained in the sending information maintenance table, and there is no need to pay attention to the sending status of subpackets that have received confirmation information, which reduces the amount of information that needs to be maintained, and can clearly know Which sub-packet is not sent successfully ensures the reliability of data transmission.
  • the determined second sub-packet is a sub-packet successfully received by the receiver and successfully returned to the sender with confirmation information.
  • the sender does not need to continue to pay attention to the sending status of the second sub-packet, so it can Release the association between the second sending status information and the corresponding fields in the sending information maintenance table, and clear the data information filled in the second sending status information to obtain the initial sending status information, and use the initial sending status information to continue recording the sent
  • the data information of other subpackets and the initial sending status information set initially can be recycled to reduce resource consumption.
  • the preset number of initial sending status information whose content is empty is the first preset value, correspondingly recording the sending status of each sub-packet in the first preset number of sub-packets sent to the receiving end, At this time, all initial sending state information is used, and there is no idle initial sending state information.
  • the association relationship between the second sending state information of the second sub-packet corresponding to the confirmation information and the corresponding field in the sending information maintenance table can be released, and the second sending state information recorded in the second sending state information can be cleared.
  • the idle initial sending state information can be obtained at this time, and the number of the second sub-packet is the number of the re-obtained idle initial sending state information, and the corresponding number of sending status information can continue to be sent at this time
  • the sending status information of the sent sub-packets is continuously recorded through the idle initial sending status information.
  • the determined number of the second sub-packets is the number of idle initial sending status information, and also the number of sub-packets that can continue to be sent at this time, and the number cannot exceed the initially set Initially send the number of state information (that is, the initial first preset value), so the determined number of second sub-data packets can be used as the first preset value, and continue to return to the execution of sending the first preset value to the receiving end Number of subpackages to do in steps.
  • the number of the second sub-data packets is 3, that is, 3 empty slots are obtained
  • the first preset value is 3
  • the sending end It is possible to continue to send 3 sub-packets to the receiving end, such as the sub-packets whose data identifiers are 16, 17, and 18.
  • the first sub-packet (i.e. the sub-packet corresponding to data identifier 16) in the 3 sub-packets is used as the first sub-packet, that is, the sequence number of the first sub-packet in the 3 sub-packets is 0, and the second The default value is 4, and the sequence number 0 is taken as the remainder of the second preset value 4.
  • the corresponding field number of the first sub-data packet in the sending information maintenance table can be obtained as 0.
  • the first sub-data can be
  • the first sending state information slot (16) of the packet is bound to field 0 of the sending information maintenance table, and based on the above method, it is determined in turn that slot (17) is bound to field 1 of the sending information maintenance table, and slot (18) is bound to field 0 of the sending information maintenance table. It is set on field 2 of the sending information maintenance table, as shown in FIG. 2e, which is a schematic diagram of a fifth sending information maintenance table provided by an embodiment of this specification.
  • the number of the second sub-data packets is 2, that is, 2 empty slots are obtained, the first preset value is 2, and the sending end can continue to send 2 sub-data packets to the receiving end, such as the data identifier is 19,
  • the subpacket of 20 based on the above method, it can be determined that slot (19) is bound to field 0 of the sending information maintenance table, and slot (20) is bound to field 1 of the sending information maintenance table, as shown in Figure 2g
  • Fig. 2g is a schematic diagram of a seventh sending information maintenance table provided by an embodiment of this specification.
  • An embodiment of this specification provides a data transmission method. After the sending end sends sub-data packets to the receiving end, it can maintain the sending status of each sub-data packet sent based on the sending information maintenance table, and the receiving end does not need to receive each sub-data packet in order. Packet, which sub-packet received by the receiving end can return the confirmation information of which sub-packet to the sending end. There is no need to continue to pay attention to the sending status of the sub-packet corresponding to the sending status information corresponding to the packet and the corresponding field in the sending information maintenance table. In this way, the sending end can know the status of each sub-packet based on the sending information maintenance table, so as to know which sub-packet has not been sent successfully.
  • FIG. 3 shows a flow chart of another data transmission method provided according to an embodiment of the present specification, which is applied to a receiving end, and specifically includes the following steps.
  • Step 302 Receive the third sub-packet, and acquire the target data identifier of the third sub-packet.
  • the third sub-packet is a sub-packet received by the receiving end and sent by the sending end. After receiving the third sub-packet, the receiving end can obtain the target data identifier carried in the third sub-packet. Subsequently, it may be determined based on the target data identifier whether the third sub-packet has been received before, whether the receiving status has been recorded, etc., so as to determine the information recording and reporting method for the third sub-packet.
  • the current maximum pending data identifier and sequential pending data identifier can be set in advance, and whether the third sub-packet has been received before, whether the receiving status has been recorded, etc. can be determined through these two identifiers, wherein , the current maximum data identifier to be received is the next data identifier of the currently received largest data identifier, and the sequential data identifier to be received is the data identifier of the next subpacket to be received in sequence. If no sub-packet is received, both the current maximum data identifier to be received and the sequential data identifier to be received can be initialized to 0.
  • the current maximum data identifier to be received and the sequential data identifier to be received may be updated according to the data identifier of the received subpacket, that is, the third subpacket is received, and the third subpacket is obtained.
  • the data identification of the subpacket it can also include:
  • the second data identifier is incremented by 1 as the sequence to be received data identifier, wherein, the second data identifier is the data identifier of the currently received sub-packet that has not been received before, and the sequence to be received data is identified as the sequential next The data identifier of a subpacket to be received.
  • the current largest data identifier to be received is the data identifier of the next subpacket waiting to be received after the largest data identifier among the currently received subpackets
  • the sequential data identifiers to be received are the subpackets in the order of the subpackets.
  • a sub-packet waiting to be received, so the largest data identifier in each sub-packet currently received can be incremented by 1 as the current maximum data identifier to be received, and the current received sub-packet that has not been received before The maximum data identifier in the data packet is incremented by 1 as the sequential data identifier to be received.
  • FIG. 4 is a schematic diagram of a reception information maintenance table provided by an embodiment of this specification.
  • the data identifiers of the received subpackets are 1, 2, 3, and 4.
  • the data identifier of the received subpacket is 8. At this time, since the subpackets with data identifiers of 5, 6, and 7 have not been received, there is no unreceived subdata currently received.
  • the data identifier of the received subpacket is 10.
  • Step 304 If the target data identifier is greater than the current maximum data identifier to be received, determine the fourth subpacket that has not been received before the third subpacket according to the target data identifier, wherein the current maximum pending data identifier is the current The next DataId to the largest DataId received.
  • the target data identifier is greater than the current maximum data identifier to be received, it means that the currently received third sub-packet is the sub-packet received currently with the largest data identifier.
  • the corresponding receiving status may be recorded, so as to ensure the reliability of data transmission.
  • the unreceived subpacket before the current maximum pending data identifier has already recorded the receiving status information, There is no need to record again, so at this time, the unreceived sub-packet between the current maximum data to be received and the third sub-packet can be used as the fourth sub-packet.
  • the current maximum data ID to be received is 9, and the data ID of the third sub-packet is 10, then the fourth sub-packet is a sub-packet not received between 9-10, that is, the data ID is 9 subpacket.
  • Step 306 Set the data information of the fourth subpacket in the initial receiving status information, obtain the first receiving status information, and construct the association relationship between the first receiving status information and the corresponding fields in the receiving information maintenance table, wherein,
  • the receiving information maintenance table includes a third preset number of fields.
  • the initial receiving status information is a preset receiving status record structure with empty content
  • the first receiving status information is information in which the receiving status of the fourth sub-packet is recorded.
  • the reception information maintenance table can be a preset record table capable of maintaining the reception status of each subpacket, such as the reception information maintenance table can include a third preset A hash table with a number of fields, wherein the third preset value can be the preset number of fields included in the received information maintenance table, and the third preset value can be the same as the second preset value and the first preset value The same or different, for example, the third preset value can be 4, 8, 16 and so on.
  • the first receiving status information recording the receiving status of the fourth subpacket can be obtained, and the first receiving status information and The association relationship between the corresponding fields in the reception information maintenance table is used to maintain the reception status of each sub-packet through the reception information maintenance table.
  • constructing the association relationship between the first receiving status information and the corresponding fields in the receiving information maintenance table may be to bind the first receiving status information with the corresponding fields in the receiving information maintenance table, and then you can view the receiving information The first receiving status information bound to each field in the table is maintained.
  • a plurality of initial receiving state information whose content is empty may also be preset, that is, the fourth subpacket is set in the initial receiving state information.
  • the data information of the data packet, before obtaining the first receiving state information may also include:
  • Each initial reception status information is set as an idle information table.
  • the initial receiving status information is a structure that is preset and can record the information of unreceived subpackets.
  • the initial receiving status information is a slot (slot) that can record information, so the fourth preset can be preset.
  • the numerical value and the first preset numerical value are the same, or may be different, for example, the fourth preset numerical value may be 4, 8, 16 and so on.
  • each initial receiving status information is set as an idle information table
  • an association relationship between each initial receiving status information and the idle information table can be constructed, that is, each initial receiving status information is bound to the idle information table.
  • the fourth preset numerical value of initial receiving status information with empty content can be set in advance, and each initial receiving status information can be set as an idle information table, and the information that should be received in sequence but has not been received can be subsequently
  • the data information of each sub-packet is set in the initial receiving state information, so as to record the state information of each sub-packet not received, and improve the reliability of data transmission.
  • the initial reception state information includes a data identification field and a reception information identification field, and the reception information identification field is used to identify whether the sub-packet sent by the sender has been received.
  • the initial reception state information The data information of the fourth subpacket is set in , and the first receiving status information is obtained.
  • the receiving information identification field of the initial receiving state information is set as not received, and the first receiving state information is obtained.
  • the data identifier of the subpacket can be recorded in the initial receiving status information, and whether the corresponding subpacket is received can also be recorded based on the receiving information identifier field. Specifically, after determining the fourth subpacket that has not been received before the third subpacket, the data identifier of the fourth subpacket can be determined, and the fourth subpacket can be set in the data identifier field in the initial receiving state information and set the receiving information identification field of the initial receiving status information as not received, to obtain the first receiving status information. That is, the first reception status information may indicate that the corresponding sub-packet has not been received.
  • the received information identification field may be set to a first preset value (such as 1), indicating that the corresponding subpacket is received, and the received information identification field may be set to a second preset value (such as 0), indicating that the corresponding subpacket has not been received.
  • the received information identification field can be set to empty, indicating that the corresponding subpacket has been received, and the received information identification field can be set to a preset value (such as 0), indicating that the corresponding subpacket has not been received. son data pack.
  • the received information identification field of the initial receiving state information may also be set as not received in other ways, which is not limited in this embodiment of the present specification.
  • the data identifier of the fourth subpacket can be determined, and the fourth subpacket can be set in the data identifier field in the initial receiving state information.
  • the data identifier of the sub-packet is used to obtain the first receiving state information. In this way, the receiving end can record the status information of each sub-packet that should have been received but not received based on the receiving status information, thereby ensuring the reliability of data transmission.
  • constructing an association relationship between the first receiving state information and corresponding fields in the receiving information maintenance table includes:
  • An association relationship between the first receiving status information and the field indicated by the field number in the receiving information maintenance table is constructed.
  • the received information maintenance table includes a start identifier and an end identifier
  • the start identifier may be the position identifier corresponding to the fourth subpacket in the received information maintenance table in the highest order
  • the end identifier is the following
  • the corresponding position identification of the fourth sub-packet received in the reception information maintenance table that has not been received before the third sub-packet received in a round, that is, the termination identification is the start identification of the next round.
  • the field number corresponding to the data identifier of each fourth subpacket in the received information maintenance table can be determined.
  • the receiving end has received subpackets with data identifiers 1, 2, 3, and 4.
  • the field where the initial identifier is 0 in the received information maintenance table, 1, 2, 3 , 4 sub-packets respectively correspond to fields 0, 1, 2, and 3 in the received information maintenance table, and the start identifier of the next round is still the field where 0 is located, that is, the end identifier is also the field where 0 is located, and the data identifier is A subpacket of 4 does not have a subpacket that was not received before. Afterwards, a subpacket with a data identifier of 8 was received.
  • the start identifier and end identifier in the received information maintenance table are still in the field where 0 is located, and the 5, 6, 7, and 8 subpackets correspond to the received information maintenance
  • the subpackets with the data identifiers of 5, 6, and 7 are the fourth subpackets at this time , based on the above method, the first receiving state information slot(5), slot(6) and slot(7) corresponding to the subpackets whose data identifiers are 5, 6 and 7 can be obtained sequentially, and the slot(5), slot (6) and slot (7) are respectively associated with fields 0, 1, and 2 in the received information maintenance table, as shown in FIG. 4 .
  • the field indicated by the field number may already be associated with other Receiving status information.
  • the association between the first receiving status information and the field indicated by the field number in the receiving information maintenance table is constructed.
  • the specific implementation process can be as follows:
  • the first receiving state information and the third receiving state information are jointly constructed in series or in parallel to form an association relationship with the field indicated by the field number, wherein, the third receiving state information is the receiving state information corresponding to the unreceived subpacket.
  • constructing the association relationship between the first receiving status information and the third receiving status information in series or in parallel with the field indicated by the field number may refer to combining the first receiving status information and the third receiving status information The information is bound together on the field indicated by the field number; or, since the third reception status information is bound to the field indicated by the field number, the first reception status information can be continuously bound to the third reception status information above, that is, bind the receiving status information corresponding to the field number in series in a link manner.
  • the target data identifier carried in the third sub-data packet after obtaining the target data identifier carried in the third sub-data packet, it may be first determined based on the target data identifier whether the third sub-data packet has been received and recorded before. overtake The receiving status, etc., so as to determine the information recording and reporting method for the third sub-packet, that is, determine whether to perform determination and record the receiving status information of the sub-packet that has not been received before based on the target data identifier, that is, receive the third sub-packet
  • the data packet, after obtaining the target data identifier of the third sub-data packet may further include:
  • the target data identifier is smaller than the sequence to-be-received data identifier, it is determined that the third sub-data packet has been received and the sub-data packet has been reported.
  • the receiving end after receiving a sub-packet, can report the sub-packet to the application layer, and the receiving end can return confirmation information to the sending end after receiving the sub-packet.
  • the receiving end of the sub-packet After the process is completed, there is no need to continue to maintain the receiving status of the sub-packet, that is, the subsequent maintenance table based on the received information may not be able to query the relevant information of the sub-packet.
  • the sending end may not receive it, so the sending end may repeatedly send the sub-packet, and if the receiving end receives the same sub-packet again, it may cause Repeated reporting to the application layer leads to data confusion.
  • the sequence of data to be received is set, and the sequence of data to be received is identified as the largest data identifier in the currently received subpacket that has not been received before, that is, the sequence of data to be received is identified as The data identifier of the next subpacket to be received in sequence, that is to say, the subpackets corresponding to the data identifiers before the data identifier to be received have been received and reported to the application layer.
  • the target data identifier of the third sub-data packet it is possible to first determine whether the target data identifier is smaller than the sequence to be received data identifier, and if the target data identifier is smaller than the sequence to be received data identifier, determine the third sub-data The packet has been received and the sub-packet has been reported. At this time, there is no need to report the third sub-packet again. It is only necessary to return confirmation information to the sender, which avoids repeated reporting and ensures the reliability of data transmission.
  • the target data identifier of the received third sub-packet is 3, since 3 is smaller than the sequence to be received data identifier 5, the third sub-packet can be determined at this time If the sub-packet has been received and reported, the third sub-packet is not reported, and only a confirmation message is returned to the sender.
  • the target data identifier after determining whether the target data identifier is smaller than the sequence to be received data identifier, it may also include:
  • the target data identifier is not less than the sequential data identifier to be received, determine whether the target data identifier is greater than the current maximum data identifier to be received;
  • the association between the second receiving state information corresponding to the third sub-packet and the corresponding field in the receiving information maintenance table is released, and the third sub-packet is reported to the application layer.
  • the operation steps of steps 304-306 may be performed to record the receiving status information of the fourth sub-packet not received before the third sub-packet, so as to mark that the fourth sub-packet sent by the sender has not been received.
  • the received third sub-packet is not greater than the current maximum pending data identifier, that is, it is located between the sequential pending data identifier and the current maximum pending data identifier, it means that the receiving status of the third sub-packet has been recorded before information, and the reception status information of the third sub-packet has been associated with the reception information maintenance table, at this time, the connection between the second reception status information corresponding to the third sub-packet and the corresponding field in the reception information maintenance table can be released. , indicating that the third sub-packet has been received, return corresponding confirmation information to the sender, and report the third sub-packet to the application layer.
  • the data information filled in the second receiving state information is cleared, the initial receiving state information is obtained, and the initial receiving state information is set as an idle information table.
  • the third sub-packet is successfully received by the receiving end and successfully returns confirmation information to the sending end
  • the receiving end does not need to continue to pay attention to the receiving status of the third sub-packet, so the association between the second receiving status information and the corresponding field in the receiving information maintenance table can be released, and the second receiving status information can be cleared
  • the initial receiving status information set initially can be recycled to reduce resource consumption.
  • the receiving end receives subpackets with data identifiers 1, 2, 3, and 4, and returns confirmation information for subpackets with data identifiers 1, 2, 3, and 4 to the sending end , and report the subpackets with data identifiers of 1, 2, 3, and 4 to the application layer.
  • recv_next 5
  • recv_max 5
  • the start identifier and end identifier in the received information maintenance table are both indicated by field 0 field.
  • the start identifier and the end identifier in the received information maintenance table are fields indicated by field 0.
  • An embodiment of this specification provides a data transmission method. After receiving the third sub-packet, the receiving end can obtain the target data identifier of the third sub-packet, and determine the subsequent third sub-packet based on the target data identifier. What kind of recording method is performed? When the target data identifier is greater than the current maximum data identifier to be received, the fourth sub-packet that has not been received before the third sub-packet can be determined according to the target data identifier, and maintained based on the received information maintenance table. The reception status of the fourth sub-packet that should be received in order but not actually received, so as to know which sub-packet was not successfully received.
  • this specification also provides an embodiment of a data transmission device.
  • Figure 5 shows the An embodiment of the specification provides a schematic structural diagram of a data transmission device, which is applied to the sending end. As shown in Figure 5, the device includes:
  • the sending module 502 is configured to send a first preset number of sub-packets to the receiving end;
  • the first construction module 504 is configured to set the data information of the first sub-packet in the initial sending state information, obtain the first sending state information, and construct the relationship between the first sending state information and the corresponding field in the sending information maintenance table association relationship, wherein the sending information maintenance table includes a second preset number of fields, and the first subpacket is any one of the first preset number of subpackets;
  • the release module 506 is configured to, in the case of receiving the confirmation information returned by the receiving end, determine the second sub-packet corresponding to the confirmation information, and determine the second transmission status information corresponding to the second sub-packet, and release the second transmission status information.
  • the device also includes a first setting module configured to:
  • a corresponding data identifier is set for a subpacket after the first subpacket in at least two subpackets.
  • the initial sending status information includes a data identification field and a confirmation information identification field, and the confirmation information identification field is used to identify whether the confirmation information returned by the receiving end for the first sub-data packet is received;
  • the first building block 504 is further configured to:
  • the confirmation information identification field of the initial sending status information is set to the confirmation information not received, and the first sending status information is obtained.
  • the device also includes a second setting module configured to:
  • Each initial sending state information is set as an idle information table.
  • the first building block 504 is further configured as:
  • An association relationship between the first sending status information and the field indicated by the field number in the sending information maintenance table is constructed.
  • the first building block 504 is further configured as:
  • the first transmission state information and the third transmission state information are jointly constructed in series or in parallel to form an association relationship with the field indicated by the field number
  • the third sending state information is the sending state information corresponding to the subpacket that has been sent to the receiving end but has not received the confirmation information returned by the receiving end.
  • the device also includes an emptying module configured to:
  • the device also includes a retransmission module configured to:
  • the first sub-packet is resent to the receiving end.
  • An embodiment of this specification provides a data transmission device. After the sending end sends sub-data packets to the receiving end, it can maintain the sending status of each sub-data packet sent based on the sending information maintenance table, and the receiving end does not need to receive each sub-data packet in order. Packet, which sub-packet received by the receiving end can return the confirmation information of which sub-packet to the sending end. There is no need to continue to pay attention to the sending status of the sub-packet corresponding to the sending status information corresponding to the packet and the corresponding field in the sending information maintenance table. In this way, the sending end can know the status of each sub-packet based on the sending information maintenance table, so as to know which sub-packet has not been sent successfully.
  • FIG. 6 shows a schematic structural diagram of another data transmission device provided by an embodiment of this specification, which is applied to a receiving end. As shown in Figure 6, the device includes:
  • the receiving module 602 is configured to receive the third sub-packet, and acquire the target data identifier of the third sub-packet;
  • the first determining module 604 is configured to determine, according to the target data identifier, the fourth sub-packet that has not been received before the third sub-packet when the target data identifier is greater than the current maximum data identifier to be received, wherein the current maximum The data identifier to be received is the next data identifier of the currently received largest data identifier;
  • the second construction module 606 is configured to set the data information of the fourth sub-packet in the initial receiving status information, obtain the first receiving status information, and construct the relationship between the first receiving status information and the corresponding fields in the receiving information maintenance table association relationship, wherein the received information maintenance table includes a third preset number of fields.
  • the device also includes a self-increasing module configured to:
  • the second data identifier is incremented by 1 as the sequence to be received data identifier, wherein the second data identifier is the largest data identifier in the currently received sub-packet that has not been received before, and the sequence to be received data is identified as by The data identifier of the next subpacket to be received.
  • the device also includes a second determination module configured to:
  • the target data identifier is smaller than the sequence to-be-received data identifier, it is determined that the third sub-data packet has been received and the sub-data packet has been reported.
  • the second determining module is further configured to:
  • the target data identifier is not less than the sequential data identifier to be received, determine whether the target data identifier is greater than the current maximum data identifier to be received;
  • the association between the second receiving state information corresponding to the third sub-packet and the corresponding field in the receiving information maintenance table is released, and the third sub-packet is reported to the application layer.
  • the second determining module is further configured to:
  • the data information filled in the second receiving state information is cleared, the initial receiving state information is obtained, and the initial receiving state information is set as an idle information table.
  • the initial reception status information includes a data identification field and a reception information identification field, and the reception information identification field is used to identify whether the sub-packet sent by the sender is received;
  • the second building block 606 is further configured to:
  • the receiving information identification field of the initial receiving state information is set as not received, and the first receiving state information is obtained.
  • the device also includes a third setting module configured to:
  • Each initial reception status information is set as an idle information table.
  • the second building module 606 is further configured as:
  • An association relationship between the first receiving status information and the field indicated by the field number in the receiving information maintenance table is constructed.
  • the second building module 606 is further configured as:
  • the first receiving state information and the third receiving state information are jointly constructed in series or in parallel to form an association relationship with the field indicated by the field number, wherein, the third receiving state information is the receiving state information corresponding to the unreceived subpacket.
  • An embodiment of this specification provides a data transmission device. After receiving the third sub-packet, the receiving end can obtain the target data identifier of the third sub-packet, and determine the subsequent third sub-packet based on the target data identifier. What kind of recording method is performed? When the target data identifier is greater than the current maximum data identifier to be received, the fourth sub-packet that has not been received before the third sub-packet can be determined according to the target data identifier, and maintained based on the received information maintenance table. The reception status of the fourth sub-packet that should be received in order but not actually received, so as to know which sub-packet was not successfully received.
  • Fig. 7 shows a structural block diagram of a computing device provided according to an embodiment of this specification.
  • Components of the computing device 700 include, but are not limited to, memory 710 and processor 720 .
  • the processor 720 is connected to the memory 710 through the bus 730, and the database 750 is used for saving data.
  • Computing device 700 also includes an access device 740 that enables computing device 700 to communicate via one or more networks 760 .
  • networks include Public Switched Telephone Network (PSTN, Public Switched Telephone Network), Local Area Network (LAN, Local Area Network), Wide Area Network (WAN, Wide Area Network), Personal Area Network (PAN, Personal Area Network) or networks such as the Internet Composition of communication networks.
  • PSTN Public Switched Telephone Network
  • LAN Local Area Network
  • WAN Wide Area Network
  • PAN Personal Area Network
  • Internet Composition of communication networks such as the Internet Composition of communication networks.
  • the access device 940 may include one or more of wired or wireless network interfaces of any type (for example, a network interface card (NIC, Network Interface Controller)), such as IEEE802.11 wireless local area network (WLAN, Wireless Local Area Networks) Wireless interface, Worldwide Interoperability for Microwave Access (Wi-MAX, Worldwide Interoperability for Microwave Access) interface, Ethernet interface, Universal Serial Bus (USB, Universal Serial Bus) interface, cellular network interface, Bluetooth interface, near field communication (NFC , Near Field Communication) interface, and so on.
  • NIC Network Interface Card
  • NIC Network Interface Controller
  • computing device 700 can also be connected to each other, for example via a bus.
  • bus can be connected to each other, for example via a bus.
  • FIG. 7 the structural block diagram of the computing device shown in FIG. 7 is only for the purpose of illustration, rather than limiting the scope of this description. Those skilled in the art can add or replace other components as needed.
  • Computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile telephones (e.g., smartphones), ), wearable computing devices (eg, smart watches, smart glasses, etc.), or other types of mobile devices, or stationary computing devices such as desktop computers or PCs.
  • mobile computers or mobile computing devices e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.
  • mobile telephones e.g., smartphones
  • wearable computing devices eg, smart watches, smart glasses, etc.
  • desktop computers or PCs e.g., desktop computers or PCs.
  • Computing device 700 may also be a mobile or stationary server.
  • the processor 720 is configured to execute the following computer-executable instructions.
  • the steps of the above-mentioned data transmission method are realized.
  • An embodiment of the present specification also provides a computer-readable storage medium, which stores computer-executable instructions, and implements the steps of the above data transmission method when the computer-executable instructions are executed by a processor.
  • An embodiment of the present specification also provides a computer program, wherein, when the computer program is executed in a computer, the computer is caused to execute the steps of the above data transmission method.
  • Computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signal telecommunication signal and software distribution medium, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

本说明书实施例提供数据传输方法以及装置,其中数据传输方法包括:向接收端发送第一预设数值个子数据包;在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,并构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系;在接收到接收端返回的确认信息的情况下,确定确认信息对应的第二子数据包,并确定第二子数据包对应的第二发送状态信息,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系。如此,某个子数据包的丢失,并不会影响后续子数据包的发送,避免了线头阻塞,且可以清楚获知哪个子数据包未发送成功,提高了数据传输的可靠性。

Description

数据传输方法以及装置
本申请要求于2022年02月15日提交中国专利局、申请号为202210139287.0、申请名称为“数据传输方法以及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本说明书实施例涉及互联网技术领域,特别涉及一种数据传输方法以及装置。
背景技术
随着计算机技术和互联网技术的快速发展,线上任务越来越普遍,随之而来的是暴增的数据传输需求。由于数据中心网络拓扑大、交换机众多,以及目前数据中心常见流量,都有突发和多打一的流量模式,使得数据中心内因为交换机故障或者网络拥塞导致的丢包在根本上是无法避免的。目前,传统传输层协议都是按序交付,一个连接先发送的数据包的丢失,会影响后续数据包在接收端的上报,导致线头阻塞,这导致单数据包的丢失,可能会影响一个连接一段时间整体的吞吐,影响同连接上的一串请求。因而需要提供一种更可靠的数据传输方法。
发明内容
有鉴于此,本说明书施例提供了一种数据传输方法。本说明书一个或者多个实施例同时涉及一种数据传输装置,一种计算设备,一种计算机可读存储介质以及一种计算机程序,以解决现有技术中存在的技术缺陷。
根据本说明书实施例的第一方面,提供了一种数据传输方法,应用于发送端,包括:
向接收端发送第一预设数值个子数据包;
在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,并构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,发送信息维护表包括第二预设数值个字段,第一子数据包为第一预设数值个子数据包中的任一子数据包;
在接收到接收端返回的确认信息的情况下,确定确认信息对应的第二子数据包,并确定第二子数据包对应的第二发送状态信息,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,第二子数据包为第一预设数值个子数据包中接收端返回确认信息的子数据包。
根据本说明书实施例的第二方面,提供了一种数据传输方法,应用于接收端,包括:
接收第三子数据包,获取第三子数据包的目标数据标识;
在目标数据标识大于当前最大待接收数据标识的情况下,根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,其中,当前最大待接收数据标识为当前接收到的最大数据标识的下一个数据标识;
在初始接收状态信息中设置第四子数据包的数据信息,获得第一接收状态信息,并构建第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,其中,接收信息维护表包括第三预设数值个字段。
根据本说明书实施例的第三方面,提供了一种数据传输装置,应用于发送端,包括:
发送模块,被配置为向接收端发送第一预设数值个子数据包;
第一构建模块,被配置为在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,并构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,发送信息维护表包括第二预设数值个字段,第一子数据包为第一预设数值个子数据包中的任一子数据包;
解除模块,被配置为在接收到接收端返回的确认信息的情况下,确定确认信息对应的第二子数据包,并确定第二子数据包对应的第二发送状态信息,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,第二子数据包为第一预设数值个子数据包中接收端返回确认信息的子数据包。
根据本说明书实施例的第四方面,提供了一种数据传输装置,应用于接收端,包括:
接收模块,被配置为接收第三子数据包,获取第三子数据包的目标数据标识;
第一确定模块,被配置为在目标数据标识大于当前最大待接收数据标识的情况下,根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,其中,当前最大待接收数据标识为当前接收到的最大数据标识的下一个数据标识;
第二构建模块,被配置为在初始接收状态信息中设置第四子数据包的数据信息,获得第一接收状态信息,并构建第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,其中,接收信息维护表包括第三预设数值个字段。
根据本说明书实施例的第五方面,提供了一种计算设备,包括:
存储器和处理器;
存储器用于存储计算机可执行指令,处理器用于执行计算机可执行指令,该计算机可执行指令被处理器执行时实现上述数据传输方法的步骤。
根据本说明书实施例的第六方面,提供了一种计算机可读存储介质,其存储有计算机可执行指令,该指令被处理器执行时实现上述数据传输方法的步骤。
根据本说明书实施例的第七方面,提供了一种计算机程序,其中,当计算机程序在计算机中执行时,令计算机执行上述数据传输方法的步骤。
本说明书一个实施例提供了一种数据传输方法,发送端可以向接收端发送第一预设数值个子数据包,然后在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,并构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,发送信息维护表包括第二预设数值个字段,第一子数据包为第一预设数值个子数据包中的任一子数据包;在接收到接收端返回的确认信息的情况下,确定确认信息对应的第二子数据包,并确定第二子数据包对应的第二发送状态信息,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,第二子数据包为第一预设数值个子数据包中接收端返回确认信息的子数据包。这种情况下,发送端向接收端发送子数据包后,可以基于发送信息维护表维护发送的各个子数据包的发送状态,接收端无需按序接收各个子数据包,接收端接收到哪个子数据包可以向发送端返回哪个子数据包的确认信息,发送端接收到接收端返回的确认信息后,说明该子数据包发送成功,此时可以解除该子数据包对应的发送状态信息与发送信息维护表中的对应字段之间的关联关系,无需继续关注该子数据包的发送状态。如此,发送端基于发送信息维护表可以获知当前各个子数据包的状态,从而获知哪个子数据包未发送成功,当出现少量丢包时,不仅丢包点后面的子数据包可以顺利发送给接收端,而且还可以继续发送后续子数据包,完全不影响该连接的后续带宽,也即某个子数据包的丢失,并不会影响后续子数据包的发送,避免了线头阻塞,且可以清楚获知哪个子数据包未发送成功,提高了数据传输的可靠性。
本说明书一个实施例提供了一种数据传输方法,接收端可以接收第三子数据包,获取第三子数据包的目标数据标识,在目标数据标识大于当前最大待接收数据标识的情况下, 根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,其中,当前最大待接收数据标识为当前接收到的最大数据标识的下一个数据标识;在初始接收状态信息中设置第四子数据包的数据信息,获得第一接收状态信息,并构建第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,其中,接收信息维护表包括第三预设数值个字段。这种情况下,接收端接收到第三子数据包后,可以获取第三子数据包的目标数据标识,基于该目标数据标识,确定后续对第三子数据包进行何种记录方式,在目标数据标识大于当前最大待接收数据标识的情况下,可以根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,基于接收信息维护表维护各个按序应该接收到、但实际未接收到的第四子数据包的接收状态,从而获知哪个子数据包未成功接收,当出现少量丢包时,不仅丢包点后面的子数据包可以顺利接收并上报给应用层,而且还可以继续接收后续子数据包,完全不影响该连接的后续带宽,也即某个子数据包的丢失,并不会影响后续子数据包的接收和上报,避免了线头阻塞,且可以清楚获知哪个子数据包未成功接收,提高了数据传输的可靠性。
附图说明
图1是本说明书一个实施例提供的一种数据传输方法的流程图;
图2a是本说明书一个实施例提供的第一种发送信息维护表的示意图;
图2b是本说明书一个实施例提供的第二种发送信息维护表的示意图;
图2c是本说明书一个实施例提供的第三种发送信息维护表的示意图;
图2d是本说明书一个实施例提供的第四种发送信息维护表的示意图;
图2e是本说明书一个实施例提供的第五种发送信息维护表的示意图;
图2f是本说明书一个实施例提供的第六种发送信息维护表的示意图;
图2g是本说明书一个实施例提供的第七种发送信息维护表的示意图;
图3是本说明书一个实施例提供的另一种数据传输方法的流程图;
图4是本说明书一个实施例提供的一种接收信息维护表的示意图;
图5是本说明书一个实施例提供的一种数据传输装置的结构示意图;
图6是本说明书一个实施例提供的另一种数据传输装置的结构示意图;
图7是本说明书一个实施例提供的一种计算设备的结构框图。
具体实施方式
在下面的描述中阐述了很多具体细节以便于充分理解本说明书。但是本说明书能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本说明书内涵的情况下做类似推广,因此本说明书不受下面公开的具体实施的限制。
在本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本说明书一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
首先,对本说明书一个或多个实施例涉及的名词术语进行解释。
有序上报:通信的接收端,接收到的数据,按照发送时的顺序,上交给上层。
乱序上报:通信的接收端,接受到的数据,不需要按照发送时的顺序,上交给上层
线头阻塞:通信两端进行通信时,某些消息受到前面消息没有送达或者丢失等各种影响,导致也没法交付给上层,叫做线头阻塞,英文为HOL(head-of-line blocking)。
可靠传输:保证消息从一端可以完整、不丢失、不出错、不重复的交给对端的机制,典型方案包括TCP、QUIC。
TCP:Transmission Control Protocol,传输控制协议,TCP是一种面向连接(连接导向)的、可靠的、基于字节流的运输层(Transport layer)通信协议。
UDP:是User Datagram Protocol的简称,中文名是用户数据包协议,是一种无连接的传输层协议,提供面向事务的简单不可靠信息传送服务,UDP协议与TCP协议一样用于处理数据包,UDP为应用程序提供了一种无需建立连接就可以发送封装的IP数据包的方法。Internet的传输层有两个主要协议,互为补充,无连接的是UDP,它除了给应用程序发送数据包功能并允许它们在所需的层次上架构自己的协议之外,几乎没有做什么特别的事情;面向连接的是TCP,该协议几乎做了所有的事情。
ACK(Acknowledgement):即是确认字符,在数据通信中,接收端发给发送端的一种传输类控制字符,表示发来的数据已确认接收无误。在TCP/IP协议中,如果接收方成功的接收到数据,那么会回复一个ACK数据,通常ACK信号有自己固定的格式,长度大小,由接收端回复给发送端。
在本说明书中,提供了一种数据传输方法,本说明书同时涉及一种数据传输装置,一种计算设备,以及一种计算机可读存储介质,在下面的实施例中逐一进行详细说明。
参见图1,图1示出了根据本说明书一个实施例提供的一种数据传输方法的流程图,应用于发送端,具体包括以下步骤。
步骤102:向接收端发送第一预设数值个子数据包。
需要说明的是,第一预设数值可以是指预先设置的、最大发送窗口数,也即每次最多发送的子数据包的个数,如第一预设数值可以为4、8、16等。另外,向接收端发送的子数据包可以为UDP数据包,从而支持乱序上报。
本实施例一个可选的实施方式中,可以对待传输的数据包进行拆分,获得多个子数据包,后续将各个子数据包发送给接收端,也即向接收端发送第一预设数值个子数据包之前,还可以包括:
将待传输数据包拆分为至少两个子数据包;
为至少两个子数据包中首个子数据包设置起始数据标识;
根据起始数据标识,为至少两个子数据包中首个子数据包之后的子数据包设置对应的数据标识。
具体的,起始数据标识为至少两个子数据包中首个子数据包的数据标识,子数据包的数据标识可以是指用于标识子数据包的顺序的数字、字母等标识,如子数据包的数据标识可以为子数据包的序列号。
需要说明的是,待传输数据包的大小受到IP层MTU(可传输数据包的最大尺寸)的限制,当待传输数据包较大时,为了防止IP层拆包,可以将该待传输数据包拆分为至少两个子数据包,后续将拆分得到的至少两个子数据包依次发送给接收端。
实际应用中,将待传输数据包拆分为至少两个子数据包后,可以为至少两个子数据包中首个子数据包设置起始数据标识,然后基于设置的起始数据标识,为至少两个子数据包中首个子数据包之后的子数据包设置对应的数据标识。具体的,可以随机设置首个子数据 包设置起始数据标识,然后将至少两个子数据包中首个子数据包之后的子数据包的数据标识设置为依次递增。
示例的,将待传输数据包拆分为7个子数据包,首个子数据包的起始数据标识为12,首个子数据包之后的6个子数据包的数据标识依次为13、14、15、16、17、18。
本说明书实施例中,为了避免待传输数据包过大,还可以将待传输数据包拆分为至少两个子数据包,并为各个子数据包设置对应的数据标识,后续可以将拆分得到的各个子数据包发送给接收端,并且在向接收端发送子数据包时,还可以携带对应的数据标识,以告知接收端接收到的是哪个子数据包。
步骤104:在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,并构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,发送信息维护表包括第二预设数值个字段,第一子数据包为第一预设数值个子数据包中的任一子数据包。
具体的,初始发送状态信息是一种预先设置的、内容为空的发送状态记录结构;第一子数据包为第一预设数值个子数据包中的任一子数据包,即第一预设数值个子数据包中的每个子数据包均可以作为第一子数据包,并记录相关的发送状态信息;第一发送状态信息为记录有第一子数据包的发送状态的信息。发送信息维护表可以是预先设置的、能够维护各个子数据包的发送状态的记录表,如发送信息维护表可以为包括第二预设数值个字段的哈希表,其中,第二预设数值可以为预先设置的、发送信息维护表包括的字段的个数,第二预设数值可以和第一预设数值相同,也可以不同,如第二预设数值可以为4、8、16等。
需要说明的是,在初始发送状态信息中记录第一子数据包的数据信息后,即可获得记录该第一子数据包的发送状态的第一发送状态信息,并构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,以通过发送信息维护表维护各个子数据包的发送状态。具体的,构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,可以是将第一发送状态信息与发送信息维护表中的对应字段进行绑定,后续可以查看发送信息维护表中各个字段上绑定的第一发送状态信息。
本实施例一个可选的实施方式中,在记录第一子数据包的数据信息之前,还可以预先设置多个内容为空的初始发送状态信息,也即在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息之前,还可以包括:
预先设置第一预设数值个内容为空的初始发送状态信息;
将各个初始发送状态信息设置为空闲信息表。
需要说明的是,初始发送状态信息是预先设置的、可以记录发送的子数据包的发送状态的结构,如初始发送状态信息为可以记录信息的slot(槽),因而发送端向接收端发送了几个子数据包,就需要记录几个子数据包的发送状态,也即预先设置的内容为空的初始发送状态信息的个数应该与最大发送窗口(第一预设数值)相同,也即预先设置第一预设数值个内容为空的初始发送状态信息,在没有记录子数据包的数据信息时,可以将各个初始发送状态信息设置为空闲信息表。
实际应用中,将各个初始发送状态信息设置为空闲信息表时,可以构建各个初始发送状态信息与空闲信息表之间的关联关系,也即将各个初始发送状态信息绑定在空闲信息表上。
示例的,图2a是本说明书一个实施例提供的第一种发送信息维护表的示意图,如图2a所示,发送信息维护表为包括4个字段的哈希表,4个字段的字段编号分别为0、1、2、3,初始状态下,发送信息维护表的4个字段均没有绑定子数据包对应的slot。预先创建的4个内容为空的slot绑定在free slot上。
本说明书实施例中可以预先设置第一预设数值个内容为空的初始发送状态信息,并将各个初始发送状态信息设置为空闲信息表,后续发送端向接收端发送子数据包后,可以将发送的各个子数据包的数据信息设置在初始发送状态信息中,以记录发送的各个子数据包的发送状态,提高数据传输的可靠性。
本实施例一个可选的实施方式中,初始发送状态信息可以包括数据标识字段和确认信息标识字段,确认信息标识字段用于标识是否接收到接收端针对第一子数据包返回的确认信息,此时在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,具体实现过程可以如下:
确定第一子数据包的数据标识,并在初始发送状态信息中的数据标识字段设置第一子数据包的数据标识;
将初始发送状态信息的确认信息标识字段设置为未接收到确认信息,获得第一发送状态信息。
需要说明的是,发送端向接收端发送子数据包后,如果接收端接收到了该子数据包,就会针对该子数据包返回对应的确认信息,以告知发送端自身接收到了其发送的子数据包。其中,接收端向发送端返回的确认信息可以为ACK。
实际应用中,可以在初始发送状态信息中记录子数据包的数据标识,并且还可以基于确认信息标识字段记录是否接收到接收端针对第一子数据包返回的确认信息。具体的,发送端向接收端发送子数据包后,即可确定第一子数据包的数据标识,并在初始发送状态信息中的数据标识字段设置第一子数据包的数据标识,并且将初始发送状态信息的确认信息标识字段设置为未接收到确认信息,获得第一发送状态信息。也即,第一发送状态信息可以标识第一子数据包未接收到接收端返回的确认信息。
一种可选的实现方式中,可以将确认信息标识字段设置为第一预设值(如1),表示接收到确认信息,将确认信息标识字段设置为第二预设值(如0),表示未接收到确认信息。另一种可选的实现方式中,可以将确认信息标识字段设置为空,表示接收到确认信息,可以将确认信息标识字段设置为预设值(如0),表示未接收到确认信息。当然,还可以通过其他方式将初始发送状态信息的确认信息标识字段设置为未接收到确认信息,本说明书实施例对此不进行限制。
需要说明的是,发送端向接收端发送第一预设数值个子数据包后,每个子数据包均可以作为第一子数据包,之后确定第一子数据包的数据标识,并在初始发送状态信息中的数据标识字段设置第一子数据包的数据标识,并将初始发送状态信息的确认信息标识字段设置为未接收到确认信息,获得第一发送状态信息。如此,发送端向接收端发送的各个子数据包均可生成对应的第一发送状态信息,以便记录发送的各个子数据包的发送状态,保证数据传输的可靠性。
本实施例一个可选的实施方式中,可以根据第一子数据包在发送的第一预设数值个子数据包中的顺序,确定在发送信息维护表中的对应字段,以构建关联关系,也即构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,具体实现过程可以如下:
确定第一子数据包在第一预设数值个子数据包中的顺序编号;
根据顺序编号和第二预设数值,确定第一子数据包在发送信息维护表中对应的字段编号;
构建第一发送状态信息与发送信息维护表中字段编号所指示的字段之间的关联关系。
需要说明的是,第一预设数值个子数据包中不同顺序的子数据包可以绑定在发送信息维护表中的不同字段,因而可以先确定第一子数据包在第一预设数值个子数据包中的顺序编号,然后基于该顺序编号和第二预设数值,确定第一子数据包在发送信息维护表中对应 的字段编号,构建第一发送状态信息与发送信息维护表中字段编号所指示的字段之间的关联关系,以将第一发送状态信息与发送信息维护表中字段编号所指示的字段进行绑定。
实际应用中,第二预设数值是发送信息维护表包括的字段数,还可以预先设置哪个顺序编号的子数据包对应的发送状态信息应该绑定在发送信息维护表的哪个字段上,即预先设置字段编号的确定规则。
一种可能的实现方式中,各个子数据包的发送状态信息可以按序依次绑定在发送信息维护表中的字段上,此时可以将顺序编号对第二预设数值取余,获得的余数即为第一子数据包在发送信息维护表中对应的字段编号,后续构建第一发送状态信息与发送信息维护表中字段编号所指示的字段之间的关联关系即可。
示例的,发送端向接收端发送了4个子数据包,依次为数据标识为12、13、14、15的子数据包。将4个子数据包中的首个子数据包(即数据标识12对应的子数据包)作为第一子数据包,也即第一子数据包在4个子数据包中的顺序编号为0,第二预设数值为4,将顺序编号0对第二预设数值4取余,此时可以获得第一子数据包在发送信息维护表中对应的字段编号为0,此时可以将第一子数据包的第一发送状态信息slot(12)绑定在发送信息维护表的字段0上。将4个子数据包中的第2个子数据包(即数据标识13对应的子数据包)作为第一子数据包,也即第一子数据包在第一预设数值个子数据包中的顺序编号为1,第二预设数值为4,将顺序编号1对第二预设数值4取余,此时可以获得第一子数据包在发送信息维护表中对应的字段编号为1,此时可以将第一子数据包的第一发送状态信息slot(13)绑定在发送信息维护表的字段1上。将4个子数据包中的第3个子数据包(即数据标识14对应的子数据包)作为第一子数据包,也即第一子数据包在第一预设数值个子数据包中的顺序编号为2,第二预设数值为4,将顺序编号2对第二预设数值4取余,此时可以获得第一子数据包在发送信息维护表中对应的字段编号为2,此时可以将第一子数据包的第一发送状态信息slot(14)绑定在发送信息维护表的字段2上。将4个子数据包中的第4个子数据包(即数据标识15对应的子数据包)作为第一子数据包,也即第一子数据包在第一预设数值个子数据包中的顺序编号为3,第二预设数值为4,将顺序编号3对第二预设数值4取余,此时可以获得第一子数据包在发送信息维护表中对应的字段编号为3,此时可以将第一子数据包的第一发送状态信息slot(15)绑定在发送信息维护表的字段3上。由此可以将发送的4个子数据包的发送状态信息绑定在发送信息维护表上,此时free slot上的各个slot均已使用,不存在空的slot,如图2b所示,图2b是本说明书一个实施例提供的第二种发送信息维护表的示意图。
本实施例一个可选的实施方式中,在构建第一发送状态信息与发送信息维护表中字段编号所指示的字段之间的关联关系时,该字段编号所指示的字段可能已经关联有其他的发送状态信息,此时构建第一发送状态信息与发送信息维护表中字段编号所指示的字段之间的关联关系,具体实现过程可以如下:
在字段编号所指示的字段关联有第三发送状态信息的情况下,将第一发送状态信息和第三发送状态信息以串联或并列形式共同构建与字段编号所指示的字段之间的关联关系,其中,第三发送状态信息为已向接收端发送、但未接收到接收端返回的确认信息的子数据包对应的发送状态信息。
需要说明的是,如果发送信息维护表中某个字段之前关联过某个子数据包的发送状态信息,但是未接收到接收端返回的该子数据包的确认信息,那么该子数据包的发送状态信息会一直关联在该字段上,但是并不影响后续子数据包的发送,也即该字段上还可以继续关联其他子数据包的发送状态信息。
实际应用中,将第一发送状态信息和第三发送状态信息以串联或并列形式共同构建与字段编号所指示的字段之间的关联关系,可以是指将第一发送状态信息和第三发送状态信 息共同绑定在该字段编号所指示的字段上;或者,由于第三发送状态信息绑定在该字段编号所指示的字段,因而可以将第一发送状态信息继续绑定在第三发送状态信息上,即以链路方式串联绑定该字段编号对应的各个发送状态信息。
沿用上例,图2c是本说明书一个实施例提供的第三种发送信息维护表的示意图,假设第一发送状态信息为slot(16),slot(16)对应的字段编号为0,也即需要将slot(16)关联在图2c所示的发送信息维护表中的字段0上,该字段0上关联有slot(12),此时可以继续将slot(16)关联在slot(12)上,如图2c所示。
本说明书实施例中,发送端基于发送信息维护表可以获知当前各个子数据包的状态,从而获知哪个子数据包未发送成功,当出现少量丢包时,不仅丢包点后面的子数据包可以顺利发送给接收端,而且还可以继续发送后续子数据包,完全不影响该连接的后续带宽,也即某个子数据包的丢失,并不会影响后续子数据包的发送,避免了线头阻塞,且可以清楚获知哪个子数据包未发送成功,提高了数据传输的可靠性。
本实施例一个可选的实施方式中,对于长时间未接收到接收端返回的确认信息的子数据包可以重新进行发送,也即构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系之后,还可以包括:
确定预设时长内是否接收到接收端针对第一子数据包返回的确认信息;
若未接收到,则重新向接收端发送第一子数据包。
具体的,预设时长可以是预先设置的、重新发送子数据包的时间间隔,如5分钟、10分钟等。
需要说明的是,若发送端向接收端发送第一子数据包后的预设时长内未接收到接收端针对第一子数据包返回的确认信息,则说明第一子数据包可能丢包了,接收端并未收到,因而此时可以重新向接收端发送第一子数据包。
实际应用中,发送端向接收端发送第一子数据包时,可以记录发送时间,开启定时器,在达到预设时长时,可以在发送信息维护表中查询,看各个字段是否关联有第一子数据包的发送状态信息,若是,则说明还未接收到接收端针对第一子数据包返回的确认信息,此时可以重新向接收端发送第一子数据包;若否,则说明已经接收到接收端针对第一子数据包返回的确认信息。
当然,还可以每隔预设时长查找发送信息维护表中的各个字段下是否关联有发送状态信息,若是,则可以确定关联的各个发送状态信息对应的子数据包,然后重新向接收端发送给该子数据包。
本说明书实施例中,发送端基于发送信息维护表可以获知当前各个子数据包的状态,从而获知哪个子数据包未发送成功,当出现少量丢包时,不仅丢包点后面的子数据包可以顺利发送给接收端,而且还可以继续发送后续子数据包,完全不影响该连接的后续带宽,也即某个子数据包的丢失,并不会影响后续子数据包的发送,避免了线头阻塞。并且,可以清楚获知哪个子数据包未发送成功,对于长时间未发送成功的子数据包可以及时重新发送,避免丢包,提高了数据传输的可靠性。
步骤106:在接收到接收端返回的确认信息的情况下,确定确认信息对应的第二子数据包,并确定第二子数据包对应的第二发送状态信息,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,第二子数据包为第一预设数值个子数据包中接收端返回确认信息的子数据包。
需要说明的是,发送端向接收端发送第一预设数值个子数据包后,可以基于发送信息维护表维护发送的各个子数据包的发送状态,在接收到接收端返回的确认信息的情况下,可以确定接收到的确认信息针对的第二子数据包,该第二子数据包为发送端向接收端发送 的、且被接收端成功接收的子数据包。
实际应用中,接收端在接收到某个子数据包时,可以向发送端返回针对该子数据包的确认信息,也即接收端返回的确认信息中可以携带数据标识,以告知发送端自身接收到了哪个子数据包。因而,发送端在接收到接收端返回的确认信息的情况下,可以根据确认信息中携带的数据标识,确定该确认信息对应的第二子数据包,该第二子数据包即为接收端成功接收的子数据包。由于第二子数据包已经被接收端成功接收,其发送状态无需继续维护,因而此时可以确定第二子数据包对应的第二发送状态信息,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系。
本说明书实施例中,在接收到接收端返回的确认信息的情况下,可以确定确认信息对应的第二子数据包,并确定第二子数据包对应的第二发送状态信息,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系。如此,发送信息维护表中只需维护未接收到确认信息的各个子数据包的发送状态,无需关注已经接收到确认信息的子数据包的发送状态,减少了需要维护的信息量,可以清楚获知哪个子数据包未发送成功,保证了数据传输的可靠性。
本实施例一个可选的实施方式中,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系之后,还可以包括:
清空第二发送状态信息中填写的数据信息,获得初始发送状态信息,并将初始发送状态信息设置为空闲信息表;
将确定出的第二子数据包的个数作为第一预设数值,继续返回执行向接收端发送第一预设数值个子数据包的操作步骤,其中,第二子数据包的个数小于等于初始的第一预设数值。
需要说明的是,确定出的第二子数据包即为接收端成功接收、并向发送端成功返回确认信息的子数据包,该第二子数据包的发送状态发送端无需继续关注,因而可以解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系,并清空第二发送状态信息中填写的数据信息,获得初始发送状态信息,使用该初始发送状态信息继续记录发送的其他子数据包的数据信息,初始设置的初始发送状态信息可以循环利用,降低资源消耗。
实际应用中,预先设置的内容为空的初始发送状态信息的个数为第一预设数值个,对应记录向接收端发送的第一预设数值个子数据包中每个子数据包的发送状态,此时全部初始发送状态信息均被使用,不存在空闲的初始发送状态信息。在接收到确认信息后,可以解除确认信息对应的第二子数据包的第二发送状态信息与发送信息维护表中的对应字段之间的关联关系,并清空第二发送状态信息中记录的第二子数据包的数据信息,此时可以获得空闲的初始发送状态信息,且第二子数据包的个数即为重新获得的空闲的初始发送状态信息的个数,此时可以继续发送相应个数个子数据包,通过空闲的初始发送状态信息继续记录发送的子数据包的发送状态信息。也即是,确定出的第二子数据包的个数即为空闲的初始发送状态信息的个数,也为此时可以继续发送的子数据包的个数,该个数不能超过初始设置的初始发送状态信息的个数(即初始的第一预设数值),因而可以将确定出的第二子数据包的个数作为第一预设数值,继续返回执行向接收端发送第一预设数值个子数据包的操作步骤。
示例的,如图2b所示,假设接收到了3个确认信息,分别对应数据标识为13、14、15的子数据包,此时可以解除slot(13)、slot(14)和slot(13)与发送信息维护表中的对应字段之间的关联关系,并清空slot(13)、slot(14)和slot(13)中记录的数据信息,获得3个空的slot,并将该3个空的slot绑定在free slot上,如图2d所示,图2d是本说明书一个实施例提供的第四种发送信息维护表的示意图。
此时第二子数据包的个数为3个,即获得了3个空的slot,第一预设数值为3,发送端 可以继续向接收端发送3个子数据包,如数据标识为16、17、18的子数据包。将3个子数据包中的首个子数据包(即数据标识16对应的子数据包)作为第一子数据包,也即第一子数据包在3个子数据包中的顺序编号为0,第二预设数值为4,将顺序编号0对第二预设数值4取余,此时可以获得第一子数据包在发送信息维护表中对应的字段编号为0,此时可以将第一子数据包的第一发送状态信息slot(16)绑定在发送信息维护表的字段0上,基于上述方法,依次确定slot(17)绑定在发送信息维护表的字段1上、slot(18)绑定在发送信息维护表的字段2上,如图2e所示,图2e是本说明书一个实施例提供的第五种发送信息维护表的示意图。
假设又接收到了2个确认信息,分别对应数据标识为12、16的子数据包,此时可以解除slot(12)和slot(16)与发送信息维护表中的对应字段之间的关联关系,并清空slot(12)和slot(16)中记录的数据信息,获得2个空的slot,并将该2个空的slot绑定在free slot上,如图2f所示,图2f是本说明书一个实施例提供的第六种发送信息维护表的示意图。此时第二子数据包的个数为2个,即获得了2个空的slot,第一预设数值为2,发送端可以继续向接收端发送2个子数据包,如数据标识为19、20的子数据包,基于上述方法,可以确定slot(19)绑定在发送信息维护表的字段0上、slot(20)绑定在发送信息维护表的字段1上,如图2g所示,图2g是本说明书一个实施例提供的第七种发送信息维护表的示意图。
本说明书一个实施例提供了一种数据传输方法,发送端向接收端发送子数据包后,可以基于发送信息维护表维护发送的各个子数据包的发送状态,接收端无需按序接收各个子数据包,接收端接收到哪个子数据包可以向发送端返回哪个子数据包的确认信息,发送端接收到接收端返回的确认信息后,说明该子数据包发送成功,此时可以解除该子数据包对应的发送状态信息与发送信息维护表中的对应字段之间的关联关系,无需继续关注该子数据包的发送状态。如此,发送端基于发送信息维护表可以获知当前各个子数据包的状态,从而获知哪个子数据包未发送成功,当出现少量丢包时,不仅丢包点后面的子数据包可以顺利发送给接收端,而且还可以继续发送后续子数据包,完全不影响该连接的后续带宽,也即某个子数据包的丢失,并不会影响后续子数据包的发送,避免了线头阻塞,且可以清楚获知哪个子数据包未发送成功,提高了数据传输的可靠性。
参见图3,图3示出了根据本说明书一个实施例提供的另一种数据传输方法的流程图,应用于接收端,具体包括以下步骤。
步骤302:接收第三子数据包,获取第三子数据包的目标数据标识。
需要说明的是,第三子数据包是接收端接收到的、发送端发送的子数据包,接收端接收到第三子数据包后,可以获取第三子数据包中携带的目标数据标识,后续可以基于该目标数据标识确定该第三子数据包之前是否已经接收过、是否已经记录过接收状态等,从而确定针对第三子数据包的信息记录和上报方式。
本说明书实施例中,可以预先设置当前最大待接收数据标识和顺序待接收数据标识,通过该两个标识可以确定出第三子数据包之前是否已经接收过、是否已经记录过接收状态等,其中,当前最大待接收数据标识为当前接收到的最大数据标识的下一个数据标识,顺序待接收数据标识为按序下一个待接收的子数据包的数据标识。在未接收到任何子数据包的情况下,可以将当前最大待接收数据标识和顺序待接收数据标识均初始化为0。
本实施例一个可选的实施方式中,可以根据已经接收到的子数据包的数据标识,更新当前最大待接收数据标识和顺序待接收数据标识,也即接收第三子数据包,获取第三子数据包的数据标识之后,还可以包括:
将第一数据标识自增1作为当前最大待接收数据标识,其中,第一数据标识为当前接收到的各个子数据包中最大的数据标识;
将第二数据标识自增1作为顺序待接收数据标识,其中,第二数据标识为当前接收到的、之前不存在未接收到的子数据包的数据标识,顺序待接收数据标识为按序下一个待接收的子数据包的数据标识。
需要说明的是,当前最大待接收数据标识为当前接收到的各个子数据包中最大的数据标识下一个等待接收的子数据包的数据标识,顺序待接收数据标识为按照子数据包的顺序下一个等待接收的子数据包,因而可以将当前接收到的各个子数据包中最大的数据标识自增1作为当前最大待接收数据标识,并将当前接收到的、之前不存在未接收到的子数据包中的最大数据标识自增1作为顺序待接收数据标识。
示例的,图4是本说明书一个实施例提供的一种接收信息维护表的示意图,如图4所示,初始状态下,接收端未接收到任何子数据包,顺序待接收数据标识为recv_next=0,当前最大待接收数据标识为recv_max=0。假设接收到的子数据包的数据标识为1、2、3、4,此时当前接收到的、之前不存在未接收到的子数据包中的最大数据标识为4,因而顺序待接收数据标识为recv_next=5;当前接收到的各个子数据包中最大的数据标识也为4,因而当前最大待接收数据标识也为recv_max=5。之后,又接收到的子数据包的数据标识为8,此时由于并未接收到数据标识为5、6、7的子数据包,因而当前接收到的、之前不存在未接收到的子数据包中的最大数据标识依旧为4,也即顺序待接收数据标识依旧为recv_next=5;当前接收到的各个子数据包中最大的数据标识为8,因而此时当前最大待接收数据标识为recv_max=9。之后,又接收到的子数据包的数据标识为6,此时由于并未接收到数据标识为5的子数据包,因而当前接收到的、之前不存在未接收到的子数据包中的最大数据标识依旧为4,此时顺序待接收数据标识依旧为recv_next=5;当前接收到的各个子数据包中最大的数据标识依旧为8,因而此时当前最大待接收数据标识依旧为recv_max=9。之后,又接收到的子数据包的数据标识为10,此时由于并未接收到数据标识为5、7、9的子数据包,因而当前接收到的、之前不存在未接收到的子数据包中的最大数据标识依旧为4,此时顺序待接收数据标识依旧为recv_next=5;当前接收到的各个子数据包中最大的数据标识为10,因而此时当前最大待接收数据标识为recv_max=11。
步骤304:在目标数据标识大于当前最大待接收数据标识的情况下,根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,其中,当前最大待接收数据标识为当前接收到的最大数据标识的下一个数据标识。
需要说明的是,目标数据标识大于当前最大待接收数据标识的情况下,说明当前接收到的第三子数据包为目前接收到的、数据标识最大的子数据包,此时可以根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,对于未接收到的第四子数据包,可以记录对应的接收状态,以保证数据传输的可靠性。
实际应用中,根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包时,当前最大待接收数据标识之前的未接收到的子数据包,已经记录了接收状态信息,无需再次记录,因而此时可以将当前最大待接收数据标识至第三子数据包之间未接收到的子数据包作为第四子数据包。示例的,当前最大待接收数据标识为9,第三子数据包的数据标识为10,那么此时第四子数据包为9-10之间未接收到的子数据包,即数据标识为9的子数据包。
步骤306:在初始接收状态信息中设置第四子数据包的数据信息,获得第一接收状态信息,并构建第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,其中,接收信息维护表包括第三预设数值个字段。
具体的,初始接收状态信息是一种预先设置的、内容为空的接收状态记录结构;第一接收状态信息为记录有第四子数据包的接收状态的信息。接收信息维护表可以是预先设置的、能够维护各个子数据包的接收状态的记录表,如接收信息维护表可以为包括第三预设 数值个字段的哈希表,其中,第三预设数值可以为预先设置的、接收信息维护表包括的字段的个数,第三预设数值可以与第二预设数值、第一预设数值相同,也可以各不相同,如第三预设数值可以为4、8、16等。
需要说明的是,在初始接收状态信息中记录第四子数据包的数据信息后,即可获得记录该第四子数据包的接收状态的第一接收状态信息,并构建第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,以通过接收信息维护表维护各个子数据包的接收状态。具体的,构建第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,可以是将第一接收状态信息与接收信息维护表中的对应字段进行绑定,后续可以查看接收信息维护表中各个字段上绑定的第一接收状态信息。
本实施例一个可选的实施方式中,在记录第四子数据包的数据信息之前,还可以预先设置多个内容为空的初始接收状态信息,也即在初始接收状态信息中设置第四子数据包的数据信息,获得第一接收状态信息之前,还可以包括:
预先设置第四预设数值个内容为空的初始接收状态信息;
将各个初始接收状态信息设置为空闲信息表。
需要说明的是,初始接收状态信息是预先设置的、可以记录未接收到的子数据包的信息的结构,如初始接收状态信息为可以记录信息的slot(槽),因而可以预先设置第四预设数值个内容为空的初始接收状态信息,其中,第四预设数值可以为预先设置的、初始接收状态信息的个数,第四预设数值可以与第三预设数值、第二预设数值、第一预设数值相同,也可以各不相同,如第四预设数值可以为4、8、16等。
实际应用中,将各个初始接收状态信息设置为空闲信息表时,可以构建各个初始接收状态信息与空闲信息表之间的关联关系,也即将各个初始接收状态信息绑定在空闲信息表上。
本说明书实施例中可以预先设置第四预设数值个内容为空的初始接收状态信息,并将各个初始接收状态信息设置为空闲信息表,后续可以将按序应该接收到、但未接收到的各个子数据包的数据信息设置在初始接收状态信息中,以记录未接收到的各个子数据包的状态信息,提高数据传输的可靠性。
本实施例一个可选的实施方式中,初始接收状态信息包括数据标识字段和接收信息标识字段,接收信息标识字段用于标识是否接收到发送端发送的子数据包,此时在初始接收状态信息中设置第四子数据包的数据信息,获得第一接收状态信息,具体实现过程可以如下:
确定第四子数据包的数据标识,并在初始接收状态信息中的数据标识字段中设置第四子数据包的数据标识;
将初始接收状态信息的接收信息标识字段设置为未接收到,获得第一接收状态信息。
需要说明的是,可以在初始接收状态信息中记录子数据包的数据标识,并且还可以基于接收信息标识字段记录是否接收到对应的子数据包。具体的,确定出第三子数据包之前未接收到的第四子数据包后,可以确定第四子数据包的数据标识,并在初始接收状态信息中的数据标识字段设置第四子数据包的数据标识,并且将初始接收状态信息的接收信息标识字段设置为未接收到,获得第一接收状态信息。也即,第一接收状态信息可以标识未接收到对应的子数据包。
一种可选的实现方式中,可以将接收信息标识字段设置为第一预设值(如1),表示接收到对应的子数据包,将接收信息标识字段设置为第二预设值(如0),表示未接收到对应的子数据包。另一种可选的实现方式中,可以将接收信息标识字段设置为空,表示接收到对应的子数据包,可以将接收信息标识字段设置为预设值(如0),表示未接收到对应的子 数据包。当然,还可以通过其他方式将初始接收状态信息的接收信息标识字段设置为未接收到,本说明书实施例对此不进行限制。
需要说明的是,确定出第三子数据包之前未接收到的第四子数据包后,可以确定第四子数据包的数据标识,并在初始接收状态信息中的数据标识字段中设置第四子数据包的数据标识,获得第一接收状态信息。如此,接收端可以基于接收状态信息记录各个按序应该接收到、但未接收到的子数据包的状态信息,保证了数据传输的可靠性。
本实施例一个可选的实施方式中,构建第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,包括:
确定第四子数据包的数据标识在接收信息维护表中对应的字段编号;
构建第一接收状态信息与接收信息维护表中字段编号所指示的字段之间的关联关系。
实际应用中,接收信息维护表中包括有起始标识和终止标识,该起始标识可以为顺序最靠前的第四子数据包在接收信息维护表中对应的位置标识,该终止标识为下一轮接收到的第三子数据包之前未接收到的、顺序最靠前的第四子数据包在接收信息维护表中对应的位置标识,即终止标识为下一轮的起始标识。根据接收信息维护表中包括有起始标识和终止标识,可以确定各个第四子数据包的数据标识在接收信息维护表中对应的字段编号。
示例的,如图4所示,假设接收端接收到了数据标识为1、2、3、4的子数据包,此时接收信息维护表中起始标识为0所在的字段,1、2、3、4子数据包分别对应接收信息维护表中的0、1、2、3字段,下一轮的起始标识依旧为0所在的字段,即终止标也均为0所在的字段,数据标识为4的子数据包不存在之前未接收到的子数据包。之后,又接收到了数据标识为8的子数据包,此时接收信息维护表中起始标识和终止标识依旧均为0所在的字段,5、6、7、8子数据包分别对应接收信息维护表中的0、1、2、3字段,由于未接收到数据标识为5、6、7的子数据包,因而此时数据标识为5、6、7的子数据包为第四子数据包,基于上述方法,可以依次获得数据标识为5、6、7的子数据包对应的第一接收状态信息slot(5)、slot(6)和slot(7),依次将slot(5)、slot(6)和slot(7)分别和接收信息维护表中的字段0、1、2进行关联,如图4所示。
本实施例一个可选的实施方式中,在构建第一接收状态信息与接收信息维护表中字段编号所指示的字段之间的关联关系时,该字段编号所指示的字段可能已经关联有其他的接收状态信息,此时构建第一接收状态信息与接收信息维护表中字段编号所指示的字段之间的关联关系,具体实现过程可以如下:
在字段编号所指示的字段关联有第三接收状态信息的情况下,将第一接收状态信息和第三接收状态信息以串联或并列形式共同构建与字段编号所指示的字段之间的关联关系,其中,第三接收状态信息为未接收到的子数据包对应的接收状态信息。
需要说明的是,如果接收信息维护表中某个字段之前关联过某个子数据包的接收状态信息,且一直未接收到对应的子数据包,那么该子数据包的接收状态信息会一直关联在该字段上,但是并不影响后续子数据包的接收,也即该字段上还可以继续关联其他子数据包的接收状态信息。
实际应用中,将第一接收状态信息和第三接收状态信息以串联或并列形式共同构建与字段编号所指示的字段之间的关联关系,可以是指将第一接收状态信息和第三接收状态信息共同绑定在该字段编号所指示的字段上;或者,由于第三接收状态信息绑定在该字段编号所指示的字段,因而可以将第一接收状态信息继续绑定在第三接收状态信息上,即以链路方式串联绑定该字段编号对应的各个接收状态信息。
本实施例一个可选的实施方式中,在获取到第三子数据包中携带的目标数据标识后,可以先基于该目标数据标识确定该第三子数据包之前是否已经接收过、是否已经记录过接 收状态等,从而确定针对第三子数据包的信息记录和上报方式,即基于该目标数据标识确定是否执行确定并记录之前未接收到的子数据包的接收状态信息,也即接收第三子数据包,获取第三子数据包的目标数据标识之后,还可以包括:
确定目标数据标识是否小于顺序待接收数据标识;
在目标数据标识小于顺序待接收数据标识的情况下,确定第三子数据包为已接收、且已上报子数据包。
实际应用中,接收端接收到一个子数据包后,可以将该子数据包上报给应用层,且接收端接收到子数据包后可以向发送端返回确认信息,此时该子数据包的接收过程完成,无需继续维护该子数据包的接收状态,也即后续基于接收信息维护表可能无法查询到该子数据包的相关信息。然而,虽然接收端向发送端返回了确认信息,但发送端可能并未接收到,因而发送端可以会重复发送该子数据包,后续接收端如果再次接收到相同的子数据包,可能会导致重复上报给应用层,导致数据混乱。因而,本说明书实施例中设置了顺序待接收数据标识,该顺序待接收数据标识为当前接收到的、之前不存在未接收到的子数据包中的最大数据标识,即顺序待接收数据标识为按序下一个待接收的子数据包的数据标识,也就是说,顺序待接收数据标识之前的数据标识对应的子数据包均已经接收过、且上报给了应用层。
需要说明的是,获得第三子数据包的目标数据标识后,可以先确定目标数据标识是否小于顺序待接收数据标识,在目标数据标识小于顺序待接收数据标识的情况下,确定第三子数据包为已接收、且已上报子数据包,此时无需再次对该第三子数据包进行上报处理,仅向发送端返回确认信息即可,避免了重复上报,保证了数据传输的可靠性。
沿用上例,假设顺序待接收数据标识为recv_next=5,接收到的第三子数据包的目标数据标识为3,由于3小于顺序待接收数据标识5,此时可以确定该第三子数据包为已接收、且已上报子数据包,不对该第三子数据包进行上报处理,仅向发送端返回确认信息即可。
本实施例一个可选的实施方式中,确定目标数据标识是否小于顺序待接收数据标识之后,还可以包括:
在目标数据标识不小于顺序待接收数据标识的情况下,确定目标数据标识是否大于当前最大待接收数据标识;
若不大于,则解除第三子数据包对应的第二接收状态信息与接收信息维护表中的对应字段之间的关联关系,并将第三子数据包上报给应用层。
需要说明的是,若目标数据标识大于当前最大待接收数据标识,即接收到大于当前最大待接收数据标识的子数据包时,说明该子数据包之前存在未接收到的第四子数据包,此时,可以执行步骤304-306的操作步骤,记录第三子数据包之前未接收到的第四子数据包的接收状态信息,以标记未接收到发送端发送的第四子数据包。若接收到的第三子数据包不大于当前最大待接收数据标识,即位于顺序待接收数据标识和当前最大待接收数据标识之间,那么说明之前已经记录过该第三子数据包的接收状态信息,并已经将该第三子数据包的接收状态信息关联至接收信息维护表中,此时可以解除第三子数据包对应的第二接收状态信息与接收信息维护表中的对应字段之间的关联关系,表示第三子数据包已经接收到,向发送端返回对应的确认信息,并将第三子数据包上报给应用层。
本实施例一个可选的实施方式中,解除第三子数据包对应的第二接收状态信息与接收信息维护表中的对应字段之间的关联关系之后,还可以包括:
清空第二接收状态信息中填写的数据信息,获得初始接收状态信息,并将初始接收状态信息设置为空闲信息表。
需要说明的是,此时第三子数据包为接收端成功接收、并向发送端成功返回确认信息 的子数据包,该第三子数据包的接收状态接收端无需继续关注,因而可以解除第二接收状态信息与接收信息维护表中的对应字段之间的关联关系,并清空第二接收状态信息中填写的数据信息,获得初始接收状态信息,使用该初始接收状态信息继续记录其他未接收到的子数据包的数据信息,初始设置的初始接收状态信息可以循环利用,降低资源消耗。
沿用上例,如图4所示,接收端接收到数据标识为1、2、3、4的子数据包,向发送端返回数据标识为1、2、3、4的子数据包的确认信息,并将数据标识为1、2、3、4的子数据包上报给应用层,此时recv_next=5,recv_max=5,接收信息维护表中的起始标识和终止标识均为字段0所指示的字段。
之后,接收端又接收到了数据标识为8的子数据包,此时可以向发送端返回数据标识为8的子数据包的确认信息,并将数据标识为8的子数据包上报给应用层,由于8大于recv_max=5,此时可以确定数据标识为8的子数据包之前未接收到的子数据包为数据标识为5、6、7的子数据包,此时可以依次在初始接收状态信息中设置数据标识为5的子数据包的数据信息,获得数据标识为5的子数据包对应的第一接收状态信息slot(5),在初始接收状态信息中设置数据标识为6的子数据包的数据信息,获得数据标识为6的子数据包对应的第一接收状态信息slot(6),在初始接收状态信息中设置数据标识为7的子数据包的数据信息,获得数据标识为7的子数据包对应的第一接收状态信息slot(7),并依次将slot(5)、slot(6)、slot(7)关联在接收信息维护表中字段0、1、2所指示的字段上。并且,此时recv_next=5,recv_max=9,接收信息维护表中的起始标识和终止标识均为字段0所指示的字段。
之后,又接收到数据标识为6的子数据包,由于6大于recv_next=5,且小于recv_max=9,因而此时可以确定数据标识为6的子数据包在接收信息维护表中的对应字段为字段1,解除数据标识为6的接收状态信息slot(6)与接收信息维护表中的字段1之间的关联关系,并向发送端返回数据标识为6的子数据包对应的确认信息,并将数据标识为6的子数据包上报给应用层。此时recv_next=5,recv_max=9,接收信息维护表中的起始标识和终止标识均为字段0所指示的字段。
之后,又接收到数据标识为10的子数据包,此时可以向发送端返回数据标识为10的子数据包的确认信息,并将数据标识为10的子数据包上报给应用层,由于10大于recv_max=9,此时可以确定数据标识为10的子数据包之前、数据标识为8的子数据包之后未接收到的子数据包为数据标识为9的子数据包,此时可以在初始接收状态信息中设置数据标识为9的子数据包的数据信息,获得数据标识为9的子数据包对应的第一接收状态信息slot(9),并将slot(9)关联在接收信息维护表中字段0所指示的字段上。并且,此时recv_next=5,recv_max=11,接收信息维护表中的起始标识为字段0所指示的字段,终止标识为字段2所指示的字段,也即后续数据标识11的子数据包对应接收信息维护表中字段2所指示的字段。
本说明书一个实施例提供了一种数据传输方法,接收端接收到第三子数据包后,可以获取第三子数据包的目标数据标识,基于该目标数据标识,确定后续对第三子数据包进行何种记录方式,在目标数据标识大于当前最大待接收数据标识的情况下,可以根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,基于接收信息维护表维护各个按序应该接收到、但实际未接收到的第四子数据包的接收状态,从而获知哪个子数据包未成功接收,当出现少量丢包时,不仅丢包点后面的子数据包可以顺利接收并上报给应用层,而且还可以继续接收后续子数据包,完全不影响该连接的后续带宽,也即某个子数据包的丢失,并不会影响后续子数据包的接收和上报,避免了线头阻塞,且可以清楚获知哪个子数据包未成功接收,提高了数据传输的可靠性。
与上述方法实施例相对应,本说明书还提供了数据传输装置实施例,图5示出了本说 明书一个实施例提供的一种数据传输装置的结构示意图,应用于发送端。如图5所示,该装置包括:
发送模块502,被配置为向接收端发送第一预设数值个子数据包;
第一构建模块504,被配置为在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,并构建第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,发送信息维护表包括第二预设数值个字段,第一子数据包为第一预设数值个子数据包中的任一子数据包;
解除模块506,被配置为在接收到接收端返回的确认信息的情况下,确定确认信息对应的第二子数据包,并确定第二子数据包对应的第二发送状态信息,解除第二发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,第二子数据包为第一预设数值个子数据包中接收端返回确认信息的子数据包。
可选的,该装置还包括第一设置模块,被配置为:
将待传输数据包拆分为至少两个子数据包;
为至少两个子数据包中首个子数据包设置起始数据标识;
根据起始数据标识,为至少两个子数据包中首个子数据包之后的子数据包设置对应的数据标识。
可选的,初始发送状态信息包括数据标识字段和确认信息标识字段,确认信息标识字段用于标识是否接收到接收端针对第一子数据包返回的确认信息;
第一构建模块504进一步被配置为:
确定第一子数据包的数据标识,并在初始发送状态信息中的数据标识字段设置第一子数据包的数据标识;
将初始发送状态信息的确认信息标识字段设置为未接收到确认信息,获得第一发送状态信息。
可选的,该装置还包括第二设置模块,被配置为:
预先设置第一预设数值个内容为空的初始发送状态信息;
将各个初始发送状态信息设置为空闲信息表。
可选的,第一构建模块504进一步被配置为:
确定第一子数据包在第一预设数值个子数据包中的顺序编号;
根据顺序编号和第二预设数值,确定第一子数据包在发送信息维护表中对应的字段编号;
构建第一发送状态信息与发送信息维护表中字段编号所指示的字段之间的关联关系。
可选的,第一构建模块504进一步被配置为:
在字段编号所指示的字段关联有第三发送状态信息的情况下,将第一发送状态信息和第三发送状态信息以串联或并列形式共同构建与字段编号所指示的字段之间的关联关系,其中,第三发送状态信息为已向接收端发送、但未接收到接收端返回的确认信息的子数据包对应的发送状态信息。
可选的,该装置还包括清空模块,被配置为:
清空第二发送状态信息中填写的数据信息,获得初始发送状态信息,并将初始发送状态信息设置为空闲信息表;
将确定出的第二子数据包的个数作为第一预设数值,继续返回执行发送模块502,其中,第二子数据包的个数小于等于初始的第一预设数值。
可选的,该装置还包括重发模块,被配置为:
确定预设时长内是否接收到接收端针对第一子数据包返回的确认信息;
若未接收到,则重新向接收端发送第一子数据包。
本说明书一个实施例提供了一种数据传输装置,发送端向接收端发送子数据包后,可以基于发送信息维护表维护发送的各个子数据包的发送状态,接收端无需按序接收各个子数据包,接收端接收到哪个子数据包可以向发送端返回哪个子数据包的确认信息,发送端接收到接收端返回的确认信息后,说明该子数据包发送成功,此时可以解除该子数据包对应的发送状态信息与发送信息维护表中的对应字段之间的关联关系,无需继续关注该子数据包的发送状态。如此,发送端基于发送信息维护表可以获知当前各个子数据包的状态,从而获知哪个子数据包未发送成功,当出现少量丢包时,不仅丢包点后面的子数据包可以顺利发送给接收端,而且还可以继续发送后续子数据包,完全不影响该连接的后续带宽,也即某个子数据包的丢失,并不会影响后续子数据包的发送,避免了线头阻塞,且可以清楚获知哪个子数据包未发送成功,提高了数据传输的可靠性。
上述为本实施例的一种数据传输装置的示意性方案。需要说明的是,该数据传输装置的技术方案与上述的数据传输方法的技术方案属于同一构思,数据传输装置的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。
与上述方法实施例相对应,本说明书还提供了数据传输装置实施例,图6示出了本说明书一个实施例提供的另一种数据传输装置的结构示意图,应用于接收端。如图6所示,该装置包括:
接收模块602,被配置为接收第三子数据包,获取第三子数据包的目标数据标识;
第一确定模块604,被配置为在目标数据标识大于当前最大待接收数据标识的情况下,根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,其中,当前最大待接收数据标识为当前接收到的最大数据标识的下一个数据标识;
第二构建模块606,被配置为在初始接收状态信息中设置第四子数据包的数据信息,获得第一接收状态信息,并构建第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,其中,接收信息维护表包括第三预设数值个字段。
可选的,该装置还包括自增模块,被配置为:
将第一数据标识自增1作为当前最大待接收数据标识,其中,第一数据标识为当前接收到的各个子数据包中最大的数据标识;
将第二数据标识自增1作为顺序待接收数据标识,其中,第二数据标识为当前接收到的、之前不存在未接收到的子数据包中的最大数据标识,顺序待接收数据标识为按序下一个待接收的子数据包的数据标识。
可选的,该装置还包括第二确定模块,被配置为:
确定目标数据标识是否小于顺序待接收数据标识;
在目标数据标识小于顺序待接收数据标识的情况下,确定第三子数据包为已接收、且已上报子数据包。
可选的,第二确定模块进一步被配置为:
在目标数据标识不小于顺序待接收数据标识的情况下,确定目标数据标识是否大于当前最大待接收数据标识;
若不大于,则解除第三子数据包对应的第二接收状态信息与接收信息维护表中的对应字段之间的关联关系,并将第三子数据包上报给应用层。
可选的,第二确定模块进一步被配置为:
清空第二接收状态信息中填写的数据信息,获得初始接收状态信息,并将初始接收状态信息设置为空闲信息表。
可选的,初始接收状态信息包括数据标识字段和接收信息标识字段,接收信息标识字段用于标识是否接收到发送端发送的子数据包;
第二构建模块606进一步被配置为:
确定第四子数据包的数据标识,并在初始接收状态信息中的数据标识字段中设置第四子数据包的数据标识;
将初始接收状态信息的接收信息标识字段设置为未接收到,获得第一接收状态信息。
可选的,该装置还包括第三设置模块,被配置为:
预先设置第四预设数值个内容为空的初始接收状态信息;
将各个初始接收状态信息设置为空闲信息表。
可选的,第二构建模块606进一步被配置为:
确定第四子数据包的数据标识在接收信息维护表中对应的字段编号;
构建第一接收状态信息与接收信息维护表中字段编号所指示的字段之间的关联关系。
可选的,第二构建模块606进一步被配置为:
在字段编号所指示的字段关联有第三接收状态信息的情况下,将第一接收状态信息和第三接收状态信息以串联或并列形式共同构建与字段编号所指示的字段之间的关联关系,其中,第三接收状态信息为未接收到的子数据包对应的接收状态信息。
本说明书一个实施例提供了一种数据传输装置,接收端接收到第三子数据包后,可以获取第三子数据包的目标数据标识,基于该目标数据标识,确定后续对第三子数据包进行何种记录方式,在目标数据标识大于当前最大待接收数据标识的情况下,可以根据目标数据标识,确定第三子数据包之前未接收到的第四子数据包,基于接收信息维护表维护各个按序应该接收到、但实际未接收到的第四子数据包的接收状态,从而获知哪个子数据包未成功接收,当出现少量丢包时,不仅丢包点后面的子数据包可以顺利接收并上报给应用层,而且还可以继续接收后续子数据包,完全不影响该连接的后续带宽,也即某个子数据包的丢失,并不会影响后续子数据包的接收和上报,避免了线头阻塞,且可以清楚获知哪个子数据包未成功接收,提高了数据传输的可靠性。
上述为本实施例的一种数据传输装置的示意性方案。需要说明的是,该数据传输装置的技术方案与上述的数据传输方法的技术方案属于同一构思,数据传输装置的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。
图7示出了根据本说明书一个实施例提供的一种计算设备的结构框图。该计算设备700的部件包括但不限于存储器710和处理器720。处理器720与存储器710通过总线730相连接,数据库750用于保存数据。
计算设备700还包括接入设备740,接入设备740使得计算设备700能够经由一个或多个网络760通信。这些网络的示例包括公用交换电话网(PSTN,Public Switched Telephone Network)、局域网(LAN,Local Area Network)、广域网(WAN,Wide Area Network)、个域网(PAN,Personal Area Network)或诸如因特网的通信网络的组合。接入设备940可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC,Network Interface Controller))中的一个或多个,诸如IEEE802.11无线局域网(WLAN,Wireless Local Area Networks)无线接口、全球微波互联接入(Wi-MAX,Worldwide Interoperability for Microwave Access)接口、以太网接口、通用串行总线(USB,Universal Serial Bus)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC,Near Field Communication)接口,等等。
在本说明书的一个实施例中,计算设备700的上述部件以及图7中未示出的其他部件 也可以彼此相连接,例如通过总线。应当理解,图7所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。
计算设备700可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备700还可以是移动式或静止式的服务器。
其中,处理器720用于执行如下计算机可执行指令,该计算机可执行指令被处理器执行时实现上述数据传输方法的步骤。
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的数据传输方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。
本说明书一实施例还提供一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现上述数据传输方法的步骤。
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的数据传输方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。
本说明书一实施例还提供一种计算机程序,其中,当计算机程序在计算机中执行时,令计算机执行上述数据传输方法的步骤。
上述为本实施例的一种计算机程序的示意性方案。需要说明的是,该计算机程序的技术方案与上述的数据传输方法的技术方案属于同一构思,计算机程序的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
计算机指令包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质可以包括:能够携带计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本说明书实施例并不受所描述的动作顺序的限制,因为依据本说明书实施例,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本说明书实施例所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。
以上公开的本说明书优选实施例只是用于帮助阐述本说明书。可选实施例并没有详尽 叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本说明书实施例的内容,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本说明书实施例的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本说明书。本说明书仅受权利要求书及其全部范围和等效物的限制。

Claims (14)

  1. 一种数据传输方法,应用于发送端,包括:
    向接收端发送第一预设数值个子数据包;
    在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,并构建所述第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,所述发送信息维护表包括第二预设数值个字段,所述第一子数据包为所述第一预设数值个子数据包中的任一子数据包;
    在接收到所述接收端返回的确认信息的情况下,确定所述确认信息对应的第二子数据包,并确定所述第二子数据包对应的第二发送状态信息,解除所述第二发送状态信息与所述发送信息维护表中的对应字段之间的关联关系,其中,所述第二子数据包为所述第一预设数值个子数据包中接收端返回确认信息的子数据包。
  2. 根据权利要求1所述的数据传输方法,所述向接收端发送第一预设数值个子数据包之前,还包括:
    将待传输数据包拆分为至少两个子数据包;
    为所述至少两个子数据包中首个子数据包设置起始数据标识;
    根据所述起始数据标识,为所述至少两个子数据包中首个子数据包之后的子数据包设置对应的数据标识。
  3. 根据权利要求2所述的数据传输方法,所述初始发送状态信息包括数据标识字段和确认信息标识字段,所述确认信息标识字段用于标识是否接收到接收端针对所述第一子数据包返回的确认信息;
    所述在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,包括:
    确定所述第一子数据包的数据标识,并在所述初始发送状态信息中的数据标识字段设置所述第一子数据包的数据标识;
    将所述初始发送状态信息的确认信息标识字段设置为未接收到确认信息,获得所述第一发送状态信息。
  4. 根据权利要求1-3任一项所述的数据传输方法,所述构建所述第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,包括:
    确定所述第一子数据包在所述第一预设数值个子数据包中的顺序编号;
    根据所述顺序编号和所述第二预设数值,确定所述第一子数据包在所述发送信息维护表中对应的字段编号;
    构建所述第一发送状态信息与所述发送信息维护表中所述字段编号所指示的字段之间的关联关系。
  5. 根据权利要求1-3任一项所述的数据传输方法,所述解除所述第二发送状态信息与所述发送信息维护表中的对应字段之间的关联关系之后,还包括:
    清空所述第二发送状态信息中填写的数据信息,获得初始发送状态信息,并将所述初始发送状态信息设置为空闲信息表;
    将确定出的第二子数据包的个数作为第一预设数值,继续返回执行所述向接收端发送第一预设数值个子数据包的操作步骤,其中,所述第二子数据包的个数小于等于初始的第一预设数值。
  6. 一种数据传输方法,应用于接收端,包括:
    接收第三子数据包,获取所述第三子数据包的目标数据标识;
    在所述目标数据标识大于当前最大待接收数据标识的情况下,根据所述目标数据标识,确定所述第三子数据包之前未接收到的第四子数据包,其中,所述当前最大待接收数据标识为当前接收到的最大数据标识的下一个数据标识;
    在初始接收状态信息中设置所述第四子数据包的数据信息,获得第一接收状态信息,并构建所述第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,其中,所述接收信息维护表包括第三预设数值个字段。
  7. 根据权利要求6所述的数据传输方法,所述接收第三子数据包,获取所述第三子数据包的数据标识之后,还包括:
    将第一数据标识自增1作为当前最大待接收数据标识,其中,所述第一数据标识为当前接收到的各个子数据包中最大的数据标识;
    将第二数据标识自增1作为顺序待接收数据标识,其中,所述第二数据标识为当前接收到的、之前不存在未接收到的子数据包中的最大数据标识,所述顺序待接收数据标识为按序下一个待接收的子数据包的数据标识。
  8. 根据权利要求7所述的数据传输方法,所述接收第三子数据包,获取所述第三子数据包的目标数据标识之后,还包括:
    确定所述目标数据标识是否小于所述顺序待接收数据标识;
    在所述目标数据标识小于所述顺序待接收数据标识的情况下,确定所述第三子数据包为已接收、且已上报子数据包。
  9. 根据权利要求8所述的数据传输方法,所述确定所述目标数据标识是否小于所述顺序待接收数据标识之后,还包括:
    在所述目标数据标识不小于所述顺序待接收数据标识的情况下,确定所述目标数据标识是否大于所述当前最大待接收数据标识;
    若不大于,则解除所述第三子数据包对应的第二接收状态信息与所述接收信息维护表中的对应字段之间的关联关系,并将所述第三子数据包上报给应用层。
  10. 根据权利要求6-9任一项所述的数据传输方法,所述初始接收状态信息包括数据标识字段和接收信息标识字段,所述接收信息标识字段用于标识是否接收到发送端发送的子数据包;
    所述在初始接收状态信息中设置所述第四子数据包的数据信息,获得第一接收状态信息,包括:
    确定所述第四子数据包的数据标识,并在所述初始接收状态信息中的数据标识字段中设置所述第四子数据包的数据标识;
    将所述初始接收状态信息的接收信息标识字段设置为未接收到,获得所述第一接收状态信息。
  11. 一种数据传输装置,应用于发送端,包括:
    发送模块,被配置为向接收端发送第一预设数值个子数据包;
    第一构建模块,被配置为在初始发送状态信息中设置第一子数据包的数据信息,获得第一发送状态信息,并构建所述第一发送状态信息与发送信息维护表中的对应字段之间的关联关系,其中,所述发送信息维护表包括第二预设数值个字段,所述第一子数据包为所述第一预设数值个子数据包中的任一子数据包;
    解除模块,被配置为在接收到所述接收端返回的确认信息的情况下,确定所述确认信息对应的第二子数据包,并确定所述第二子数据包对应的第二发送状态信息,解除所述第 二发送状态信息与所述发送信息维护表中的对应字段之间的关联关系,其中,所述第二子数据包为所述第一预设数值个子数据包中接收端返回确认信息的子数据包。
  12. 一种数据传输装置,应用于接收端,包括:
    接收模块,被配置为接收第三子数据包,获取所述第三子数据包的目标数据标识;
    第一确定模块,被配置为在所述目标数据标识大于当前最大待接收数据标识的情况下,根据所述目标数据标识,确定所述第三子数据包之前未接收到的第四子数据包,其中,所述当前最大待接收数据标识为当前接收到的最大数据标识的下一个数据标识;
    第二构建模块,被配置为在初始接收状态信息中设置所述第四子数据包的数据信息,获得第一接收状态信息,并构建所述第一接收状态信息与接收信息维护表中的对应字段之间的关联关系,其中,所述接收信息维护表包括第三预设数值个字段。
  13. 一种计算设备,包括:
    存储器和处理器;
    所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求1至5或者权利要求6至10任意一项所述数据传输方法的步骤。
  14. 一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求1至5或者权利要求6至10任意一项所述数据传输方法的步骤。
PCT/CN2023/074265 2022-02-15 2023-02-02 数据传输方法以及装置 WO2023155690A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210139287.0A CN114598651B (zh) 2022-02-15 2022-02-15 数据传输方法以及装置
CN202210139287.0 2022-02-15

Publications (1)

Publication Number Publication Date
WO2023155690A1 true WO2023155690A1 (zh) 2023-08-24

Family

ID=81805515

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/074265 WO2023155690A1 (zh) 2022-02-15 2023-02-02 数据传输方法以及装置

Country Status (2)

Country Link
CN (1) CN114598651B (zh)
WO (1) WO2023155690A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598651B (zh) * 2022-02-15 2024-04-09 阿里巴巴(中国)有限公司 数据传输方法以及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106982108A (zh) * 2016-01-18 2017-07-25 华为技术有限公司 一种数据传输的方法以及相关设备
WO2018205688A1 (zh) * 2017-05-12 2018-11-15 华为技术有限公司 一种数据传输的方法、装置和系统
CN111865503A (zh) * 2019-04-30 2020-10-30 华为技术有限公司 一种发送、接收反馈信息的方法及设备
CN113300817A (zh) * 2020-09-22 2021-08-24 阿里巴巴集团控股有限公司 数据传输方法以及装置
CN113708895A (zh) * 2020-05-21 2021-11-26 北京金山云网络技术有限公司 数据传输方法、装置及电子设备
CN114598651A (zh) * 2022-02-15 2022-06-07 阿里巴巴(中国)有限公司 数据传输方法以及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254041A (zh) * 2015-08-20 2016-12-21 北京智谷技术服务有限公司 数据传输方法、数据接收方法、及其装置
CN110868276A (zh) * 2018-08-28 2020-03-06 京东数字科技控股有限公司 用于物联网设备间的数据传输方法、系统和电子设备
CN110995697B (zh) * 2019-11-29 2023-01-03 济南慧天云海信息技术有限公司 一种大数据传输方法及系统
CN113784389B (zh) * 2020-06-09 2024-01-30 大唐移动通信设备有限公司 一种数据处理的方法和装置
CN113872735B (zh) * 2020-06-30 2023-10-24 京东方科技集团股份有限公司 数据传输方法、装置及设备
CN112995685B (zh) * 2021-02-05 2023-02-17 杭州网易智企科技有限公司 数据发送方法及装置、数据接收方法及装置、介质、设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106982108A (zh) * 2016-01-18 2017-07-25 华为技术有限公司 一种数据传输的方法以及相关设备
WO2018205688A1 (zh) * 2017-05-12 2018-11-15 华为技术有限公司 一种数据传输的方法、装置和系统
CN111865503A (zh) * 2019-04-30 2020-10-30 华为技术有限公司 一种发送、接收反馈信息的方法及设备
CN113708895A (zh) * 2020-05-21 2021-11-26 北京金山云网络技术有限公司 数据传输方法、装置及电子设备
CN113300817A (zh) * 2020-09-22 2021-08-24 阿里巴巴集团控股有限公司 数据传输方法以及装置
CN114598651A (zh) * 2022-02-15 2022-06-07 阿里巴巴(中国)有限公司 数据传输方法以及装置

Also Published As

Publication number Publication date
CN114598651B (zh) 2024-04-09
CN114598651A (zh) 2022-06-07

Similar Documents

Publication Publication Date Title
JP6419245B2 (ja) 通信システムにおける方法および装置
CN110830472B (zh) 基于tcp/ip协议的灵活数据传输协议的灵活数据传输方法
US7864771B2 (en) Parsing out of order data packets at a content gateway of a network
WO2018205688A1 (zh) 一种数据传输的方法、装置和系统
US20170149675A1 (en) Packet retransmission method and apparatus
US7502860B1 (en) Method and apparatus for client-side flow control in a transport protocol
EP3694160A1 (en) Date transmission method, apparatus and device
US20130077501A1 (en) Dynamic subflow control for a multipath transport connection in a wireless communication network
JP2014524092A (ja) 単一ソケットポイントツーマルチポイント性能による高信頼性仮想双方向データストリーム通信のためのシステムおよび方法
TW201208324A (en) Packet coalescing
EP2673933A1 (en) Mechanisms to improve the transmission control protocol performance in wireless networks
WO2011100911A2 (zh) 探测处理方法、数据发送端、数据接收端以及通信系统
WO2013159516A1 (zh) 无线侧tcp数据重传的方法和设备
WO2023155690A1 (zh) 数据传输方法以及装置
CN115396067A (zh) 重传控制方法、通信接口和电子设备
CN114268991A (zh) 数据传输方法、装置、电子设备、存储介质
CN102769520A (zh) 基于sctp协议的无线网络拥塞控制方法
WO2022083371A1 (zh) 一种数据传输方法和装置
CN112468513B (zh) 一种企业网的终端管理通信方法
JP7123194B2 (ja) データ送信方法、送信デバイス、データ受信方法、および受信デバイス
CN107548105B (zh) 一种基于udp的数据传输确认方法和基站
CN113424578A (zh) 一种传输控制协议加速方法和装置
JP4805072B2 (ja) 通信システム
EP4037232A1 (en) Acknowledgement message processing method, communication apparatus, and storage medium
Li et al. A cross layer design for improving trivial file transfer protocol in mobile transparent computing

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: 23755694

Country of ref document: EP

Kind code of ref document: A1