Bluetooth data transmission method, device and Bluetooth data sending device

By detecting the signal strength parameters and MTU values ​​of Bluetooth devices, calculating the threshold gradient and cross parameters, and dynamically adjusting the MTU values, the problem of Bluetooth data transmission is solved and communication efficiency and reliability are improved.

CN119603249BActive Publication Date: 2025-05-13DESSMANN CHINA MACHINERY & ELECTRONICS +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510134582.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-05-13
Estimated Expiration
2045-02-07

AI Technical Summary

Technical Problem

Bluetooth data transmission is susceptible to interference, especially in co-frequency interference and complex communication environments, resulting in reduced signal transmission and reception efficiency.

Method used

By detecting the signal strength parameters of the Bluetooth data receiving device to the transmitting device, obtaining the current maximum transmission unit (MTU) value, calculating the threshold gradient of the signal strength parameter and the first gradient cross parameter of the MTU value, and adjusting the MTU value based on these parameters to optimize the packet length and reduce interference.

Benefits of technology

Dynamic adjustment of MTU values ​​is achieved, communication efficiency and reliability of Bluetooth devices in frequency bands with high interference are improved, and the impact of synchronous interference is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603249B_ABST
    Figure CN119603249B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and Bluetooth data transmission device for Bluetooth data, wherein the method comprises: detecting a signal strength parameter from a Bluetooth data receiving device to a Bluetooth data sending device; obtaining the current MTU value of the Bluetooth data sending device; calculating the threshold gradient of the signal strength parameter; calculating the first gradient crossover parameter of the current MTU value based on the threshold gradient; the first gradient crossover parameter is the number of times different threshold gradients are crossed; determining the corresponding MTU coefficient based on the first comparison result between the signal strength parameter and a preset signal strength standard range; adjusting the current MTU value according to the MTU coefficient and the first gradient crossover parameter, and calculating a new MTU value; transmitting Bluetooth data to the Bluetooth data receiving device based on the new MTU value. Through the present application, the problem that Bluetooth data transmission is susceptible to interference is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Bluetooth technology, and in particular to a Bluetooth data transmission method, device and Bluetooth data sending equipment. Background Art

[0002] With the continuous development of Bluetooth technology, the use scenarios of Bluetooth devices are becoming more and more diverse. For example, users can use smartphones to control Bluetooth headphones or Bluetooth speakers for audio playback.

[0003] During Bluetooth data transmission, the actual communication environment may be very complex, including various obstacles, reflective surfaces, multipath effects, etc. These factors will affect the transmission and reception of signals, thereby increasing time loss. For example, since Bluetooth uses the free Industrial Scientific Medical (ISM) frequency band, when Bluetooth devices coexist with other wireless devices (such as Wi-Fi, microwave ovens, etc.) using the same frequency band (such as 2.4GHz), co-channel interference is likely to occur.

[0004] Currently, no effective solution has been proposed for the problem that Bluetooth data transmission is susceptible to interference in related technologies. Summary of the invention

[0005] The embodiments of the present application provide a Bluetooth data transmission method, apparatus and Bluetooth data sending device to at least solve the problem that Bluetooth data transmission in the related art is susceptible to interference.

[0006] In a first aspect, an embodiment of the present application provides a method for transmitting Bluetooth data, which is applied to a Bluetooth data sending device; the method comprises:

[0007] Detecting a signal strength parameter from a Bluetooth data receiving device to the Bluetooth data sending device;

[0008] Obtaining the current Maximum Transmission Unit (MTU) value of the Bluetooth data sending device;

[0009] Calculate the threshold gradient of the signal strength parameter; calculate a first gradient crossover parameter for the current MTU value based on the threshold gradient; the first gradient crossover parameter is the number of times different threshold gradients are crossed;

[0010] Determine a corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range; adjust the current MTU value according to the MTU coefficient and the first gradient cross parameter to calculate a new MTU value;

[0011] Based on the new MTU value, Bluetooth data is transmitted to the Bluetooth data receiving device.

[0012] In some embodiments, determining the corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range includes:

[0013] Acquire transmission time data stored in the Bluetooth data sending device; the transmission time data is the sending and receiving time data of historical data transmitted to the Bluetooth data receiving device during the historical communication process;

[0014] Calculating air loss time based on the transmission time data;

[0015] A second comparison result between the air loss time and a preset loss time standard range is calculated, and the MTU coefficient is determined according to the first comparison result and the second comparison result.

[0016] In some embodiments, the transmission time data includes a first data sending time, a first data receiving time, a second data sending time, and a second data receiving time;

[0017] The first data sending time is the time when the historical data starts to be sent to the Bluetooth data receiving device, the first data receiving time is the recorded time when the Bluetooth data receiving device completely receives the data, the second data sending time is the recorded time when the Bluetooth data receiving device starts to send the return data, and the second data receiving time is the time when the return data is completely received;

[0018] The step of calculating the air loss time based on the transmission time data comprises:

[0019] Calculating a first time difference between the first data sending time and the first data receiving time, and a second time difference between the second data sending time and the second data receiving time;

[0020] The air loss time is calculated based on the first time difference and the second time difference.

[0021] In some embodiments, adjusting the current MTU value according to the MTU coefficient and the first gradient cross parameter to calculate a new MTU value includes:

[0022] Calculate the time gradient of the air loss time; calculate the second gradient crossover parameter of the current MTU value based on the time gradient; the second gradient crossover parameter is the number of times crossing different time gradients;

[0023] Calculating a total gradient crossover parameter according to the first gradient crossover parameter and the second gradient crossover parameter;

[0024] The current MTU value is adjusted according to the MTU coefficient and the total gradient cross parameter to obtain the new MTU value.

[0025] In some embodiments, the calculating, based on the threshold gradient, a first gradient cross parameter for the current MTU value includes:

[0026] Calculating gradient span information between the threshold gradient and the signal strength standard range;

[0027] Based on the gradient crossing information, the first gradient crossing parameter is determined.

[0028] In some embodiments, determining the corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range includes:

[0029] If the first comparison result indicates that the signal strength parameter is less than the signal strength standard range, determining a first MTU attenuation coefficient;

[0030] If the first comparison result indicates that the signal strength parameter is greater than the signal strength standard range, determining an MTU growth factor;

[0031] The MTU coefficient includes the first MTU attenuation coefficient and the MTU growth coefficient.

[0032] In some embodiments, adjusting the current MTU value according to the MTU coefficient and the first gradient cross parameter to calculate a new MTU value includes:

[0033] If the determined MTU coefficient is the first MTU attenuation coefficient, calculating an MTU attenuation adjustment value according to the first MTU attenuation coefficient and the first gradient cross parameter, and attenuating the current MTU value according to the MTU attenuation adjustment value to obtain the new MTU value;

[0034] If the determined MTU coefficient is the MTU growth coefficient, the MTU growth adjustment value is calculated according to the MTU growth coefficient and the first gradient cross parameter, and the current MTU value is increased according to the MTU growth adjustment value to obtain the new MTU value.

[0035] In some embodiments, transmitting Bluetooth data to the Bluetooth data receiving device based on the new MTU value includes:

[0036] When the number of retransmissions of transmitting the Bluetooth data to the Bluetooth data receiving device based on the new MTU value exceeds a preset number threshold, determining a retransmission parameter based on the number of retransmissions; or,

[0037] When a retransmission time for transmitting the Bluetooth data to the Bluetooth data receiving device based on the new MTU value exceeds a preset time threshold, determining the retransmission parameter based on the retransmission time;

[0038] Obtain a preset second MTU attenuation coefficient; based on the second MTU attenuation coefficient and the retransmission parameter, adjust the new MTU value again, and calculate the adjusted MTU value;

[0039] Based on the adjusted MTU value, the Bluetooth data is resent to the Bluetooth data receiving device.

[0040] In a second aspect, an embodiment of the present application provides a Bluetooth data transmission device, which is applied to a Bluetooth data sending device; the device includes:

[0041] A signal strength detection module, used to detect a signal strength parameter from a Bluetooth data receiving device to the Bluetooth data sending device;

[0042] An acquisition module, used to acquire the current MTU value of the Bluetooth data sending device;

[0043] A cross parameter calculation module, used to calculate the threshold gradient of the signal strength parameter; based on the threshold gradient, calculate a first gradient cross parameter for the current MTU value; the first gradient cross parameter is the number of times different threshold gradients are crossed;

[0044] An MTU value calculation module is used to determine a corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range; adjust the current MTU value according to the MTU coefficient and the first gradient cross parameter, and calculate a new MTU value;

[0045] A transmission module is used to transmit Bluetooth data to the Bluetooth data receiving device based on the new MTU value.

[0046] In a third aspect, an embodiment of the present application provides a Bluetooth data sending device, which includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the Bluetooth data sending method as described in the first aspect above.

[0047] In a fourth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the Bluetooth data sending method as described in the first aspect above is implemented.

[0048] Compared with the related art, the Bluetooth data transmission method, device and Bluetooth data sending device provided in the embodiments of the present application detect the signal strength parameter from the Bluetooth data receiving device to the Bluetooth data sending device; obtain the current MTU value of the Bluetooth data sending device; calculate the threshold gradient where the signal strength parameter is located; based on the threshold gradient, calculate the first gradient cross parameter of the current MTU value; the first gradient cross parameter is the number of times different threshold gradients are crossed; based on the first comparison result between the signal strength parameter and the preset signal strength standard range, determine the corresponding MTU coefficient; according to the MTU coefficient and the first gradient cross parameter, adjust the current MTU value and calculate the new MTU value; based on the new MTU value, transmit Bluetooth data to the Bluetooth data receiving device.

[0049] Based on this, dynamic adjustment of the MTU value is realized. In the frequency band with greater interference, the length of the data packet sent by the Bluetooth device can be adaptively adjusted, so that the Bluetooth device can more effectively utilize spectrum resources, reduce the probability of conflict with other wireless devices, and effectively reduce co-channel interference. Therefore, the problem of Bluetooth data transmission being susceptible to interference is solved, and communication efficiency and reliability are improved.

[0050] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0052] Figure 1 It is a hardware structure block diagram of a terminal of a Bluetooth data transmission method according to an embodiment of the present application;

[0053] Figure 2 is a flow chart of a method for transmitting Bluetooth data according to an embodiment of the present application;

[0054] Figure 3 is a flow chart of a method for determining an MTU coefficient according to an embodiment of the present application;

[0055] Figure 4 It is a structural block diagram of a Bluetooth data transmission device according to an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.

[0057] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0058] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantity limitation, and may indicate the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application means greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.

[0059] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. Taking running on a terminal as an example, Figure 1 1 is a hardware structure block diagram of a terminal according to a method for transmitting Bluetooth data in an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0060] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the Bluetooth data transmission method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0061] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0062] This embodiment provides a Bluetooth data transmission method, which is applied to a Bluetooth data sending device; Figure 2 is a flow chart of a method for transmitting Bluetooth data according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0063] Step S210: detecting a signal strength parameter from the Bluetooth data receiving device to the Bluetooth data sending device.

[0064] The above-mentioned Bluetooth data sending device and Bluetooth data receiving device are both devices equipped with Bluetooth chips. In an optional embodiment, the Bluetooth data sending device can be a smart door lock with a built-in Bluetooth chip and serving as a Bluetooth host device; the Bluetooth data receiving device can be a smart phone, a Bluetooth keychain, a Bluetooth card reader or other smart device that establishes a Bluetooth communication connection with the smart door lock.

[0065] Among them, the signal strength parameter is an important parameter for measuring the quality of Bluetooth connection, which directly affects the stability and efficiency of data transmission. The signal strength parameter can be detected by: in the initial stage of discovery and connection of the Bluetooth data sending device, by receiving the broadcast data packet of the Bluetooth data sending device, detecting the broadcast data packet to obtain the corresponding signal strength parameter (Received Signal Strength Indication, RSSI) value. Based on the signal strength parameter, the distance between the Bluetooth data sending device and the Bluetooth data receiving device can be determined, and the transmission power of the Bluetooth data sending device can be dynamically adjusted.

[0066] Step S220, obtaining the current MTU value of the Bluetooth data sending device.

[0067] After successfully establishing a connection with a Bluetooth data receiving device, the Bluetooth data sending device agrees on the current MTU value through Bluetooth wireless transmission. MTU refers to the maximum Internet Protocol (IP) message length that can be transmitted during a message transmission. During Bluetooth data transmission, different sizes of MTU bearer links are configured according to the protocol requirements; in order to support communication protocols of different lengths, the current MTU value can usually be configured to a typical value of 256.

[0068] Step S230, calculating the threshold gradient of the signal strength parameter; based on the threshold gradient, calculating the first gradient cross parameter for the current MTU value; the first gradient cross parameter is the number of times crossing different threshold gradients.

[0069] The threshold gradient specifically refers to the signal quality numerical range corresponding to the signal strength parameter. Different signal strength parameters correspond to different threshold gradients; in other words, different intervals or gradients can be divided in advance according to the size of the signal strength, and each gradient represents a different signal quality range. In this embodiment, the signal strength can be divided into intervals according to three gradients of "strong", "medium" and "weak", and each gradient corresponds to a range of signal strength. The range of each preset threshold gradient interval divided in the above manner can be equal; or, in order to better adapt to the communication scenario, the range of each preset threshold gradient interval can also be increased or decreased.

[0070] For example, different signal strength parameters can be divided into: Gradient 1 (-50dBm to -40dBm), within this range, the signal strength is very high, which usually means that the communication between devices is very stable, the data transmission speed is fast, and there are few connection interruptions or signal loss. Gradient 2 (-60dBm to -51dBm), the signal strength is still very strong in this range, although it is slightly lower than gradient 1, but it can usually still meet the needs of most applications; within this range, the communication between devices is still relatively stable, and the data transmission speed is fast. Gradient 3 (-70dBm to -61dBm), description: the signal strength is moderate, and the connection may be unstable or the data transmission speed may decrease under some specific conditions (such as long distance, obstacles, etc.). Gradient 4 (-80dBm to -71dBm), the signal strength is weak, and there may be frequent connection interruptions or signal loss; within this range, the communication between devices may become unstable, and the data transmission speed may also be greatly affected. Gradient 5 (-90dBm to -81dBm), the signal strength is very weak, and it is almost impossible to maintain stable communication. In this range, the connection between devices may be frequently interrupted, and data transmission speed is very slow or not possible at all. Gradient 6 (below -90dBm), the signal strength is extremely low and it is almost impossible to detect a valid signal; in this range, communication between devices is almost impossible.

[0071] Next, according to the signal strength parameter value measured in real time through the above steps, the gradient interval in which it is located is determined. In the process of adjusting the MTU value, according to the threshold gradient interval in which the currently determined signal strength parameter is located, the number of times the signal strength parameter crosses different threshold gradients is calculated, that is, the above-mentioned first gradient crossover parameter is obtained. It should also be noted that the first gradient crossover parameter can be obtained by calculating the threshold gradient in which the signal strength parameter is located, compared with the number of times the threshold gradient of the preset threshold gradient interval with the highest strength is crossed. Alternatively, the calculation method of the first gradient crossover parameter can also be to determine an intermediate value interval from each preset threshold gradient interval, and calculate the number of times the threshold gradient of the signal strength parameter is crossed compared with the intermediate value interval. Alternatively, the first gradient crossover parameter can also be determined from each preset threshold gradient interval according to the preset signal strength standard threshold, and the threshold gradient of the signal strength parameter is calculated compared with the number of times the standard threshold gradient interval is crossed. By calculating the first gradient crossover parameter, it can help to dynamically determine the adjustment range of the current MTU value.

[0072] Step S240, based on the first comparison result between the signal strength parameter and the preset signal strength standard range, determine the corresponding MTU coefficient; according to the MTU coefficient and the first gradient cross parameter, adjust the current MTU value and calculate a new MTU value.

[0073] In this step, the MTU coefficient is first determined. Specifically, a signal strength standard range is obtained; the signal strength standard range can be an optimal signal strength range obtained based on experience or testing. The signal strength parameter detected by the above steps is compared with the signal strength standard range, and the corresponding MTU coefficient is obtained. For example, if the signal strength parameter is less than the signal strength standard range, the coefficient value for dynamically attenuating the current MTU value can be determined; the coefficient value can be a negative number or a decimal less than 1. The coefficient values ​​of different division methods have different adjustment methods for the current MTU value; if the coefficient value is set to a negative number, the attenuation adjustment method of decreasing the current MTU value can be adopted; if the coefficient value is set to a decimal less than 1, the attenuation adjustment method of multiplying the current MTU value can be adopted. The specific value of the coefficient may vary according to the gradient of the signal strength, the number of crossovers and other factors. If the signal strength parameter is greater than the signal strength standard range, the coefficient value for dynamically increasing the current MTU value can be determined; the coefficient value can be a positive number or a natural number greater than 1. Of course, if the signal strength parameter is within the signal strength standard range, it means that there is no need to adjust the MTU value at this time, and the MTU coefficient can be set to 0 or 1, or the subsequent calculation and adjustment steps can be omitted, and Bluetooth data can be sent directly at the current MTU value. By calculating the above MTU coefficient, it can help dynamically determine how to adjust the current MTU value.

[0074] Afterwards, the current MTU value is adjusted based on the various parameters obtained by the above calculations. Specifically, the MTU dynamic adjustment value can be calculated according to the MTU coefficient and the first gradient cross parameter, and the current MTU value can be adjusted according to the MTU dynamic adjustment value. The MTU dynamic adjustment value can be calculated by calculating the product between the MTU coefficient and the first gradient cross parameter. Alternatively, in another embodiment, in order to further increase the flexibility of the MTU value adjustment, the first gradient cross parameter can be used as an index to calculate the exponential value of the MTU coefficient to obtain the MTU dynamic adjustment value. Finally, the MTU dynamic adjustment value is added or multiplied with the current MTU value to calculate the above-mentioned new MTU value.

[0075] Through the above steps, the signal strength can be continuously monitored and the MTU value can be dynamically adjusted according to the signal strength, thereby dynamically adjusting the data frame length to optimize the data transmission efficiency, effectively ensuring that the Bluetooth connection can operate at the highest possible efficiency while maintaining the stability of the connection.

[0076] Step S250: transmitting Bluetooth data to a Bluetooth data receiving device based on the new MTU value.

[0077] The Bluetooth data transmission device uses the adjusted MTU value for packet assembly; the larger the MTU value, the larger the amount of data that can be carried. Since the adjustment of the MTU value is based on the current signal strength and quality, this step can ensure that data is transmitted at the highest possible efficiency while maintaining the stability of the connection.

[0078] In the related art, when the Bluetooth signal is too complex in a certain application scenario, or is affected by unstable factors such as frequency band interference and channel congestion, the quality of Bluetooth communication is easily affected. Based on this, the present application determines the first gradient crossover parameter by calculating the threshold gradient of the signal strength parameter through the above steps S210 to S250, and determines the corresponding MTU coefficient based on the threshold gradient, and finally adjusts the current MTU value according to the MTU coefficient and the first gradient crossover parameter, and calculates the new MTU value, thereby realizing the dynamic adjustment of the MTU value. In the frequency band with greater interference, the length of the data packet sent by the Bluetooth device can be adaptively adjusted, so that the Bluetooth device can use the spectrum resources more effectively, reduce the probability of conflict with other wireless devices, and effectively reduce the same-frequency interference, thereby solving the problem that Bluetooth data transmission is susceptible to interference and improving communication efficiency and reliability.

[0079] In some embodiments, a method for determining the MTU factor is also provided. Figure 3 , the process includes the following steps:

[0080] Step S310, acquiring transmission time data stored in the Bluetooth data sending device; the transmission time data is the sending and receiving time data of historical data transmitted to the Bluetooth data receiving device during the historical communication process.

[0081] The above historical communication may be the previous communication compared to the current communication, or may be multiple communications that occurred before the current communication. The transmission time data under the historical communication can usually be stored in the log file of the Bluetooth data sending device; specifically, it includes the time data of the Bluetooth data sending device sending data, and the time data of the Bluetooth data receiving device receiving data, that is, the above sending and receiving time data.

[0082] Step S320, calculating the air loss time based on the transmission time data;

[0083] By reading the stored transmission time data, the air loss time of Bluetooth data transmission in the historical communication process can be calculated; the air loss time refers to the actual time required for data to be transmitted from the sender to the receiver in the Bluetooth wireless channel.

[0084] Step S330, calculating a second comparison result between the air loss time and a preset loss time standard range, and determining the MTU coefficient according to the first comparison result and the second comparison result.

[0085] In this step, a comprehensive comparison is made in combination with the calculated air loss time to determine the corresponding MTU coefficient. Specifically, a loss time standard range is obtained; the loss time standard range can be an optimal loss time range based on experience or testing. The air loss time is compared with the loss time standard range, and the first comparison result between the above-mentioned signal strength parameter and the signal strength standard range, as well as the second comparison result between the air loss time and the loss time standard range are comprehensively considered to evaluate the current Bluetooth transmission channel quality, and then determine whether the current MTU value needs to be adjusted to dynamically attenuate or increase. It can be seen that the current channel quality is evaluated according to the length of the air loss time and the monitored signal strength parameter value, and the MTU value can be dynamically adjusted according to the current channel quality.

[0086] Through the above embodiment, a method for calculating the first gradient crossover parameter in combination with the air loss time is also provided, thereby realizing a method for dynamically adjusting the MTU value by integrating the air loss time and the monitoring signal strength parameter, which is beneficial to improving the accuracy and reliability of the dynamic adjustment of the MTU value, thereby improving the reliability of Bluetooth data transmission.

[0087] In some embodiments, the transmission time data includes a first data sending time, a first data receiving time, and a second data sending time;

[0088] Among them, the first data sending time is the time when historical data starts to be sent to the Bluetooth data receiving device, the first data receiving time is the recorded time when the Bluetooth data receiving device completely receives the data, the second data sending time is the recorded time when the Bluetooth data receiving device starts to send return data, and the second data receiving time is the time when the return data is completely received.

[0089] Specifically, during the historical communication process, the Bluetooth data sending device sends historical data to the Bluetooth data receiving device, and records the first data sending time t1. After receiving the historical data, the Bluetooth data receiving device sends the returned response data; the communication data format requires the Bluetooth data receiving device to return the first data receiving time t2 when the historical data is completely received, and the second data sending time t3 when the returned data is started. The Bluetooth data sending device records the second data receiving time t4 when the returned data of the Bluetooth data receiving device is completely received.

[0090] The above data are stored in the Bluetooth data sending device, and in the current communication process, the transmission time data stored in the historical communication is read to participate in the calculation of the first gradient crossover parameter in the subsequent steps. Based on this, the above calculation of the air loss time based on the transmission time data may also include the following steps:

[0091] Calculate a first time difference between a first data sending moment and a first data receiving moment, and a second time difference between a second data sending moment and a second data receiving moment; and calculate the air loss time based on the first time difference and the second time difference.

[0092] The calculation process of the above-mentioned air loss time is shown in the following formula:

[0093] T=t2-t1+t4-t3

[0094] Through the above embodiment, the air loss time used to adjust the MTU value in the current communication process is calculated by obtaining the transmission time difference between two data interactions in the historical communication, which is conducive to improving the accuracy of the air loss time calculation.

[0095] In some embodiments, the step of calculating the first gradient crossing parameter according to the threshold gradient and the air loss time may further include the following steps:

[0096] Calculate the time gradient of the air loss time; based on the time gradient, calculate the second gradient cross parameter for the current MTU value; the second gradient cross parameter is the number of times crossing different time gradients; calculate the total gradient cross parameter based on the first gradient cross parameter and the second gradient cross parameter; adjust the current MTU value based on the MTU coefficient and the total gradient cross parameter to obtain a new MTU value.

[0097] Among them, the time gradient specifically refers to the time value range corresponding to the air loss time. Different air loss times correspond to different time gradients; in other words, different intervals or gradients can be divided in advance according to the length of the loss time. For example, different air loss times can be divided into: time gradient 1 (0 to 10 s), time gradient 2 (11 s to 20s) and time gradient 3 (21 s to 30 s). These preset time gradient intervals can be adjusted according to actual conditions. Compare the air loss time calculated through the above steps with the preset time gradient interval to determine the time gradient interval in which the air loss time is located.

[0098] During the MTU value adjustment process, the number of times the signal strength parameter crosses different threshold gradients is calculated based on the threshold gradient interval where the currently determined signal strength parameter is located, that is, the above-mentioned first gradient crossover parameter is obtained. And, based on the time gradient interval where the calculated air loss time is located, the number of times the air loss time crosses different time gradients is calculated, that is, the above-mentioned second gradient crossover parameter is obtained. Similar to the calculation method of the first gradient crossover parameter, the second gradient crossover parameter can be obtained by calculating the number of times the time gradient where the air loss time is located is crossed compared to the time gradient of the preset time gradient interval with the shortest time predetermined, or by calculating the number of times the time gradient where the air loss time is located is crossed compared to the standard time gradient interval.

[0099] Next, the total gradient cross parameter is calculated by combining the first gradient cross parameter and the second gradient cross parameter, and together with the MTU coefficient, it participates in the dynamic adjustment of the current MTU value. Among them, there can be multiple ways to calculate the total gradient cross parameter. For example, if the currently determined dynamic adjustment calculation process is to multiply the gradient cross parameter by the MTU coefficient to obtain a dynamic adjustment value, and adjust it according to the dynamic adjustment value and the current MTU value by adding or multiplying, then the first gradient cross parameter and the second gradient cross parameter can be added or multiplied to obtain the total gradient cross parameter. Alternatively, if the total gradient cross parameter is used as an exponent of the MTU coefficient, the first gradient cross parameter and the second gradient cross parameter can generally be added to obtain the total gradient cross parameter.

[0100] It should also be noted that when the calculation process is to add the first gradient cross parameter and the second gradient cross parameter to calculate the total gradient cross parameter, in order to further improve the flexibility of dynamic adjustment of the MTU value and expand the application scenarios, corresponding weight values ​​can be assigned to the first gradient cross parameter and the second gradient cross parameter in advance, and the first gradient cross parameter and the second gradient cross parameter can be weighted calculated based on the assigned weight values.

[0101] Through the above embodiments, a method of calculating the total gradient crossover parameter by integrating the air loss time and signal strength parameters is realized, thereby effectively improving the accuracy and flexibility of the dynamic adjustment of the MTU value, and also helping to further improve the reliability of Bluetooth data communication.

[0102] In some embodiments, the calculation of the first gradient cross parameter for the current MTU value based on the threshold gradient includes:

[0103] The gradient crossing information between the threshold gradient and the signal strength standard range is calculated; and the first gradient crossing parameter is determined based on the gradient crossing information.

[0104] Specifically, for the signal strength standard range determined above, the corresponding standard gradient interval is matched from the pre-divided different threshold gradient intervals. For example, the starting value and the ending value of the signal strength standard range can be determined. The upper and lower limits of the standard range are compared with the upper and lower limits of each gradient interval to compare the gradient intervals one by one, and the first gradient interval that completely contains the standard range or overlaps with it is found, and is determined as the standard gradient interval. If the standard range spans multiple gradient intervals, it may be necessary to select the interval that overlaps the most with it, or to select it according to specific rules (such as giving priority to higher or lower gradients).

[0105] Then, according to the number of gradient crossings between the threshold gradient and the standard threshold gradient interval obtained by the above calculation, that is, the above gradient crossing information, the first gradient crossing parameter is determined. If the initial first gradient crossing parameter is 1, each time the current threshold gradient crosses the gradient once compared to the standard threshold gradient interval, the value of the first gradient crossing parameter is increased by 1.

[0106] Through the above embodiment, a method for calculating the first gradient crossing parameter threshold according to the gradient crossing information is provided, and the accuracy of the first gradient crossing threshold calculation is improved by comparing the preset signal strength standard range with the threshold gradient and determining the gradient crossing information.

[0107] In some embodiments, the MTU coefficient can be divided into a first MTU attenuation coefficient and an MTU growth coefficient. The first comparison result between the signal strength parameter and the preset signal strength standard range is used to determine the corresponding MTU coefficient, and the following steps can also be included:

[0108] When the first comparison result indicates that the signal strength parameter is less than the signal strength standard range, the first MTU attenuation coefficient is determined. When the signal strength parameter is less than the signal strength standard range, it means that the channel quality is poor at this time. In order to avoid interference in communication, a first MTU attenuation coefficient can be set accordingly. Normally, the first MTU attenuation coefficient can be set to 0.5, and the exponential calculation value of the first MTU attenuation coefficient is multiplied by the current MTU value, indicating that each time the signal strength parameter is less than the signal strength standard range, the current MTU value is halved.

[0109] When the first comparison result indicates that the signal strength parameter is greater than the signal strength standard range, the MTU growth coefficient is determined. Similarly, when the signal strength parameter is greater than the signal strength standard range, it means that the signal quality is good at this time. In order to improve communication efficiency, an MTU growth coefficient can be set accordingly. Normally, the MTU growth coefficient can be set to 2, and the exponential calculation value of the first MTU growth coefficient is multiplied by the current MTU value, indicating that each time the signal strength parameter is greater than the signal strength standard range, the current MTU value doubles.

[0110] It should be understood that when the signal strength parameter is within the signal strength standard range, it means that the communication quality and efficiency can be met at the same time, and there is no need to adjust the MTU value. The subsequent calculation and adjustment steps can be omitted, and Bluetooth data can be sent directly at the current MTU value.

[0111] In some embodiments, the above-mentioned adjusting the current MTU value according to the MTU coefficient and the first gradient cross parameter to calculate the new MTU value may also include the following steps:

[0112] If the determined MTU coefficient is the first MTU attenuation coefficient, the MTU attenuation adjustment value is calculated according to the first MTU attenuation coefficient and the first gradient cross parameter, and the current MTU value is attenuated according to the MTU attenuation adjustment value to obtain a new MTU value. In this embodiment, the first gradient cross parameter is calculated as an exponent of the first MTU attenuation coefficient to obtain the MTU attenuation adjustment value, and the MTU attenuation adjustment value is multiplied by the current MTU value to obtain a new MTU value.

[0113] If the determined MTU coefficient is the MTU growth coefficient, the MTU growth adjustment value is calculated according to the MTU growth coefficient and the first gradient cross parameter, and the current MTU value is increased according to the MTU growth adjustment value to obtain a new MTU value.

[0114] For a better understanding of this application, a calculation formula for the new MTU value is provided below:

[0115] MTU_new=MTU_initial×(decay_rate)^(number_of_thresholds_crossed)

[0116] In the above formula, MTU_new is used to represent the new MTU value. MTU_initial represents the current MTU value. decay_rate represents the MTU coefficient; when the MTU coefficient is the first MTU decay coefficient between 0 and 1, the MTU value decays; when the MTU coefficient is 1, the MTU value remains unchanged; when the MTU coefficient is the MTU growth coefficient greater than 1, the MTU value increases. Moreover, the greater the difference between the MTU coefficient value and 1, the faster the decay or growth adjustment of the current MTU value. number_of_thresholds_crossed represents the first gradient crossover parameter.

[0117] Through the above embodiment, the MTU value is dynamically adjusted according to the calculated MTU attenuation adjustment value or the MTU growth adjustment value, thereby improving the flexibility of the MTU value adjustment.

[0118] In some embodiments, the above-mentioned transmitting Bluetooth data to the Bluetooth data receiving device based on the new MTU value includes:

[0119] When the number of retransmissions of Bluetooth data transmitted to a Bluetooth data receiving device based on a new MTU value exceeds a preset number threshold, a retransmission parameter is determined based on the number of retransmissions; or, when the retransmission time of Bluetooth data transmitted to a Bluetooth data receiving device based on a new MTU value exceeds a preset time threshold, a retransmission parameter is determined based on the retransmission time.

[0120] Specifically, when transmitting Bluetooth data to a Bluetooth data receiving device, the number of retransmissions for each transmission is recorded. If the number of retransmissions for transmitting data based on the new MTU value exceeds a preset number threshold, the number of retransmissions itself or the degree to which it exceeds the threshold (such as the number of times exceeded) can be regarded as a retransmission parameter, and the next step is entered. At the same time or separately, the retransmission time for each transmission is recorded. If the retransmission time for transmitting data based on the new MTU value exceeds a preset time threshold, the retransmission time itself or the duration for which it exceeds the threshold can be regarded as a retransmission parameter, and the next step is also entered.

[0121] Next, obtain the preset second MTU attenuation coefficient; based on the second MTU attenuation coefficient and the retransmission parameter, adjust the new MTU value again and calculate the adjusted MTU value; based on the adjusted MTU value, resend the Bluetooth data to the Bluetooth data receiving device. It should be noted that since the communication state monitored at this time is a state where multiple attempts have not been successful, the corresponding set MTU coefficient should be the second MTU attenuation coefficient. The coefficient value of the second MTU attenuation coefficient may be the same as or different from the value of the above-mentioned first MTU attenuation coefficient. Finally, based on the retransmission parameter, calculate the exponential value of the second MTU attenuation coefficient, and perform automatic exponential attenuation processing on the new MTU value according to the calculated exponential value until the data packet is successfully sent under the MTU value obtained after processing.

[0122] Through the above embodiment, combined with the communication state of multiple unsuccessful attempts to send, how to dynamically adjust the MTU value is comprehensively considered, thereby further effectively improving the reliability of Bluetooth data transmission.

[0123] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0124] This embodiment also provides a Bluetooth data transmission device, which is applied to a Bluetooth data sending device; the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the terms "module", "unit", "subunit", etc. can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0125] Figure 4 is a structural block diagram of a Bluetooth data transmission device according to an embodiment of the present application, such as Figure 4 As shown, the device includes: a signal strength detection module 41, an acquisition module 42, a cross parameter calculation module 43, an MTU value calculation module 44 and a transmission module 45; wherein:

[0126] The signal strength detection module 41 is used to detect the signal strength parameter from the Bluetooth data receiving device to the Bluetooth data sending device.

[0127] The acquisition module 42 is used to acquire the current MTU value of the Bluetooth data sending device.

[0128] The cross parameter calculation module 43 is used to calculate the threshold gradient of the signal strength parameter; based on the threshold gradient, calculate the first gradient cross parameter for the current MTU value; the first gradient cross parameter is the number of times crossing different threshold gradients.

[0129] The MTU value calculation module 44 is used to determine the corresponding MTU coefficient based on the first comparison result between the signal strength parameter and the preset signal strength standard range; adjust the current MTU value according to the MTU coefficient and the first gradient cross parameter, and calculate a new MTU value.

[0130] The transmission module 45 is used to transmit Bluetooth data to the Bluetooth data receiving device based on the new MTU value.

[0131] In some embodiments, the MTU value calculation module 44 is further used to obtain transmission time data stored in the Bluetooth data sending device; the transmission time data is the sending and receiving time data of historical data transmitted to the Bluetooth data receiving device during the historical communication process.

[0132] The MTU value calculation module 44 is further used to calculate the air loss time based on the transmission time data.

[0133] The MTU value calculation module 44 is further used to calculate a second comparison result between the air loss time and a preset loss time standard range, and determine the MTU coefficient according to the first comparison result and the second comparison result.

[0134] In some embodiments, the transmission time data includes a first data transmission time, a first data reception time, a second data transmission time, and a second data reception time; wherein the first data transmission time is the time when the historical data starts to be sent to the Bluetooth data receiving device, the first data reception time is the time when the Bluetooth data receiving device completely receives the data, the second data transmission time is the time when the Bluetooth data receiving device starts to send the return data, and the second data reception time is the time when the return data is completely received. Based on the transmission time data, calculating the air loss time includes:

[0135] The above-mentioned MTU value calculation module 44 is also used to calculate the first time difference between the first data sending time and the first data receiving time, and the second time difference between the second data sending time and the second data receiving time; the MTU value calculation module 44 is also used to calculate the air loss time according to the first time difference and the second time difference.

[0136] In some embodiments, the MTU value calculation module 44 is further used to calculate the time gradient of the air loss time; based on the time gradient, calculate the second gradient crossover parameter of the current MTU value; the second gradient crossover parameter is the number of times crossing different time gradients;

[0137] The MTU value calculation module 44 is further configured to calculate a total gradient cross parameter according to the first gradient cross parameter and the second gradient cross parameter.

[0138] The MTU value calculation module 44 is further used to adjust the current MTU value according to the MTU coefficient and the total gradient cross parameter to obtain a new MTU value.

[0139] In some embodiments, the cross parameter calculation module 43 is further used to calculate the gradient span information between the threshold gradient and the signal strength standard range; the cross parameter calculation module 43 is further used to determine the first gradient cross parameter based on the gradient span information.

[0140] In some of the embodiments, the MTU value calculation module 44 is also used to determine a first MTU attenuation coefficient when the first comparison result indicates that the signal strength parameter is less than the signal strength standard range; the MTU value calculation module 44 is also used to determine an MTU growth coefficient when the first comparison result indicates that the signal strength parameter is greater than the signal strength standard range; wherein the MTU coefficient includes a first MTU attenuation coefficient and an MTU growth coefficient.

[0141] In some of the embodiments, the MTU value calculation module 44 is also used to calculate the MTU attenuation adjustment value according to the first MTU attenuation coefficient and the first gradient cross parameter if the determined MTU coefficient is the first MTU attenuation coefficient, and to attenuate the current MTU value according to the MTU attenuation adjustment value to obtain a new MTU value; the MTU value calculation module 44 is also used to calculate the MTU growth adjustment value according to the MTU growth coefficient and the first gradient cross parameter if the determined MTU coefficient is the MTU growth coefficient, and to increase the current MTU value according to the MTU growth adjustment value to obtain a new MTU value.

[0142] In some embodiments, the transmission module 45 is further used to determine the retransmission parameter based on the number of retransmissions when the number of retransmissions for transmitting Bluetooth data to a Bluetooth data receiving device based on a new MTU value exceeds a preset number threshold; or, the transmission module 45 is further used to determine the retransmission parameter based on the retransmission time when the retransmission time for transmitting Bluetooth data to a Bluetooth data receiving device based on a new MTU value exceeds a preset time threshold.

[0143] The transmission module 45 is also used to obtain a preset second MTU attenuation coefficient; based on the second MTU attenuation coefficient and the retransmission parameter, the new MTU value is adjusted again to calculate the adjusted MTU value; the transmission module 45 is also used to resend Bluetooth data to the Bluetooth data receiving device based on the adjusted MTU value.

[0144] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0145] This embodiment further provides a Bluetooth data sending device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0146] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0147] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0148] S1, detecting the signal strength parameter from the Bluetooth data receiving device to the Bluetooth data sending device.

[0149] S2, obtaining the current MTU value of the Bluetooth data sending device.

[0150] S3, calculating the threshold gradient of the signal strength parameter; based on the threshold gradient, calculating the first gradient cross parameter for the current MTU value; the first gradient cross parameter is the number of times crossing different threshold gradients.

[0151] S4, determining a corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range; adjusting a current MTU value according to the MTU coefficient and a first gradient cross parameter, and calculating a new MTU value.

[0152] S5: Transmitting Bluetooth data to the Bluetooth data receiving device based on the new MTU value.

[0153] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0154] In addition, in combination with the Bluetooth data transmission method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any Bluetooth data transmission method in the above embodiment is implemented.

[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0156] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0157] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0158] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for transmitting Bluetooth data, characterized in that: Applied to a Bluetooth data sending device; the method comprises: Detecting a signal strength parameter from a Bluetooth data receiving device to the Bluetooth data sending device; Obtain the current MTU value of the Bluetooth data sending device; Calculate the threshold gradient of the signal strength parameter; calculate a first gradient crossover parameter for the current MTU value based on the threshold gradient; the first gradient crossover parameter is the number of times different threshold gradients are crossed; Determine a corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range; adjust the current MTU value according to the MTU coefficient and the first gradient cross parameter to calculate a new MTU value; Based on the new MTU value, Bluetooth data is transmitted to the Bluetooth data receiving device.

2. The transmission method according to claim 1, characterized in that: The determining a corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range includes: Acquire transmission time data stored in the Bluetooth data sending device; the transmission time data is the sending and receiving time data of historical data transmitted to the Bluetooth data receiving device during the historical communication process; Calculating air loss time based on the transmission time data; A second comparison result between the air loss time and a preset loss time standard range is calculated, and the MTU coefficient is determined according to the first comparison result and the second comparison result.

3. The transmission method according to claim 2, characterized in that: The transmission time data includes a first data sending time, a first data receiving time, a second data sending time, and a second data receiving time; The first data sending time is the time when the historical data starts to be sent to the Bluetooth data receiving device, the first data receiving time is the recorded time when the Bluetooth data receiving device completely receives the data, the second data sending time is the recorded time when the Bluetooth data receiving device starts to send the return data, and the second data receiving time is the time when the return data is completely received; The step of calculating the air loss time based on the transmission time data comprises: Calculating a first time difference between the first data sending time and the first data receiving time, and a second time difference between the second data sending time and the second data receiving time; The air loss time is calculated based on the first time difference and the second time difference.

4. The transmission method according to claim 2, characterized in that: The adjusting the current MTU value according to the MTU coefficient and the first gradient cross parameter to calculate a new MTU value includes: Calculate the time gradient of the air loss time; calculate the second gradient crossover parameter of the current MTU value based on the time gradient; the second gradient crossover parameter is the number of times crossing different time gradients; Calculating a total gradient crossover parameter according to the first gradient crossover parameter and the second gradient crossover parameter; The current MTU value is adjusted according to the MTU coefficient and the total gradient cross parameter to obtain the new MTU value.

5. The transmission method according to claim 1, characterized in that: The calculating, based on the threshold gradient, a first gradient cross parameter for the current MTU value includes: Calculating gradient span information between the threshold gradient and the signal strength standard range; Based on the gradient crossing information, the first gradient crossing parameter is determined.

6. The transmission method according to claim 1, characterized in that: The determining a corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range includes: If the first comparison result indicates that the signal strength parameter is less than the signal strength standard range, determining a first MTU attenuation coefficient; If the first comparison result indicates that the signal strength parameter is greater than the signal strength standard range, determining an MTU growth factor; The MTU coefficient includes the first MTU attenuation coefficient and the MTU growth coefficient.

7. The transmission method according to claim 6, characterized in that: The adjusting the current MTU value according to the MTU coefficient and the first gradient cross parameter to calculate a new MTU value includes: If the determined MTU coefficient is the first MTU attenuation coefficient, calculating an MTU attenuation adjustment value according to the first MTU attenuation coefficient and the first gradient cross parameter, and attenuating the current MTU value according to the MTU attenuation adjustment value to obtain the new MTU value; If the determined MTU coefficient is the MTU growth coefficient, the MTU growth adjustment value is calculated according to the MTU growth coefficient and the first gradient cross parameter, and the current MTU value is increased according to the MTU growth adjustment value to obtain the new MTU value.

8. The transmission method according to any one of claims 1 to 7, characterized in that: The transmitting the Bluetooth data to the Bluetooth data receiving device based on the new MTU value includes: When the number of retransmissions of transmitting the Bluetooth data to the Bluetooth data receiving device based on the new MTU value exceeds a preset number threshold, determining a retransmission parameter based on the number of retransmissions; or, When a retransmission time for transmitting the Bluetooth data to the Bluetooth data receiving device based on the new MTU value exceeds a preset time threshold, determining the retransmission parameter based on the retransmission time; Obtain a preset second MTU attenuation coefficient; based on the second MTU attenuation coefficient and the retransmission parameter, adjust the new MTU value again, and calculate the adjusted MTU value; Based on the adjusted MTU value, the Bluetooth data is resent to the Bluetooth data receiving device.

9. A Bluetooth data transmission device, characterized in that: Applicable to a Bluetooth data sending device; the device comprises: A signal strength detection module, used to detect a signal strength parameter from a Bluetooth data receiving device to the Bluetooth data sending device; An acquisition module, used to acquire the current MTU value of the Bluetooth data sending device; A cross parameter calculation module, used to calculate the threshold gradient of the signal strength parameter; based on the threshold gradient, calculate a first gradient cross parameter for the current MTU value; the first gradient cross parameter is the number of times different threshold gradients are crossed; An MTU value calculation module is used to determine a corresponding MTU coefficient based on a first comparison result between the signal strength parameter and a preset signal strength standard range; adjust the current MTU value according to the MTU coefficient and the first gradient cross parameter, and calculate a new MTU value; A transmission module is used to transmit Bluetooth data to the Bluetooth data receiving device based on the new MTU value.

10. A Bluetooth data transmission device, characterized in that: The Bluetooth data sending device comprises a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the Bluetooth data transmission method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Bluetooth data packet processing method and device

    CN110446193A

  • Method and apparatus for reducing transmission error rate using variable maximum transfer unit

    KR1020080057973A