Data transmission method and device, storage medium, Bluetooth device and system

CN117412272BActive Publication Date: 2026-09-11ACTIONS ZHUHAI TECH CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210794816.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-05
Publication Date
2026-09-11
Estimated Expiration
2042-07-05

AI Technical Summary

Technical Problem

[0003]在具有经典蓝牙功能和低功耗蓝牙功能的蓝牙设备同时利用经典蓝牙通信链路和低功耗通信链路传输数据时,出于硬件成本考虑,一般共用一个射频硬件装置,当在利用经典蓝牙通信链路传输数据包时可能会存在需要利用低功耗通信链路传输数据包的情况,从而会导致射频时隙存在冲突,数据传输性能下降

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117412272B_ABST
    Figure CN117412272B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data transmission method, device, storage medium, Bluetooth device and system, so as to effectively avoid the time slot conflict of classic Bluetooth and low-power Bluetooth of the Bluetooth device, improve the data transmission speed, and further improve the data transmission efficiency. The method is applied to a first Bluetooth device with classic Bluetooth function and low-power Bluetooth function, and includes: determining a target time slot in which a completion time of transmitting a first data packet to a second Bluetooth device is located and a remaining time period of the target time slot, when the first Bluetooth device is connected to the second Bluetooth device through classic Bluetooth and connected to a third Bluetooth device through low-power Bluetooth; determining whether a second data packet can be sent to the third Bluetooth device in the target time slot according to the remaining time period of the target time slot; and if it is determined that the second data packet can be sent to the third Bluetooth device, sending the second data packet to the third Bluetooth device through low-power Bluetooth in the remaining time period of the target time slot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of Bluetooth communication technology, and more specifically, to a data transmission method, apparatus, storage medium, Bluetooth device, and system. Background Technology

[0002] Bluetooth 4.0 and later protocols include both Classic Bluetooth and Low Energy (LE) Bluetooth protocols. LE Bluetooth was introduced in Bluetooth 4.0. In Bluetooth 4.0, the maximum data packet length using LE is 39 bytes, while in Bluetooth 4.2 and later, the maximum data packet length is 257 bytes. The maximum transmission speed using LE is 2 Mbps (megabits per second). Classic Bluetooth, on the other hand, has a maximum data packet length of 1023 bytes and can transmit at speeds of 1 Mbps, 2 Mbps, and 3 Mbps.

[0003] When Bluetooth devices with both Bluetooth Classic and Bluetooth Low Energy (BLE) capabilities transmit data using both communication links, they typically share a single radio frequency (RF) hardware device for cost reasons. This can lead to conflicts in RF time slots and degraded data transmission performance when data packets are being transmitted via the BLE link while the BLE link is in use. In audio playback scenarios, insufficient audio data can cause playback stuttering at longer distances. Summary of the Invention

[0004] The purpose of this disclosure is to provide a data transmission method, apparatus, storage medium, Bluetooth device, and system to solve the problems existing in the related technologies.

[0005] To achieve the above objectives, the first aspect of this disclosure provides a data transmission method applied to a first Bluetooth device, the first Bluetooth device having classic Bluetooth functionality and low-power Bluetooth functionality, the method comprising:

[0006] When connected to a second Bluetooth device via Bluetooth Classic and to a third Bluetooth device via Bluetooth Low Energy, the target time slot where the first data packet is completed and the remaining time period of the target time slot are determined.

[0007] Based on the remaining time period of the target time slot, determine whether a second data packet can be sent to the third Bluetooth device within the target time slot;

[0008] If it is determined that the second data packet can be sent to the third Bluetooth device, then the second data packet is sent to the third Bluetooth device via Bluetooth Low Energy during the remaining time period of the target time slot.

[0009] Optionally, the method further includes:

[0010] When initially connecting to a second Bluetooth device via the classic Bluetooth and to a third Bluetooth device via the low-power Bluetooth, the event offset of the low-power Bluetooth is adjusted so that the start time of each time slot in the event cycle of the low-power Bluetooth is aligned with the start time of each time slot in the event cycle of the classic Bluetooth.

[0011] Optionally, when the second Bluetooth device is the master device of the classic Bluetooth and the first Bluetooth device is the slave device of the classic Bluetooth, the method further includes:

[0012] When connected to a second Bluetooth device via Bluetooth Classic and to a third Bluetooth device via Bluetooth Low Energy, the clock information of the second Bluetooth device is periodically synchronized.

[0013] The event offset of the low-power Bluetooth is adjusted based on the clock information of the synchronized second Bluetooth device.

[0014] Optionally, the method further includes:

[0015] Obtain the minimum number of retransmissions for the second data packet, the number of retransmissions for the second data packet, and the number of remaining time slots within the target event period, wherein the target event period is the event period in which the target time slot is located;

[0016] Based on the minimum number of retransmissions of the second data packet and the number of retransmissions of the second data packet, determine the number of times the second data packet needs to be retransmitted within the target event period;

[0017] Based on the remaining number of time slots and the number of times the second data packet needs to be retransmitted, determine whether to interrupt data transmission with the second Bluetooth device.

[0018] Optionally, determining whether to interrupt data transmission with the second Bluetooth device based on the remaining number of time slots within the target event period and the number of retransmissions of the second data packet includes:

[0019] If the difference between the remaining number of time slots and the number of retransmissions of the second data packet is less than or equal to a preset value, then the data transmission between the device and the second Bluetooth device is interrupted.

[0020] Optionally, determining whether a second data packet can be sent to the third Bluetooth device within the target time slot based on the remaining time period of the target time slot includes:

[0021] Obtain the transmission duration of the second data packet sent to the third Bluetooth device;

[0022] If the duration of the remaining time period in the target time slot is greater than or equal to the transmission duration of the second data packet, then it is determined that the second data packet can be sent to the third Bluetooth device within the target time slot.

[0023] Optionally, the method further includes:

[0024] For each time slot, the data transmission status within that time slot is monitored, and when the data transmission status meets at least one of the preset completion conditions, that time slot is determined as the target time slot where the completion time of transmitting the first data packet with the second Bluetooth device is located;

[0025] The preset completion conditions include receiving the first data packet sent by the second Bluetooth device, not receiving the first data packet sent by the second Bluetooth device, and successfully sending the first data packet to the second Bluetooth device.

[0026] Optionally, the second Bluetooth device and the third Bluetooth device are the same Bluetooth device.

[0027] A second aspect of this disclosure provides a data transmission apparatus for use in a first Bluetooth device, the first Bluetooth device having classic Bluetooth functionality and low-power Bluetooth functionality, the apparatus comprising:

[0028] The first determining module is used to determine the target time slot where the first data packet is completed when connected to the second Bluetooth device via the classic Bluetooth and to the third Bluetooth device via the low-power Bluetooth, as well as the remaining time period of the target time slot.

[0029] The second determining module is used to determine, based on the remaining time period of the target time slot, whether a second data packet can be sent to the third Bluetooth device within the target time slot;

[0030] The transmitting module is configured to, if it is determined that the second data packet can be transmitted to the third Bluetooth device, transmit the second data packet to the third Bluetooth device via Bluetooth Low Energy during the remaining time period of the current time slot.

[0031] A third aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method provided in the first aspect of this disclosure.

[0032] A fourth aspect of this disclosure provides a Bluetooth device, comprising:

[0033] A memory on which computer programs are stored;

[0034] A processor for executing the computer program in the memory to implement the steps of the method provided in the first aspect of this disclosure.

[0035] The fifth aspect of this disclosure provides a data transmission system, including: a first Bluetooth device, a second Bluetooth device, and a third Bluetooth device, wherein the first Bluetooth device has classic Bluetooth functionality and low-power Bluetooth functionality, and the first Bluetooth device is connected to the second Bluetooth device via the classic Bluetooth, and the first Bluetooth device is connected to the third Bluetooth device via the low-power Bluetooth.

[0036] The first Bluetooth device is used to perform the steps of the method provided in the first aspect of this disclosure;

[0037] The second Bluetooth device is used to transmit a first data packet with the first Bluetooth device via the classic Bluetooth protocol;

[0038] The third Bluetooth device is a slave device of the Bluetooth Low Energy (BLE) and is used to receive the second data packet sent by the first Bluetooth device via the BLE in each event cycle until the second data packet is correctly received or the event cycle ends.

[0039] Through the above technical solution, when the first Bluetooth device is connected to the second Bluetooth device via Classic Bluetooth and to the third Bluetooth device via Bluetooth Low Energy, the remaining time period of the target time slot where the completion time of transmitting the first data packet with the second Bluetooth device is located is determined. When it is determined, based on this remaining time period, that it is possible to send the second data packet to the third Bluetooth device, the second data packet is sent to the third Bluetooth device via Bluetooth Low Energy within that remaining time period. Thus, by sending data packets only via Bluetooth Low Energy within the remaining time period of the target time slot where the completion time of transmitting the first data packet with the second Bluetooth device is located, on the one hand, it avoids impacting the Classic Bluetooth communication link, ensuring normal communication of the Classic Bluetooth communication link; on the other hand, it effectively avoids data transmission time slot conflicts between the Classic Bluetooth and Bluetooth Low Energy of the Bluetooth devices, improving data transmission speed and thus enhancing data transmission efficiency.

[0040] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0041] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:

[0042] Figure 1 This is a schematic diagram illustrating the transmission of data packets using a Bluetooth Low Energy communication link according to an exemplary embodiment.

[0043] Figure 2 This is a schematic diagram illustrating the transmission of data packets using a classic Bluetooth communication link according to an exemplary embodiment.

[0044] Figure 3 This is a block diagram illustrating a data transmission system according to an exemplary embodiment.

[0045] Figure 4 This is a flowchart illustrating a data transmission method according to an exemplary embodiment.

[0046] Figure 5 This is a schematic diagram illustrating a data transmission method according to an exemplary embodiment.

[0047] Figure 6 This is a schematic diagram illustrating another data transmission method according to an exemplary embodiment.

[0048] Figure 7 This is a block diagram illustrating a data transmission apparatus according to an exemplary embodiment.

[0049] Figure 8 This is a block diagram illustrating a Bluetooth device according to an exemplary embodiment. Detailed Implementation

[0050] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.

[0051] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.

[0052] Figure 1 This is a schematic diagram illustrating the transmission of data packets using a Bluetooth Low Energy communication link according to an exemplary embodiment. Figure 1 As shown, when transmitting data packets using the Bluetooth Low Energy communication link, periodic transmission is performed using iso intervals (synchronous equal intervals). Figure 1The diagram illustrates two event cycles, each of which can be used to repeatedly transmit a data packet. For example, in... Figure 1 Assuming the maximum retransmission count for this data packet is 4, for the master device, the data packets retransmitted in the first event period are identified as SE0 TX1, SE1 TX1, SE2 TX1, and SE3 TX1, respectively, and the data packets retransmitted in the second event period are identified as SE0 TX2, SE1 TX2, SE2 TX2, and SE3 TX2, respectively. Data packets transmitted within the same event period are identical, while data packets transmitted in different event periods are different. For example, SE1 TX1 represents the second transmitted data packet TX1, and SE2 TX2 represents the third transmitted data packet TX2.

[0053] First, it should be understood that, considering the relatively high speed of electromagnetic wave transmission, the transmission process of data packets in the air can be ignored. Therefore, if... Figure 1 As shown, the slave device can receive data packets at the same time as the master device sends them. Specifically, the data packets received by the slave device in the first event cycle can be identified as SE0 RX1, SE1 RX1, SE2 RX1, and SE3 RX1, and the data packets received in the second event cycle can be identified as SE0 RX2, SE1 RX2, SE2 RX2, and SE3 RX2.

[0054] It should then be understood that the slave device can send a response message to the master device each time it receives a data packet or if it does not receive a data packet within a preset time period. For example, if the slave device receives a correct data packet, it can send a response message to the master device, and the master device can stop retransmitting the data packet when it receives the response message indicating that the slave device has received the correct data packet.

[0055] Figure 2 This is a schematic diagram illustrating the transmission of data packets using a classic Bluetooth communication link according to an exemplary embodiment. Figure 2 The rectangles in the diagram represent data packets transmitted using the classic Bluetooth communication link. For example... Figure 2 As shown, neither the master nor slave device has a fixed transmission period when transmitting data packets using the classic Bluetooth communication link. Furthermore, the data packet transmission begins at the start of each time slot; that is, transmitting data packets using the classic Bluetooth communication link differs from transmitting data packets using the Bluetooth Low Energy link. In addition, the transmission time also varies depending on the length of the data packet. For example, in... Figure 2In this process, the first data packet transmitted by the master device takes less than one time slot, while the third data packet takes more than four time slots. It should be understood that when transmitting data packets using the classic Bluetooth communication link, the transmission time typically ranges from 1 to 5 time slots, depending on the data packet type. Here, k represents the starting time slot of the data packet transmission. Figure 2 The image shows 14 time slots.

[0056] The inventors discovered during their research that, because data packets are transmitted via the classic Bluetooth communication link without a fixed period—meaning the transmission time is unpredictable—when a Bluetooth device is simultaneously connected to both classic Bluetooth and Bluetooth Low Energy (BLE), the timing of data packet transmission via classic Bluetooth cannot be predicted in advance. This easily leads to conflicts in data transmission time slots between the two communication modes, resulting in reduced transmission speed and consequently, lower data transmission efficiency. Furthermore, when transmitting audio data via the BLE communication link, insufficient transmission of valid data may cause Bluetooth audio stuttering, affecting the smoothness of audio playback.

[0057] In view of this, the present disclosure provides a data transmission method, apparatus, storage medium, Bluetooth device and system to effectively avoid data transmission time slot conflicts between Bluetooth Classic and Bluetooth Low Energy devices, improve data transmission speed and thus improve data transmission efficiency.

[0058] Before describing the data transmission method provided in this disclosure in detail, the data transmission system provided in this disclosure will first be described.

[0059] Figure 3 This is a block diagram illustrating a data transmission system according to an exemplary embodiment. Figure 3 As shown, in one implementation scenario, the data transmission system 300 may include a first Bluetooth device 301, a second Bluetooth device 302, and a third Bluetooth device 303. The first Bluetooth device 301 possesses both Classic Bluetooth and Bluetooth Low Energy (BLE) functionality. It should be understood that the first Bluetooth device 301 possessing both Classic Bluetooth and BLE functionality means that it can communicate with other Bluetooth devices via a Classic Bluetooth communication link, and it can also communicate with another Bluetooth device via a BLE communication link. The BLE functionality can be Bluetooth Low Energy Audio (LE Audio), meaning that the first Bluetooth device 301 transmits audio data with another Bluetooth device via BLE.

[0060] For example, such as Figure 3As shown, the first Bluetooth device 301 can connect to the second Bluetooth device 302 via Classic Bluetooth, that is, the first Bluetooth device 301 and the second Bluetooth device 302 communicate via a Classic Bluetooth communication link (e.g., transmitting a first data packet). The second Bluetooth device 302 can also connect to the third Bluetooth device 303 via Bluetooth Low Energy, that is, the first Bluetooth device 301 and the third Bluetooth device 303 communicate via a Bluetooth Low Energy communication link (e.g., transmitting a second data packet). The third Bluetooth device 303 is a Bluetooth Low Energy slave device, used to receive the second data packet sent by the first Bluetooth device 301 via Bluetooth Low Energy in each event cycle, until the second data packet is correctly received or the event cycle ends.

[0061] It should be understood that, in this disclosure, the first data packet refers to a data packet transmitted via a classic Bluetooth communication link, which may include data packets sent by the first Bluetooth device 301 to the second Bluetooth device 302 and data packets sent by the second Bluetooth device 302 to the first Bluetooth device 301, etc. The second data packet refers to a data packet transmitted via a Bluetooth Low Energy communication link, that is, a data packet sent by the first Bluetooth device 301 to the third Bluetooth device 303 via a Bluetooth Low Energy communication link.

[0062] In another implementation scenario, the second and third Bluetooth devices are the same Bluetooth device (hereinafter referred to as the target Bluetooth device). In this scenario, both the first and target Bluetooth devices have both Classic Bluetooth and Bluetooth Low Energy (BLE) capabilities, meaning they can transmit data packets via both the Classic Bluetooth communication link and the BLE communication link. For ease of distinction, the data packet transmitted via the Classic Bluetooth communication link is referred to as the first data packet, and the data packet transmitted via the BLE communication link is referred to as the second data packet.

[0063] The data transmission method provided in this disclosure will now be described in detail.

[0064] Figure 4 This is a flowchart illustrating a data transmission method according to an exemplary embodiment. The method is applied to a first Bluetooth device in the above-described implementation scenario, and the first Bluetooth device has both Classic Bluetooth functionality and Bluetooth Low Energy functionality. Figure 4 As shown, the data transmission method may include the following steps.

[0065] In step S401, when connected to the second Bluetooth device via Classic Bluetooth and to the third Bluetooth device via Bluetooth Low Energy, the target time slot where the first data packet is transmitted to the second Bluetooth device is located and the remaining time period of the target time slot are determined.

[0066] For example, the specific implementation of determining the target time slot where the completion time of transmitting the first data packet with the second Bluetooth device is located is as follows: For each time slot, the data transmission status within that time slot is monitored, wherein the data transmission status may include the status of receiving data packets and the status of sending data packets. When the data transmission status meets at least one of the preset completion conditions, that time slot is determined as the target time slot where the completion time of transmitting the first data packet with the second Bluetooth device is located. The preset completion conditions include receiving the first data packet sent by the second Bluetooth device, not receiving the first data packet sent by the second Bluetooth device, and successfully sending the first data packet to the second Bluetooth device. Specifically, if the first Bluetooth device does not receive the header of the first data packet within a preset time period, it is considered that it has not received the first data packet sent by the second Bluetooth device.

[0067] In other words, for each time slot, when the first Bluetooth device receives the first data packet sent by the second Bluetooth device, or does not receive the first data packet sent by the second Bluetooth device, or the first Bluetooth device successfully sends the first data packet, the time slot is determined as the target time slot where the transmission of the first data packet with the second Bluetooth device is completed.

[0068] In this disclosure, the first Bluetooth device and the second Bluetooth device transmit data via a classic Bluetooth communication link. Both the first and second Bluetooth devices begin transmitting data packets at the start of each time slot. Typically, the actual transmission time of data packets without valid data (e.g., poll packets, null packets, etc.) is less than 100µs. Since a Bluetooth time slot (hereinafter referred to as a time slot) is typically 625µs long, after the transmission of poll or null packets within a time slot, there will be some idle time periods (hereinafter referred to as remaining time periods). Furthermore, if the transmitted data packet contains valid data, the size of this data packet can be determined by the Bluetooth device (in classic Bluetooth communication, a Bluetooth device that only has classic Bluetooth functionality, such as...). Figure 3 The second Bluetooth device negotiates the maximum transmission unit (MTU) size to control the data packet transmission duration. Thus, given the transmission duration of the first data packet and the duration of each time slot, the remaining time slot of the target time slot containing the completion time of the first data packet transmission by the second Bluetooth device can be determined.

[0069] In step S402, based on the remaining time period of the target time slot, it is determined whether the second data packet can be sent to the third Bluetooth device within the target time slot.

[0070] In this disclosure, based on the remaining time period of the target time slot, it is determined whether the second data packet can be transmitted to the third Bluetooth device within the remaining time period of the target time slot; that is, it is determined whether the duration of the remaining time period of the target time slot is greater than or equal to the transmission duration of the second data packet. Therefore, a specific implementation of step S402 can be: obtaining the transmission duration of the second data packet to be sent to the third Bluetooth device; if the duration of the remaining time period of the target time slot is greater than or equal to the transmission duration of the second data packet, then it is determined that the second data packet can be sent to the third Bluetooth device within the target time slot.

[0071] It should be understood that when the third Bluetooth device establishes a Bluetooth Low Energy communication link connection with the first Bluetooth device, the size of the second data packet transmitted via Bluetooth Low Energy has been negotiated and determined, and correspondingly, the transmission duration of the second data packet is also determined.

[0072] In step 403, if it is determined that the second data packet can be sent to the third Bluetooth device, the second data packet is sent to the third Bluetooth device via Bluetooth Low Energy during the remaining time period of the target time slot.

[0073] As described above, data transmission using the classic Bluetooth communication link begins at the start of each time slot. Therefore, to avoid impacting the classic Bluetooth communication link, this disclosure determines whether a second data packet can be sent to the third Bluetooth device within the target time slot based on the remaining time period of the target time slot. If it is determined that the second data packet can be sent, it is sent within the remaining time period of the target time slot. In this way, the first Bluetooth device does not occupy the start time of the next time slot when transmitting the second data packet to the third Bluetooth device, thus not affecting the normal data transmission of the classic Bluetooth communication link.

[0074] For example, Figure 5 This is a schematic diagram illustrating a data transmission method according to an exemplary embodiment. For example... Figure 5 As shown, the first Bluetooth device acts as both a slave device in the classic Bluetooth communication link and a master device in the Bluetooth Low Energy (BLE) communication link. The second Bluetooth device acts as the master device in the classic Bluetooth communication link, and the third Bluetooth device acts as a slave device in the BLE communication link. Furthermore, TX1 and RX1 represent the first data packet transmitted between the first and second Bluetooth devices via the classic Bluetooth communication link, where TX1 represents the first data packet sent and RX1 represents the first data packet received. TX2 and RX2 represent the second data packet transmitted between the first and third Bluetooth devices via the BLE communication link, where TX2 represents the second data packet sent and RX2 represents the second data packet received. Figure 5 In the middle, sei represents the (i+1)th sub-event period, that is, the (i+1)th time slot, where the value of i ranges from 0 to 7.

[0075] It should be understood that the event period of Bluetooth Low Energy must be a multiple of 1.25ms. That is, the period for transmitting the second data packet using Bluetooth Low Energy must be an integer multiple of 1.25ms. One sub-event period is denoted as one time slot, which is 625us. In order to ensure that the operation of sending or receiving a data packet can be completed within one time slot, the transmission duration of the second data packet should be less than 625us.

[0076] like Figure 5 As shown, the target time slot where the first Bluetooth device completes receiving the first data packet sent by the second Bluetooth device is designated as time slot se2. The remaining time period of this target time slot se2 is then determined; that is, the distance between the completion time of receiving the first data packet in time slot se2 and the start time of time slot se3 is recorded as the remaining time period of time slot se2. Since the duration of the remaining time period of time slot se2 is greater than the transmission duration of the second data packet, the first Bluetooth device sends the second data packet TX2 to the third Bluetooth device via Bluetooth Low Energy during the remaining time period of time slot se2. Simultaneously, the third Bluetooth device receives the second data packet. If it does not receive the correct second data packet, the first Bluetooth device will retransmit the second data packet in a subsequent time slot. Similarly, in time slot se3, if the first Bluetooth device successfully sends the first data packet TX1 to the second Bluetooth device, then time slot se3 is designated as the target time slot, and the remaining time period of time slot se3 is determined. Since the remaining time period of time slot se3 is greater than the transmission duration of the second data packet, the first Bluetooth device retransmits the second data packet TX2 to the third Bluetooth device via Bluetooth Low Energy during the remaining time period of time slot se3. This continues until the third Bluetooth device receives the correct second data packet or the event cycle ends. In this context, Figure 5 In this event cycle, the target time slots of the first Bluetooth device are time slot se2, time slot se3, time slot se6 and time slot se7, and the duration of the remaining time in each target time slot is greater than or equal to the transmission duration of the second data packet. Therefore, the first Bluetooth device can send the second data packet in time slots se2, se3, se6 and se7.

[0077] In this disclosure, the first Bluetooth device determines whether to transmit the second data packet to the third Bluetooth device in the target time slot based on the remaining time period of the target time slot in which the completion time of transmitting the first data packet with the second Bluetooth device is located. Since the remaining time period of the target time slot is not fixed, the time when the first Bluetooth device sends the second data packet is also not fixed. In order to avoid the third Bluetooth device missing the second data packet, the third Bluetooth device can remain in the listening state (i.e., remain in the receiving state of receiving the second data packet) throughout this event period until the correct second data packet is received or the event period ends.

[0078] It should be understood that, Figure 5 This illustration only shows an embodiment where the first Bluetooth device is a slave device in a classic Bluetooth communication link and a master device in a Bluetooth Low Energy communication link, and the second Bluetooth device is a master device in a classic Bluetooth communication link. In practical applications, the first Bluetooth device can also be a master device in a classic Bluetooth communication link and a master device in a Bluetooth Low Energy communication link, and the second Bluetooth device can be a slave device in a classic Bluetooth communication link. This disclosure does not impose specific limitations in this regard.

[0079] For example, Figure 6 This is a schematic diagram illustrating another data transmission method according to an exemplary embodiment. Figure 6 In the above, the second and third Bluetooth devices are the same Bluetooth device (in...). Figure 6 (The target Bluetooth device is denoted as [insert name here]). Figure 6 In this context, the first Bluetooth device acts as both a slave device in the classic Bluetooth communication link and a master device in the Bluetooth Low Energy communication link, while the target Bluetooth device acts as both a master device in the classic Bluetooth communication link and a slave device in the Bluetooth Low Energy communication link. It should be understood that in... Figure 6 In the example shown, the data transmission method is the same as... Figure 5 The data transmission methods described are similar and will not be repeated here.

[0080] By adopting the above technical solution, when the first Bluetooth device is connected to the second Bluetooth device via Classic Bluetooth and to the third Bluetooth device via Bluetooth Low Energy, the remaining time period of the target time slot where the completion time of transmitting the first data packet with the second Bluetooth device is located is determined. When it is determined, based on this remaining time period, that it is possible to send the second data packet to the third Bluetooth device, the second data packet is sent to the third Bluetooth device via Bluetooth Low Energy within that remaining time period. Thus, by sending data packets only via Bluetooth Low Energy within the remaining time period of the target time slot where the completion time of transmitting the first data packet with the second Bluetooth device is located, on the one hand, it avoids impacting the Classic Bluetooth communication link, ensuring normal communication of the Classic Bluetooth communication link; on the other hand, it effectively avoids data transmission time slot conflicts between the Classic Bluetooth and Bluetooth Low Energy of the Bluetooth devices, improving data transmission speed and thus enhancing data transmission efficiency.

[0081] In practical applications, considering that the first Bluetooth device transmits the first data packet non-periodically when using the classic Bluetooth communication link, but transmits the second data packet periodically when using the low-power Bluetooth communication link, in order to further avoid the data transmission time slot conflicts between the classic Bluetooth and low-power Bluetooth devices, when the first Bluetooth device connects to the second Bluetooth device via classic Bluetooth and to the third Bluetooth device via low-power Bluetooth, the event offset of the data transmission is adjusted so that the start time of each time slot in the event cycle of low-power Bluetooth is aligned with the start time of each time slot in the event cycle of classic Bluetooth.

[0082] In practical applications, the event offset of Bluetooth Low Energy (BLE) is typically adjusted based on the local clock of the master device in the classic Bluetooth communication link. This adjustment of the BLE event offset refers to adjusting the event offset of the BLE communication link itself.

[0083] Therefore, in this disclosure, the data transmission method may further include:

[0084] When initially connecting to a second Bluetooth device via Classic Bluetooth and a third Bluetooth device via Bluetooth Low Energy, the event offset of Bluetooth Low Energy is adjusted so that the start time of each time slot in the Bluetooth Low Energy event cycle is aligned with the start time of each time slot in the Classic Bluetooth event cycle.

[0085] For example, such as Figure 5 As shown, if the first Bluetooth device is already connected to the second Bluetooth device via the classic Bluetooth communication link, when the first Bluetooth device is connected to the third Bluetooth device via the low-power Bluetooth communication link, or if the first Bluetooth device is already connected to the third Bluetooth device via the low-power Bluetooth communication link, when the first Bluetooth device is connected to the second Bluetooth device via the classic Bluetooth communication link, the event offset of the low-power Bluetooth is adjusted according to the clock of the second Bluetooth device, so that the start time of each time slot in the event cycle of the low-power Bluetooth is aligned with the start time of each time slot in the event cycle of the classic Bluetooth.

[0086] Suppose a first Bluetooth device first connects to a third Bluetooth device via Bluetooth Low Energy (BLE), and then connects to a second Bluetooth device via Bluetooth Classic. If the first Bluetooth device acts as the master in the Bluetooth Classic connection, it already satisfies the requirement of aligning its local clock with the Bluetooth Classic time slots when establishing the connection with the second device. Specifically, when establishing the BLE connection with the third device, the first Bluetooth device selects the local clock slot alignment position as the event offset. If the first Bluetooth device acts as a slave in the Bluetooth Classic connection, it needs to adjust the BLE event offset to align the start time of each time slot in the BLE event cycle with the start time of each time slot in the Bluetooth Classic event cycle.

[0087] For example, a Bluetooth Low Energy (BLE) master device can adjust the BLE connection parameters by sending the Link Layer command LL_CONNECTION_UPDATE_IND to align the start times of each time slot in the BLE event cycle with the start times of each time slot in the Classic Bluetooth event cycle. The specific implementation method for adjusting the BLE connection parameters is a relatively mature technology, and this disclosure does not specifically limit it.

[0088] In this disclosure, when the first Bluetooth device is the master device in both the classic Bluetooth communication link and the Bluetooth Low Energy communication link, and the second Bluetooth device is the slave device in the classic Bluetooth communication link, since the local clock of the first Bluetooth device is used as the clock reference, the first Bluetooth device can ensure that the start time of each time slot in the Bluetooth Low Energy event cycle is aligned with the start time of each time slot in the classic Bluetooth event cycle by setting initial parameters during the connection establishment process with the third Bluetooth device.

[0089] After adjusting the event offset of Bluetooth Low Energy (BLE) in the manner described above, the start times of each time slot in the BLE event cycle are aligned with the start times of each time slot in the Classic Bluetooth event cycle. For example, as... Figure 5 As shown, the start time of the time slot for data transmission using the Bluetooth Low Energy communication link is aligned with the start time of the time slot for data transmission using the classic Bluetooth communication link.

[0090] By adopting the above technical solution, when connecting to the second Bluetooth device via Classic Bluetooth and the third Bluetooth device via Bluetooth Low Energy, the event offset of Bluetooth Low Energy is adjusted to align the start time of each time slot in the event cycle of Bluetooth Low Energy with the start time of each time slot in the event cycle of Classic Bluetooth, thereby further avoiding data transmission time slot conflicts between Classic Bluetooth and Bluetooth Low Energy of the Bluetooth device.

[0091] In a classic Bluetooth communication link, communication is always conducted using the master device's clock. To avoid time slot conflicts caused by clock drift deviations between the master and slave devices in a classic Bluetooth communication link, in one possible embodiment, where the second Bluetooth device is a classic Bluetooth master device and the first Bluetooth device is a classic Bluetooth slave device, the method further includes:

[0092] When connected to a second Bluetooth device via Classic Bluetooth and to a third Bluetooth device via Bluetooth Low Energy, the clock information of the second Bluetooth device is periodically synchronized.

[0093] Adjust the Bluetooth Low Energy event offset based on the clock information of the synchronized second Bluetooth device.

[0094] In this disclosure, since the first data packet sent using Classic Bluetooth is always sent at the time slot alignment point, the clock offset between the local clock and the Classic Bluetooth master device's time slot can be obtained by comparing the actual time point at which the first data packet header is received with the local time. Based on this clock offset, the start time of the next Bluetooth Low Energy event is adjusted so that the time point at which the second data packet is sent using Bluetooth Low Energy can be aligned with the time slot at which the first data packet is sent using Classic Bluetooth.

[0095] Typically, the Bluetooth clock accuracy requirement is below 20 ppm in non-sleep mode and 250 ppm in sleep mode. Because Bluetooth Low Energy (BLE) event cycles are relatively short, the clock deviation between events is minimal. As long as the BLE slave devices start receiving a certain amount of time before the event start time and fine-tune the next reception time based on the start time of the received second data packet, they can maintain clock synchronization with the BLE master device.

[0096] In this embodiment, since the second Bluetooth device is the master device for Classic Bluetooth, the first Bluetooth device needs to periodically synchronize the clock information of the second Bluetooth device to fine-tune the event offset of Bluetooth Low Energy. This ensures that there are no time slot conflicts when the first Bluetooth device operates both Classic Bluetooth and Bluetooth Low Energy simultaneously for extended periods.

[0097] It should be understood that when the first Bluetooth device is the master device of Classic Bluetooth and the second Bluetooth device is the slave device of Classic Bluetooth, since both Classic Bluetooth and Bluetooth Low Energy use the local clock of the first Bluetooth device for communication, there is no need to dynamically adjust the event offset of Bluetooth Low Energy to ensure clock consistency.

[0098] It should be understood that if the second Bluetooth device and the third Bluetooth device are the same Bluetooth device, the start time of each time slot in the event cycle of Bluetooth Low Energy is always aligned with the start time of each time slot in the event cycle of Bluetooth Classic. That is, when the second Bluetooth device and the third Bluetooth device are the same Bluetooth device, there is no need to adjust the event offset of data transmission, and there is no need to consider the time slot conflict caused by the clock drift deviation between the master and slave devices in the Bluetooth Classic communication link.

[0099] In practical applications, to improve the anti-interference capability of Bluetooth Low Energy communication and enhance the smoothness of audio playback, it is necessary to meet the requirement of minimizing the number of retransmissions of the second data packet within the event cycle. Therefore, in this disclosure, the data transmission method further includes:

[0100] Obtain the minimum number of retransmissions for the second data packet, the current number of retransmissions for the second data packet, and the number of remaining time slots within the target event period, where the target event period is the event period in which the target time slot is located;

[0101] Based on the minimum number of retransmissions for the second data packet and the current number of retransmissions for the second data packet, determine the number of times the second data packet needs to be retransmitted within the target event period.

[0102] Based on the remaining number of time slots and the number of retransmissions required for the second data packet, determine whether to interrupt data transmission with the second Bluetooth device.

[0103] Specifically, if the difference between the remaining number of time slots and the number of retransmissions of the second data packet is less than or equal to a preset value, then the data transmission between the device and the second Bluetooth device is interrupted.

[0104] For example, assuming the minimum retransmission count for the second data packet is 5 and the preset value is 1, if the current retransmission count is 2, then the number of retransmissions to be performed for the second data packet is 3. If the remaining time slots are 3, then in order to meet the minimum retransmission count requirement for the second data packet, the low-power communication link will be used to transmit the second data packet in the remaining time slots of the target event period. That is, the data transmission between the first Bluetooth device and the second Bluetooth device will be interrupted.

[0105] Using the above technical solution, when the difference between the number of remaining time slots in the target event period and the number of retransmissions of the second data packet is less than or equal to a preset value, the data transmission with the second Bluetooth device is interrupted, and the second data packet is transmitted using the low-power communication link first, so as to improve the anti-interference capability of low-power Bluetooth communication and improve the smoothness of audio playback.

[0106] Based on the same concept, this disclosure also provides a data transmission device. Figure 7 This is a block diagram illustrating a data transmission apparatus according to an exemplary embodiment, the data transmission apparatus being applied to a first Bluetooth device, the first Bluetooth device having both Classic Bluetooth functionality and Bluetooth Low Energy functionality. Figure 7 The data transmission device 600 shown may include:

[0107] The first determining module 601 is used to determine the target time slot where the first data packet is completed when connected to the second Bluetooth device via the classic Bluetooth and to the third Bluetooth device via the low-power Bluetooth, as well as the remaining time slot of the target time slot.

[0108] The second determining module 602 is used to determine whether a second data packet can be sent to the third Bluetooth device within the target time slot based on the remaining time period of the target time slot.

[0109] The sending module 603 is configured to send the second data packet to the third Bluetooth device via Bluetooth Low Energy during the remaining time period of the current time slot if it is determined that the second data packet can be sent to the third Bluetooth device.

[0110] Optionally, the data transmission device 600 further includes:

[0111] The first adjustment module is used to adjust the event offset of the Bluetooth Low Energy device when initially connecting to the second Bluetooth device via the classic Bluetooth and the third Bluetooth device via the Bluetooth Low Energy device, so that the start time of each time slot in the event period of the Bluetooth Low Energy device is aligned with the start time of each time slot in the event period of the classic Bluetooth device.

[0112] Optionally, when the second Bluetooth device is the master device of the classic Bluetooth and the first Bluetooth device is the slave device of the classic Bluetooth, the data transmission device 600 further includes:

[0113] The first acquisition module is used to periodically synchronize the clock information of the second Bluetooth device when it is connected to the second Bluetooth device via the classic Bluetooth and to the third Bluetooth device via the low-power Bluetooth.

[0114] The second adjustment module is used to adjust the event offset of the low-power Bluetooth according to the clock information of the synchronized second Bluetooth device.

[0115] Optionally, the data transmission device 600 further includes:

[0116] The second acquisition module is used to acquire the minimum number of retransmissions of the second data packet, the number of retransmissions of the second data packet, and the number of remaining time slots within the target event period, wherein the target event period is the event period in which the target time slot is located;

[0117] The third determining module is used to determine the number of times the second data packet needs to be retransmitted within the target event period based on the minimum number of retransmissions of the second data packet and the number of retransmissions of the second data packet.

[0118] The fourth determining module is used to determine whether to interrupt data transmission with the second Bluetooth device based on the remaining number of time slots and the number of times the second data packet needs to be retransmitted.

[0119] Optionally, the fourth determining module is configured to: if the difference between the number of remaining time slots and the number of retransmissions of the second data packet is less than or equal to a preset value, then determine to interrupt data transmission with the second Bluetooth device.

[0120] Optionally, the second determining module 602 includes:

[0121] The acquisition submodule is used to acquire the transmission duration of the second data packet sent to the third Bluetooth device;

[0122] The determination submodule is used to determine that if the duration of the remaining time period of the target time slot is greater than or equal to the transmission duration of the second data packet, the second data packet can be sent to the third Bluetooth device within the target time slot.

[0123] Optionally, the data transmission device 600 further includes:

[0124] The monitoring module is used to monitor the data transmission status within each time slot, and when the data transmission status meets at least one of the preset completion conditions, determine the time slot as the target time slot where the first data packet is transmitted with the second Bluetooth device.

[0125] The preset completion conditions include receiving the first data packet sent by the second Bluetooth device, not receiving the first data packet sent by the second Bluetooth device, and successfully sending the first data packet to the second Bluetooth device.

[0126] Optionally, the second Bluetooth device and the third Bluetooth device are the same Bluetooth device.

[0127] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0128] Based on the same concept, this disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data transmission method provided in this disclosure.

[0129] Based on the same concept, this disclosure also provides a Bluetooth device, which includes: a memory storing a computer program thereon; and a processor for executing the computer program in the memory to implement the data transmission method provided in this disclosure.

[0130] For example, Figure 8 This is a block diagram illustrating a Bluetooth device according to an exemplary embodiment. Figure 8 As shown, the Bluetooth device 700 may include a processor 701 and a memory 702. The Bluetooth device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.

[0131] The processor 701 controls the overall operation of the Bluetooth device 700 to complete all or part of the steps in the data transmission method described above. The memory 702 stores various types of data to support the operation of the Bluetooth device 700. This data may include, for example, instructions for any application or method operating on the Bluetooth device 700, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. Multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 702 or transmitted via communication component 705. The audio component also includes at least one speaker for outputting audio signals. I / O interface 704 provides an interface between processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 705 is used for wired or wireless communication between the Bluetooth device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.

[0132] In an exemplary embodiment, the Bluetooth device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the data transmission method described above.

[0133] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the data transmission method described above. For example, the computer-readable storage medium may be the memory 702 including the program instructions described above, which may be executed by the processor 701 of the Bluetooth device 700 to complete the data transmission method described above.

[0134] In another exemplary embodiment, a computer program product is also provided, which includes a computer program executable by a programmable device, the computer program having a code portion for performing the data transmission method described above when executed by the programmable device.

[0135] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.

[0136] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.

[0137] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.

Claims

1. A data transmission method, characterized in that, Applied to a first Bluetooth device, the first Bluetooth device having classic Bluetooth functionality and low-power Bluetooth functionality, the method includes: When connected to a second Bluetooth device via Bluetooth Classic and to a third Bluetooth device via Bluetooth Low Energy, the target time slot where the first data packet is completed and the remaining time period of the target time slot are determined. Based on the remaining time period of the target time slot, determine whether a second data packet can be sent to the third Bluetooth device within the target time slot; If it is determined that the second data packet can be sent to the third Bluetooth device, then the second data packet is sent to the third Bluetooth device via Bluetooth Low Energy during the remaining time period of the target time slot; The method further includes: Obtain the minimum number of retransmissions for the second data packet, the number of retransmissions for the second data packet, and the number of remaining time slots within the target event period, wherein the target event period is the event period in which the target time slot is located; Based on the minimum number of retransmissions of the second data packet and the number of retransmissions of the second data packet, determine the number of times the second data packet needs to be retransmitted within the target event period; Based on the remaining number of time slots and the number of times the second data packet needs to be retransmitted, determine whether to interrupt data transmission with the second Bluetooth device.

2. The method according to claim 1, characterized in that, The method further includes: When initially connecting to a second Bluetooth device via the classic Bluetooth and to a third Bluetooth device via the low-power Bluetooth, the event offset of the low-power Bluetooth is adjusted so that the start time of each time slot in the event cycle of the low-power Bluetooth is aligned with the start time of each time slot in the event cycle of the classic Bluetooth.

3. The method according to claim 1, characterized in that, When the second Bluetooth device is the master device of the classic Bluetooth and the first Bluetooth device is the slave device of the classic Bluetooth, the method further includes: When connected to a second Bluetooth device via Bluetooth Classic and to a third Bluetooth device via Bluetooth Low Energy, the clock information of the second Bluetooth device is periodically synchronized. The event offset of the low-power Bluetooth is adjusted based on the clock information of the synchronized second Bluetooth device.

4. The method according to claim 1, characterized in that, The step of determining whether to interrupt data transmission with the second Bluetooth device based on the remaining number of time slots within the target event period and the number of retransmissions of the second data packet includes: If the difference between the remaining number of time slots and the number of retransmissions of the second data packet is less than or equal to a preset value, then the data transmission between the device and the second Bluetooth device is interrupted.

5. The method according to any one of claims 1-4, characterized in that, The step of determining whether a second data packet can be sent to the third Bluetooth device within the target time slot based on the remaining time period of the target time slot includes: Obtain the transmission duration of the second data packet sent to the third Bluetooth device; If the duration of the remaining time period in the target time slot is greater than or equal to the transmission duration of the second data packet, then it is determined that the second data packet can be sent to the third Bluetooth device within the target time slot.

6. The method according to any one of claims 1-4, characterized in that, The method further includes: For each time slot, the data transmission status within that time slot is monitored, and when the data transmission status meets at least one of the preset completion conditions, that time slot is determined as the target time slot where the completion time of transmitting the first data packet with the second Bluetooth device is located; The preset completion conditions include receiving the first data packet sent by the second Bluetooth device, not receiving the first data packet sent by the second Bluetooth device, and successfully sending the first data packet to the second Bluetooth device.

7. The method according to claim 1, characterized in that, The second Bluetooth device and the third Bluetooth device are the same Bluetooth device.

8. A data transmission device, characterized in that, The device, applicable to a first Bluetooth device having both Classic Bluetooth and Bluetooth Low Energy capabilities, comprises: The first determining module is used to determine the target time slot where the first data packet is completed when connected to the second Bluetooth device via the classic Bluetooth and to the third Bluetooth device via the low-power Bluetooth, as well as the remaining time slot of the target time slot. The second determining module is used to determine, based on the remaining time period of the target time slot, whether a second data packet can be sent to the third Bluetooth device within the target time slot; The transmitting module is configured to, if it is determined that the second data packet can be transmitted to the third Bluetooth device, transmit the second data packet to the third Bluetooth device via the Bluetooth Low Energy method during the remaining time period of the target time slot. The data transmission device further includes: The second acquisition module is used to acquire the minimum number of retransmissions of the second data packet, the number of retransmissions of the second data packet, and the number of remaining time slots within the target event period, wherein the target event period is the event period in which the target time slot is located; The third determining module is used to determine the number of times the second data packet needs to be retransmitted within the target event period based on the minimum number of retransmissions of the second data packet and the number of retransmissions of the second data packet. The fourth determining module is used to determine whether to interrupt data transmission with the second Bluetooth device based on the remaining number of time slots and the number of times the second data packet needs to be retransmitted.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-7.

10. A Bluetooth device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-7.

11. A data transmission system, characterized in that, include: A first Bluetooth device, a second Bluetooth device, and a third Bluetooth device, wherein the first Bluetooth device has classic Bluetooth functionality and low-power Bluetooth functionality, and the first Bluetooth device is connected to the second Bluetooth device via the classic Bluetooth, and the first Bluetooth device is connected to the third Bluetooth device via the low-power Bluetooth. The first Bluetooth device is configured to perform the steps of the method as described in any one of claims 1-7; The second Bluetooth device is used to transmit a first data packet with the first Bluetooth device via the classic Bluetooth protocol; The third Bluetooth device is a slave device of the Bluetooth Low Energy (BLE) and is used to receive the second data packet sent by the first Bluetooth device via the BLE in each event cycle until the second data packet is correctly received or the event cycle ends.

Citation Information

Patent Citations

  • Bluetooth data transmission method and device

    CN111491283A

  • Flexible time slot data sending method, device and system, and flexible time slot data receiving method and device

    CN112291719A