Data transmission method and apparatus, electronic device, and storage medium

By acquiring and utilizing the communication quality of multiple communication links, data is allocated and subcontracted, and transmitted simultaneously through multiple links, the problem of low big data transmission efficiency between multiple payment devices is solved, and more efficient data transmission is achieved.

WO2025103315A1PCT designated stage expired Publication Date: 2025-05-22SHENZHEN ZOLON TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/131599
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-15
Filing Date
2024-11-12
Publication Date
2025-05-22

AI Technical Summary

Technical Problem

In the business premises of merchants, data transmission efficiency between multiple payment-related equipment is low, especially when the data volume is large, using a single communication method leads to a long transmission time and poor user experience.

Method used

By acquiring the communication quality of the communication link between the first electronic device and the second electronic device, data allocation is performed on the basis of this, allocation data packets corresponding to each communication link are formed, and these data packets are sent to the second electronic device simultaneously through multiple communication links.

Benefits of technology

It improves data transmission efficiency, reduces transmission time, and improves user experience, especially when the data volume is large, multiple communication links can be used more effectively to improve overall transmission performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024131599_22052025_PF_FP_ABST
    Figure CN2024131599_22052025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data transmission method and apparatus, an electronic device, and a storage medium. The method comprises: when data to be transmitted to a second electronic device is acquired, acquiring the communication quality of a communication link between a first electronic device and the second electronic device; on the basis of the communication quality, performing data allocation on said data to obtain an allocation data packet corresponding to each communication link; and on the basis of the communication link, sending to the second electronic device the allocation data packet corresponding to each communication link, so as to send said data to the second electronic device. Therefore, the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Data transmission method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 15, 2023, with application number 202311525927.2, and invention name “Data transmission method, device, electronic device and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application belongs to the field of data transmission technology, and in particular relates to data transmission methods, devices, electronic devices and storage media. Background Art

[0003] A merchant's business premises may contain multiple payment-related devices, such as cash registers, POS machines, and printers. The cash register and POS machine may be connected using multiple communication methods, such as USB, LAN, and Wi-Fi. When large amounts of data are communicated between two devices, communication often relies on only one of these methods. When the data volume is small, the transmission efficiency is generally acceptable to users. However, when the data volume is large, using only one communication method for transmission is inefficient, time-consuming, and poor user experience.

[0004] Summary of the Invention

[0005] To address the above problems, embodiments of the present application provide a data transmission method, device, electronic device, and storage medium that can improve transmission efficiency.

[0006] An embodiment of the present application provides a data transmission method, applied to a first electronic device, including:

[0007] When data to be transmitted to a second electronic device is obtained, obtaining a communication quality of a communication link between the first electronic device and the second electronic device;

[0008] Allocating the data to be transmitted based on the communication quality to obtain allocated data packets corresponding to each communication link;

[0009] Based on each communication link, the allocation data packet corresponding to each communication link is sent to the second electronic device, so as to send the data to be transmitted to the second electronic device.

[0010] In some embodiments, each allocation data packet has an external sequence number, and the step of sending the allocation data packets corresponding to the respective communication links to the second electronic device based on the respective communication links includes:

[0011] storing the allocated data packets corresponding to each communication link in a sending buffer corresponding to each communication link based on the external sequence number;

[0012] The allocated data packets corresponding to each communication link are sent to the second electronic device based on the sending buffer corresponding to each communication link.

[0013] In some embodiments, the communication links include n, the external sequence numbers in the sending buffer corresponding to each communication link are arranged from small to large, and the sending of the allocated data packets corresponding to each communication link to the second electronic device based on the sending buffer corresponding to each communication link includes:

[0014] The external sequence numbers of the allocated data packets in the sending buffer corresponding to each communication link are sent in ascending order, wherein the external sequence numbers are used to identify the order of the allocated data packets in the data to be transmitted.

[0015] In some embodiments, the communication link includes: a first communication link and a second communication link, and the communication quality includes: transmission efficiency, the transmission efficiency of the first communication link is greater than the transmission efficiency of the second communication link, and the size of the allocated data packet corresponding to the first communication link is greater than the size of the allocated data packet corresponding to the second communication link.

[0016] In some embodiments, the method further comprises:

[0017] Obtain the size of data stored in the sending buffer corresponding to each communication link;

[0018] The size of the subsequently allocated data packets corresponding to each communication link is adjusted based on the size of the stored data.

[0019] In some embodiments, the method further comprises:

[0020] In the case of detecting that the target communication link between the first electronic device and the second electronic device is disconnected, allocating the allocated data packets in the sending buffer corresponding to the target communication link to other communication links in the communication links except the target communication link;

[0021] When it is detected that a new communication link is added between the first electronic device and the second electronic device, part of the allocated data packets in the sending buffers corresponding to the respective communication links are added to the sending buffer corresponding to the new communication link.

[0022] In some embodiments, the method further comprises:

[0023] determining whether response information of receiving each allocated data packet fed back by the second electronic device is obtained;

[0024] In the case that no response information of the target allocation data packet is received, the target allocation data packet is resent.

[0025] An embodiment of the present application provides a data transmission device, applied to a first electronic device, including:

[0026] a first acquiring module, configured to acquire, upon acquiring data to be transmitted to a second electronic device, a communication quality of a communication link between the first electronic device and the second electronic device;

[0027] an allocation module, configured to allocate the data to be transmitted based on the communication quality, and obtain allocation data packets corresponding to each communication link;

[0028] The sending module is used to send the allocated data packets corresponding to each communication link to the second electronic device based on each communication link, so as to send the data to be transmitted to the second electronic device.

[0029] An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the computer program.

[0030] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above methods is implemented.

[0031] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the electronic device executes any of the above-mentioned data transmission methods.

[0032] The embodiments of the present application provide a data transmission method, device, electronic device and storage medium, which can improve data transmission efficiency by obtaining the communication quality of the communication link between the first electronic device and the second electronic device when the data to be transmitted to the second electronic device is obtained; allocating the data to be transmitted based on the communication quality to obtain allocation data packets corresponding to each communication link; and sending the allocation data packets corresponding to each communication link to the second electronic device based on each communication link, so as to send the data to be transmitted to the second electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Hereinafter, the present application will be described in more detail based on embodiments with reference to the accompanying drawings.

[0034] FIG1 is a schematic diagram of an implementation flow of a data transmission method provided in an embodiment of the present application.

[0035] FIG2 is a schematic diagram of the implementation flow of the data transmission method at the sending end provided in an embodiment of the present application.

[0036] FIG3 is a schematic diagram of an implementation flow of a data processing method at a receiving end provided in an embodiment of the present application.

[0037] FIG4 is a schematic diagram of an implementation flow of a data transmission method at a sending end provided in an embodiment of the present application.

[0038] FIG5 is a flow chart of a data processing method at a receiving end provided in an embodiment of the present application.

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

[0040] FIG7 is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present application.

[0041] In the drawings, like components are given like reference numerals, and the drawings are not drawn to scale. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0043] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0044] If similar descriptions of "first\second\third" appear in the application documents, the following explanation will be added. In the following description, the terms "first\second\third" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0046] Based on the problems existing in the related art, the embodiments of the present application provide a data transmission method that can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), cash registers, and POS machines. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices. The functions implemented by the data transmission method provided in the embodiments of the present application can be implemented by calling program code by the processor of the electronic device, wherein the program code can be stored in a computer storage medium.

[0047] An embodiment of the present application provides a data transmission method. FIG1 is a schematic diagram of an implementation flow of a data transmission method provided in an embodiment of the present application. As shown in FIG1 , the method includes:

[0048] Step S101: When data to be transmitted to a second electronic device is obtained, the communication quality of the communication link between the first electronic device and the second electronic device is obtained.

[0049] In the embodiment of the present application, the data to be transmitted may be data whose data volume is greater than a data volume threshold, that is, the data to be processed may be data with a relatively large data volume.

[0050] In an embodiment of the present application, the communication link may include multiple links. For example, the communication link may include: one or more of a local area network link, a WIFI link, and a USB link.

[0051] In the embodiment of the present application, communication quality includes transmission efficiency, transmission bandwidth, etc. Transmission efficiency may include communication rate, probability of no packet loss, etc. The first electronic device may obtain the transmission efficiency of the communication link between the first electronic device and the second electronic device.

[0052] Step S102: allocating the data to be transmitted based on the communication quality to obtain allocated data packets corresponding to each communication link.

[0053] In the embodiment of the present application, the higher the transmission efficiency, the larger the allocated data packet is, and the lower the transmission efficiency, the smaller the allocated data packet is.

[0054] In some embodiments, the communication link includes: a first communication link and a second communication link, and the communication quality includes: transmission efficiency, the transmission efficiency of the first communication link is greater than the transmission efficiency of the second communication link, and the size of the allocated data packet corresponding to the first communication link is greater than the size of the allocated data packet corresponding to the second communication link.

[0055] In some embodiments, the communication link includes: a first communication link and a second communication link, and the communication quality includes: transmission bandwidth, the transmission bandwidth of the first communication link is greater than the transmission bandwidth of the second communication link, and the size of the allocated data packet corresponding to the first communication link is greater than the size of the allocated data packet corresponding to the second communication link.

[0056] For example, take three communication links. For example, the first link is a local area network, which can send a 40KB data packet in 10 milliseconds. The second link is a Wi-Fi link, which can only send a 20KB data packet in 10 milliseconds. The third link is a USB link, which can only send a 10KB data packet in the same time. Then, the data packet sizes of the three links can be defined as 40KB, 20KB, and 10KB. Data packets can then be allocated based on the data packet sizes to obtain allocated data packets.

[0057] Step S103: sending the allocated data packets corresponding to the respective communication links to the second electronic device based on the respective communication links, so as to send the data to be transmitted to the second electronic device.

[0058] In an embodiment of the present application, each communication link sends a corresponding allocated data packet. After each communication link transmits the data packet to the second electronic device, the second electronic device can use a thread to uniformly cache the data packets received by each communication link, and then reorganize them according to the external sequence number, so that the second electronic device obtains the complete data to be transmitted.

[0059] The data transmission method provided in the embodiment of the present application is as follows: when a first electronic device obtains data to be transmitted to a second electronic device, it obtains the communication quality of the communication link between the first electronic device and the second electronic device; based on the communication quality, the data to be transmitted is allocated to obtain allocation data packets corresponding to each communication link; based on each communication link, the allocation data packets corresponding to each communication link are sent to the second electronic device to send the data to be transmitted to the second electronic device, which can improve data transmission efficiency.

[0060] In some embodiments, each allocation data packet has an external sequence number, which may be a numerical sequence number, such as 1, 2, 3 to N, etc.

[0061] In an embodiment of the present application, the attributes of each data packet may include: a packet sequence number, which may include: an external sequence number and an internal sequence number, wherein the external sequence number is used to identify the order of the allocated data packets to be transmitted, also known as the user data packet sequence number, and the internal sequence number is a sequence number used internally.

[0062] In the embodiment of the present application, in the allocated data packet, the external sequence number is followed by the user data. The external sequence number can start from 0 and increase by 1 each time, ranging from 0 to 32767, and is used cyclically, with the smaller external sequence number being sent first.

[0063] The internal sequence number is definitely not followed by user data, which can be divided into the following three categories:

[0064] Initialization sequence number: fixed to -1, used when initializing the cache, and will not be used during the transmission of allocated data packets;

[0065] End sequence number: fixed to -2, indicating that the allocated data packet transmission has been completed and there is no other data behind;

[0066] Response sequence number: fixed to -3, a response message is sent to the sender. The response sequence number in the response message is followed by the external sequence number of the maximum sequence number packet received in the allocated data packet and a list of external sequence numbers that have not been received.

[0067] In the embodiment of the present application, step S103 can be implemented by the following steps:

[0068] Step S1031 : storing the allocated data packets corresponding to each communication link into the sending buffer corresponding to each communication link based on the external sequence number.

[0069] In the embodiment of the present application, the sending buffer refers to the memory in the first electronic device, and each communication link will apply for an array to buffer the data to be sent.

[0070] In an embodiment of the present application, the communication links include n, and the external sequence numbers in the sending buffer corresponding to each communication link are arranged from small to large. When the sending buffer corresponding to each communication link is empty, after data allocation, the difference between the external sequence numbers of two adjacent allocated data packets in the sending buffer corresponding to each communication link is n, and n is a positive integer greater than or equal to 1.

[0071] For example, if n is 3, the allocation data packets with external sequence numbers 1, 4, 7... are added to the sending buffer corresponding to the first link, the allocation data packets with external sequence numbers 2, 5, 8... are added to the sending buffer of the second link, and the allocation data packets with external sequence numbers 3, 6, 9... are added to the third link.

[0072] Step S1032: sending the allocated data packets corresponding to each communication link to the second electronic device based on the sending buffer corresponding to each communication link.

[0073] Continuing with the above example, the first link sends allocation packets with external sequence numbers 1, 4, 7..., the second link will send allocation packets with external sequence numbers 2, 5, 8..., and the third link will send allocation packets with external sequence numbers 3, 6, 9...

[0074] In the embodiment of the present application, each allocated data packet in the transmission buffer corresponding to each communication link can be sent sequentially from small to large based on the external sequence number. The external sequence number is used to identify the order of the allocated data packet in the data to be transmitted.

[0075] The method provided in the embodiment of the present application is based on sending the external sequence numbers of each allocated data packet in the sending buffer corresponding to each communication link in ascending order, which can enable the second electronic device to receive them in order as much as possible, reduce the time it takes to put the allocated data packet into the buffer, and improve efficiency.

[0076] In related technologies, when traditionally transmitting large amounts of data, the link with the highest communication rate is generally used for transmission, or the large data is simply divided into several blocks, and then each link transmits one data block. However, this approach fails to solve the series of problems caused by changes in the increase or decrease in physical link transmission during the communication process and changes in the communication rate of the physical link, and the communication efficiency is not significantly improved.

[0077] In order to solve the above problem, in some embodiments, while executing step S103, the method further includes:

[0078] Step S104: Acquire the size of data stored in the sending buffer corresponding to each communication link.

[0079] In an embodiment of the present application, the first electronic device can read the stored data in each sending buffer to determine the size of each stored data.

[0080] Step S105 : adjusting the size of the subsequently allocated data packets corresponding to each communication link based on the size of the stored data.

[0081] In an embodiment of the present application, if the stored data reaches the storage data threshold, it can be considered that the stored data in the sending cache is about to be full. At this time, the size of the allocated data packets subsequently allocated by the communication link can be reduced. If the stored data in the sending cache is close to being empty, the size of the allocated data packets subsequently allocated by the communication link can be increased.

[0082] In an embodiment of the present application, by adjusting the size of the subsequently allocated data packets corresponding to each communication link based on the size of the stored data, the transmission frequency of each communication link can be made as consistent as possible, thereby improving the receiving efficiency of the receiving end.

[0083] In some embodiments, while step S103 is being executed, the method further includes:

[0084] Step S106: when it is detected that the target communication link between the first electronic device and the second electronic device is disconnected, the allocated data packets in the sending buffer corresponding to the target communication link are allocated to other communication links in the communication links except the target communication link.

[0085] In the embodiment of the present application, the target communication link may be any one of the existing communication links. When the target communication link is disconnected, the allocated data packets in the sending buffer corresponding to the target communication link may be evenly distributed to other communication links.

[0086] Step S107 : when it is detected that a new communication link is added between the first electronic device and the second electronic device, part of the allocated data packets in the sending buffers corresponding to the respective communication links are added to the sending buffer corresponding to the new communication link.

[0087] In an embodiment of the present application, when a new communication link is added, a sending buffer will be created for the new link. At this time, a portion of the unsent allocated data packets in the sending buffer of the existing link can be copied to the new communication link.

[0088] In an embodiment of the present application, when storing part of the allocated data packets in the sending buffer corresponding to each communication link into the sending buffer corresponding to the new communication link, the part of the allocated data packets can be added to the sending buffer corresponding to the new communication link in an interval copy manner.

[0089] In the embodiment of the present application, when adjusting the data packets, only the allocated data packets that have been read are copied, and one copy is made at every interval.

[0090] For example, to increase the number of communication links from 1 to 2, it is necessary to copy part of the sending cache of the first communication link to the sending cache of the second communication link. To increase the number of communication links from 2 to 3, it is necessary to copy part of the sending cache of the first and second communication links to the sending cache of the third communication link.

[0091] In some embodiments, while step S103 is being executed, the method further includes:

[0092] Step S108: When response information fed back by the second electronic device is obtained, determine the target allocation data packet based on the response information, wherein the response information includes statistical information of unreceived target allocation data packets.

[0093] In the embodiment of the present application, the statistical information may include: the external sequence number of the unreceived allocation data packet. The first electronic device may parse the response information to obtain the external sequence number of the unreceived allocation data packet, thereby determining the target allocation data packet.

[0094] In the embodiment of the present application, each allocation data packet also has the following attributes:

[0095] Priority: The priority of the allocated data packet can be low priority or high priority. The higher priority is sent first. The priority of the allocated data packet to be resent will be increased.

[0096] Status: Status of the allocated data packet:

[0097] Read, not sent (PACKET_HAS_READ, 0),

[0098] Sent, not received (PACKET_HAS_SENT, 1),

[0099] Received, not written (PACKET_HAS_RECEIVED, 2),

[0100] Written (PACKET_HAS_WRITE, 3).

[0101] In an embodiment of the present application, if the status of the allocated data packet is received, it indicates that the receiving end has received the allocated data packet, and the sending end can clear the allocated data packet from the cache and put in a new allocated data packet to overwrite it. It can be considered that there is a free cache, and the new allocated data packet can be put into this free cache.

[0102] In the embodiment of the present application, the status of the allocated data packet is sent, which indicates that the sending end has sent the allocated data packet.

[0103] In the embodiment of the present application, if the status of the allocated data packet is read, it indicates that the allocated data packet has been added to the sending buffer.

[0104] In the embodiment of the present application, the status of the allocated data packet is written, which indicates that the receiving end has written the allocated data packet.

[0105] In an embodiment of the present application, the second electronic device can provide feedback of a response message. Based on the status of the receive buffer, the second electronic device can calculate the maximum external sequence number received, and then calculate all unreceived external sequence numbers less than the maximum external sequence number, thereby generating a response message. The response message can be formatted as follows: maximum received packet sequence number + unreceived external sequence number 1 + unreceived external sequence number 2 + ... + unreceived external sequence number n. Sending the response message is triggered by one of the following two conditions: a. Receiving the specified number of allocated data packets; b. The receive buffer is full.

[0106] Step S109: resend the target allocation data packet.

[0107] In the embodiment of the present application, a retransmission buffer array may be set in the first electronic device, and the target allocation data packet to be retransmitted may be placed in the retransmission buffer array for retransmission.

[0108] In some embodiments, when data is sent, the priority of each allocated data packet can be read. The higher the priority, the earlier the allocated data packet is sent. If the priority is the same, it is sent in ascending order of external sequence number.

[0109] The data sending method provided in the embodiment of the present application will simultaneously start all connected communication links to work together when a large amount of data is communicated. Physical links can be added or reduced during the communication process. In addition, the size of the sending packet is automatically adjusted according to the actual transmission rate, so that each link can cooperate effectively and greatly improve the transmission efficiency.

[0110] Based on the aforementioned embodiments, an embodiment of the present application further provides a data transmission method. In the embodiment of the present application, a large amount of data that the user needs to transmit is taken as an input stream (the same as the data to be transmitted in the aforementioned embodiments), and an independent thread distributes the input stream according to the transmission efficiency of each communication link. The allocated data packets will be stored in the sending cache corresponding to each communication link. Links with high transmission rates will be allocated more and larger allocation data packets, each packet has an external sequence number, and then each communication link will transmit the allocation data packets to the second electronic device. The second electronic device uses a thread to uniformly cache the allocation data packets received by each communication link, and then reorganizes them according to the actual order of the allocation data packets to form a data stream that is the same as the first electronic device and then submits it to the user.

[0111] In the embodiment of the present application, when allocating data packets to the communication links, they are allocated at intervals. If there are three links, the first link will send allocation data packets with external sequence numbers of 1, 4, 7..., the second link will send allocation data packets with external sequence numbers of 2, 5, 8..., and the third link will send allocation data packets with external sequence numbers of 3, 6, 9.... This will enable the receiving end to receive data in order as much as possible, reduce the caching time, and improve efficiency.

[0112] In the embodiment of the present application, due to the different transmission efficiencies of different links, the packet sizes they send also vary. Links with faster transmission efficiency will be assigned larger data packets. For example, if the first link is a local area network (LAN) and can send a 40KB packet in 10 milliseconds, the second link is a WiFi link and can only send a 20KB packet in 10 milliseconds, and the third link is a USB link and can only send a 10KB packet in the same amount of time, the packet sizes for the three links can be defined as 40KB, 20KB, and 10KB, respectively.

[0113] If the send buffer of one communication link is full, while the send buffers of other communication links are not, the size of the allocated data packets to be distributed to that communication link will be automatically reduced. If the send buffer of one communication link is empty, the size of the allocated data packets to be distributed to that communication link will be increased. The purpose of adjusting the allocated data packet size is to ensure that the transmission frequency of each communication link is as consistent as possible, which improves the efficiency of the receiving end.

[0114] In the embodiment of the present application, the sending buffer refers to the memory of the first electronic device, and each communication link will apply for an array to buffer the data to be sent.

[0115] In this embodiment of the present application, when a new communication link is added, a portion of the unsent data packets in the send buffer of the existing link is copied to the new communication link. When an existing communication link is disconnected, the unsent data packets in the send buffer of the disconnected communication link are evenly distributed to the other connected communication links.

[0116] In this embodiment of the present application, the data packet defines the following attributes:

[0117] Packet sequence number (packetNo): The sequence number of the data packet, 2 bytes, is divided into an external sequence number and an internal sequence number. The external sequence number is used to identify the order of the data packets to be transmitted, also known as the user data packet sequence number. The internal sequence number is the sequence number used internally. The external sequence number is followed by the user data. The allocation packet number of user data can start from 0 and increase by 1 each time, ranging from 0 to 32767, and is used in a circular manner. The smaller the external sequence number, the first one to be sent. The internal sequence number is definitely not followed by user data, and there are three types:

[0118] Initialization sequence number: fixed to -1, used when initializing the send buffer, and will not be used during the transmission of allocated data packets;

[0119] End sequence number: fixed at -2, indicating that the transmission of all allocated data packets has been completed and there is no other data behind;

[0120] Response sequence number: fixed to -3. When a response message is sent to the sender, the data content following the response sequence number in the response message is the external sequence number of the packet with the largest sequence number received and a list of external sequence numbers that have not been received.

[0121] Priority: Data packets have two priority levels: low and high. Packets with higher priority are sent first. Packets waiting to be resent will have a higher priority.

[0122] Status: The status of the data packet includes:

[0123] Read, not sent (PACKET_HAS_READ, 0),

[0124] Sent, not received (PACKET_HAS_SENT, 1),

[0125] Received, not written (PACKET_HAS_RECEIVED, 2),

[0126] Written (PACKET_HAS_WRITE, 3).

[0127] Data content (data): When allocating data packets and placing them in the send buffer and receive buffer, they will carry the above attributes. During communication, the data format is: LEN(2)+PACKET_NO(2)+DATA(n), where LEN=n+2.

[0128] In an embodiment of the present application, after the program is started, all currently available communication links will be added to the link list. During operation, if a new communication link is detected to be connected, the new communication link can be added to the link list. If an existing link is detected to be disconnected, it will be deleted from the link list.

[0129] In this embodiment of the application, when each communication link is added, a corresponding send buffer is created, that is, an array of specified capacity is created to store the data packets to be sent (packet sequence number, priority, status, data content). All communication links share a receive buffer, which is also an array structure, for storing received data packets.

[0130] The last m elements of the sending buffer array are the retransmission buffer. The retransmission buffer is used to solve the problem that when the sending buffer is full, some packets with very small sequence numbers have been sent, but the second electronic device has not received them. At this time, these packets need to be resent. At this time, these packets are placed in the retransmission buffer and sent first.

[0131] For example, a very small external sequence number refers to the situation being processed at the time. For example, if packets 0 to 1000 have been successfully received and allocation data packets with external sequence numbers 1001 to 1050 are currently being sent, if allocation data packets with external sequence numbers 1001 and 1049 do not receive responses from each other, the allocation data packet with the very small sequence number is now 1001. After a period of time, allocation data packet 1001 receives a response, and packets 1049 to 1100 are being processed. Of these, packets 1049 and 1089 have not been received, and the allocation data packet with the very small sequence number is now 1049. The successfully received allocation data packet has been processed by the first electronic device and is not included in the statistical range when counting packet sequence numbers.

[0132] The last n elements of the receive buffer array are the small packet buffer area. When the receive buffer is full and a new data packet arrives, if the new data packet is close to the current minimum packet sequence number, it will be stored in the small packet buffer area. If the sequence number difference is too large (the sequence number does not belong to "minimum packet sequence number ~ minimum packet sequence number + n"), it will be automatically discarded.

[0133] After the data in the send buffer is sent, it still exists in the corresponding send buffer, but the status is changed to sent. After the other party confirms that it has received it, the status is changed to received. This status indicates that the element can be reassigned.

[0134] In the embodiment of the present application, the data status changes according to the flow direction: read, sent, received, written.

[0135] In the embodiment of the present application, the last m blocks in the array of the sending buffer are set as the retransmission buffer area to prevent the sending buffer from being full and having nowhere to put it;

[0136] In the embodiment of the present application, the last n blocks in the array of the receive buffer are set as the small packet buffer area to prevent the receive buffer from being full but the most needed packets from having nowhere to go;

[0137] In the embodiment of the present application, m and n are set according to actual conditions.

[0138] In an embodiment of the present application, the second electronic device generates a response message for the list group of the external sequence number of the received packet with the largest sequence number and the allocated data packet with the external sequence number not received every N packets or when the receiving buffer is full, and sends the response message to the first electronic device, so that the first electronic device can give priority to resending the allocated data packet with the smallest external sequence number to the second electronic device.

[0139] The multi-link management thread is used to manage each link, including allocating the send buffer data to each link and merging the received data of each link.

[0140] In the embodiment of the present application, the first electronic device and the second electronic device can both act as a transmitter to send data and as a receiver to receive data. FIG2 is a schematic diagram of an implementation flow of a data transmission method provided by the transmitter in the embodiment of the present application, as shown in FIG2 , including:

[0141] Step S201: The sending end starts a thread.

[0142] Step S202: The sending end detects that a new communication link has been added, and adjusts the allocated data packets in the sending buffers of all communication links.

[0143] In an embodiment of the present application, if a new communication link is added, a portion of the unsent allocated data packets in the sending buffer of the existing communication link can be copied to the new communication link.

[0144] Step S203: The sending end detects that a communication link is disconnected and adjusts the allocated data packets in the sending buffers of all communication links.

[0145] In an embodiment of the present application, if a communication link is disconnected, the allocated data packets in the sending buffer corresponding to the target communication link can be evenly distributed to other communication links.

[0146] In the embodiment of the present application, adjusting the allocated data packets in the sending buffer is divided into two cases:

[0147] If a new communication link is added, the total number of allocated data packets with the status of "read in" in the sending cache of other communication links is counted, and then evenly distributed to the new communication link. When evenly distributing, only the allocated data packets with the status of "read in" are copied, and one is copied every interval. When one communication link is increased to two communication links, part of the sending cache of the first communication link needs to be copied to the sending cache of the second communication link. When two communication links are increased to three communication links, part of the sending cache of the first and second communication links needs to be copied to the sending cache of the third communication link. If a communication link is disconnected, the packets with the status of "read in" and "sent" in the sending cache of the disconnected communication link are evenly distributed to other communication links.

[0148] Step S204: The sending end detects whether the user input stream contains user data.

[0149] In the embodiment of the present application, if yes, execute step S205; if not, execute step S206.

[0150] Step S205: The sending end determines whether there is any free buffer in the communication link.

[0151] In the embodiment of the present application, if yes, step S207 is executed; if no, step S208 is executed.

[0152] In the embodiment of the present application, after the first electronic device sends the distribution data packet, the second electronic device will receive the distribution data packet.

[0153] Step S206: The sender reads the receiving buffer to check whether there is a new data packet.

[0154] In the embodiment of the present application, if there is a new data packet, step S209 is executed; if there is no new data packet, step S202 is executed.

[0155] In step S207, the sending end allocates data according to the maximum length supported, allocates the data to the corresponding sending buffer, and changes the status of the allocated data packet to "read in".

[0156] In step S208, the sending end detects whether there is an allocated data packet that has not been received by the receiving end. If so, the allocated data packet is placed in the retransmission area of ​​the sending buffer and the priority is increased.

[0157] In the embodiment of the present application, the conditions for the transmitting end to detect whether there is an allocated data packet that the receiving end has not received include: every N allocated data packets, or the sending buffer is full. The number N is configurable.

[0158] After step S207 and step S208, step S210 is executed.

[0159] Step S210: The sending end detects whether the size of the allocated data packet to be sent needs to be adjusted. If necessary, the size of the allocated data packet in the link is adjusted.

[0160] After step S210, step S206 is executed.

[0161] Step S209: The sending end determines whether the packet sequence number is an internal response sequence number.

[0162] In the embodiment of the present application, if yes, execute step S211, and if no, execute step S212.

[0163] In step S211, the sending end parses the external sequence number of the unreceived allocation data packet to determine the received allocation data packet, and modifies the status of the received allocation data packet in the sending buffer to received.

[0164] After step S211, step S202 is executed.

[0165] Step S212: The sending end determines whether the packet sequence number is an internal end sequence number.

[0166] Continuing with the above example, the internal end sequence number can be fixed to -2. If the packet sequence number is -2 at this time, it is the internal end sequence number.

[0167] In the embodiment of the present application, if yes, execute step S213, if not, execute step S202.

[0168] In step S213, the sending end determines that the sending is complete, ends the current thread, and ends the link thread.

[0169] After step S213, step S202 is executed.

[0170] FIG3 is a schematic diagram of an implementation flow of a data processing method at a receiving end provided in an embodiment of the present application, as shown in FIG3 , including:

[0171] Step S301: The receiving end starts a thread.

[0172] Step S302: The receiving end reads the receiving buffer.

[0173] Step S303: The receiving end determines whether there is new data.

[0174] In the embodiment of the present application, if there is new data, step S304 is executed; if there is no new data, step S302 is executed.

[0175] Step S304: The receiving end determines whether the packet sequence number of the allocated data packet is an external sequence number.

[0176] Continuing with the above example, if the packet sequence number is 0 to 32767, it is an external sequence number.

[0177] In the embodiment of the present application, if yes, execute step S305, if not, execute step S302.

[0178] Step S305: The receiving end determines whether it is the minimum external sequence number.

[0179] In the embodiment of the present application, if yes, execute step S306, if not, execute step S307.

[0180] Step S306: The receiving end writes the allocated data packet into the sending buffer, changes the status of the allocated data packet to written, and updates the minimum external sequence number.

[0181] In the embodiment of the present application, if the minimum external sequence number is n, the updated minimum external sequence number is n+1.

[0182] After step S306, step S309 is executed.

[0183] Step S307: The receiving end determines whether the current external sequence number is smaller than the minimum external sequence number.

[0184] In the embodiment of the present application, if yes, execute step S308; if no, execute step S302.

[0185] Step S308: The receiving end changes the status of the allocated data packet in the receiving buffer to written.

[0186] After executing step S308 , continue to execute step S302 .

[0187] Step S309: The receiving end traverses the receiving buffer to determine whether there is an allocated data packet with a minimum external sequence number.

[0188] In the embodiment of the present application, if yes, execute step S306, and if no, execute step S310.

[0189] In step S310, the receiving end determines that all allocated data packets have been received, and the group internal response end packet is placed in the sending buffer.

[0190] In the embodiment of the present application, the receiving end receives the allocated data packet in real time. When the receiving end determines that it has received all the allocated data packets, it generates an internal response completion packet and sends it to the sending end.

[0191] In the embodiment of the present application, while the receiving end is receiving the allocated data packets, it also sends a response message to the sending end. The receiving end then provides statistical information about the received data packets to the sending end. The sending end calculates the maximum external sequence number received based on the status of the receive buffer, and then calculates all external sequence numbers less than the maximum external sequence number that have not yet been received. The response message is formatted as follows: maximum external sequence number received + external sequence number 1 not received + external sequence number 2 not received + ... + external sequence number n not received. The sending of the response packet is triggered by either of the following two conditions: a. Receiving the specified number of user data packets; b. The normal receive buffer is full.

[0192] In the embodiment of the present application, if the packet status in the sending buffer is "read in", it indicates that it is waiting to be sent; if it is "received", it indicates that it has been sent successfully and confirmed that the other party has received it.

[0193] Based on the aforementioned embodiments, an embodiment of the present application further provides a data transmission method, which is applied to a data transmission system. The data transmission system includes: a transmitting end and a receiving end. FIG4 is a schematic diagram of an implementation flow of a data transmission method of the transmitting end provided in an embodiment of the present application. As shown in FIG4 , the method includes:

[0194] Step S401: The sending end starts a thread.

[0195] Step S402: The sending end detects whether there is an allocated data packet to be sent in the sending buffer.

[0196] In the embodiment of the present application, if yes, execute step S403, and if no, execute step S405.

[0197] Step S403: The sending end finds the allocated data packet with a higher priority or the same priority and the smallest external sequence number.

[0198] In the embodiment of the present application, the priority can be determined by the attribute information of the packet.

[0199] Step S404: The sending end sends the allocated data packet. If the packet is a user data packet, the packet status is modified to: sent; if not, the packet status is changed to received.

[0200] Step S405: The sending end determines whether valid data is received.

[0201] In the embodiment of the present application, if yes, step S406 is executed; if no, step S402 is executed.

[0202] In step S406, the sending end receives the complete data, assembles the data into packets, puts the packets into a receiving buffer, and changes the packet status to: received.

[0203] After step S406, step S402 is executed.

[0204] In the embodiment of the present application, after the transmitting end sends the allocation data packet, the receiving end receives the allocation data packet and processes it. FIG5 is a flow chart of a data processing method of the receiving end provided in the embodiment of the present application, as shown in FIG5, including:

[0205] Step S501: The receiving end starts a thread.

[0206] Step S502: The receiving end detects whether there is data to be sent in the sending buffer.

[0207] In the embodiment of the present application, if yes, step S503 is executed. If no, step S505 is executed.

[0208] Step S503: The receiving end finds the allocated data packet with a higher priority or the smallest external sequence number under the same priority.

[0209] Step S504: the receiving end sends the allocated data packet. If the allocated data packet is a user data packet, the status of the data packet is modified to "sent", otherwise it is changed to "received".

[0210] After step S504, step S505 is executed.

[0211] Step S505: Determine whether the allocation data packet is received.

[0212] In the embodiment of the present application, if yes, execute step S506; if no, execute step S502.

[0213] Step S506: The receiving end determines whether the receiving buffer is idle.

[0214] In the embodiment of the present application, if the receiving buffer is idle, step S507 is executed; if the receiving buffer is not idle, step S508 is executed.

[0215] Step S507: The receiving end receives the complete allocated data packet, assembles the packet, puts the allocated data packet into a receiving buffer, and changes the status of the packet to received.

[0216] After step S507, step S511 is executed.

[0217] Step S508: The receiving end determines whether the external sequence number is close to the current minimum external sequence number.

[0218] In the embodiment of the present application, if yes, execute step S509; if no, execute step S510.

[0219] In an embodiment of the present application, the criteria for determining whether the external sequence number is close to the current minimum external sequence number include: if there are n small packet caches in the receiving cache at the end, then the external sequence number is between "minimum external sequence number ~ minimum external sequence number + n" and is considered close and can be stored in the small packet cache area.

[0220] Step S509: The receiving end stores the packet in the packet buffer area.

[0221] Step S510: The receiving end receives the complete allocated data packet, does not process it in any way, and discards it.

[0222] After step S509 and step S510, step S512 is executed.

[0223] In step S511, the receiving end determines whether each link has received N allocated data packets cumulatively.

[0224] In the embodiment of the present application, if yes, execute step S512; if no, execute step S502.

[0225] Step S512: The receiving end group responds to the information and returns the allocated data packets that have not been received recently to the sending end.

[0226] In an embodiment of the present application, if an exception occurs during the process of sending and receiving data, indicating that the link is disconnected, it is necessary to set the link status in the link list to abnormal disconnection, and the multi-link management thread begins to distribute the data packets sent by the link cache to other links.

[0227] Based on the foregoing embodiments, an embodiment of the present application provides a data transmission device, and the modules included in the device, as well as the units included in each module, can be implemented by a processor in a computer device; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0228] An embodiment of the present application provides a data transmission device. FIG6 is a schematic structural diagram of a data transmission device provided in an embodiment of the present application. As shown in FIG6 , the data transmission device 600 includes:

[0229] A first acquiring module 601 is configured to acquire, upon acquiring data to be transmitted to a second electronic device, a communication quality of a communication link between the first electronic device and the second electronic device;

[0230] An allocation module 602 is configured to allocate the data to be transmitted based on the communication quality, and obtain allocation data packets corresponding to each communication link;

[0231] The sending module 603 is configured to send the allocated data packets corresponding to the respective communication links to the second electronic device based on the respective communication links, so as to send the data to be transmitted to the second electronic device.

[0232] In some embodiments, each allocated data packet has an external sequence number, and the sending module 603 includes:

[0233] a adding unit, configured to store the allocated data packets corresponding to each communication link into a sending buffer corresponding to each communication link based on an external sequence number;

[0234] The sending unit is configured to send the allocated data packets corresponding to each communication link to the second electronic device based on the sending buffer corresponding to each communication link.

[0235] In some embodiments, the communication links include n, and the external sequence numbers in the sending buffer corresponding to each communication link are arranged from small to large. The sending unit is used to send the external sequence numbers of each allocated data packet in the sending buffer corresponding to each communication link in sequence from small to large, wherein the external sequence number is used to identify the order of the allocated data packets in the data to be transmitted.

[0236] In some embodiments, the communication link includes: a first communication link and a second communication link, and the communication quality includes: transmission efficiency, the transmission efficiency of the first communication link is greater than the transmission efficiency of the second communication link, and the size of the allocated data packet corresponding to the first communication link is greater than the size of the allocated data packet corresponding to the second communication link.

[0237] In some embodiments, the data transmission device 600 further includes:

[0238] The second acquisition module is used to obtain the size of data stored in the sending buffer corresponding to each communication link;

[0239] The first adjustment module is configured to adjust the size of the subsequently allocated data packets corresponding to each communication link based on the size of the stored data.

[0240] In some embodiments, the data transmission device 600 further includes:

[0241] a second adjustment module, configured to, upon detecting that a target communication link between the first electronic device and the second electronic device is disconnected, allocate allocated data packets in a sending buffer corresponding to the target communication link to other communication links among the communication links except the target communication link;

[0242] The third adjustment module is configured to add part of the allocated data packets in the sending buffers corresponding to the respective communication links to the sending buffer corresponding to the new communication link when detecting that a new communication link is added between the first electronic device and the second electronic device.

[0243] In some embodiments, the data transmission device 600 further includes:

[0244] a determination module, configured to determine whether response information of receiving each allocated data packet fed back by the second electronic device is obtained;

[0245] The resending module is used to resend the target allocation data packet when no response information of the target allocation data packet is received.

[0246] An embodiment of the present application provides an electronic device; FIG7 is a schematic diagram of the composition structure of the electronic device provided in the embodiment of the present application. As shown in FIG7 , the electronic device 700 includes: a processor 701, at least one communication bus 702, a user interface 703, at least one external communication interface 704, and a memory 705. The communication bus 702 is configured to implement connection and communication between these components. The user interface 703 may include a display screen, and the external communication interface 704 may include a standard wired interface and a wireless interface. The processor 701 is configured to execute a program of a data transmission method stored in a memory to implement the steps in the data transmission method provided in the above embodiment.

[0247] In the embodiment of the present application, if the above-mentioned data transmission method is implemented in the form of a software function module and is sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read Only Memory), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0248] Accordingly, an embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the data transmission method provided in the above embodiment are implemented.

[0249] An embodiment of the present application further provides a computer program product, which, when executed on a terminal device, enables the electronic device to execute any of the above-mentioned data transmission methods.

[0250] The description of the above electronic device and storage medium embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the computer device and storage medium embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0251] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.

[0252] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

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

[0254] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0255] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0256] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROMs), magnetic disks, optical disks, and other media that can store program codes.

[0257] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a controller to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.

[0258] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A data transmission method, characterized in that: Applicable to a first electronic device, comprising: When the data to be transmitted to the second electronic device is obtained, the communication quality of the communication link between the first electronic device and the second electronic device is obtained; Allocate the data to be transmitted based on the communication quality to obtain allocated data packets corresponding to each communication link; Based on each communication link, the allocation data packet corresponding to each communication link is sent to the second electronic device, so as to send the data to be transmitted to the second electronic device.

2. The method according to claim 1, characterized in that Each allocation data packet has an external sequence number, and the method of sending the allocation data packets corresponding to each communication link to the second electronic device based on each communication link includes: storing the allocated data packets corresponding to each communication link in the sending buffer corresponding to each communication link based on the external sequence number; The allocation data packets corresponding to each communication link are sent to the second electronic device based on the sending buffer corresponding to each communication link.

3. The method according to claim 2, characterized in that The communication links include n, the external sequence numbers in the sending buffer corresponding to each communication link are arranged from small to large, and the sending of the allocated data packets corresponding to each communication link to the second electronic device based on the sending buffer corresponding to each communication link includes: The external sequence numbers of the allocated data packets in the sending buffer corresponding to each communication link are sent in order from small to large, wherein the external sequence numbers are used to identify the order of the allocated data packets in the data to be transmitted.

4. The method according to claim 1, characterized in that: The communication link includes: a first communication link and a second communication link, and the communication quality includes: transmission efficiency, the transmission efficiency of the first communication link is greater than the transmission efficiency of the second communication link, and the size of the allocated data packet corresponding to the first communication link is greater than the size of the allocated data packet corresponding to the second communication link.

5. The method according to claim 2, characterized in that: The method further comprises: Obtain the size of data stored in the sending buffer corresponding to each communication link; The size of the subsequently allocated data packets corresponding to each communication link is adjusted based on the size of the stored data.

6. The method according to claim 2, characterized in that The method further comprises: In the case where it is detected that the target communication link between the first electronic device and the second electronic device is disconnected, allocating the allocated data packets in the sending buffer corresponding to the target communication link to other communication links in the communication links except the target communication link; When it is detected that a new communication link is added between the first electronic device and the second electronic device, part of the allocated data packets in the sending buffer corresponding to each communication link is added to the sending buffer corresponding to the new communication link.

7. The method according to claim 1, characterized in that The method further comprises: In the case of acquiring response information fed back by the second electronic device, determining the target allocation data packet based on the response information, wherein the response information includes statistical information that the target allocation data packet has not been received; The target allocation data packet is resent.

8. A data transmission device, characterized in that: Applicable to a first electronic device, comprising: A first acquisition module, configured to acquire the communication quality of the communication link between the first electronic device and the second electronic device when acquiring the data to be transmitted to the second electronic device; An allocation module, configured to allocate the data to be transmitted based on the communication quality, and obtain allocation data packets corresponding to each communication link; The sending module is used to send the allocated data packets corresponding to each communication link to the second electronic device based on each communication link, so as to send the data to be transmitted to the second electronic device.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

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

    CN110769465A

  • Audio and video data transmission method, electronic equipment and storage medium

    CN111294664A

  • Data packet transmission method and device, terminal equipment and storage medium

    CN114142968A

  • Data transmission method, device and equipment based on RUDP (Remote User Datagram Protocol) and computer storage medium

    CN114640724A

  • Data transmission method and device, electronic equipment and storage medium

    CN117768425A