Bluetooth data transmission methods, devices and electronic devices

By obtaining the execution identifier and data packet size from the configuration file, the data packet size is dynamically adjusted to adapt to the processing capabilities of the Bluetooth stack, thus solving the transmission rate and stability issues in low-power Bluetooth transmission and achieving high-speed and stable data transmission.

CN122093779APending Publication Date: 2026-05-26HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU EZVIZ SOFTWARE CO LTD
Filing Date
2024-11-25
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In low-power Bluetooth data transmission scenarios, the inability to know the Bluetooth stack processing capabilities of the Bluetooth master and slave devices makes it impossible to determine the appropriate data packet size, resulting in slower transmission rates and lower stability.

Method used

By obtaining the execution identifier, total data transmission volume, and first data packet size from the configuration file, the data packet size is dynamically adjusted to adapt to the processing capacity of the Bluetooth stack. A correction process and a search process are used to determine the target data packet size to achieve stable transmission.

Benefits of technology

In the absence of known processing capabilities of the Bluetooth stack at the receiving end device, the maximum data packet size that the Bluetooth stack can handle is dynamically determined to achieve high-speed and stable Bluetooth data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122093779A_ABST
    Figure CN122093779A_ABST
Patent Text Reader

Abstract

This application provides a Bluetooth data transmission method, apparatus, and electronic device. When the execution correction process is determined by the execution identifier in the configuration file, the first data packet size recorded in the configuration file is reduced to obtain a second data packet size. If the second data packet size is greater than the maximum data packet MTU negotiated between the sending and receiving devices, and transmission is successful based on the second data packet size, then the second data packet size is determined as the maximum data packet size that the Bluetooth stack of the receiving device can handle, i.e., the target data packet size. If transmission fails based on the second data packet size, then the second data packet size is used as the first data packet size, and the target data packet size is re-determined. This method can determine the maximum data packet size that the Bluetooth stack can handle even when the processing capability of the receiving device's Bluetooth stack is unknown, achieving high-speed and stable Bluetooth data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Bluetooth communication technology, and in particular to Bluetooth data transmission methods, devices and electronic devices. Background Technology

[0002] In low-power Bluetooth data transmission scenarios, due to the limitations of some closed-source system application programming interfaces (APIs), it is impossible to know the processing capabilities of the Bluetooth stack of the Bluetooth host and Bluetooth slave, i.e., the maximum data packet size that the Bluetooth stack can handle. Therefore, when the Bluetooth host and Bluetooth slave are transmitting large data through Bluetooth Low Energy, it is impossible to determine the appropriate data packet size for transmission, resulting in a slow Bluetooth data transmission rate and low transmission stability. Summary of the Invention

[0003] In view of this, this application provides a Bluetooth data transmission method, apparatus, and Bluetooth device to determine the processing capabilities of the Bluetooth stack, thereby improving the Bluetooth data transmission rate and transmission stability.

[0004] The technical solution provided in this application is as follows:

[0005] According to an embodiment of the first aspect of this application, a Bluetooth data transmission method is provided, the method comprising:

[0006] Obtain the configuration file, which includes an execution identifier, a total data transmission volume, and a first data packet size. The value of the execution identifier is used to indicate the allowed execution process, and the first data packet size refers to the data packet size that the Bluetooth stack of the receiving device can process.

[0007] If the execution identifier is a first value, which is used to indicate that the correction process is allowed, then the second data packet size is determined according to the first data packet size, and the second data packet size is smaller than the first data packet size;

[0008] If the size of the second data packet is greater than the maximum transmission unit (MTU) negotiated between the sending and receiving devices, then the total data transmission volume is transmitted based on the size of the second data packet.

[0009] If the transmission is successful based on the second data packet size, then the second data packet size is determined to be the target data packet size, and Bluetooth data is transmitted to the receiving device according to the target data packet size. The target data packet size refers to the maximum data packet size that the Bluetooth stack of the receiving device can process.

[0010] If transmission fails based on the second data packet size, the second data packet size is used as the first data packet size, and the process returns to the step of determining the second data packet size based on the first data packet size.

[0011] Optionally, after obtaining the configuration file, the method further includes:

[0012] If the execution identifier is a second value, which indicates that the search process is allowed, then the size of the third data packet is determined based on the size of the first data packet; the size of the third data packet is greater than the size of the first data packet.

[0013] Data of the total data transmission volume is transmitted based on the size of the third data packet.

[0014] If transmission fails based on the third data packet size, the execution identifier in the configuration file is updated to the first value, and the first data packet size in the configuration file is updated to the third data packet size.

[0015] Optionally, if the transmission based on the second data packet size is successful, the method further includes:

[0016] The execution identifier in the configuration file is updated to a third value, which indicates that the correction process and the search process are not allowed to be executed, and the first data packet size recorded in the configuration file is updated to the target data packet size.

[0017] When transmitting Bluetooth data from the sending device to the receiving device, if the execution identifier in the configuration file is found to be a third value, then Bluetooth data transmission is performed based on the target data packet size.

[0018] Optionally, after performing Bluetooth data transmission based on the target data packet size, the method further includes:

[0019] If packet loss is detected, the execution identifier included in the configuration file is updated to the first value to redetermine the size of the target data packet.

[0020] Optionally, the method further includes:

[0021] If the transmission is successful based on the third data packet size, the first data packet size in the configuration file is updated to the third data packet size, and the process of determining the third data packet size based on the first data packet size is returned.

[0022] Optionally, the configuration file also includes a scene identifier and scene parameters. After obtaining the configuration file, the method further includes:

[0023] If the execution identifier is a third value, the third value is used to indicate that the correction process and the search process are not allowed to be executed, then the current application scenario is determined according to the scenario identifier in the configuration file;

[0024] If the current application scenario is a specified type scenario, and the scenario parameters corresponding to the current application scenario in the configuration file meet the preset conditions, then the execution identifier in the configuration file is updated to the second value, which is used to indicate that the search process is allowed to be executed.

[0025] Optionally, the specified scenario type includes sleep scenario, timed scenario, and heartbeat scenario, and the scenario parameters corresponding to the current application scenario in the configuration file meet preset conditions, including:

[0026] If the current application scenario is a sleep scenario and the scenario parameter corresponding to the sleep scenario is sleep duration, then if the sleep duration reaches the first threshold, it is determined that the preset condition is met.

[0027] If the current application scenario is a timed scenario, and the scenario parameter corresponding to the timed scenario is the cumulative duration, and the cumulative duration refers to the duration from the last time the execution identifier was updated to the second value to the current time, then if the cumulative duration reaches the second threshold, it is determined that the preset condition is met.

[0028] If the current application scenario is a heartbeat scenario, and the scenario parameter corresponding to the heartbeat scenario is the cumulative number of heartbeat packets, the cumulative number of heartbeat packets refers to the number of heartbeat packets sent between the sending device and the receiving device during the time period from the last time the execution identifier was updated to the second value to the current time. Then, if the cumulative number of heartbeat packets reaches the third threshold, it is determined that the preset condition is met.

[0029] According to an embodiment of a second aspect of this application, a Bluetooth data transmission device is provided, the device comprising:

[0030] The acquisition unit is used to acquire a configuration file, which includes an execution identifier, a total data transmission volume, and a first data packet size. The value of the execution identifier is used to indicate the allowed execution process, and the first data packet size refers to the data packet size that the Bluetooth stack of the receiving device can process.

[0031] The determining unit is configured to determine a second data packet size based on the first data packet size if the execution identifier is a first value, the first value being used to indicate that the correction process is allowed to be executed; the second data packet size is smaller than the first data packet size.

[0032] The transmission unit is used to transmit data of the total data transmission volume based on the size of the second data packet if the size of the second data packet is greater than the maximum transmission unit (MTU) negotiated between the sending device and the receiving device.

[0033] If the transmission is successful based on the second data packet size, then the second data packet size is determined to be the target data packet size, and Bluetooth data is transmitted to the receiving device according to the target data packet size. The target data packet size refers to the maximum data packet size that the Bluetooth stack of the receiving device can process.

[0034] The correction unit is configured to, if transmission fails based on the second data packet size, use the second data packet size as the first data packet size and return to the step of determining the second data packet size based on the first data packet size.

[0035] Optionally, after obtaining the configuration file, the determining unit is further configured to:

[0036] If the execution identifier is a second value, which indicates that the search process is allowed, then the size of the third data packet is determined based on the size of the first data packet; the size of the third data packet is greater than the size of the first data packet.

[0037] Data of the total data transmission volume is transmitted based on the size of the third data packet.

[0038] If transmission fails based on the third data packet size, the execution identifier in the configuration file is updated to the first value, and the first data packet size in the configuration file is updated to the third data packet size.

[0039] And / or, if the transmission is successful based on the second data packet size, the transmission unit is further configured to:

[0040] The execution identifier in the configuration file is updated to a third value, which indicates that the correction process and the search process are not allowed to be executed, and the first data packet size recorded in the configuration file is updated to the target data packet size;

[0041] When transmitting Bluetooth data from the sending device to the receiving device, if the execution identifier in the configuration file is found to be a third value, then Bluetooth data transmission is performed based on the target data packet size.

[0042] And / or, after performing Bluetooth data transmission based on the target data packet size, the transmission unit is further configured to:

[0043] If packet loss is detected, the execution identifier included in the configuration file is updated to the first value to redetermine the size of the target data packet;

[0044] And / or, the determining unit is further configured to:

[0045] If the transmission is successful based on the third data packet size, then the first data packet size in the configuration file is updated to the third data packet size, and the process returns to the step of determining the third data packet size based on the first data packet size.

[0046] And / or, the configuration file also includes a scene identifier and scene parameters. After obtaining the configuration file, the determining unit is further configured to:

[0047] If the execution identifier is a third value, the third value is used to indicate that the correction process and the search process are not allowed to be executed, then the current application scenario is determined according to the scenario identifier in the configuration file;

[0048] If the current application scenario is a specified type scenario, and the scenario parameters corresponding to the current application scenario in the configuration file meet the preset conditions, then the execution identifier in the configuration file is updated to the second value, which is used to indicate that the search process is allowed to be executed;

[0049] And / or, the specified type of scenario includes sleep scenario, timed scenario, and heartbeat scenario, and the determining unit is specifically used for:

[0050] If the current application scenario is a sleep scenario and the scenario parameter corresponding to the sleep scenario is sleep duration, then if the sleep duration reaches the first threshold, it is determined that the preset condition is met.

[0051] If the current application scenario is a timed scenario, and the scenario parameter corresponding to the timed scenario is the cumulative duration, and the cumulative duration refers to the duration from the last time the execution identifier was updated to the second value to the current time, then if the cumulative duration reaches the second threshold, it is determined that the preset condition is met.

[0052] If the current application scenario is a heartbeat scenario, and the scenario parameter corresponding to the heartbeat scenario is the cumulative number of heartbeat packets, the cumulative number of heartbeat packets refers to the number of heartbeat packets sent between the sending device and the receiving device during the time period from the last time the execution identifier was updated to the second value to the current time. Then, if the cumulative number of heartbeat packets reaches the third threshold, it is determined that the preset condition is met.

[0053] According to an embodiment of the third aspect of this application, a Bluetooth device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method as described in the first aspect.

[0054] As can be seen from the above technical solutions, this application, when determining the execution correction process through the execution identifier in the configuration file, reduces the first data packet size recorded in the configuration file to obtain the second data packet size. If the second data packet size is greater than the maximum data packet MTU negotiated between the sending device and the receiving device, and the transmission is successful based on the second data packet size, then the second data packet size is determined as the target data packet size, i.e., the maximum data packet size that the Bluetooth stack of the receiving device can handle, and Bluetooth data transmission is further performed based on the target data packet size. If the transmission fails based on the second data packet size, then the second data packet size is used as the first data packet size, and the target data packet size is re-determined. Even when the processing capability of the Bluetooth stack of the receiving device is unknown, the maximum data packet size that the Bluetooth stack can handle can be determined, achieving high-speed and stable Bluetooth data transmission. Attached Figure Description

[0055] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the principles of this application.

[0056] Figure 1 This is a flowchart of a Bluetooth data transmission method provided in an embodiment of this application;

[0057] Figure 2 This is a schematic diagram of the overall process of the Bluetooth data transmission method provided in the embodiments of this application;

[0058] Figure 3 This is a schematic diagram of the sleep scene task triggering process provided in an embodiment of this application;

[0059] Figure 4 This is a schematic diagram of the timed scene task triggering process provided in the embodiments of this application;

[0060] Figure 5 This is a schematic diagram of the heartbeat packet scenario task triggering process provided in the embodiments of this application;

[0061] Figure 6 A schematic diagram of a search process provided in an embodiment of this application;

[0062] Figure 7 A schematic diagram of a correction process provided in an embodiment of this application;

[0063] Figure 8 This is a schematic diagram of the structure of a Bluetooth device provided in an embodiment of this application;

[0064] Figure 9 This is a structural diagram of a Bluetooth data transmission device provided in an embodiment of this application. Detailed Implementation

[0065] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0066] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a Bluetooth data transmission method provided in an embodiment of this application.

[0067] like Figure 1 As shown, the method may include the following steps:

[0068] Step 101: Obtain the configuration file. The configuration file includes the execution identifier, the total data transmission volume, and the first data packet size. The value of the execution identifier is used to indicate the allowed execution process. The first data packet size refers to the data packet size that the Bluetooth stack of the receiving device can process.

[0069] The following is a brief introduction to the Bluetooth stack. The Bluetooth stack refers to the software protocol stack inside a Bluetooth device, which includes various rules and processes for managing Bluetooth communication. Its function is to enable communication and data transmission between Bluetooth hardware devices, allowing devices to discover other Bluetooth devices, establish connections, exchange data, and ensure the effectiveness and security of these processes.

[0070] The size of the Bluetooth stack represents its data processing capability, that is, the maximum data packet size that the Bluetooth stack can process.

[0071] In this embodiment, in order to determine the maximum data packet size that the Bluetooth stack of the receiving device can handle, the configuration file of the receiving device can be obtained first. The configuration file records the execution identifier, the total amount of data transmission, and the size of the first data packet, which serves as the basis and information source for subsequent scenario judgment and algorithm execution judgment.

[0072] This concludes the description of step 101. We will now proceed to step 102.

[0073] Step 102: If the execution identifier is a first value, which is used to indicate that the correction process is allowed, then the size of the second data packet is determined according to the size of the first data packet, and the size of the second data packet is smaller than the size of the first data packet.

[0074] In this embodiment, the execution identifier may include multiple values, and different values ​​are used to indicate the execution of different processes.

[0075] When the execution identifier is set to the first value, it indicates that the correction process is allowed. The correction process refers to the process executed when the size of the currently transmitted Bluetooth data packet (i.e., the first data packet) is greater than the data processing capacity of the Bluetooth stack, resulting in the inability to transmit normally. The process is used to adjust the size of the first data packet recorded in the configuration file so that it is not greater than the data processing capacity of the Bluetooth stack, so as to achieve normal Bluetooth data transmission.

[0076] In this embodiment, the process of determining the size of the second data packet based on the size of the first data packet can be as follows:

[0077] The second data packet size is obtained by subtracting the first data packet size from the first specified value.

[0078] This concludes the description of step 102. We will now proceed to step 103.

[0079] Step 103: If the size of the second data packet is greater than the maximum transmission unit (MTU) negotiated between the sending and receiving devices, then the data of the total data transmission volume is transmitted based on the size of the second data packet.

[0080] Before describing step 103, a brief introduction to the Maximum Transmission Unit (MTU) is given first.

[0081] MTU is the maximum size of a single data packet that can be transmitted in a network, as defined by the communication protocol. If the size of a single data packet exceeds the MTU, the network will divide it into smaller fragments for transmission, i.e., the data packet will be split into smaller packets.

[0082] Bluetooth data fragmentation refers to the process by which larger data packets are divided into smaller data packets for transmission when using the Bluetooth protocol, in order to accommodate the transmission capabilities of Bluetooth technology and the specified maximum packet size (MTU). These packets are sent sequentially to the receiving device. After receiving all the packets, the receiving device reassembles them in the correct order to restore the original data information.

[0083] Bluetooth data packet segmentation not only ensures the integrity of data transmission but also effectively solves the communication efficiency problem caused by the limitations of Bluetooth transmission rate. Furthermore, from an error control perspective, if a packet is lost or corrupted during transmission, only that specific packet needs to be retransmitted, rather than the entire data, thus improving the reliability and efficiency of data transmission.

[0084] In this embodiment, after determining the size of the second data packet in step 102, the size of the second data packet can be compared with the maximum transmission unit (MTU) negotiated between the sending device and the receiving device. It is easy to understand that since the MTU is the negotiated maximum transmission unit, data packets with a size not greater than the MTU can be directly transmitted via Bluetooth without being split into packets.

[0085] If the size of the second data packet is determined to be larger than the MTU size, it indicates that the second data packet needs to be divided into multiple packets for transmission. In this case, we can try to transmit the total amount of data according to the size of the second data packet.

[0086] As an example, it is easy to understand that if the size of the second data packet is determined to be no larger than the MTU size, it means that there is no need to split the packet and the second data packet can be directly transmitted via Bluetooth. In this case, the MTU size can be directly used as the maximum data packet size that the Bluetooth stack can handle.

[0087] This concludes the description of step 103. We will now proceed to step 104.

[0088] Step 104: If the transmission based on the second data packet size is successful, then the second data packet size is determined to be the target data packet size, and Bluetooth data is transmitted to the receiving device according to the target data packet size. The target data packet size refers to the maximum data packet size that the Bluetooth stack of the receiving device can process.

[0089] In this embodiment, if the data transmission of the total data transmission volume according to the size of the second data packet is successful, it indicates that the Bluetooth stack can handle data of the size of the second data packet, that is, the size of the second data packet is not greater than the processing capacity of the Bluetooth stack.

[0090] The method for determining whether Bluetooth data transmission was successful can be based on an acknowledgment (ACK) mechanism, which determines whether Bluetooth data transmission was successful by whether an acknowledgment signal sent by the receiving end is received; or it can be determined by receiving feedback from the protocol stack to determine whether the transmission was successful or failed. This application does not impose any restrictions on this method.

[0091] At this point, the size of the second data packet can be taken as the maximum data packet size that the Bluetooth stack can process, i.e., the target data packet size, and Bluetooth data transmission can be performed to the receiving device according to this target data packet size.

[0092] This concludes the description of step 104.

[0093] Step 105: If transmission fails based on the second data packet size, then the second data packet size is used as the first data packet size, and the process returns to the step of determining the second data packet size based on the first data packet size.

[0094] In this embodiment, step 104 describes the case where transmission is successful based on the second data packet size, and step 105 describes the case where transmission fails based on the second data packet size.

[0095] If transmission fails based on the second data packet size, it indicates that the Bluetooth stack lacks the capability to process data of that size, meaning the second data packet size exceeds the maximum data packet size the Bluetooth stack can handle. In this case, the first data packet size can be updated to the second data packet size, and the second data packet size can be re-determined based on the updated first data packet size. This allows for a re-comparison of the pre-MTU on the newly determined second data packet.

[0096] It is easy to understand that this scheme is actually a process of gradually reducing the size of the first data packet in order to find the threshold of the Bluetooth stack data processing capability of the receiving device.

[0097] This concludes the description of step 105. It should be noted that steps 104 and 105 are actually separate descriptions of two scenarios in step 103 involving the transmission of data based on the second data packet size, where the total data transmission volume is determined by the second data packet size. There is no fixed order between them; the step numbers for steps 104 and 105 are merely for ease of description.

[0098] In this embodiment, after obtaining the configuration file, if the execution identifier is determined to be the first value, it indicates that a correction process is being executed. The size of the first data packet in the current configuration file is greater than the data processing capacity of the Bluetooth stack, and the first data packet needs to be gradually reduced to find the threshold of the Bluetooth stack data processing capacity of the receiving device. At this time, the size of the first data packet in the configuration file can be a pre-set empirical value or a value determined according to other processes.

[0099] In this embodiment, after obtaining the configuration file, the method may further include:

[0100] If the execution identifier is the second value, which indicates that the search process is allowed, then the size of the third data packet is determined based on the size of the first data packet; the size of the third data packet is greater than the size of the first data packet.

[0101] Data is transmitted based on the size of the third data packet, representing the total data transmission volume.

[0102] If transmission fails based on the third data packet size, the execution identifier in the configuration file will be updated to the first value, and the first data packet size in the configuration file will be updated to the third data packet size.

[0103] In this embodiment, after obtaining the configuration file, if the execution identifier is set to the second value, it indicates that the search process is allowed. The search process refers to the process executed when the configuration file indicates that the size of the currently transmitted Bluetooth data packet (i.e., the first data packet) is smaller than the data processing capacity of the Bluetooth stack. However, since the data processing capacity of the Bluetooth stack cannot be determined, i.e., the maximum data packet size that the Bluetooth stack can transmit cannot be determined, it will lead to the inability to fully utilize Bluetooth stack resources, resulting in low Bluetooth data transmission rate and efficiency. The process is executed when the data processing capacity threshold of the Bluetooth stack needs to be found by using the size of the first data packet recorded in the configuration file. This process is used to adjust the size of the first data packet until it is greater than the data processing capacity of the Bluetooth stack, so as to find the approximate range of the Bluetooth stack data processing capacity threshold. Then, the aforementioned correction process is used to adjust the size of the first data packet that is greater than the data processing capacity of the Bluetooth stack so that it is not greater than the data processing capacity of the Bluetooth stack, so as to achieve normal Bluetooth data transmission.

[0104] In this embodiment, after determining a third data packet that is larger than the size of the first data packet based on the size of the first data packet, the data of the total data transmission volume can be transmitted according to the size of the third data packet.

[0105] If transmission fails based on the third data packet size, it indicates that the size of the third data packet has exceeded the processing capacity threshold of the receiver's Bluetooth stack. At this point, the search process has ended, and the first data packet size in the configuration file can be updated to the third data packet size. The execution identifier in the configuration file can also be updated to the first value to further execute the correction process.

[0106] In this embodiment, the method may further include:

[0107] If the transmission based on the third data packet size is successful, the first data packet size in the configuration file will be updated to the third data packet size, and the steps for determining the third data packet size based on the first data packet size will be returned.

[0108] In this embodiment, if transmission based on the third data packet size is successful, it indicates that the third data packet size is not greater than the data processing capability threshold of the receiving end's Bluetooth stack. To determine the Bluetooth stack processing capability threshold, it is necessary to further increase the size of the third data packet. At this time, the first data packet size can be updated to the third data packet size, and the third data packet size can be re-determined based on the updated first data packet size. Transmission attempts can then be made based on the re-determined third data packet size until transmission based on the third data packet size fails.

[0109] In this embodiment, the method for determining the size of the third data packet based on the size of the first data packet may be:

[0110] The size of the first data packet is added to the second specified value to obtain the size of the third data packet.

[0111] As an example, the size of the first data packet can be a pre-set empirical value, such as the size of MTU*12, and this application does not limit it.

[0112] In this embodiment, the overall idea of ​​the search process and the correction process is as follows: First, a small empirical value is preset as the size of the first data packet. This empirical value is less than the Bluetooth stack processing capability threshold. The size of the first data packet is gradually increased through the search process until the size of the first data packet exceeds the Bluetooth stack processing capability threshold. Then, the size of the first data packet is further reduced through the correction process until the size of the first data packet does not exceed the Bluetooth stack processing capability threshold. The size of the first data packet at this time is determined as the maximum data packet size that the Bluetooth stack can process.

[0113] It should be noted that in the search process, since it is necessary to find the approximate range of the Bluetooth stack processing capability threshold as soon as possible, the second specified value can be set to a larger value when increasing the size of the first data packet; while in the correction process, since it is necessary to find the Bluetooth stack processing capability threshold as accurately as possible, the first specified value can be set to a smaller value when decreasing the size of the first data packet.

[0114] As an example, assuming the second specified value is N, the first specified value in the correction process can be floor(N / 2), where the floor function is a mathematical function used to round a real number down to the nearest integer. The function's purpose is to return the largest integer less than or equal to a given real number; for example, floor(3.7) will return 3, and floor(-2.3) will return -3.

[0115] Furthermore, in this embodiment, during the above-described correction process, if it is determined that the transmission based on the second data packet size was successful, the method may further include:

[0116] Update the execution identifier in the configuration file to the third value, which indicates that the correction process and the search process are not allowed to be executed, and update the first data packet size recorded in the configuration file to the target data packet size;

[0117] When transmitting Bluetooth data from the sending device to the receiving device, if the execution identifier in the configuration file is found to be the third value, the Bluetooth data transmission will be performed based on the target data packet size.

[0118] In this embodiment, if the transmission based on the second data packet size is successful, it indicates that the maximum data packet size that the Bluetooth stack can transmit has been determined. At this time, the first data packet size recorded in the configuration file can be updated to the target data packet size, which is the maximum data packet size that the Bluetooth stack can transmit.

[0119] Simultaneously, the execution identifier in the configuration file can be updated to a third value, which means neither the correction process nor the search process will be executed. After updating the execution identifier to a third value, the above process will not continue. In subsequent Bluetooth data transmissions from the sending device to the receiving device, if the execution identifier in the configuration file is found to be a third value, Bluetooth data transmission can be directly performed based on the target data packet size (i.e., the size of the first data packet recorded in the configuration file).

[0120] If packet loss is detected during Bluetooth data transmission based on the target data packet size, it indicates that the previously determined target data packet size was incorrect. This could be due to updates to the Bluetooth stack protocol version, wireless channel interference, changes in the number of Bluetooth connections, or variations in device hardware performance. In this case, the execution identifier in the configuration file can be updated to the first value to re-determine the target data packet size. If packet loss indicates that the target data packet size exceeds the Bluetooth stack's data processing capacity threshold, the aforementioned correction process can be directly executed to re-determine the target data packet size.

[0121] In this embodiment, the above method requires the detection of packet loss before the target data packet size can be adjusted. To avoid a mismatch between the target data packet size and the data processing capabilities supported by the Bluetooth stack due to changes in the Bluetooth stack protocol version, wireless channel interference, the number of Bluetooth connections, or device hardware performance after the target data packet size has been determined, this application also proposes a method to actively execute a search process in a specified scenario to update the target data packet size in a timely manner.

[0122] In this embodiment, the configuration file also includes a scene identifier and scene parameters. After obtaining the configuration file, the method proposed in this application embodiment may further include:

[0123] If the execution identifier is a third value, which indicates that the correction process and the search process are not allowed to be executed, then the current application scenario is determined according to the scenario identifier in the configuration file.

[0124] If the current application scenario is a specified type scenario, and the scenario parameters corresponding to the current application scenario in the configuration file meet the preset conditions, then the execution identifier in the configuration file will be updated to the second value, which is used to indicate that the search process is allowed to be executed.

[0125] In this embodiment, if the execution identifier is the third value, the current application scenario can be determined according to the scenario identifier in the configuration file. If the current application scenario is an execution type scenario and the scenario parameters corresponding to the scenario also meet the preset conditions, the execution identifier in the configuration file will be updated to the second value to execute the search process.

[0126] Specifically, the specified scenario types include sleep scenarios, timed scenarios, and heartbeat scenarios. The scenario parameters corresponding to the current application scenario in the configuration file meet preset conditions, including:

[0127] If the current application scenario is a sleep scenario, and the scenario parameter corresponding to the sleep scenario is sleep duration, then if the sleep duration reaches the first threshold, it is determined that the preset condition is met.

[0128] If the current application scenario is a timed scenario, the scenario parameter corresponding to the timed scenario is the cumulative duration. The cumulative duration refers to the duration from the last time the execution identifier was updated to the second value to the current time. Then, if the cumulative duration reaches the second threshold, it is determined that the preset condition is met.

[0129] If the current application scenario is a heartbeat scenario, the scenario parameter corresponding to the heartbeat scenario is the cumulative number of heartbeat packets. The cumulative number of heartbeat packets refers to the cumulative number of heartbeat packets sent between the sending device and the receiving device during the time period from the last time the execution identifier was updated to the second value to the current time. Then, if the cumulative number of heartbeat packets reaches the third threshold, it is determined that the preset condition is met.

[0130] In this embodiment, the above-mentioned scenarios and the corresponding preset conditions for each scenario will be described in detail below, and will not be repeated here.

[0131] This concludes the article. Figure 1 Description of the Bluetooth data transmission method and process.

[0132] This application, when determining the execution correction process through the execution identifier in the configuration file, reduces the first data packet size in the configuration file to obtain a second data packet size. If the second data packet size is greater than the maximum data packet MTU negotiated between the sending and receiving devices, and the transmission is successful based on the second data packet size, then the second data packet size is determined to be the maximum data packet size that the Bluetooth stack of the receiving device can handle, i.e., the target data packet size, and Bluetooth data transmission is further performed based on the target data packet size. If the transmission fails based on the second data packet size, then the second data packet size is used as the first data packet size, and the target data packet size is re-determined. This enables the determination of the maximum data packet size that the Bluetooth stack can handle even when the processing capability of the Bluetooth stack of the receiving device is unknown, achieving high-speed and stable Bluetooth data transmission.

[0133] Meanwhile, in low-power Bluetooth big data transmission scenarios, this application enables the system to intelligently and dynamically determine the maximum data packet size that both Bluetooth stacks can handle in any pair of data interaction terminals (such as a mobile phone and an embedded Bluetooth device) during big data transmission, while also having automatic adjustment and correction capabilities; and for any two low-power Bluetooth devices, this technical solution can be run to dynamically calculate and adjust the transmission stability value of both parties.

[0134] The Bluetooth data transmission method proposed in this application is described below through several specific embodiments.

[0135] Example 1

[0136] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the overall process of the Bluetooth data transmission method provided in the embodiments of this application.

[0137] like Figure 2 As shown, the process specifically includes:

[0138] If the configuration file is generated or modified, the configuration file is read.

[0139] In this embodiment, the configuration file can be generated by the Bluetooth slave device, or by the cloud platform or the Bluetooth host, and this application does not impose any restrictions on this.

[0140] The configuration file serves as the basis and information source for subsequent scene judgments and algorithm execution decisions, and can record various parameters and information.

[0141] Please refer to Table 1, which is an example configuration file containing the attribute types and their meanings.

[0142]

[0143]

[0144] Table 1

[0145] It should be noted that the attribute values ​​recorded in the configuration file shown in Table 1 are only examples, and these attribute values ​​can be deleted or added according to the actual situation.

[0146] For example, the configuration file shown in Table 1 can determine whether a process is allowed to be executed by using the execution identifier tag, and further determine the type of process to be executed (finding a process or correcting a process) by using the execution type type. Thus, it is necessary to combine the above two attribute values ​​to determine whether a certain process is allowed to be executed.

[0147] In this embodiment, the execution identifier tag and execution type type can be merged. That is, the execution type and whether execution is allowed are determined only by the value of the execution identifier. The execution identifier has three possible values: the first value indicates that the correction process is allowed, the second value indicates that the search process is allowed, and the third value indicates that neither the correction process nor the search process is allowed.

[0148] For example, in this embodiment, a corresponding scene identifier can be set for each scenario, and the current application scenario can be determined according to the scene identifier carried in the configuration file. This application does not impose any restrictions on this.

[0149] When the execution identifier in the configuration file is detected to be a third value, the current application scenario can be determined. If the scenario identifier in the read configuration file indicates that the current application scenario is not a specified type scenario, the process ends directly, indicating that it is not necessary to determine the target data packet size at this time.

[0150] If the current application scenario is determined to be a specified type scenario based on the scenario identifier in the read configuration file, the scenario identifier is further used to determine which scenario the current application scenario is: sleep scenario, timed scenario, or heartbeat scenario.

[0151] After determining the scenario type, based on the scenario parameters corresponding to that scenario type, if it is determined that the preset conditions are met, the execution identifier in the configuration file is updated to the second value, so as to further execute the subsequent process according to the execution identifier. After obtaining the target data packet size through the subsequent process, the first data packet size stored in the configuration file is updated to the target data packet size.

[0152] If the scene parameters corresponding to this type of scene determine that the preset conditions are not met, the scene will be continuously monitored, and the steps of reading the scene parameters and judging the scene parameters will be returned until the preset conditions are met according to the scene judgment parameters.

[0153] This concludes the discussion on... Figure 2A description of the overall process flow diagram of the Bluetooth data transmission method.

[0154] Example 2

[0155] In this embodiment, by Figures 3 to 5 The process of triggering the search flow under three different specified scenarios is described.

[0156] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the sleep scene task triggering process provided in an embodiment of this application.

[0157] like Figure 3 As shown, the process begins by determining that the current application scenario is a sleep scenario.

[0158] Once the current application scenario is determined to be a sleep scenario, the sleep scenario is continuously monitored, and the scenario parameters corresponding to the sleep scenario, namely the sleep duration parameter, are updated in real time.

[0159] If the sleep duration parameter is detected to have reached the preset threshold, the execution identifier in the configuration file is updated to the second value, triggering the execution search process.

[0160] If the sleep duration parameter is detected to be below the preset threshold, the sleep duration corresponding to the sleep scenario will be continuously monitored until the sleep duration reaches the threshold.

[0161] In this embodiment, the sleep scenario is applicable to wearable products, such as smartwatches and smart bracelets. In wearable products, when both devices maintain a low-power Bluetooth connection, sleep scenario monitoring is started. Once the user is detected to be asleep, the sleep scenario triggering conditions are judged in real time according to the configuration information. When the triggering threshold configured for the sleep scenario is reached, such as when the detected sleep duration reaches 20 minutes, the sleep scenario task can be triggered to schedule and run the search process.

[0162] Specifically, configuration information is read when both devices maintain a low-power Bluetooth connection.

[0163] Determine if the current state is in a sleep mode, such as by checking the `enabled` field in the `sleep_config` file, and perform continuous scenario monitoring.

[0164] When the scene parameters are detected to meet the preset conditions, such as the detected sleep duration reaching 20 minutes, the execution identifier in the configuration file can be updated to the second value, triggering the execution search process.

[0165] Please refer to Figure 4 , Figure 4 This is a schematic diagram of the timed scene task triggering process provided in an embodiment of this application.

[0166] like Figure 4 As shown, the process begins by determining that the current application scenario is a timed scenario.

[0167] If the current application scenario is determined to be a timed scenario, the timed scenario is continuously monitored and the scenario parameters corresponding to the timed scenario are updated in real time, namely the cumulative duration parameter. The cumulative duration is the duration from the last time the execution identifier was updated to the second value to the current time.

[0168] If the cumulative duration parameter is detected to have reached the preset threshold, it is determined that the preset condition is met. At this time, the execution identifier in the configuration file can be updated to the second value to trigger the execution search process.

[0169] As an example, after detecting that the cumulative duration parameter has reached a preset threshold, it can be further determined whether the device is currently experiencing heavy communication tasks, such as the device's processor resource consumption ratio being greater than the preset threshold. If it is determined that there are no heavy communication tasks, the execution identifier in the configuration file can be updated to the second value, triggering the execution search process. If it is determined that there are heavy communication tasks, it indicates that the Bluetooth device is currently consuming a large amount of resources and may not have any free resources to update the execution identifier and execute the subsequent search process. In this case, the step of reading the cumulative duration parameter can be returned until the cumulative duration reaches the threshold and there are no heavy communication tasks. Then, the execution identifier in the configuration file is updated to the second value, triggering the execution search process.

[0170] In this embodiment, the timed scenario is applicable to low data interaction or power-sensitive products, such as wireless headphones and Bluetooth speakers. In low data interaction or power-sensitive products, when both devices maintain a low-power Bluetooth connection, the timed scenario monitoring is started. According to the configuration information, the triggering conditions of the timed scenario are judged in real time. When the preset value is met, such as triggering the timed scenario task every 3 days, the algorithm is scheduled and run.

[0171] Specifically, configuration information is read when both devices maintain a low-power Bluetooth connection.

[0172] Determine whether the current scenario is a timed scenario, such as by checking the enabled field in the timer_config file recorded in the configuration file, and then perform continuous scenario monitoring.

[0173] Based on the configuration information (unit, value, result_time), when the preset trigger value configured for the timed scenario is reached, such as triggering a timed scenario task every 3 days, it can be determined that the preset conditions are met.

[0174] Once the preset conditions are met, you can check if there are any heavy communication tasks. If the communication is not busy, you can update the execution identifier in the configuration file to the second value to trigger the execution search process. Otherwise, the execution search process will not be triggered during this period.

[0175] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the heartbeat package scenario task triggering process provided in the embodiments of this application.

[0176] like Figure 5 As shown, the process begins by determining that the current application scenario is a heartbeat scenario.

[0177] If the current application scenario is determined to be a heartbeat scenario, the heartbeat scenario is continuously detected and the scenario parameters corresponding to the timed scenario are updated in real time, namely the cumulative heartbeat packet count parameter. The cumulative heartbeat packet count refers to the cumulative number of heartbeat packets sent between the sending device and the receiving device during the time period from the last time the execution identifier was updated to the second value to the current time.

[0178] If the cumulative number of heartbeat packets reaches the preset threshold, it is determined that the preset condition is met. At this time, the execution identifier in the configuration file can be updated to the second value to trigger the execution search process.

[0179] As an example, after detecting that the cumulative number of heartbeat packets has reached a preset threshold, it can be further determined whether the device is currently experiencing heavy communication tasks, such as the device's processor resource consumption exceeding the preset threshold. If it is determined that there are no heavy communication tasks, the execution identifier in the configuration file can be updated to the second value, triggering the execution search process. If it is determined that there are heavy communication tasks, it indicates that the Bluetooth device is currently consuming a large amount of resources and may not have enough free resources to update the execution identifier and execute the subsequent search process. In this case, the step of reading the cumulative duration parameter can be returned until the cumulative duration reaches the threshold and there are no heavy communication tasks. Then, the execution identifier in the configuration file is updated to the second value, triggering the execution search process.

[0180] In this embodiment, the heartbeat scenario is applicable to products that are not power-sensitive or involve heavy data interaction, such as smartphones, laptops, and servers. In these products, when both devices maintain a low-power Bluetooth connection, heartbeat scenario monitoring is initiated. Based on the configuration information, the system performs real-time judgment of the timed scenario trigger conditions. When a preset value is reached, such as every 100 heartbeats, the algorithm is scheduled and run.

[0181] Specifically, configuration information is read when both devices maintain a low-power Bluetooth connection.

[0182] Determine whether the current scenario is a heartbeat scenario, such as by determining the current scenario as a heartbeat scenario based on the enabled field in ping_config recorded in the configuration file, and perform continuous scenario monitoring.

[0183] Based on the configuration information (value), when the preset trigger value of the heartbeat scenario is reached, such as triggering the heartbeat scenario task every 100 heartbeats, it can be determined that the preset conditions are met.

[0184] After the preset conditions are met, you can check if there are any heavy communication tasks. If the communication is not busy, you can update the execution identifier in the configuration file to the second value to trigger the execution search process. Otherwise, the execution search process will not be triggered during this period.

[0185] This concludes the discussion on... Figures 3 to 5 Descriptions of various scenes.

[0186] Example 3

[0187] In this embodiment, by Figure 6 as well as Figure 7 Describe the search process and the correction process.

[0188] Please refer to Figure 6 , Figure 6 This is a schematic diagram of a search process provided in an embodiment of this application.

[0189] like Figure 6 As shown, after reading the configuration file, if the execution identifier in the configuration file is determined to be the second value, then the search process is allowed to be executed; otherwise, the search process is not allowed to be executed.

[0190] After determining that the search process is allowed, the total amount of data to be transmitted and the size of the first data packet can be determined through the records in the configuration file.

[0191] Furthermore, data corresponding to the total amount of data to be transmitted can be sent based on the size of the first data packet.

[0192] As one example, during the first transmission, data can be transmitted directly according to the size of the first data packet recorded in the configuration file, or the size of the third data packet can be determined by increasing the size of the first data packet first, and then data can be transmitted according to the size of the third data packet. This application does not limit this.

[0193] In this embodiment, if the data packet is successfully sent based on the first data packet size, the first data packet size can be increased, and the step of sending data packets based on the first data packet size can be returned until the data packet is sent based on the first data packet size fails.

[0194] In this embodiment, if the transmission fails based on the first data packet size, the current first data packet size can be updated to the configuration file, and the execution identifier can be modified to the first value so that the correction process can be further executed to determine the target data packet size, and finally the target data packet size can be updated to the configuration file.

[0195] Please refer to Figure 7 , Figure 7 This is a schematic diagram of a correction process provided for an embodiment of this application.

[0196] like Figure 7 As shown, after reading the configuration file, if the execution identifier in the configuration file is determined to be the first value, then the execution of the correction process is allowed; otherwise, the execution of the correction process is not allowed.

[0197] After determining that the correction process is permitted, the total amount of data to be transmitted and the size of the first data packet can be determined through the records in the configuration file.

[0198] Furthermore, data corresponding to the total amount of data to be transmitted can be sent based on the size of the first data packet.

[0199] As one embodiment, during the first transmission, data can be transmitted directly according to the size of the first data packet recorded in the configuration file, or the size of the second data packet can be determined by reducing the size of the first data packet first, and then data can be transmitted according to the size of the second data packet. This application does not limit this.

[0200] In this embodiment, if sending based on the first data packet size fails, the first data packet size can be further reduced, and the step of sending data packets based on the first data packet size can be returned until sending data packets based on the first data packet size is successful.

[0201] In this embodiment, if the transmission is successful based on the first data packet size, the current first data packet size can be updated to the configuration file, and the execution identifier can be modified to the third value so that subsequent Bluetooth data transmissions can be performed directly according to the first data packet size in the configuration file.

[0202] Please refer to Figure 8 , Figure 8This is a schematic structural diagram of a Bluetooth device proposed in an embodiment of this application. At the hardware level, the Bluetooth device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for various services. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it, forming a terminal interaction device at the logical level. Of course, besides software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0203] Please refer to Figure 9 , Figure 9 This is a structural diagram of a Bluetooth data transmission device proposed in an embodiment of this application. Figure 9 As shown, the device may include an acquisition unit 901, a determination unit 902, a transmission unit 903, and a correction unit 904. Specifically, the device includes:

[0204] The acquisition unit 901 is used to acquire the configuration file, which includes the execution identifier, the total amount of data transmission, and the size of the first data packet. The value of the execution identifier is used to indicate the allowed execution process, and the size of the first data packet refers to the data packet size that the Bluetooth stack of the receiving device can process.

[0205] The determining unit 902 is used to determine the second data packet size based on the first data packet size if the execution identifier is a first value, the first value being used to indicate that the correction process is allowed to be executed; the second data packet size is smaller than the first data packet size.

[0206] The transmission unit 903 is used to transmit data of a total data transmission size based on the size of the second data packet if the size of the second data packet is greater than the maximum transmission unit (MTU) negotiated between the sending device and the receiving device.

[0207] If the transmission based on the second data packet size is successful, then the second data packet size is determined to be the target data packet size, and Bluetooth data is transmitted to the receiving device according to the target data packet size. The target data packet size refers to the maximum data packet size that the Bluetooth stack of the receiving device can process.

[0208] The correction unit 904 is used to return the step of determining the second data packet size based on the first data packet size if the transmission based on the second data packet size fails.

[0209] Optionally, after obtaining the configuration file, the determination unit 902 is also used for:

[0210] If the execution identifier is the second value, which indicates that the search process is allowed, then the size of the third data packet is determined based on the size of the first data packet; the size of the third data packet is greater than the size of the first data packet.

[0211] Data is transmitted based on the size of the third data packet, representing the total data transmission volume.

[0212] If transmission fails based on the third data packet size, the execution identifier in the configuration file will be updated to the first value, and the first data packet size in the configuration file will be updated to the third data packet size.

[0213] And / or, if the transmission is successful based on the second data packet size, the transmission unit 903 is also used to:

[0214] Update the execution identifier in the configuration file to the third value, which indicates that the correction process and the search process are not allowed to be executed, and update the first data packet size recorded in the configuration file to the target data packet size;

[0215] When transmitting Bluetooth data from the sending device to the receiving device, if the execution identifier in the configuration file is found to be the third value, the Bluetooth data transmission is performed based on the target data packet size.

[0216] And / or, after Bluetooth data transmission based on the target data packet size, the transmission unit is also used for:

[0217] If packet loss is detected, the execution identifier included in the configuration file is updated to the first value to redetermine the size of the target data packet;

[0218] And / or, the determining unit 902 is also used for:

[0219] If the transmission based on the third data packet size is successful, then update the first data packet size in the configuration file to the third data packet size, and return to the step of determining the third data packet size based on the first data packet size;

[0220] And / or, the configuration file also includes scene identifiers and scene parameters. After obtaining the configuration file, the determining unit 902 is further used for:

[0221] If the execution identifier is a third value, which indicates that the correction process and the search process are not allowed to be executed, then the current application scenario is determined according to the scenario identifier in the configuration file.

[0222] If the current application scenario is a specified type scenario, and the scenario parameters corresponding to the current application scenario in the configuration file meet the preset conditions, then the execution identifier in the configuration file will be updated to the second value. The second value is used to indicate that the search process is allowed to be executed.

[0223] And / or, the specified type of scenario includes sleep scenario, timed scenario, and heartbeat scenario, and the determining unit 902 is specifically used for:

[0224] If the current application scenario is a sleep scenario, and the scenario parameter corresponding to the sleep scenario is sleep duration, then if the sleep duration reaches the first threshold, it is determined that the preset condition is met.

[0225] If the current application scenario is a timed scenario, the scenario parameter corresponding to the timed scenario is the cumulative duration. The cumulative duration refers to the duration from the last time the execution identifier was updated to the second value to the current time. Then, if the cumulative duration reaches the second threshold, it is determined that the preset condition is met.

[0226] If the current application scenario is a heartbeat scenario, the scenario parameter corresponding to the heartbeat scenario is the cumulative number of heartbeat packets. The cumulative number of heartbeat packets refers to the cumulative number of heartbeat packets sent between the sending device and the receiving device during the time period from the last time the execution identifier was updated to the second value to the current time. Then, if the cumulative number of heartbeat packets reaches the third threshold, it is determined that the preset condition is met.

[0227] This concludes the process. Figure 9 Description of the Bluetooth data transmission device.

[0228] Correspondingly, embodiments of this application also provide a computer-readable storage medium storing a plurality of computer instructions, which, when executed, can implement the methods disclosed in the above examples of this application.

[0229] For example, the aforementioned computer-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For instance, computer-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0230] The above are merely preferred embodiments of this application and are not intended to limit the application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A Bluetooth data transmission method, characterized in that, The method includes: Obtain the configuration file, which includes an execution identifier, a total data transmission volume, and a first data packet size. The value of the execution identifier is used to indicate the allowed execution process, and the first data packet size refers to the data packet size that the Bluetooth stack of the receiving device can process. If the execution identifier is a first value, which is used to indicate that the correction process is allowed, then the second data packet size is determined according to the first data packet size, and the second data packet size is smaller than the first data packet size; If the size of the second data packet is greater than the maximum transmission unit (MTU) negotiated between the sending and receiving devices, then the total data transmission volume is transmitted based on the size of the second data packet. If the transmission is successful based on the second data packet size, then the second data packet size is determined to be the target data packet size, and Bluetooth data is transmitted to the receiving device according to the target data packet size. The target data packet size refers to the maximum data packet size that the Bluetooth stack of the receiving device can process. If transmission fails based on the second data packet size, the second data packet size is used as the first data packet size, and the process returns to the step of determining the second data packet size based on the first data packet size.

2. The method according to claim 1, characterized in that, After obtaining the configuration file, the method further includes: If the execution identifier is a second value, which indicates that the search process is allowed, then the size of the third data packet is determined based on the size of the first data packet; the size of the third data packet is greater than the size of the first data packet. Data of the total data transmission volume is transmitted based on the size of the third data packet. If transmission fails based on the third data packet size, the execution identifier in the configuration file is updated to the first value, and the first data packet size in the configuration file is updated to the third data packet size.

3. The method according to claim 1, characterized in that, If the transmission based on the second data packet size is successful, the method further includes: The execution identifier in the configuration file is updated to a third value, which indicates that the correction process and the search process are not allowed to be executed, and the first data packet size recorded in the configuration file is updated to the target data packet size. When transmitting Bluetooth data from the sending device to the receiving device, if the execution identifier in the configuration file is found to be a third value, then Bluetooth data transmission is performed based on the target data packet size.

4. The method according to claim 3, characterized in that, After performing Bluetooth data transmission based on the target data packet size, the method further includes: If packet loss is detected, the execution identifier included in the configuration file is updated to the first value to redetermine the size of the target data packet.

5. The method according to claim 2, characterized in that, The method also includes: If the transmission is successful based on the third data packet size, the first data packet size in the configuration file is updated to the third data packet size, and the process of determining the third data packet size based on the first data packet size is returned.

6. The method according to claim 1, characterized in that, The configuration file also includes a scene identifier and scene parameters. After obtaining the configuration file, the method further includes: If the execution identifier is a third value, and the third value is used to indicate that the correction process and the search process are not allowed to be executed, then the current application scenario is determined according to the scenario identifier in the configuration file; If the current application scenario is a specified type scenario, and the scenario parameters corresponding to the current application scenario in the configuration file meet the preset conditions, then the execution identifier in the configuration file is updated to the second value, which is used to indicate that the search process is allowed to be executed.

7. The method according to claim 6, characterized in that, The specified scenario types include sleep scenarios, timed scenarios, and heartbeat scenarios. The scenario parameters corresponding to the current application scenario in the configuration file meet preset conditions, including: If the current application scenario is a sleep scenario and the scenario parameter corresponding to the sleep scenario is sleep duration, then if the sleep duration reaches the first threshold, it is determined that the preset condition is met. If the current application scenario is a timed scenario, and the scenario parameter corresponding to the timed scenario is the cumulative duration, and the cumulative duration refers to the duration from the last time the execution identifier was updated to the second value to the current time, then if the cumulative duration reaches the second threshold, it is determined that the preset condition is met. If the current application scenario is a heartbeat scenario, and the scenario parameter corresponding to the heartbeat scenario is the cumulative number of heartbeat packets, the cumulative number of heartbeat packets refers to the number of heartbeat packets sent between the sending device and the receiving device during the time period from the last time the execution identifier was updated to the second value to the current time. Then, if the cumulative number of heartbeat packets reaches the third threshold, it is determined that the preset condition is met.

8. A Bluetooth data transmission device, characterized in that, The device includes: The acquisition unit is used to acquire a configuration file, which includes an execution identifier, a total data transmission volume, and a first data packet size. The value of the execution identifier is used to indicate the allowed execution process, and the first data packet size refers to the data packet size that the Bluetooth stack of the receiving device can process. The determining unit is configured to determine a second data packet size based on the first data packet size if the execution identifier is a first value, the first value being used to indicate that the correction process is allowed to be executed; the second data packet size is smaller than the first data packet size. The transmission unit is used to transmit data of the total data transmission volume based on the size of the second data packet if the size of the second data packet is greater than the maximum transmission unit (MTU) negotiated between the sending device and the receiving device. If the transmission is successful based on the second data packet size, then the second data packet size is determined to be the target data packet size, and Bluetooth data is transmitted to the receiving device according to the target data packet size. The target data packet size refers to the maximum data packet size that the Bluetooth stack of the receiving device can process. The correction unit is configured to, if transmission fails based on the second data packet size, use the second data packet size as the first data packet size and return to the step of determining the second data packet size based on the first data packet size.

9. The apparatus according to claim 8, characterized in that, After obtaining the configuration file, the determining unit is further configured to: If the execution identifier is a second value, which indicates that the search process is allowed, then the size of the third data packet is determined based on the size of the first data packet; the size of the third data packet is greater than the size of the first data packet. Data of the total data transmission volume is transmitted based on the size of the third data packet. If transmission fails based on the third data packet size, the execution identifier in the configuration file is updated to the first value, and the first data packet size in the configuration file is updated to the third data packet size. And / or, if the transmission is successful based on the second data packet size, the transmission unit is further configured to: The execution identifier in the configuration file is updated to a third value, which indicates that the correction process and the search process are not allowed to be executed, and the first data packet size recorded in the configuration file is updated to the target data packet size; When transmitting Bluetooth data from the sending device to the receiving device, if the execution identifier in the configuration file is found to be a third value, then Bluetooth data transmission is performed based on the target data packet size. And / or, after performing Bluetooth data transmission based on the target data packet size, the transmission unit is further configured to: If packet loss is detected, the execution identifier included in the configuration file is updated to the first value to redetermine the size of the target data packet; And / or, the determining unit is further configured to: If the transmission is successful based on the third data packet size, then the first data packet size in the configuration file is updated to the third data packet size, and the process returns to the step of determining the third data packet size based on the first data packet size. And / or, the configuration file also includes a scene identifier and scene parameters. After obtaining the configuration file, the determining unit is further configured to: If the execution identifier is a third value, and the third value is used to indicate that the correction process and the search process are not allowed to be executed, then the current application scenario is determined according to the scenario identifier in the configuration file; If the current application scenario is a specified type scenario, and the scenario parameters corresponding to the current application scenario in the configuration file meet the preset conditions, then the execution identifier in the configuration file is updated to the second value, which is used to indicate that the search process is allowed to be executed; And / or, the specified type of scenario includes sleep scenario, timed scenario, and heartbeat scenario, and the determining unit is specifically used for: If the current application scenario is a sleep scenario and the scenario parameter corresponding to the sleep scenario is sleep duration, then if the sleep duration reaches the first threshold, it is determined that the preset condition is met. If the current application scenario is a timed scenario, and the scenario parameter corresponding to the timed scenario is the cumulative duration, and the cumulative duration refers to the duration from the last time the execution identifier was updated to the second value to the current time, then if the cumulative duration reaches the second threshold, it is determined that the preset condition is met. If the current application scenario is a heartbeat scenario, and the scenario parameter corresponding to the heartbeat scenario is the cumulative number of heartbeat packets, the cumulative number of heartbeat packets refers to the number of heartbeat packets sent between the sending device and the receiving device during the time period from the last time the execution identifier was updated to the second value to the current time. Then, if the cumulative number of heartbeat packets reaches the third threshold, it is determined that the preset condition is met.

10. A Bluetooth 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 program, it implements the method as described in any one of claims 1 to 7.