A data transmission method, device and storage medium

By dividing the data into group packets and sending end acknowledge packets, the inefficiency and reliability problems in visual network data transmission are solved, and more efficient and reliable data transmission is achieved.

CN111740809BActive Publication Date: 2025-07-01VISIONVERA INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010420614.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-18
Publication Date
2025-07-01
Estimated Expiration
2040-05-18

AI Technical Summary

Technical Problem

The existing network-based data transmission scheme of video networking waits for the response of the peer to be long when transmitting multiple data packets, resulting in inefficiency and may lead to packet loss and reduce reliability.

Method used

A data transmission method is proposed, by dividing the original data into multiple groups of data packets, each group of data packets contains multiple block packets, and after sending the group of data packets, the end packet is sent, waiting for the end confirmation packet of the counterparty, and resend the unreceived block packet according to the confirmation packet.

Benefits of technology

Improve the efficiency of data transmission, reduce the time to wait for the counterparty to respond, and improve the reliability of data transmission by resending unreceived packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111740809B_ABST
    Figure CN111740809B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a data transmission method, apparatus, and storage medium. The method is applied to a first terminal and includes: splitting original data into multiple grouped data packets; sending the current grouped data packet to a second terminal and then sending an end data packet to the second terminal; receiving an end confirmation data packet returned by the second terminal according to the end data packet; and re-sending the block data packets not received by the second terminal to the second terminal according to the end confirmation data packet. The embodiment of the present invention avoids waiting for the response, i.e., the end confirmation data packet, returned by the second terminal after each block data packet is sent to the second terminal, reduces the time for the first terminal to wait for the response of the second terminal, and thus improves the efficiency of data transmission. Moreover, re-sending the block data packets not received by the second terminal according to the response returned by the second terminal ensures that each part of the original data to be transmitted is transmitted to the second terminal, improving the reliability of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technologies, and particularly to a data transmission method, apparatus, and storage medium. Background Art

[0002] Currently, the application of the Visual Networking is becoming more and more extensive and is no longer limited to the transmission of audio and video data. Application scenarios such as data synchronization have higher and higher requirements for the efficiency and reliability of data transmission.

[0003] In the existing data transmission solutions based on the Visual Networking, after each data packet is sent, it is necessary to wait for the response from the peer end. When there are more data packets to be transmitted, waiting for the response from the peer end takes a relatively long time, and the efficiency of data transmission is low. Moreover, sometimes, in order to improve the data transmission efficiency, the next data packet is directly sent without waiting for the response from the peer end, which may cause data packets to be lost without being noticed, thereby reducing the reliability of data transmission. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide a data transmission method, apparatus, and storage medium that overcome the above problems or at least partially solve the above problems.

[0005] To solve the above problems, an embodiment of the present invention discloses a data transmission method applied to a first terminal. The method includes: obtaining original data to be transmitted; splitting the original data into a plurality of group data packets, each group data packet including a plurality of block data packets; after sending the current group data packet to a second terminal, sending an end data packet to the second terminal, where the end data packet indicates that the current group data packet has been sent; receiving an end confirmation data packet returned by the second terminal according to the end data packet, where the end confirmation data packet indicates that one or more of the block data packets in the current group data packet have not been received by the second terminal; re-sending one or more of the block data packets that have not been received by the second terminal to the second terminal according to the end confirmation data packet and in the form of the current group data packet; and after each block data packet in the current group data packet is received by the second terminal, sending the next group data packet to the second terminal.

[0006] Optionally, before sending the end data packet to the second terminal, the method further includes: generating the end data packet according to transmission identification information corresponding to the original data, the number of the current group data packet, the number of retransmissions, transmission completion identification information, and a check code of the current group data packet, where the transmission identification information indicates the transmission of the original data between the first terminal and the second terminal.

[0007] Optionally, the second terminal is configured to generate the end confirmation data packet according to the transmission identification information, the number, the packet loss status, and the packet loss bitmap; wherein the packet loss bitmap includes a plurality of consecutive bytes, and each bit of each byte represents the sequence number of each block data packet in the current group of data packets. When the value of the bit is a preset value, it indicates that the second terminal has not received the block data packet corresponding to the sequence number.

[0008] Optionally, before sending the current group of data packets to the second terminal, the method further includes: obtaining the status of the second terminal; and sending the current group of data packets to the second terminal includes: when the status of the second terminal indicates an idle state, sending the current group of data packets to the second terminal.

[0009] Optionally, obtaining the status of the second terminal includes: sending a handshake confirmation data packet to the second terminal; and receiving a handshake response data packet returned by the second terminal according to the handshake confirmation data packet, where the handshake response data packet includes the status of the second terminal.

[0010] Optionally, the handshake confirmation data packet includes a first time, and the handshake response data packet further includes a second time; the method further includes: generating a delay duration according to the first time and the second time, and the delay duration is used to determine whether to re - send the current group of data packets.

[0011] Optionally, after sending the end data packet to the second terminal, the method further includes: if the end confirmation data packet returned by the second terminal is not received within the time period corresponding to one or more of the delay durations, re - sending the corresponding end data packet to the second terminal.

[0012] An embodiment of the present invention also discloses a data transmission device, which is applied to a first terminal. The device includes: an acquisition module, configured to acquire original data to be transmitted; a segmentation module, configured to segment the original data into multiple group data packets, each group data packet including multiple block data packets; a sending module, configured to send an end data packet to the second terminal after sending the current group data packet to the second terminal, the end data packet indicating that the current group data packet has been sent; a receiving module, configured to receive an end confirmation data packet returned by the second terminal according to the end data packet, the end confirmation data packet indicating that the second terminal has not received one or more of the block data packets in the current group data packet; the sending module is further configured to re-send one or more of the block data packets not received by the second terminal to the second terminal according to the end confirmation data packet and in the form of the current group data packet; the sending module is further configured to send the next group data packet to the second terminal after the second terminal receives each of the block data packets in the current group data packet.

[0013] Optionally, the device further includes: a generation module, configured to generate the end data packet according to the transmission identification information corresponding to the original data, the number of the current group data packet, the retransmission times, the transmission completion identification information, and the check code of the current group data packet before the sending module sends the end data packet to the second terminal, where the transmission identification information indicates that the original data is transmitted between the first terminal and the second terminal.

[0014] Optionally, the second terminal is configured to generate the end confirmation data packet according to the transmission identification information, the number, the packet loss status, and the packet loss bitmap; wherein, the packet loss bitmap includes a plurality of consecutive bytes, each bit of each byte represents the sequence number of each block data packet in the current group data packet, and when the value of the bit is a preset value, it indicates that the second terminal has not received the block data packet corresponding to the sequence number.

[0015] Optionally, the acquisition module is further configured to acquire the status of the second terminal before the sending module sends the current group data packet to the second terminal; the sending module is configured to send the current group data packet to the second terminal when the status of the second terminal indicates an idle state.

[0016] Optionally, the acquisition module is configured to send a handshake confirmation data packet to the second terminal; and receive a handshake response data packet returned by the second terminal according to the handshake confirmation data packet, where the handshake response data packet includes the status of the second terminal.

[0017] Optionally, the handshake confirmation data packet includes a first time, and the handshake response data packet further includes a second time; the generating module is further configured to generate a delay duration according to the first time and the second time, and the delay duration is used to determine whether to retransmit the current group of data packets.

[0018] Optionally, the sending module is further configured to, after sending the end data packet to the second terminal, if the receiving module does not receive the end confirmation data packet returned by the second terminal within the time period corresponding to one or more of the delay durations, retransmit the corresponding end data packet to the second terminal.

[0019] An embodiment of the present invention further discloses an apparatus, including: one or more processors; and one or more machine-readable media storing instructions thereon, which when executed by the one or more processors, cause the apparatus to execute the data transmission method as described above.

[0020] An embodiment of the present invention further discloses a computer-readable storage medium, and a computer program stored thereon causes a processor to execute the data transmission method as described above.

[0021] The embodiments of the present invention include the following advantages:

[0022] The embodiments of the present invention provide a data transmission solution. At a first terminal, i.e., a data sending terminal, original data to be transmitted is obtained, and the original data is divided into multiple groups of data packets, and each group of data packets includes multiple block data packets. After sending the current group of data packets to the second terminal, an end data packet is sent to the second terminal. Among them, the end data packet can indicate that the current group of data packets has been sent. The first terminal receives an end confirmation data packet returned by the second terminal according to the end data packet, and the end confirmation data packet can indicate that the second terminal has not received one or more block data packets in the current group of data packets. The first terminal then retransmits one or more block data packets not received by the second terminal to the second terminal in the form of the current group of data packets according to the end confirmation data packet. After the second terminal receives each block data packet in the current group of data packets, the first terminal sends the next group of data packets to the second terminal.

[0023] After the embodiment of the present invention sends a group data packet composed of multiple block data packets, it sends an end data packet to the second terminal to indicate that the group data packet has been sent, and waits for the second terminal to return an end confirmation data packet, and indicates whether the second terminal has received all the block data packets through the end confirmation data packet. It avoids waiting for the response from the second terminal, that is, the end confirmation data packet, after each block data packet is sent to the second terminal, reduces the waiting time of the first terminal for the response from the second terminal, and thus improves the data transmission efficiency. Moreover, in the case that the second terminal has not received all the block data packets, the block data packets not received by the second terminal are re-sent according to the response returned by the second terminal, ensuring that each part of the original data to be transmitted is transmitted to the second terminal, and improving the reliability of data transmission. Description of the Drawings

[0024] Figure 1 is a flowchart of the steps of an embodiment of a data transmission method of the present invention;

[0025] Figure 2 is a flowchart of the steps of another embodiment of a data transmission method of the present invention;

[0026] Figure 3 is a schematic flowchart of a data transmission method based on the vision network of the present invention;

[0027] Figure 4 is a structural block diagram of an embodiment of a data transmission device of the present invention. Detailed Embodiments

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

[0029] In the data transmission solution provided by the embodiment of the present invention, the first terminal divides the original data to be transmitted into multiple group data packets, and each group data packet contains multiple block data packets. After sending the current group data packet to the second terminal, an end data packet is sent to the second terminal to notify the second terminal that the current group data packet has been sent. The second terminal can return an end confirmation data packet to the first terminal according to the actual reception situation, and indicate the block data packets not received through the end confirmation data packet. The first terminal then re-sends the block data packets not received by the second terminal to the second terminal according to the end confirmation data packet.

[0030] Refer to Figure 1 , which shows a flowchart of the steps of an embodiment of a data transmission method of the present invention. The method may specifically include the following steps:

[0031] Step 101, obtain the original data to be transmitted.

[0032] In an embodiment of the present invention, the original data to be transmitted can be data of a certain amount, such as text data, picture data, audio-video data, and so on. The embodiment of the present invention does not make specific limitations on the type, amount, etc. of the original data.

[0033] Step 102: Split the original data into multiple group data packets.

[0034] In an embodiment of the present invention, the original data can be split according to the data packet splitting information. The data packet splitting information can represent the splitting requirements, splitting identifiers, etc. of the original data. The specific data packet splitting information can be determined according to the type or amount of the original data. The data packet splitting information can include transmission identifier information, data identifier information of the original data, the amount of the original data, the number of multiple group data packets, the number of multiple block data packets included in each group data packet, and the amount of data of each block data packet, etc. In the process of splitting the original data into multiple group data packets, it is possible to allocate how many group data packets the original data can be specifically split into (the number of multiple group data packets), how many block data packets each group data packet can specifically include (the number of multiple block data packets), and the amount of data of each block data packet. For example, it is allocated that the original data can be specifically split into 50 group data packets, each group data packet can include 512 block data packets, and each block data packet can include 1024 bytes. Moreover, in order to distinguish different original data, a unique transmission identifier information can also be set for each original data. When each group data packet is sent subsequently, the transmission identifier information is carried.

[0035] Step 103: After sending the current group data packet to the second terminal, send an end data packet to the second terminal.

[0036] In an embodiment of the present invention, if the original data is split into n group data packets, the first terminal sends at least n end data packets to the second terminal. And, after sending each group data packet, a corresponding end data packet is sent. The second terminal is notified by the end data packet after the group data packet that the first terminal has finished sending a group data packet before the end data packet.

[0037] Step 104: Receive an end confirmation data packet returned by the second terminal according to the end data packet.

[0038] In an embodiment of the present invention, after the second terminal receives the current group data packet and the end data packet after the current group data packet, in combination with the actual reception situation of the block data packets, an end confirmation data packet is returned to the first terminal. The end confirmation data packet can indicate whether the second terminal has received all the block data packets in the current group data packet. If not all the block data packets in the current group data packet are received, the second terminal can indicate through the end confirmation data packet which one or which several block data packets are specifically not received.

[0039] Step 105: Confirm the data packet according to the end, and resend one or more block data packets not received by the second terminal to the second terminal in the form of the current grouped data packets.

[0040] In an embodiment of the present invention, if the end confirmation data packet indicates that the second terminal has not received all or part of the block data packets in the current grouped data packet, the block data packets not received by the second terminal are resent to the second terminal. Moreover, when resending the block data packets, the block data packets are still sent in the form of the current grouped data packet, that is, the current grouped data packet containing the block data packets not received by the second terminal is sent to the second terminal, and the current grouped data packet resent may only contain the block data packets not received by the second terminal.

[0041] If the end confirmation data packet indicates that the second terminal has received all the block data packets in the current grouped data packet, step 106 is executed.

[0042] Step 106: Send the next grouped data packet to the second terminal.

[0043] In an embodiment of the present invention, after the first terminal sends the next grouped data packet to the second terminal, the end data packet of the next grouped data packet is still sent, and the second terminal returns an end confirmation data packet to the first terminal. The first terminal determines whether to resend the block data packets in the next grouped data packet to the second terminal according to the end confirmation data packet. The specific judgment, sending and other processes can refer to the above steps 103 to 105 and will not be elaborated here.

[0044] Refer to Figure 2 , which shows a flowchart of steps of another embodiment of the data transmission method of the present invention. The method may specifically include the following steps:

[0045] Step 201: Obtain the original data to be transmitted and the status of the second terminal.

[0046] In an embodiment of the present invention, when obtaining the status of the second terminal, a handshake confirmation data packet may be sent to the second terminal, and then the handshake response data packet returned by the second terminal according to the handshake confirmation data packet is received. The handshake response data packet may contain the status of the second terminal.

[0047] In practical applications, the packet structure of the handshake confirmation data packet is shown in the following table:

[0048]

[0049] After the second terminal receives the handshake confirmation data packet, it can generate a handshake response data packet according to the current state and current time of the second terminal, and return the handshake response data packet to the first terminal. In practical applications, the packet structure of the handshake response data packet is shown in the following table:

[0050] Transmission identification information Status information First time Second time

[0051] Among them, the "status information" represents the current state of the second terminal, which may include but is not limited to: idle, busy, etc. The "second time" represents the current time when the second terminal receives the handshake confirmation data packet.

[0052] After the first terminal receives the handshake response data packet, it can generate a delay duration according to the second time and the first time. The delay duration can be used to determine whether to resend the current group of data packets. In practical applications, the time period obtained by subtracting the first time from the second time can be used as the delay duration.

[0053] Step 202: Split the original data into multiple groups of data packets.

[0054] In an embodiment of the present invention, the original data is split into multiple groups of data packets, and each data packet contains multiple block data packets. In practical applications, the packet structure of the group data packet is shown in the following table:

[0055]

[0056] Step 203: After sending the current group of data packets, send an end data packet to the second terminal.

[0057] In an embodiment of the present invention, after the first terminal finishes sending each group of data packets to the second terminal, it sends an end data packet to the second terminal. An end data packet can indicate that a group of data packets has been sent. The end data packet can be sent to the second terminal immediately after the group of data packets.

[0058] In practical applications, the first terminal can generate the end data packet of the current group of data packets according to the transmission identification information, the number of the current group of data packets, the number of retransmissions, the transmission completion identification information, and the check code of the current group of data packets. The transmission identification information can indicate the transmission of the original data between the first terminal and the second terminal. The transmission identification information can be affected by factors such as the original data, the first terminal, the second terminal, the number of transmissions, and the transmission time. When any one of the above factors changes, the transmission identification information will also change accordingly. The packet structure of the end data packet is shown in the following table:

[0059]

[0060] Among them, in the case where the first terminal does not resend the block data packet of the current group data packet, the number of resends can be 0. The transmission completion identification information can be set according to the actual situation, and the embodiments of the present invention do not specifically limit the content, format, etc. of the transmission completion identification information.

[0061] After the second terminal receives the end data packet, it can generate an end confirmation data packet according to the actual reception situation of the block data packet. In practical applications, the second terminal can generate an end confirmation data packet according to the transmission identification information, the number of the current group data packet, the packet loss status, and the packet loss bitmap. The packet structure of the end confirmation data packet is shown in the following table:

[0062]

[0063] Among them, the packet loss status can indicate the existence or non-existence of packet loss. The packet loss bitmap can include a continuous plurality of bytes, and each bit of each byte represents the sequence number of each block data packet in the current group data packet. When the value of a certain bit in a byte is 1, it means that the second terminal has not received the block data packet corresponding to the sequence number of this bit. When the value of a certain bit in a byte is 0, it means that the second terminal has received the block data packet corresponding to the sequence number of this bit.

[0064] Step 204: Receive the end confirmation data packet returned by the second terminal, and resend the block data packet that the second terminal has not received according to the end confirmation data packet.

[0065] In the embodiments of the present invention, the first terminal receives the end confirmation data packet returned by the second terminal, analyzes the end confirmation data packet. If the packet loss status in the end confirmation data packet indicates the existence of packet loss, and the value of a certain bit in a certain byte of the packet loss bitmap is 1, then resend the block data packet corresponding to the sequence number of this bit.

[0066] In an exemplary embodiment of the present invention, after the first terminal sends the end data packet of the current group data packet to the second terminal, if the end confirmation data packet returned by the second terminal is not received within the time period corresponding to one or more delay durations, then resend the end data packet to the second terminal. The purpose of setting the delay duration is to set a time period threshold for the first terminal to wait for the end confirmation data packet, so as to prevent the first terminal from affecting the transmission of subsequent group data packets due to waiting for the end confirmation data packet for a long time.

[0067] Based on the above related description of the data transmission method, a data transmission method based on the Visual Networking is introduced below. As Figure 3As shown in the figure, a flowchart of a data transmission method based on the Vision Internet of the embodiment of the present invention is shown. This data transmission method based on the Vision Internet is applied to a data sending terminal and a data receiving terminal. Before transmitting data, the data sending terminal sends a handshake confirmation packet to the data receiving terminal. The data receiving terminal receives the handshake confirmation packet and returns a handshake response packet to the data sending terminal. The purpose of the data sending terminal sending the handshake confirmation packet to the data receiving terminal is as follows: a. Notify the data receiving terminal of the relevant information of the data to be transmitted, such as the data identification information (file name), transmission identification information (transmission ID), first time (current timestamp), and data packet splitting information, etc., of the data to be transmitted. b. Confirm the status information of the data receiving terminal to clarify that the data receiving terminal can normally receive the data to be transmitted. c. Confirm the delay duration of the data transmission from the data sending terminal to the data receiving terminal, and this delay duration can be used for subsequent data transmission timeout determination. The data sending terminal splits the data to be transmitted into multiple group data packets (packetized data) according to the pre-set data packet splitting information. For example, each group data packet contains 512 block data packets (block data), and each block data packet contains 1024 bytes. The data sending terminal sequentially sends the group data packets to the data receiving terminal. After each group data packet is sent to the data receiving terminal, the data sending terminal sends an end data packet (packetized end packet) to the data receiving terminal to indicate that a group data packet has been sent. After receiving the end data packet, the data receiving terminal performs a sorting check on the received block data packets. If a certain or certain block data packets are missing, an end confirmation data packet (packetized end confirmation packet) is returned to the data sending terminal. The missing block data packets are represented in the form of a lost packet bitmap in the end confirmation data packet. For example: the lost packet bitmap is a continuous 1024 bytes, and each bit of each byte represents the serial number of a block data packet. The 8 bits of the first byte represent the block data packets with serial numbers 0-7, the 8 bits of the second byte represent the block data packets with serial numbers 8-15, and so on. If the block data packet corresponding to the bit serial number is missing, the value of this bit is set to 1. After receiving the end confirmation data packet, if there are missing block data packets, the data sending terminal re-sends the missing block data packets to the data receiving terminal and sends the end data packet to the data receiving terminal again. The data receiving terminal performs a sorting check on the block data packets again according to the end data packet and returns an end confirmation data packet to the data sending terminal again. This cycle continues until all the block data packets in the group data packet are received by the data receiving terminal. At this point, the transmission of a group data packet is completed, and the data sending terminal continues to transmit the next group data packet.

[0068] It should be noted that if the above group data packets are transmitted using the Visual Networking Protocol, the data volume of the Visual Networking Protocol header part and the payload data part (block data packets) usually cannot exceed 1500 bytes. Among them, the block data packets can comply with the format requirements of multiple versions such as IEEE802.3 and IEEE802.2. For example, the Ethernet frame format of IEEE802.3 is shown in the following table:

[0069] Preamble Frame start delimiter Destination physical address Source physical address Protocol type Payload data Frame check sequence

[0070] An embodiment of the present invention provides a data transmission solution. At the first terminal, i.e., the data sending terminal, the original data to be transmitted is obtained, and the original data is divided into multiple group data packets, and each group data packet contains multiple block data packets. After sending the current group data packet to the second terminal, an end data packet is sent to the second terminal. Among them, the end data packet can indicate that the current group data packet has been sent. The first terminal receives the end confirmation data packet returned by the second terminal according to the end data packet, and the end confirmation data packet can indicate that the second terminal has not received one or more block data packets in the current group data packet. The first terminal then re-sends one or more block data packets that the second terminal has not received to the second terminal according to the end confirmation data packet and in the form of the current group data packet. After the second terminal receives each block data packet in the current group data packet, the first terminal sends the next group data packet to the second terminal.

[0071] After the embodiment of the present invention sends a group data packet composed of multiple block data packets, an end data packet is sent to the second terminal to indicate that the group data packet has been sent, and waits for the second terminal to return an end confirmation data packet. The end confirmation data packet indicates whether the second terminal has received all the block data packets. It avoids waiting for the response returned by the second terminal, i.e., the end confirmation data packet, after each block data packet is sent to the second terminal, reduces the waiting time of the first terminal for the response of the second terminal, and thus improves the data transmission efficiency. Moreover, in the case where the second terminal has not received all the block data packets, the block data packets that the second terminal has not received are re-sent according to the response returned by the second terminal, ensuring that every part of the original data to be transmitted is transmitted to the second terminal, and improving the reliability of data transmission.

[0072] The embodiment of the present invention sets corresponding transmission identification information for the original data. When the original data is transmitted between the first terminal and the second terminal, the transmission identification information plays a role of unique identification. That is to say, for a certain transmission of a certain original data between the first terminal and the second terminal, corresponding to the original data, the first terminal and the second terminal, and this transmission, the transmission identification information is unique. By setting the transmission identification information, it can be distinguished from other original data, other first terminals and second terminals, and other transmission times.

[0073] In an embodiment of the present invention, the packet loss bitmap in the end confirmation packet is used to represent the reception situation of the block packets in the current group packet by the second terminal, which can more intuitively represent the block packets not received by the second terminal and facilitate the first terminal to grasp the situation of the block packets not received by the second terminal.

[0074] In an embodiment of the present invention, the first terminal determines the delay duration according to the handshake confirmation data and the handshake response packet, aiming to set a time period threshold for the first terminal to wait for the end confirmation packet and avoid the first terminal affecting the transmission of subsequent group packets due to waiting for the end confirmation packet for a long time.

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

[0076] Refer to Figure 4 , which shows a structural block diagram of an embodiment of a data transmission device of the present invention. The device is applied to the first terminal and specifically may include the following modules:

[0077] An acquisition module 41, configured to acquire the original data to be transmitted;

[0078] A splitting module 42, configured to split the original data into multiple group packets, and each group packet includes multiple block packets;

[0079] A sending module 43, configured to send the current group packet to the second terminal and then send an end packet to the second terminal, where the end packet indicates that the current group packet has been sent;

[0080] A receiving module 44, configured to receive an end confirmation packet returned by the second terminal according to the end packet, where the end confirmation packet indicates that the second terminal has not received one or more of the block packets in the current group packet;

[0081] The sending module 43 is further configured to re - send one or more of the block packets not received by the second terminal to the second terminal according to the end confirmation packet and in the form of the current group packet.

[0082] The sending module 43 is further configured to send the next group packet to the second terminal after the second terminal receives each block packet in the current group packet.

[0083] In an exemplary embodiment of the present invention, in an exemplary embodiment of the present invention, the device further includes: a generating module, configured to generate the end packet according to the transmission identification information corresponding to the original data, the number of the current group of packets, the retransmission times, the transmission completion identification information, and the check code of the current group of packets before the sending module 43 sends the end packet to the second terminal, where the transmission identification information indicates that the original data is transmitted between the first terminal and the second terminal.

[0084] In an exemplary embodiment of the present invention, the second terminal is configured to generate the end confirmation packet according to the transmission identification information, the number, the packet loss status, and the packet loss bitmap;

[0085] Wherein, the packet loss bitmap includes a plurality of consecutive bytes, and each bit of each byte represents the sequence number of each block packet in the current group of packets. When the value of the bit is a preset value, it indicates that the second terminal has not received the block packet corresponding to the sequence number.

[0086] In an exemplary embodiment of the present invention, the obtaining module 41 is further configured to obtain the status of the second terminal before the sending module 43 sends the current group of packets to the second terminal;

[0087] The sending module 43 is configured to send the current group of packets to the second terminal when the status of the second terminal indicates an idle state.

[0088] In an exemplary embodiment of the present invention, the obtaining module 41 is configured to send a handshake confirmation packet to the second terminal; receive the handshake response packet returned by the second terminal according to the handshake confirmation packet, where the handshake response packet includes the status of the second terminal.

[0089] In an exemplary embodiment of the present invention, the handshake confirmation packet includes a first time, and the handshake response packet further includes a second time;

[0090] The generating module is further configured to generate a delay duration according to the first time and the second time, and the delay duration is used to determine whether to retransmit the current group of packets.

[0091] In an exemplary embodiment of the present invention, the sending module 43 is further configured to, after sending the end packet to the second terminal, if the receiving module 44 does not receive the end confirmation packet returned by the second terminal within the time period corresponding to one or more of the delay durations, retransmit the corresponding end packet to the second terminal.

[0092] For the apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For related parts, please refer to the corresponding descriptions in the method embodiments.

[0093] The embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other.

[0094] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, apparatuses, or computer program products. Therefore, the embodiments of the present invention can take the form of all-hardware embodiments, all-software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

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

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

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

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

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

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

Claims

1. A data transmission method, characterized in that, Applied to a first terminal, the method includes: Obtain original data to be transmitted; Split the original data into multiple group data packets, each group data packet containing multiple block data packets; After sending the current group data packet to a second terminal, send an end data packet to the second terminal, the end data packet indicating that the current group data packet has been sent; Receive an end confirmation data packet returned by the second terminal according to the end data packet, the end confirmation data packet indicating that the second terminal has not received one or more of the block data packets in the current group data packet; According to the end confirmation data packet and in the form of the current group data packet, re-send one or more of the block data packets not received by the second terminal to the second terminal, including: sending the current group data packet containing the block data packets not received by the second terminal to the second terminal; After the second terminal receives each block data packet in the current group data packet, send the next group data packet to the second terminal; Before sending the end data packet to the second terminal, generate the end data packet according to the transmission identification information corresponding to the original data, the number of the current group data packet, the retransmission times, the transmission completion identification information, and the check code of the current group data packet, the transmission identification information indicating the transmission of the original data between the first terminal and the second terminal; After sending the end data packet to the second terminal, the method further includes: If the end confirmation data packet returned by the second terminal is not received within the time period corresponding to one or more of the delay durations, re-send the end data packet to the second terminal.

2. The method according to claim 1, characterized in that, The second terminal is used to generate the end confirmation data packet according to the transmission identification information, the number, the packet loss status, and the packet loss bitmap; Wherein, the packet loss bitmap includes a plurality of consecutive bytes, each bit of each byte representing the sequence number of each block data packet in the current group data packet, and when the value of the bit is a preset value, it indicates that the second terminal has not received the block data packet corresponding to the sequence number.

3. The method according to claim 1, wherein Before sending the current group data packet to the second terminal, the method further includes: Obtain the status of the second terminal; Sending the current group data packet to the second terminal includes: When the status of the second terminal indicates an idle state, send the current group data packet to the second terminal.

4. The method according to claim 3, wherein Obtaining the status of the second terminal includes: Send a handshake confirmation data packet to the second terminal; Receive a handshake response data packet returned by the second terminal according to the handshake confirmation data packet, the handshake response data packet containing the status of the second terminal.

5. The method according to claim 4, characterized in that, The handshake confirmation data packet contains a first time, and the handshake response data packet further contains a second time; The method further includes: Generate a delay duration according to the first time and the second time, the delay duration being used to determine whether to re-send the current group data packet.

6. A data transmission device, characterized in that, Applied to a first terminal, the device includes: An acquisition module, configured to acquire original data to be transmitted; A splitting module, configured to split the original data into a plurality of group data packets, each of the group data packets including a plurality of block data packets; A sending module, configured to send an end data packet to the second terminal after sending the current group data packet to the second terminal, the end data packet indicating that the current group data packet has been sent; A receiving module, configured to receive an end confirmation data packet returned by the second terminal according to the end data packet, the end confirmation data packet indicating that the second terminal has not received one or more of the block data packets in the current group data packet; The sending module is further configured to re-send one or more of the block data packets not received by the second terminal to the second terminal according to the end confirmation data packet and in the form of the current group data packet, and the sending module is configured to send the current group data packet including the block data packet not received by the second terminal to the second terminal; The sending module is further configured to send the next group data packet to the second terminal after the second terminal receives each of the block data packets in the current group data packet; A generating module, configured to generate the end data packet according to the transmission identification information corresponding to the original data, the number of the current group data packet, the retransmission times, the transmission completion identification information, and the check code of the current group data packet before the sending module sends the end data packet to the second terminal, the transmission identification information indicating the transmission of the original data between the first terminal and the second terminal; The sending module is further configured to re-send the corresponding end data packet to the second terminal if the receiving module does not receive the end confirmation data packet returned by the second terminal within the time periods corresponding to one or more of the delay time lengths after sending the end data packet to the second terminal.

7. A device, characterized in that, Comprising: One or more processors; And One or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the device to perform the data transmission method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer program stored therein causes the processor to perform the data transmission method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Communication apparatus and communication method

    CN101594366A

  • Improved fragmentation for long packets in a low-speed wireless network

    CN103858373A