Data transmission method, terminal and computer-readable medium based on low-power Bluetooth

By dividing large data into small units and transmitting them sequentially during low-power Bluetooth data transmission between wearable devices and mobile terminals, the problem of insufficient low-power Bluetooth transmission rate is solved and user experience and satisfaction are improved.

CN112770306BActive Publication Date: 2024-08-23NUBIA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011526162.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-22
Publication Date
2024-08-23
Estimated Expiration
2040-12-22

AI Technical Summary

Technical Problem

In the data transmission between wearable devices and mobile terminals, the transmission rate of low-power Bluetooth is low, resulting in long data transmission time, causing the Bluetooth channel to be blocked for a long time, affecting the user experience.

Method used

By monitoring the total length of the data, if it is greater than the preset length, it is divided into multiple data units. The length of each unit is less than or equal to the preset length and transmitted in sequence to avoid long-term occupation of the Bluetooth channel.

Benefits of technology

It effectively avoids Bluetooth channel congestion, improves user experience and satisfaction, and prevents device freezes and slow response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112770306B
    Figure CN112770306B
Patent Text Reader

Abstract

The present invention discloses a data transmission method, terminal and computer-readable medium based on low-power Bluetooth, the method comprising the following steps: when a data transmission request is detected, the total length of the data is obtained; whether the total length of the data is greater than a preset length; if so, the data is divided into several data units so that the length of each data unit is less than or equal to the preset length, and the data units are transmitted in sequence; if not, the data is directly transmitted. The technical solution of the present invention realizes the transmission of data with a larger data length by dividing the data with a total length greater than the preset length into several data units with a length less than or equal to the preset length, and then transmitting the data units in sequence, which can effectively avoid the situation where the Bluetooth channel is occupied for a long time and causes congestion, thereby effectively avoiding the occurrence of freezes, slow reactions, no responses and other situations, greatly improving the user experience and satisfaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method, a terminal and a computer-readable medium based on low-power Bluetooth. Background Art

[0002] Currently, mainstream wearable devices are used in pairs with mobile terminals. Wearable devices are responsible for collecting the user's body and motion data and transmitting this data to the mobile terminal for display. There are two types of data transmitted between wearable devices and mobile terminals: one is large-volume physical data, such as music, documents, etc., and the other is small-volume control instructions.

[0003] There are two main ways of data transmission between wearable devices and mobile terminals: Bluetooth transmission and Wi-Fi transmission. There are two main types of Bluetooth transmission: classic Bluetooth and Bluetooth Low Energy (BLE). Classic Bluetooth has a fast transmission speed but high power consumption, which is suitable for transmitting physical data, but has now been replaced by better Wi-Fi direct connection.

[0004] The BLE method has the characteristics of fast search speed, fast connection speed, ultra-low power consumption to maintain connection, etc., and is particularly suitable as a channel for transmitting control instructions. However, in some cases where WiFi direct connection cannot be used (for example, data transmission between wearable devices and mobile terminals with different operating systems; specifically, data transmission between wearable devices with Android system and mobile terminals with IOS system), it is still necessary to use BLE to realize the transmission of physical data. However, due to the low transmission rate of BLE, data transmission takes a long time, and the Bluetooth channel will be blocked for a long time. In this case, the user's intuitive feeling is that the device is stuck, slow to respond, or even unresponsive, which seriously affects the user experience. Summary of the invention

[0005] The main purpose of the present invention is to provide a data transmission method, terminal and computer-readable medium based on low-power Bluetooth, aiming to effectively avoid the long-term congestion of the Bluetooth channel due to the large amount of data transmitted in a single time, thereby effectively improving the user experience.

[0006] To achieve the above object, the present invention proposes a data transmission method based on low-power Bluetooth, comprising the following steps:

[0007] When a data transmission request is detected, obtaining the total length of the data;

[0008] Determine whether the total length of the data is greater than a preset length;

[0009] If yes, dividing the data into a plurality of data units so that the length of each of the data units is less than or equal to the preset length, and transmitting the data units in sequence;

[0010] If not, the data is directly transmitted.

[0011] Optionally, the step of presetting the preset length includes:

[0012] Get the transmission speed V of low-power Bluetooth and the user's tolerance waiting time S;

[0013] The preset length K is calculated according to the formula K=V*S.

[0014] Optionally, the step of dividing the data into a plurality of data units so that the length of each of the data units is less than or equal to the preset length includes:

[0015] The data is divided into a plurality of data units of different lengths, and the maximum length of the data unit is less than or equal to the preset length.

[0016] Optionally, the step of dividing the data into a plurality of data units so that the length of each of the data units is less than or equal to the preset length includes:

[0017] The data is divided into a plurality of data units of equal length, and the length of the data unit is equal to the preset length.

[0018] Optionally, the step of dividing the data into a plurality of data units so that the length of each of the data units is less than or equal to the preset length includes:

[0019] The data is divided into a plurality of data units of equal length, and the length of the data unit is less than the preset length.

[0020] Optionally, the step of transmitting the data units in sequence includes:

[0021] After each of the data units is transmitted, a control instruction waiting queue is obtained;

[0022] Determine whether the control instruction waiting queue is empty;

[0023] If yes, transmitting the next said data unit;

[0024] If not, the control instructions are executed sequentially.

[0025] Optionally, after the step of sequentially executing the control instructions, the method further includes:

[0026] Determine whether the control instruction waiting queue is empty;

[0027] If yes, the next said data unit is transmitted.

[0028] Optionally, the step of transmitting the data units in sequence includes:

[0029] transmitting a first of said data units;

[0030] Wait for the preset time;

[0031] The next said data unit is transmitted.

[0032] In addition, the present invention also proposes a terminal, comprising a memory, a processor, and an implementation program of a data transmission method based on low-power Bluetooth stored in the memory and executable on the processor, wherein the implementation program of the data transmission method based on low-power Bluetooth is executed by the processor as follows:

[0033] When a data transmission request is detected, obtaining the total length of the data;

[0034] Determine whether the total length of the data is greater than a preset length;

[0035] If yes, dividing the data into a plurality of data units so that the length of each of the data units is less than or equal to the preset length, and transmitting the data units in sequence;

[0036] If not, the data is directly transmitted.

[0037] In addition, the present invention further proposes a computer-readable medium, on which is stored an implementation program of a data transmission method based on low-power Bluetooth. When the implementation program of the data transmission method based on low-power Bluetooth is executed, the following steps are implemented:

[0038] When a data transmission request is detected, obtaining the total length of the data;

[0039] Determine whether the total length of the data is greater than a preset length;

[0040] If yes, dividing the data into a plurality of data units so that the length of each of the data units is less than or equal to the preset length, and transmitting the data units in sequence;

[0041] If not, the data is directly transmitted.

[0042] The technical solution of the present invention realizes the transmission of data with a larger data length by dividing data with a total length greater than a preset length into several data units with a length less than or equal to the preset length, and then transmitting the data units in sequence. This can effectively avoid the Bluetooth channel being occupied for a long time and causing congestion, and further effectively avoid the occurrence of freezes, slow responses, no responses, etc., greatly improving the user experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0044] Figure 1 A schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention;

[0045] Figure 2 A communication network system architecture diagram provided for an embodiment of the present invention;

[0046] Figure 3 It is a flow chart of an embodiment of a data transmission method based on low-power Bluetooth of the present invention;

[0047] Figure 4 A flow chart of the steps for presetting the length in the present invention;

[0048] Figure 5 for Figure 3 A flowchart of a first embodiment of the steps of sequentially transmitting the data units shown;

[0049] Figure 6 for Figure 3 A flow chart of a second embodiment of the steps of sequentially transmitting the data units is shown.

[0050] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0052] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0053] The terminal may be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile terminals, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., and fixed terminals such as digital TVs and desktop computers.

[0054] The following description will be made by taking a mobile terminal as an example, and those skilled in the art will appreciate that, in addition to components specifically used for mobile purposes, the configuration according to the embodiments of the present invention can also be applied to fixed-type terminals.

[0055] See also Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A / V (audio / video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111 and other components. Those skilled in the art can understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0056] Combine the following Figure 1 The following is a detailed introduction to the various components of the mobile terminal:

[0057] The radio frequency unit 101 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving the downlink information of the base station, it is sent to the processor 110 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.

[0058] WiFi is a short-range wireless transmission technology. Mobile terminals can help users send and receive emails, browse web pages, and access streaming media through WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as required without changing the essence of the invention.

[0059] The audio output unit 103 can convert the audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.

[0060] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, and other operating modes, and can process such sound into audio data. The processed audio (voice) data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 can implement various types of noise elimination (or suppression) algorithms to eliminate (or suppress) noise or interference generated in the process of receiving and sending audio signals.

[0061] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile terminal, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0062] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0063] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1071 or near the touch panel 1071 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 110, and can receive and execute the command sent by the processor 110. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc., which are not specifically limited here.

[0064] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of the touch event. Then, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Figure 1 In the figure, the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to implement the input and output functions of the mobile terminal, which is not limited here.

[0065] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.

[0066] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile terminal (such as audio data, a phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0067] The processor 110 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. It executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, so as to monitor the mobile terminal as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.

[0068] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.

[0069] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.

[0070] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.

[0071] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present invention. The communication network system is an LTE system of universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203 and an operator's IP service 204, which are sequentially connected for communication.

[0072] Specifically, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.

[0073] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 , etc. Among them, eNodeB 2021 can be connected to other eNodeBs 2022 through a backhaul (eg, an X2 interface), and eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 can provide UE 201 with access to EPC 203 .

[0074] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, PGW (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function) 2036, etc. Among them, MME2031 is a control node that processes signaling between UE201 and EPC203, and provides bearer and connection management. HSS2032 is used to provide some registers to manage functions such as home location register (not shown in the figure), and save some user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, which selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).

[0075] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem) or other IP services.

[0076] Although the above introduction takes the LTE system as an example, those skilled in the art should know that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA and future new network systems, etc., which are not limited here.

[0077] Based on the above mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.

[0078] like Figure 3 As shown, Figure 3 The figure is a flow chart of an embodiment of a data transmission method based on low-power Bluetooth of the present invention.

[0079] In this embodiment, the data transmission method based on low-power Bluetooth includes the following steps:

[0080] Step S100, monitoring data transmission requests.

[0081] Step S200, obtaining the total length of the data.

[0082] Step S300, determining whether the total length of the data is greater than a preset length. If yes, executing step S400, if no, executing step S600.

[0083] Step S400 , dividing the data into a plurality of data units, so that the length of each of the data units is less than or equal to the preset length.

[0084] Step S500, the data units are transmitted sequentially.

[0085] Step S600: directly transmit the data.

[0086] The technical solution of this embodiment is mainly used for data transmission between wearable devices (such as smart watches, bracelets, etc.) and mobile terminals (such as smart phones, tablet lights), especially for data transmission between wearable devices and mobile terminals with different operating systems or that cannot be directly connected to wifi (for example, data transmission between wearable devices of Android system and mobile terminals of IOS system, or data transmission between wearable devices of IOS system and mobile terminals of Android system).

[0087] Specifically, in this embodiment, when a data transmission request is monitored, the total length of the data to be transmitted (that is, the amount of data) is obtained, and it is determined whether the total length of the data is greater than a preset length (the preset length can use the system default length, or can be set according to the needs of the user; the preset length is preferably the maximum length of the data transmitted in a single time, and its specific setting method will be described in detail later). When the total length of the data is greater than the preset length, the data is divided into several data units from front to back, and it is ensured that the length of each data unit is less than or equal to the preset length. After the division is completed, each of the data units is transmitted in order until all the data units are fully transmitted. When the total length of the data is not greater than (that is, less than or equal to) the preset length, the data is directly transmitted.

[0088] The technical approach of this embodiment realizes the transmission of data with a larger data length by dividing the data with a total length greater than the preset length into several data units with a length less than or equal to the preset length, and then transmitting the data units in sequence. This can effectively avoid the Bluetooth channel being occupied for a long time and causing congestion, and further effectively avoid the occurrence of freezes, slow responses, and no responses, thereby greatly improving the user experience and satisfaction.

[0089] Further, such as Figure 4 As shown, Figure 4 The figure is a flow chart of the steps for presetting the length in the present invention.

[0090] In this embodiment, the step of presetting the preset length includes:

[0091] Step S10, obtaining the transmission speed V of the low-power Bluetooth and the user's tolerance waiting time S;

[0092] Step S20, calculating the preset length K according to the formula K=V*S.

[0093] Specifically, since the actual transmission speed of low-power Bluetooth is between 1 and 6 KB / s, that is, the length of data transmitted by low-power Bluetooth every 1 second is 1 to 6 KB. Assuming that the actual transmission speed of low-power Bluetooth is V=6 KB / s, and the user's tolerance waiting time is S=1 second, then the preset length K=6 KB / s*1s=6 KB.

[0094] However, considering that the actual transmission speed of low-power Bluetooth is between 1 and 6KB / s and cannot be maintained at 6KB / s all the time, based on comprehensive considerations, the preset length K can be set to any value between 1 and 6. In order to reduce the user waiting time as much as possible, it is preferred to set the preset length K = 1KB / s.

[0095] Further, based on the setting of the above preset length, in this embodiment, the manner of dividing the data having a total length greater than the preset length into a plurality of data units so that the length of each of the data units is less than or equal to the preset length may include the following manners:

[0096] Method 1:

[0097] The data is divided into several data units of different lengths, and the maximum length of the data unit is less than or equal to the preset length. For example, the total length of the data m = 3KB, and the preset length K = 1KB / s, then the data can be divided into at least 4 data units, and the length of each data unit can be 1KB, 0.7KB, 0.8KB, 0.5KB. Of course, in this way, the lengths of some of the data units can also be equal, for example, the length of each data unit can be 1KB, 0.7KB, 0.7KB, 0.6KB.

[0098] Method 2:

[0099] The data is divided into several data units of equal length, and the length of the data unit is equal to the preset length. For example, the total length of the data m = 3KB, the preset length K = 1KB / s, then the data can be divided into 3 data units, and the length of each data unit is 1KB.

[0100] Method 3:

[0101] The data is divided into several data units of equal length, and the length of the data unit is less than the preset length. For example, the total length of the data m = 4KB, the preset length K = 1KB / s, then the data can be divided into 5 data units, and the length of each data unit is 0.8KB.

[0102] Further, such as Figure 5 As shown, Figure 5 for Figure 3 A flow chart of a first embodiment of the steps of sequentially transmitting the data units is shown.

[0103] In this embodiment, the step of sequentially transmitting the data units includes:

[0104] Step S611: transmitting the data unit.

[0105] Step S612, obtaining the control instruction waiting queue.

[0106] Step S613, determining whether the control instruction waiting queue is empty; if so, returning to step S611 to implement the transmission of the next data unit; if not, executing step S614.

[0107] Step S614, executing the control instructions in sequence.

[0108] Specifically, in order to avoid the situation where the user experience is reduced due to the waiting of the control instructions input by the user, in this embodiment, after each data unit is transmitted, the control instruction waiting queue is obtained. When the control instruction waiting queue is empty, it indicates that there is no control instruction waiting to be executed, so the transmission of the next data unit continues. When the control instruction waiting queue is not empty, it indicates that there is a control instruction waiting to be executed. At this time, the transmission of the data unit will be suspended, and the control instructions in the control instruction waiting queue will be executed instead. After the control instructions in the current control instruction waiting queue are executed, the step of transmitting the data unit is returned to realize the transmission of the next data unit. This cycle is repeated until all the data units are transmitted.

[0109] The technical solution of this embodiment, by interspersing the execution of control instructions between the transmission of data units, can execute control instructions while realizing data transmission, without causing congestion due to long-term occupation of the Bluetooth channel by data transmission, thereby effectively avoiding the occurrence of freezes, slow responses, and no responses, thereby greatly improving the user experience and satisfaction.

[0110] Further, such as Figure 6 As shown, Figure 6 for Figure 3 A flow chart of a second embodiment of the steps of sequentially transmitting the data units is shown.

[0111] In this embodiment, the step of sequentially transmitting the data units includes:

[0112] Step S621: Transmit the data unit.

[0113] Step S622, waiting for a preset time.

[0114] Specifically, in order to avoid the situation where the user experience is reduced due to waiting for the control instructions input by the user, in this embodiment, after each transmission of the data unit, a preset time is waited, and then the next data unit is transmitted, and this cycle is repeated until all the data units are transmitted. Among them, the preset time can be a system default, or can be set according to the actual needs of the user, and it is mainly used to execute control instructions. For example, after the transmission of the first data unit is completed, the transmission of the next data unit is suspended, and the control instructions in the control instruction waiting queue are executed instead. When the preset time is reached, the next data unit is transmitted. When there is no control instruction to be executed during the waiting preset time period, it is in an idle state.

[0115] The technical solution of this embodiment reserves time between data unit transmissions to facilitate the execution of control instructions. This allows control instructions to be executed while data transmission is being realized, and does not cause congestion due to long-term occupation of the Bluetooth channel by data transmission. This effectively avoids freezes, slow responses, and no responses, greatly improving user experience and satisfaction.

[0116] The present invention also proposes a terminal, comprising a memory, a processor, and an implementation program of a data transmission method based on low-power Bluetooth stored in the memory and executable on the processor, wherein the implementation program of the data transmission method based on low-power Bluetooth is executed by the processor to implement all the steps in the above-mentioned embodiment of the data transmission method based on low-power Bluetooth. Since the terminal can execute all the steps in any of the above-mentioned embodiments, the mobile terminal at least has all the beneficial effects brought by the technical solutions of the above-mentioned method embodiments, which will not be described one by one here.

[0117] The present invention also proposes a computer-readable medium, on which is stored an implementation program of a data transmission method based on low-power Bluetooth, and when the implementation program of the data transmission method based on low-power Bluetooth is executed, all the steps in any of the above embodiments can be implemented. Since the computer-readable medium can execute all the steps in any of the above embodiments, the computer-readable medium at least has all the beneficial effects brought by the technical solutions of the above method embodiments, which will not be described one by one here.

[0118] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0119] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for a terminal (which can be a mobile terminal, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0121] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A data transmission method based on low-power Bluetooth, It is characterized in that The steps include: When a data transmission request is detected, obtaining the total length of the data; Determine whether the total length of the data is greater than a preset length; If yes, dividing the data into a plurality of data units so that the length of each of the data units is less than or equal to the preset length, and transmitting the data units in sequence; If not, directly transmit the data; The step of presetting the preset length comprises: Get the transmission speed V of low-power Bluetooth and the user's tolerance waiting time S; According to the formula K=V*S, the preset length K is calculated; The step of dividing the data into a plurality of data units so that the length of each of the data units is less than or equal to the preset length comprises: Dividing the data into a plurality of data units of different lengths, wherein the maximum length of the data unit is less than or equal to the preset length; Alternatively, the data is divided into a plurality of data units of equal length, and the length of the data unit is equal to the preset length; Alternatively, the data is divided into a plurality of data units of equal length, and the length of the data unit is less than the preset length; The step of sequentially transmitting the data units comprises: After each of the data units is transmitted, a control instruction waiting queue is obtained; Determine whether the control instruction waiting queue is empty; If yes, transmitting the next said data unit; If not, executing the control instructions in sequence; Determine whether the control instruction waiting queue is empty; If yes, transmitting the next said data unit; until all the data units are transmitted; or, transmitting a first of said data units; Wait for the preset time; transmitting the next of said data units; until all the data units are transmitted; in, When the transmission of the first data unit is completed, the transmission of the next data unit is suspended, and the control instructions in the control instruction waiting queue are executed instead. When the preset time is reached, the next data unit is transmitted again. When there is no control instruction to be executed during the waiting time period, the system is in an idle state.

2. A terminal, It is characterized in that The invention comprises a memory, a processor and an implementation program of a data transmission method based on low-power Bluetooth stored in the memory and executable on the processor. When the implementation program of the data transmission method based on low-power Bluetooth is executed by the processor, the steps of the data transmission method based on low-power Bluetooth as claimed in claim 1 are implemented.

3. A computer-readable medium, It is characterized in that The computer-readable medium stores an implementation program of the data transmission method based on low-power Bluetooth. When the implementation program of the data transmission method based on low-power Bluetooth is executed, the steps of the data transmission method based on low-power Bluetooth as claimed in claim 1 are implemented.