Data transmission method and device, data transmission equipment and storage medium

By negotiating and determining the packet size and quantity between Bluetooth low-power devices, and dividing and sending the data to be transmitted, the problem of low-power transmission bandwidth utilization is solved, and the data transmission rate and channel utilization are improved.

CN119520500APending Publication Date: 2025-02-25ZHUHAI MOJIE TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311061861.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

Bluetooth Low Energy (BLE) has lower transmission bandwidth utilization, resulting in lower transmission rates.

Method used

By negotiating between the data sending device and the data receiving device, the data to be transmitted data is divided into multiple data segments, and these data segments are sent to the data receiving device.

Benefits of technology

The utilization of Bluetooth transmission bandwidth and data transmission rate are improved, and the utilization of Bluetooth channels is maximized by dynamically adjusting the size and number of data packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520500A_ABST
    Figure CN119520500A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, data transmission equipment and a computer readable storage medium. The data transmission method comprises: obtaining a single packet transmission data volume of data to be transmitted, the single packet transmission data volume being determined by negotiation between a data sending device and a data receiving device; the maximum transmission data packet number of the to-be-transmitted data is acquired, and the maximum transmission data packet number is determined based on the equipment parameters of the data receiving equipment and the single packet transmission data volume; segmenting the to-be-transmitted data according to the single packet transmission data volume and the maximum transmission data packet number to obtain a plurality of data segments of the to-be-transmitted data; and sending the plurality of data segments to the data receiving equipment. According to the invention, the transmission bandwidth utilization rate of the Bluetooth can be improved, and the data transmission rate of the Bluetooth is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method, apparatus, data transmission equipment and computer-readable storage medium. Background Art

[0002] With the development of communication technology, more and more electronic devices (such as mobile phones, AR glasses, etc.) have Bluetooth functions. As a wireless transmission technology that can perform wireless communication and data exchange within a relatively short distance, Bluetooth technology has been widely used in a large number of electronic devices due to its many advantages such as fast connection, low cost, low power consumption, fast transmission speed, and transmission effect is not limited by direction. However, the inventors of this application found in the actual research process that the current transmission bandwidth utilization rate of Bluetooth low energy (BLE) is low, which leads to a low transmission rate of Bluetooth low energy. Summary of the invention

[0003] The present application provides a data transmission method, an apparatus, a data transmission device and a computer-readable storage medium, which can improve the transmission bandwidth utilization of Bluetooth and increase the data transmission rate of Bluetooth.

[0004] In a first aspect, the present application provides a data transmission method, applied to a data sending device, the method comprising:

[0005] Acquiring a single-packet transmission data volume of the data to be transmitted, wherein the single-packet transmission data volume is determined by negotiation between the data sending device and the data receiving device;

[0006] Acquire a maximum number of transmission data packets of the data to be transmitted, wherein the maximum number of transmission data packets is determined based on a device parameter of the data receiving device and a single packet transmission data volume;

[0007] According to the single-packet transmission data volume and the maximum number of transmission data packets, the data to be transmitted is divided into multiple data segments of the data to be transmitted;

[0008] The plurality of data segments are sent to the data receiving device.

[0009] In a second aspect, the present application provides a data transmission method, applied to a data receiving device, the method comprising:

[0010] Sending the maximum transmission unit of the data receiving device to the data sending device, so that the data sending device uses the maximum transmission unit as a single-packet transmission data amount of data to be transmitted;

[0011] Sending the device parameters of the data receiving device to the data sending device, so that the data sending device determines the maximum number of transmission data packets of the data to be transmitted based on the device parameters of the data receiving device and the single-packet transmission data volume;

[0012] Receive multiple data segments of the data to be transmitted sent by the data sending device, wherein the multiple data are obtained by dividing the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets.

[0013] In a third aspect, the present application provides a data transmission device, the data transmission device comprising:

[0014] An acquiring unit, configured to acquire a single-packet transmission data volume of data to be transmitted, wherein the single-packet transmission data volume is determined by negotiation between the data sending device and the data receiving device;

[0015] The acquisition unit is further used to acquire the maximum number of transmission data packets of the data to be transmitted, wherein the maximum number of transmission data packets is determined based on the device parameters of the data receiving device and the single packet transmission data volume;

[0016] A segmentation unit, configured to segment the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets, to obtain a plurality of data segments of the data to be transmitted;

[0017] A transmission unit is used to send the multiple data segments to the data receiving device.

[0018] In a fourth aspect, the present application provides a data transmission device, the data transmission device comprising:

[0019] A first sending unit, configured to send a maximum transmission unit of the data receiving device to a data sending device, so that the data sending device uses the maximum transmission unit as a single-packet transmission data amount of data to be transmitted;

[0020] A second sending unit, configured to send the device parameters of the data receiving device to the data sending device, so that the data sending device determines the maximum number of transmission data packets of the data to be transmitted based on the device parameters of the data receiving device and the single-packet transmission data volume;

[0021] The receiving unit is used to receive multiple data segments of the data to be transmitted sent by the data sending device, wherein the multiple data are obtained by dividing the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets.

[0022] In a fifth aspect, the present application also provides a data transmission device, which includes a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, any one of the data transmission methods provided in the present application is executed.

[0023] In a sixth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the data transmission method.

[0024] The present application divides the data to be transmitted into multiple data segments of the data to be transmitted according to the single packet transmission data volume and the maximum number of transmission data packets of the data to be transmitted, and then sends the multiple data segments to the data receiving device; on the one hand, since the single packet transmission data volume of the data to be transmitted is determined by negotiation between the data sending device and the data receiving device, the single packet data volume of the data to be transmitted can be dynamically adjusted to be as large as possible when the data transmission is in accordance with the maximum load of the data link layer, so as to achieve the data length of the extended data packet, reduce the amount of data packets split when the data transmission is in accordance with the data transmission, and then reduce the amount of repeated data at the head and tail of the data packet, reduce the consumption of Bluetooth protocol bytes, and improve the data transmission volume per unit time to a certain extent, so as to maximize the utilization rate of the Bluetooth channel; on the other hand, since the maximum number of transmission data packets of the data to be transmitted can be dynamically determined based on the device parameters of the data receiving device and the single packet transmission data volume, the number of data packets of each data segment can be increased under the load of the data receiving device, and the data transmission volume per unit time can be increased to a certain extent. Therefore, the embodiment of the present application can improve the transmission bandwidth utilization rate of Bluetooth and improve the data transmission rate of Bluetooth. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 It is a schematic block diagram of the structure of a data transmission device provided in an embodiment of the present application;

[0027] Figure 2 This is a schematic diagram of the architecture of the data transmission system in the embodiment of the present application;

[0028] Figure 3 This is a flow chart of a data transmission method provided by an embodiment of the present application;

[0029] Figure 4is another flowchart of the data transmission method provided in an embodiment of the present application;

[0030] Figure 5 It is a schematic diagram for explaining the data transmission process provided in the embodiment of the present application;

[0031] Figure 6 This is a schematic diagram of a data transmission process provided in an embodiment of the present application;

[0032] Figure 7 is a schematic diagram of the structure of an embodiment of a data transmission device provided in an embodiment of the present application;

[0033] Figure 8 It is a schematic diagram of the structure of another embodiment of the data transmission device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0035] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0036] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0037] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, the known process will not be elaborated in detail to avoid unnecessary details that make the description of the present application embodiment obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.

[0038] The embodiments of the present application provide a data transmission method, an apparatus, a data transmission device, and a computer-readable storage medium, wherein the data transmission device can be integrated in the data transmission device.

[0039] The executor of the data transmission method of the embodiment of the present application may be the data transmission device provided in the embodiment of the present application, or a data transmission device integrated with the data transmission device, wherein the data transmission device may be implemented in hardware or software.

[0040] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0041] Figure 1 It is a structural schematic block diagram of a data transmission device provided in an embodiment of the present application.

[0042] like Figure 1 As shown, the data transmission device 100 includes a processor 101 and a memory 102, and the processor 101 and the memory 102 are connected via a bus 103, such as an I2C (Inter-integrated Circuit) bus.

[0043] Specifically, the processor 101 is used to provide computing and control capabilities to support the operation of the entire data transmission device 100. The processor 101 may be a central processing unit (CPU), and the processor 101 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0044] Specifically, the memory 102 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0045] Those skilled in the art will understand that Figure 1The structure shown in the figure is merely a block diagram of a partial structure related to the embodiment scheme of the present application, and does not constitute a limitation on the data transmission device to which the embodiment scheme of the present application is applied. The specific data transmission device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0046] The data transmission device may be a data sending device or a data receiving device.

[0047] The processor 101 is used to run the computer program stored in the memory 102, and implement any one of the data transmission methods provided in the embodiments of the present application when executing the computer program. For example, when the data transmission device is a data sending device, the processor 101 is used to run the computer program stored in the memory 102, and can implement the following steps when executing the computer program:

[0048] Obtain a single-packet transmission data volume of data to be transmitted, wherein the single-packet transmission data volume is determined by negotiation between the data sending device and the data receiving device; obtain a maximum number of transmission data packets of the data to be transmitted, wherein the maximum number of transmission data packets is determined based on device parameters of the data receiving device and the single-packet transmission data volume; divide the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets to obtain multiple data segments of the data to be transmitted; and send the multiple data segments to the data receiving device.

[0049] For another example, when the data transmission device is a data sending device, the processor 101 is used to run a computer program stored in the memory 102, and when executing the computer program, the following steps can be implemented:

[0050] The maximum transmission unit of the data receiving device is sent to the data sending device, so that the data sending device uses the maximum transmission unit as the single-packet transmission data volume of the data to be transmitted; the device parameters of the data receiving device are sent to the data sending device, so that the data sending device determines the maximum number of transmission data packets of the data to be transmitted based on the device parameters of the data receiving device and the single-packet transmission data volume; and multiple data segments of the data to be transmitted sent by the data sending device are received, wherein the multiple data are obtained by dividing the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets.

[0051] It should be noted that technicians in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the data transmission device described above can refer to the corresponding process in the following data transmission method embodiment, and will not be repeated here.

[0052] Please refer to Figure 2 , Figure 2 is a schematic diagram of the architecture of the data transmission system in the embodiment of the present application. Figure 2 As shown, the data transmission system includes a data sending device and a data receiving device, wherein the data sending device includes but is not limited to: smart glasses (such as AR glasses, VR glasses), mobile phones, computers, etc., and the data receiving device includes but is not limited to: smart glasses, mobile phones, human interface devices (Human Interface Device, HID), etc. The data sending device and the data receiving device are both devices that support the Bluetooth function. The data sending device and the data receiving device establish a connection through Bluetooth, so as to realize the sending of file data of the data sending device to the data receiving device.

[0053] Please note: Figure 2 The scenarios are only used to explain the data transmission method provided in the embodiments of the present application, but do not constitute a limitation on the application scenarios of the data transmission method provided in the embodiments of the present application.

[0054] See also Figure 3 , Figure 3 301 to 304, the data transmission method is applied to a data transmission device, wherein:

[0055] 301. Obtain a single-packet transmission data volume of data to be transmitted.

[0056] For ease of understanding, the data transmission method of this embodiment is first explained here. In order to ensure that the data is sent completely, in this embodiment, the data to be transmitted will be divided into several data segments for transmission. The data sending device first sends a data segment to the data receiving device, and after the data receiving device receives it, it continues to send the next data segment, and so on. The cycle continues until the entire data to be transmitted is transmitted to the data receiving device. Among them, each data segment contains several data packets, and each data segment sent by the data sending device is equivalent to continuously sending several data packets. It can be understood that in this embodiment, the total length of a data segment is determined by the single-packet transmission data volume of the data to be transmitted and the maximum number of transmission data packets (for specific implementation, see the relevant description below). If the total data volume of the data to be transmitted is less than or equal to the total length of a data segment, the data to be transmitted is transmitted as a data segment, and will not be divided into several data segments for transmission.

[0057] Among them, the data sending device and the data receiving device are both devices that support Bluetooth function. The data sending device includes but is not limited to: smart glasses, mobile phones, computers, etc., and the data receiving device includes but is not limited to: smart glasses, mobile phones, HID devices, etc.

[0058] The data to be transmitted refers to data that needs to be sent from the data sending end to the data receiving end. For example, taking mobile phone A sending file 1 in mobile phone A application a to HID device via Bluetooth as an example, the data sending device is mobile phone A, the data receiving device is HID device, and the data to be transmitted is file 1.

[0059] The single-packet transmission data volume is determined through negotiation between the data sending device and the data receiving device, and is used to indicate the data volume of each data packet when the data sending device sends the data to be transmitted to the data receiving device.

[0060] There are multiple ways to "obtain the single-packet transmission data volume of the data to be transmitted" in step 301, illustratively including:

[0061] (1) The data sending device and the data transmission device negotiate and determine in real time. For example, the negotiation process is specifically shown in the following steps A1 to A3:

[0062] A1. The data sending device establishes a Bluetooth connection with the data receiving device and pairs them.

[0063] A2. The data receiving device sends the maximum transmission unit (MTU) of the data receiving device to the data sending device.

[0064] The MTU is used to indicate the maximum load of the data link layer (payload) of the data receiving device.

[0065] A3. The data sending device sends confirmation information to the data receiving device, confirming that the MTU is used as the single packet transmission data volume of the data to be transmitted.

[0066] (2) When establishing a Bluetooth connection, the data transmission device and the data transmission device determine the single packet transmission data volume of the data to be transmitted in advance by referring to the method of steps A1 to A3, and store it in the database. In step 301, the single packet transmission data volume of the data to be transmitted is directly read from the database.

[0067] 302. Obtain a maximum number of transmission data packets of the data to be transmitted.

[0068] The maximum number of transmitted data packets is determined based on device parameters of the data receiving device and the amount of data transmitted in a single packet.

[0069] There are multiple ways to "obtain the maximum number of transmission data packets of the data to be transmitted" in step 302, illustratively including:

[0070] (1) The data transmission device and the data transmission device negotiate and determine in real time. For example, the negotiation process is specifically shown in the following steps B1 to B3:

[0071] B1. The data sending device establishes a Bluetooth connection with the data receiving device and pairs them.

[0072] B2. The data receiving device sends MTU and device information to the data sending device, wherein the device information includes the size of the Bluetooth buffer of the data receiving device.

[0073] B3. After receiving the MTU and device information sent by the data receiving device, the data sending device calculates the maximum number of transmission data packets of the data receiving device based on the MTU and device information, and sends confirmation information to the data receiving device to confirm that the calculated maximum number of transmission data packets is used as the single-packet transmission data volume of the data to be transmitted. The data sending device uses the MTU sent by the data sending device as the single-packet transmission data volume of the data to be transmitted, and calculates the maximum number of transmission data packets of the data receiving device using the Bluetooth buffer size of the data receiving device and the single-packet transmission data volume of the data to be transmitted. The maximum number of transmission data packets = Bluetooth buffer size / single-packet transmission data volume of the data to be transmitted; for example, if the single-packet transmission data volume is 32 bytes and the Bluetooth buffer size is 960 bytes, the maximum number of transmission data packets is: 9660 bytes / 32 bytes = 15.

[0074] For another example, the negotiation process is specifically shown in the following steps C1 to C3:

[0075] C1. The data sending device establishes a Bluetooth connection with the data receiving device and pairs them.

[0076] C2. The data receiving device sends the MTU, device information and the current data channel occupancy of the data receiving device to the data sending device. The device information includes the Bluetooth buffer size of the data receiving device.

[0077] C3. After the data sending device receives the MTU, device information and data channel occupancy sent by the data receiving device, it calculates the maximum number of transmission data packets of the data receiving device based on the MTU, device information and data channel occupancy, and sends a confirmation message to the data receiving device to confirm that the calculated maximum number of transmission data packets will be used as the single-packet transmission data volume of the data to be transmitted. Exemplarily, the maximum number of transmission data packets = (Bluetooth buffer size - data channel occupancy) / single-packet transmission data volume of the data to be transmitted; for example, the single-packet transmission data volume is 32 bytes, the Bluetooth buffer size is 960 bytes, and the data channel occupancy is 480 bytes, then the maximum number of transmission data packets is: (960 bytes - 480 bytes) / 32 bytes = 15. In this way, the data transmission congestion problem of the data receiving device can be avoided while dynamically determining the maximum data transmission volume.

[0078] (2) When establishing a Bluetooth connection, the data transmission device and the data transmission device refer to the method of steps B1 to B3 or the method of steps C1 to C3 in advance to determine the maximum number of transmission packets of the data to be transmitted and store it in the database. In step 302, the maximum number of transmission packets of the data to be transmitted is directly read from the database.

[0079] 303. Divide the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets to obtain multiple data segments of the data to be transmitted.

[0080] Exemplarily, step 303 may specifically include the following steps D1 to D2, wherein:

[0081] D1. The data sending device splits the data to be transmitted into packets according to the data volume of a single packet transmission, and obtains multiple split data packets of the data to be transmitted.

[0082] The split data packets are data packets obtained by splitting the data to be transmitted according to the data volume of a single packet. For example, assuming that the data volume of a single packet is 32 bytes and the data to be transmitted is 9600 bytes, then according to the data volume of each data packet = the data volume of a single packet (32 bytes), the data to be transmitted is split into 300 split data packets.

[0083] D2. The data sending device segments the multiple split data packets according to the maximum number of transmission data packets to obtain multiple data segments of the data to be transmitted.

[0084] For ease of understanding, the example in step D1 above is continued. For example, the data to be transmitted is split into 300 split data packets. Assuming that the maximum number of transmission data packets is 15, the number of data packets in each data segment = the maximum number of transmission data packets (i.e., 15). The 300 split data packets of the data to be transmitted are segmented to obtain 20 data segments.

[0085] It can be understood that in steps D1 to D2, the data to be transmitted is packetized according to the single-packet transmission data volume, and then the multiple split data packets are segmented according to the maximum number of transmission data packets to obtain multiple data segments of the data to be transmitted. In actual implementation, in order to obtain multiple data segments of the data to be transmitted, the total length of each data segment can also be calculated according to the single-packet transmission data volume and the maximum number of transmission data packets (exemplarily, the total length of each data segment = single-packet transmission data volume × maximum number of transmission data packets); then, according to the total length of each data segment, the data to be transmitted is firstly segmented into multiple initial data segments; then, according to the single-packet transmission data volume, each initial data segment is packetized, so that multiple data segments of the data to be transmitted can be obtained, and each data segment contains multiple split data packets.

[0086] 304. Send the multiple data segments to the data receiving device.

[0087] There are many ways to "send the plurality of data segments to the data receiving device" in step 304, illustratively including:

[0088] (1) In order to improve the transmission speed of the data to be transmitted, after the data sending device sends each data segment to the data receiving device, it does not need to wait for the data receiving device to reply to confirm receipt before sending the next data segment, but can send multiple data segments to the data receiving device according to the minimum connection interval of the data receiving device, or as close to the minimum connection interval as possible. At this time, "sending the multiple data segments to the data receiving device" in step 304 can specifically include the following steps 3041A to 3042A:

[0089] 3041A. Determine a transmission connection interval of the data to be transmitted based on a minimum connection interval of the data receiving device.

[0090] 3042A. Based on the transmission connection interval, send the plurality of data segments to the data receiving device.

[0091] The transmission connection interval is the transmission time interval between two data segments when transmitting the data to be transmitted to the data receiving device.

[0092] For example, if the data receiving device is an Android phone and the minimum connection interval supported by the Android phone is 7.5ms, if data is transmitted to the Android phone, multiple data segments are sequentially sent to the Android phone according to the transmission connection interval of 7.5ms. For another example, if the data receiving device is a HID device and the minimum connection interval supported by the HID device is 11.25ms, if data is transmitted to the HID device, multiple data segments are sequentially sent to the HID device according to the transmission connection interval of 11.25ms.

[0093] In order to enable the data sending device to normally send data to the data receiving device according to the minimum connection interval, or as close to the minimum connection interval as possible, the data sending device and the data receiving device will pre-negotiate the transmission connection interval of the data to be transmitted to shorten the request interval between two data segments, thereby increasing the data transmission volume per unit time and the data transmission rate to a certain extent. Exemplarily, the negotiation process can be specifically shown in the following steps E1 to E3:

[0094] E1. Obtain a current connection interval of the data receiving device.

[0095] E2. If the current connection interval is greater than the minimum connection interval of the data receiving device, a connection interval change request is sent to the data receiving device so that the data receiving device adjusts the current connection interval; the connection interval adjusted by the data receiving device is obtained, and the connection interval adjusted by the data receiving device is used as the transmission connection interval of the data to be transmitted.

[0096] E3. If the current connection interval is less than or equal to the minimum connection interval of the data receiving device, use the minimum connection interval of the data receiving device as the transmission connection interval of the data to be transmitted.

[0097] For example, after the data sending device establishes a Bluetooth connection with the data receiving device, the data sending device sends a connection interval query request to the data receiving device; after receiving the connection interval query request, the data receiving device sends the current connection interval of the data receiving device to the data sending device. If the current connection interval of the data receiving device (such as 9ms) is greater than the minimum connection interval of the data receiving device (such as 7.5ms), the data sending device sends a connection interval change request to the data receiving device; after receiving the connection interval change request, the data receiving device adjusts the current connection interval so that the adjusted connection interval of the data receiving device is equal to the minimum connection interval of the data receiving device (such as 7.5ms), and after the adjustment, sends the adjusted connection interval to the data sending device, and the data sending device uses the adjusted connection interval as the transmission connection interval of the data to be transmitted, thereby completing the transmission connection interval of the data to be transmitted.

[0098] For another example, after the data sending device establishes a Bluetooth connection with the data receiving device, the data sending device sends a query connection interval request to the data receiving device; after receiving the query connection interval request, the data receiving device sends the current connection interval of the data receiving device to the data sending device. If the current connection interval of the data receiving device (such as 7.5ms) is equal to the minimum connection interval of the data receiving device (such as 7.5ms), the minimum connection interval of the data sending device is used as the transmission connection interval of the data to be transmitted, and a confirmation message is sent to the data receiving device to determine that the minimum connection interval of the data receiving device is used as the transmission connection interval of the data to be transmitted, thereby completing the transmission connection interval of the data to be transmitted.

[0099] (2) In order to facilitate the data sending device to determine that the data receiving device has received the data segment and continue to send the next data segment, after the data sending device sends each data segment to the data receiving device, the data receiving device does not directly wait for a data segment to be received before replying to the data sending device to confirm receipt, so as to avoid the problem of low bandwidth utilization caused by a short transmission interruption of data while waiting for the reply confirmation; instead, when the M data packets contained in a data segment are about to be sent (for example, when the data receiving device receives N data packets of the i-th data segment, it replies to the data sending device to confirm receipt of the i-th data segment, where the i-th data segment includes M data packets and N is less than M), it replies to the data sending device to confirm receipt, so as to increase the data transmission volume per unit time, thereby increasing the transmission speed of the data to be transmitted. At this time, "sending multiple data segments to the data receiving device" in step 304 can specifically include the following steps 3041B to 3042B:

[0100] 3041B. Send the i-th data segment of the data to be transmitted to the data receiving device.

[0101] The ith data segment includes M data packets, and the maximum number of transmitted data packets is ≥M.

[0102] 3042B. In response to a reply instruction of the data receiving device after receiving N data packets of the i-th data segment, send the i+1-th data segment of the data to be transmitted to the data receiving device until multiple data segments have been sent to the data transmission device.

[0103] Wherein, N is less than M. In order to effectively reduce the waiting time of the data sending device waiting for the data receiving device to reply and confirm the receipt of the data segment and to make the data receiving device reply and confirm after completely receiving the data segment as much as possible, in this embodiment, N is set to N≤M-3.

[0104] For example, assuming that the data to be transmitted is divided into P=5 data segments, and each data segment includes M=15 data packets, then when transmitting 5 data segments, the data sending device first sends the i=1th data segment of the data to be transmitted to the data receiving device; when the data receiving device receives N=12 (assuming N=M-3) data packets of the i=1th data segment, it sends a reply instruction after receiving the N=12 data packets of the i=1th data segment to the data sending device; after the data sending device receives the reply instruction of the i=1th data segment, it continues to send the i+1=2th data segment of the data to be transmitted to the data receiving device; and so on, the data sending device first sends the i=1, 2, 3, 4, and 5th data segments of the data to be transmitted to the data receiving device until all 5 data segments have been sent to the data transmission device.

[0105] Furthermore, in order to avoid transmission congestion or low transmission bandwidth utilization, the maximum number of transmission packets of the data to be transmitted can be dynamically adjusted during the process of the data sending device sending multiple data segments of the data to be transmitted to the data receiving device. Exemplarily, the maximum number of transmission packets of the data to be transmitted can be dynamically adjusted through the following steps F1 to F4, and the data to be transmitted can continue to be sent.

[0106] F1. Obtain a reply interval between the i-th data segment and the i-1-th data segment of the data to be transmitted.

[0107] The reply interval is used to indicate the interval between the time when the data receiving device sends a reply instruction for the i-th data segment to the data sending device and the time when the data receiving device sends a reply instruction for the i-1-th data segment to the data sending device.

[0108] F2. Update the maximum number of transmitted data packets based on the reply interval and the minimum connection interval of the data receiving device.

[0109] F3. Re-segment the untransmitted data segments according to the updated maximum number of transmitted data packets to obtain updated data segments.

[0110] F4. Send the updated data segment to the data receiving device.

[0111] Exemplarily, if the reply interval between the i-th data segment and the i-1-th data segment of the data to be transmitted is greater than the minimum connection interval of the data receiving device, the maximum number of transmission data packets of the data to be transmitted is reduced; if the reply interval between the i-th data segment and the i-1-th data segment of the data to be transmitted is less than the minimum connection interval of the data receiving device, the maximum number of transmission data packets of the data to be transmitted is increased.

[0112] For example, assuming that the data to be transmitted is divided into P=5 data segments, each data segment includes M=15 data packets, then for the transmission of 5 data segments, the data sending device first sends the i=1th data segment of the data to be transmitted to the data receiving device; when the data receiving device receives N=12 (assuming N=M-3) data packets of the i=1th data segment, it sends a reply instruction after receiving N=12 data packets of the i=1th data segment to the data sending device at 17:00; after receiving the reply instruction of the i=1th data segment, the data sending device continues to send the i+1=2th data segment of the data to be transmitted to the data receiving device; when the data receiving device receives N=12 (assuming N=M-3) data packets of the i=2th data segment, it sends a reply instruction after receiving N=12 data packets of the i=2th data segment to the data sending device at 17:01, then the reply interval between the first data segment and the second data segment of the data to be transmitted is 1 second.

[0113] Assuming that the original data segment 1 includes data packets 1 to 15, the original data segment 2 includes data packets 16 to 30, the original data segment 3 includes data packets 30 to 45, the original data segment 4 includes data packets 46 to 60, and the original data segment 5 includes data packets 61 to 75, and assuming that the reply interval (such as 1s) is greater than the minimum connection interval of the data receiving device (such as 7.5ms), the maximum number of transmission data packets of the data to be transmitted is reduced (such as from 15 data packets per data segment to 5 data packets per data segment). Specifically: for the remaining untransmitted data segments (original data segment 3, original data segment 4, original data segment 5), the data sending end re-segments according to the updated maximum number of transmission data packets (such as 5), and obtains the updated data segment 1 (including data packets 31-35), data segment 2 (including data packets 36-40), ... data segment 9 (including data packets 70-75). Finally, the data sending device continues to send the updated 1st, 2nd, 3rd, ..., 9th data segments of the data to be transmitted to the data receiving device until all the contents of the data to be transmitted are sent to the data transmission device.

[0114] Furthermore, in order to reduce the process of sending notifications of the completion of the data transmission of the data to be transmitted by the data sending device and the data receiving device, and reduce the process of the data receiving device waiting for the notification of the completion of the transmission, the data sending device can also send the file information of the data to be transmitted to the data receiving device, wherein the file information includes the total data length of the data to be transmitted, so that the data receiving device can determine whether the data to be transmitted has been received based on the total data length and the amount of data received by the data receiving device. For example, the total data length of the data to be transmitted is 9600 bytes, assuming that the data transmission amount of a single packet is 32 bytes and the maximum number of transmission data packets is 15, then the data to be transmitted is split into 300 split data packets, and after receiving 300 data packets, the data receiving device can determine that the data to be transmitted has been completed.

[0115] See also Figure 4 , Figure 4 4 is another flow chart of a data transmission method provided in an embodiment of the present application. The data transmission method includes steps 401 to 403, and the data transmission method is applied to a data receiving device, wherein:

[0116] 401. Send a maximum transmission unit of the data receiving device to a data sending device, so that the data sending device uses the maximum transmission unit as a single-packet transmission data amount of data to be transmitted.

[0117] The implementation of step 401 may refer to the relevant description in step 301, which will not be repeated here for simplicity.

[0118] 402. Send device parameters of the data receiving device to the data sending device, so that the data sending device determines the maximum number of transmission data packets of the data to be transmitted based on the device parameters of the data receiving device and the single-packet transmission data volume.

[0119] The implementation of step 402 may refer to the relevant description in step 302, which will not be repeated here for simplicity.

[0120] 403. Receive multiple data segments of the to-be-transmitted data sent by the data sending device.

[0121] The plurality of data are obtained by dividing the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets.

[0122] The implementation of step 403 may refer to the relevant descriptions in steps 303 to 304, which will not be repeated here for simplicity.

[0123] There are multiple ways to "receive the multiple data segments of the data to be transmitted sent by the data sending device" in step 403, illustratively including:

[0124] (1) In order to improve the transmission speed of the data to be transmitted, after sending each data segment to the data receiving device, the data sending device does not need to wait for the data receiving device to reply to confirm receipt before sending the next data segment, but can send multiple data segments to the data receiving device according to the minimum connection interval of the data receiving device, or as close to the minimum connection interval as possible; in this case, "receiving multiple data segments of the data to be transmitted sent by the data sending device" in step 403 may specifically include step 4031A:

[0125] 4031A. The data receiving device receives multiple data segments of the data to be transmitted sent by the data sending device according to the transmission connection interval.

[0126] The specific implementation process of step 4031A can refer to the relevant description of steps 3041A to 3042A, which will not be repeated here for simplicity.

[0127] In order to enable the data sending device to normally send data to the data receiving device at the minimum connection interval, or as close to the minimum connection interval as possible, the data sending device and the data receiving device will pre-negotiate the transmission connection interval of the data to be transmitted. Exemplarily, the negotiation process can be specifically shown in the following steps G1 to G4:

[0128] G1. Receive a connection interval query request sent by the data sending device.

[0129] G2. In response to the query connection interval request, send the current connection interval of the data receiving device to the data sending device.

[0130] G3. In response to the connection interval change request of the data sending device, adjust the current connection interval so that the adjusted connection interval of the data receiving device is equal to a preset Bluetooth connection interval threshold.

[0131] G4. Send the adjusted connection interval to the data sending device, so that the data sending end uses the adjusted connection interval as the transmission connection interval of the data to be transmitted.

[0132] The specific implementation of steps G1 to G4 can refer to the relevant description of steps E1 to E3, which will not be repeated here for simplicity.

[0133] (2) In order to facilitate the data sending device to determine that the data receiving device has received the data segment and continue to send the next data segment, after the data sending device sends each data segment to the data receiving device, the data receiving device does not directly wait for a data segment to be received before replying to the data sending device to confirm receipt, so as to avoid the problem of low bandwidth utilization caused by a short transmission interruption of data while waiting for the reply confirmation; instead, when the M data packets contained in a data segment are about to be sent (for example, when the data receiving device receives N data packets of the i-th data segment, it replies to the data sending device to confirm receipt of the i-th data segment, where the i-th data segment includes M data packets and N is less than M), it replies to the data sending device to confirm receipt, so as to increase the data transmission volume per unit time, thereby increasing the transmission speed of the data to be transmitted. At this time, the "receiving multiple data segments of the data to be transmitted sent by the data sending device" in step 403 can specifically include steps 4031B to 4033B:

[0134] 4031B. Receive the i-th data segment sent by the data sending device.

[0135] Each of the data segments includes M data packets.

[0136] 4032B. After receiving the N data packets of the i-th data segment, send a reply instruction of the i-th data segment to the data sending device.

[0137] 4033B. Receive the (i+1)th data segment fed back by the data sending device based on the reply instruction, until the plurality of data segments have been received.

[0138] The specific implementation process of steps 4031B to 4033B can refer to the relevant description of steps 3041B to 3042B, which will not be repeated here for simplicity.

[0139] Furthermore, in order to avoid transmission congestion or low transmission bandwidth utilization, the maximum number of transmission packets of the data to be transmitted can be dynamically adjusted during the process of the data sending device sending multiple data segments of the data to be transmitted to the data receiving device. Exemplarily, the data sending device can dynamically adjust the maximum number of transmission packets of the data to be transmitted with reference to steps F1 to F4, and continue to send the data to be transmitted; the data receiving device continues to receive the updated data segments sent by the data sending device. Among them, the updated data segments are obtained by the data sending device re-splitting the untransmitted data segments according to the updated maximum number of transmission packets; the updated maximum number of transmission packets is obtained by the data sending device updating the maximum number of transmission packets of the data to be transmitted based on the reply interval between the i-th data segment and the i-1-th data segment of the data to be transmitted, and the minimum connection interval of the data receiving device.

[0140] Furthermore, in order to reduce the process of the data sending device and the data receiving device sending notifications of the completion of the data transmission to be transmitted, and reduce the process of the data receiving device waiting for the notification of the completion of the transmission, the data sending device can also send the file information of the data to be transmitted to the data receiving device, wherein the file information includes the total data length of the data to be transmitted, so that the data receiving device can determine whether the data to be transmitted has been received based on the total data length and the amount of data received by the data receiving device. At this time, the data receiving device can receive the file information of the data to be transmitted sent by the data receiving device, wherein the file information includes the total data length of the data to be transmitted; based on the total data length and the amount of data received by the data receiving device, determine whether the data to be transmitted has been received. For example, the total data length of the data to be transmitted is 9600 bytes, assuming that the data transmission amount of a single packet is 32 bytes and the maximum number of transmission data packets is 15, then the data to be transmitted is split into 300 split data packets, and the data receiving device can determine that the data to be transmitted has been completed after receiving 300 data packets.

[0141] Please refer to Figure 5 and Figure 6 In order to better understand the data transmission method provided in the embodiment of the present application, the following takes the data sending device as a mobile phone (the mobile phone has a BLE function), the data receiving device as a peripheral device, and the target file (such as an audio file) in the mobile phone APP is sent to the peripheral device via the Bluetooth function as an example to illustrate the data transmission process. Figure 5 As shown, the data transmission process may include the following steps 501 to 508:

[0142] 501. The mobile phone APP and the peripheral device establish a Bluetooth connection and pair via the mobile phone.

[0143] 502. After the mobile phone APP is successfully paired with the peripheral device, the mobile phone and the peripheral device negotiate the maximum payload MTU of the data link layer.

[0144] 503. The mobile phone APP sends file information of the target file to the peripheral device.

[0145] The file information may include the total data length of the target file, etc.

[0146] 504. The mobile phone and the peripheral device negotiate the single-packet transmission data volume and the maximum number of transmission data packets of the target file according to the file information and MTU; after the negotiation is successful, the peripheral device sets the connection parameters and sends a reply to the mobile phone APP regarding the received file information.

[0147] The connection parameters include the maximum number of transmission packets of the target file.

[0148] For example, you can refer to Figure 6 As shown in the "Negotiate connection parameters" and "Reply file information ACK" parts.

[0149] 505. The mobile phone APP sends the i-th data segment of the target file to the peripheral device according to the negotiated single-packet transmission data volume and the maximum number of transmission packets.

[0150] Each data segment includes M data packets, and the data volume of each data packet is the data volume of a single packet transmission. Here, the maximum number of transmission data packets = M.

[0151] Specifically, the mobile phone APP sends M*MTU file data each time (the M*MTU file data is a data segment, for example, Figure 6 As shown, 15*MTU file data is sent to the peripheral device, so that the target file can be sent to the data peripheral device according to multiple data segments.

[0152] 506. When receiving the i-th data segment of the target file, if the amount of data received by the peripheral device for the i-th data segment is equal to N*MTU, the peripheral device sends a reply instruction of receiving the i-th data segment to the mobile phone APP.

[0153] Among them, N<M, here N=M-3 is taken as an example.

[0154] For example, Figure 6 As shown, after receiving the file data of *MTU, it replies, refer to Figure 6 As shown in the "Reply received 12*MTU" section.

[0155] 507. After receiving the reply instruction of the i-th data segment, the mobile phone APP continues to send the i+1-th data segment of the target file to the peripheral device.

[0156] 508. Repeat steps 505 to 507 until the target file is sent.

[0157] Furthermore, when the peripheral device sends a reply instruction to the mobile phone APP that it has received the i-th data segment, it can send the received data packet sequence number to the mobile phone APP, so that the mobile phone APP can judge whether there are abnormal situations such as packet loss and duplicate packets during the transmission process according to the sequence number of the data packet received by the peripheral device; if there is an abnormality, it can resend. Alternatively, the peripheral device can judge whether there are abnormal situations such as packet loss and duplicate packets during the transmission process according to the sequence number of the data packet received by the peripheral device; if there is an abnormality, it can send the abnormal situation to the mobile phone APP so that the mobile phone APP can resend, such as Figure 6 As shown in the "Reply whether the packet is lost or duplicated" and "Determine whether retransmission is required based on the reply ACK" sections.

[0158] Furthermore, if the mobile phone APP does not receive a reply from the peripheral device within a specified time after sending the i-th data segment to the peripheral device, the mobile phone APP will resend the i-th data segment to the peripheral device.

[0159] Furthermore, the mobile phone APP can send a sending completion instruction to the peripheral device after the target file has been completely sent, so that the peripheral device can confirm whether the target file has been received. Figure 6 As shown in the "File Sending Complete" section; after receiving the sending completion instruction, the peripheral device checks the received file data to confirm whether the target file is received completely. When the receiving is complete, it sends a receiving completion instruction to the mobile phone APP and restores the original connection parameters of the peripheral device, such as Figure 6 See the "Resume File Verification Results" and "Restore Connection Parameters" sections in the document.

[0160] From the above content, it can be seen that by dividing the data to be transmitted according to the single packet transmission data volume and the maximum number of transmission data packets of the data to be transmitted, the data to be transmitted is obtained by dividing the data to be transmitted into multiple data segments of the data to be transmitted, and then sending the multiple data segments to the data receiving device; on the one hand, since the single packet transmission data volume of the data to be transmitted is determined by negotiation between the data sending device and the data receiving device, the single packet data volume of the data to be transmitted can be dynamically adjusted to be as large as possible when the maximum load of the data link layer is met, so as to achieve the data length of the extended data packet, reduce the amount of data packets split when the data to be transmitted is transmitted, and then reduce the amount of repeated data at the head and tail of the data packet, reduce the consumption of Bluetooth protocol bytes, and improve the data transmission volume per unit time to a certain extent, so as to maximize the utilization of the Bluetooth channel; on the other hand, since the maximum number of transmission data packets of the data to be transmitted can be dynamically determined based on the device parameters of the data receiving device and the single packet transmission data volume, the number of data packets of each data segment can be increased under the load of the data receiving device, and the data transmission volume per unit time can be increased to a certain extent. Therefore, the embodiment of the present application can improve the transmission bandwidth utilization of Bluetooth and improve the data transmission rate of Bluetooth.

[0161] In addition, in order to better implement the data transmission method in the embodiment of the present application, based on the data transmission method, the embodiment of the present application also provides a data transmission device, such as Figure 7 FIG. 1 is a schematic diagram of a data transmission device according to an embodiment of the present application. The data transmission device 700 includes:

[0162] The acquisition unit 701 is used to acquire a single-packet transmission data volume of data to be transmitted, wherein the single-packet transmission data volume is determined by negotiation between the data sending device and the data receiving device.

[0163] The acquisition unit 702 is further configured to acquire a maximum number of transmission data packets of the data to be transmitted, wherein the maximum number of transmission data packets is determined based on a device parameter of the data receiving device and the single packet transmission data volume.

[0164] The segmentation unit 703 is used to segment the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets to obtain multiple data segments of the data to be transmitted.

[0165] The transmission unit 704 is configured to send the plurality of data segments to the data receiving device.

[0166] In some embodiments, the transmission unit 704 is specifically used for:

[0167] Sending the i-th data segment of the data to be transmitted to the data receiving device, wherein the i-th data segment includes M data packets; in response to a reply instruction of the data receiving device after receiving N data packets of the i-th data segment, sending the i+1-th data segment of the data to be transmitted to the data receiving device, until multiple data segments have been sent to the data transmission device, wherein N is less than M.

[0168] In some embodiments, the transmission unit 704 is specifically used for:

[0169] Obtain a reply interval between the i-th data segment and the i-1-th data segment of the data to be transmitted; based on the reply interval and the minimum connection interval of the data receiving device, update the maximum number of transmission data packets; according to the updated maximum number of transmission data packets, re-divide the data segments that have not been transmitted to obtain updated data segments; and send the updated data segments to the data receiving device.

[0170] In some embodiments, the data transmission device further includes a sending unit (not shown in the figure), and the sending unit is specifically used to:

[0171] Sending file information of the data to be transmitted to the data receiving device, wherein the file information includes the total data length of the data to be transmitted, so that the data receiving device can determine whether the data to be transmitted has been received based on the total data length and the amount of data received by the data receiving device.

[0172] In some embodiments, the acquisition unit 701 is specifically used to:

[0173] Acquire the current connection interval of the data receiving device; if the current connection interval is greater than the minimum connection interval of the data receiving device, send a connection interval change request to the data receiving device so that the data receiving device adjusts the current connection interval; acquire the adjusted connection interval of the data receiving device, and use the adjusted connection interval of the data receiving device as the transmission connection interval of the data to be transmitted.

[0174] In some embodiments, the transmission unit 704 is specifically used for:

[0175] Based on the transmission connection interval, a plurality of the data segments are sent to the data receiving device.

[0176] In some embodiments, the acquisition unit 701 is specifically used to:

[0177] Receive the single-packet transmission data volume and device parameters sent by the data receiving device; and determine the maximum number of transmission data packets of the data to be transmitted based on the single-packet transmission data volume and the device parameters.

[0178] like Figure 8 FIG. 8 is a schematic diagram of another embodiment of a data transmission device provided in an embodiment of the present application. The data transmission device 800 includes:

[0179] A first sending unit 801 is used to send the maximum transmission unit of the data receiving device to the data sending device, so that the data sending device uses the maximum transmission unit as a single packet transmission data amount of data to be transmitted;

[0180] A second sending unit 802 is used to send the device parameters of the data receiving device to the data sending device, so that the data sending device determines the maximum number of transmission data packets of the data to be transmitted based on the device parameters of the data receiving device and the single packet transmission data amount;

[0181] The receiving unit 803 is used to receive multiple data segments of the data to be transmitted sent by the data sending device, wherein the multiple data are obtained by dividing the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets.

[0182] In some embodiments, the receiving unit 803 is specifically configured to:

[0183] receiving an i-th data segment sent by the data sending device, wherein each of the data segments includes M data packets;

[0184] After receiving N data packets of the i-th data segment, sending a reply instruction of the i-th data segment to the data sending device;

[0185] The i+1th data segment fed back by the data sending device based on the reply instruction is received until the plurality of data segments have been received.

[0186] In some embodiments, the receiving unit 803 is specifically configured to:

[0187] Receiving file information of the data to be transmitted sent by the data receiving device, wherein the file information includes the total data length of the data to be transmitted;

[0188] Based on the total data length and the amount of data received by the data receiving device, it is determined whether the data to be transmitted is completely received.

[0189] In some embodiments, the data transmission device further includes a third sending unit (not shown in the figure), and the third sending unit is specifically configured to:

[0190] receiving a connection interval query request sent by the data sending device;

[0191] In response to the query connection interval request, sending the current connection interval of the data receiving device to the data sending device;

[0192] In response to a connection interval change request from the data sending device, adjusting the current connection interval so that the adjusted connection interval of the data receiving device is equal to a preset Bluetooth connection interval threshold;

[0193] The adjusted connection interval is sent to the data sending device, so that the data sending end uses the adjusted connection interval as the transmission connection interval of the data to be transmitted.

[0194] In some embodiments, the receiving unit 803 is specifically configured to:

[0195] Receive multiple data segments of the data to be transmitted that are sequentially sent by the data sending device according to the transmission connection interval.

[0196] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous data transmission method embodiment, which will not be repeated here.

[0197] A person of ordinary skill in the art will appreciate that all or part of the steps in the above data transmission method may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0198] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored. The computer programs can be loaded by a processor to execute any data transmission method provided in the embodiment of the present application.

[0199] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0200] In the above-mentioned data transmission device, computer-readable storage medium, and data transmission equipment embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-described data transmission device, computer-readable storage medium, data transmission equipment and its corresponding units can refer to the description of the data transmission method in the above embodiment, and will not be repeated here.

[0201] The above is a detailed introduction to a data transmission method, apparatus, data transmission equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data transmission method, characterized in that: Applied to a data sending device, the method comprises: Acquiring a single-packet transmission data volume of the data to be transmitted, wherein the single-packet transmission data volume is determined by negotiation between the data sending device and the data receiving device; Acquire a maximum number of transmission data packets of the data to be transmitted, wherein the maximum number of transmission data packets is determined based on a device parameter of the data receiving device and a single packet transmission data volume; According to the single-packet transmission data volume and the maximum number of transmission data packets, the data to be transmitted is divided into multiple data segments of the data to be transmitted; The plurality of data segments are sent to the data receiving device.

2. The data transmission method according to claim 1, characterized in that: The sending of the plurality of data segments to the data receiving device comprises: Sending the i-th data segment of the data to be transmitted to the data receiving device, wherein the i-th data segment includes M data packets; In response to a reply instruction of the data receiving device after receiving N data packets of the i-th data segment, the i+1-th data segment of the data to be transmitted is sent to the data receiving device until multiple data segments have been sent to the data transmission device, where N is less than M.

3. The data transmission method according to claim 2, characterized in that: The method further comprises: Obtaining a reply interval between the i-th data segment and the i-1-th data segment of the data to be transmitted; updating the maximum number of transmitted data packets based on the reply interval and the minimum connection interval of the data receiving device; Re-segmenting the untransmitted data segments according to the updated maximum number of transmitted data packets to obtain updated data segments; The updated data segment is sent to the data receiving device.

4. The data transmission method according to claim 1, characterized in that: The method further comprises: Sending file information of the data to be transmitted to the data receiving device, wherein the file information includes the total data length of the data to be transmitted, so that the data receiving device can determine whether the data to be transmitted has been received based on the total data length and the amount of data received by the data receiving device.

5. The data transmission method according to claim 1, characterized in that: The method further comprises: Obtaining a current connection interval of the data receiving device; If the current connection interval is greater than the minimum connection interval of the data receiving device, sending a connection interval change request to the data receiving device so that the data receiving device adjusts the current connection interval; The connection interval adjusted by the data receiving device is acquired, and the connection interval adjusted by the data receiving device is used as the transmission connection interval of the data to be transmitted.

6. The data transmission method according to claim 5, characterized in that: The sending of the plurality of data segments to the data receiving device comprises: Based on the transmission connection interval, a plurality of the data segments are sent to the data receiving device.

7. A data transmission method, characterized in that: Applied to a data receiving device, the method comprises: Sending the maximum transmission unit of the data receiving device to the data sending device, so that the data sending device uses the maximum transmission unit as a single-packet transmission data amount of data to be transmitted; Sending the device parameters of the data receiving device to the data sending device, so that the data sending device determines the maximum number of transmission data packets of the data to be transmitted based on the device parameters of the data receiving device and the single-packet transmission data volume; Receive multiple data segments of the data to be transmitted sent by the data sending device, wherein the multiple data are obtained by dividing the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets.

8. A data transmission device, characterized in that: The data transmission device comprises: An acquiring unit, configured to acquire a single-packet transmission data volume of data to be transmitted, wherein the single-packet transmission data volume is determined by negotiation between the data sending device and the data receiving device; The acquisition unit is further used to acquire the maximum number of transmission data packets of the data to be transmitted, wherein the maximum number of transmission data packets is determined based on the device parameters of the data receiving device and the single packet transmission data volume; A segmentation unit, configured to segment the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets, to obtain a plurality of data segments of the data to be transmitted; A transmission unit is used to send the multiple data segments to the data receiving device.

9. A data transmission device, characterized in that: The data transmission device comprises: A first sending unit, configured to send a maximum transmission unit of the data receiving device to a data sending device, so that the data sending device uses the maximum transmission unit as a single-packet transmission data amount of data to be transmitted; A second sending unit, configured to send the device parameters of the data receiving device to the data sending device, so that the data sending device determines the maximum number of transmission data packets of the data to be transmitted based on the device parameters of the data receiving device and the single-packet transmission data volume; The receiving unit is used to receive multiple data segments of the data to be transmitted sent by the data sending device, wherein the multiple data are obtained by dividing the data to be transmitted according to the single-packet transmission data volume and the maximum number of transmission data packets.

10. A data transmission device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, it executes the data transmission method according to any one of claims 1 to 6 or 7.

11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the data transmission method described in any one of claims 1 to 6 or 7.

Citation Information

Cited By

  • Electrical impedance tomography data processing method and device and storage medium

    CN120501404A

  • Parameter transmission method of electrical equipment

    CN120612806A