Bluetooth event alignment method and apparatus, dual bluetooth system, and storage medium
Bluetooth event alignment is achieved through Bluetooth clock synchronization, which solves the signal interference problem between Bluetooth subsystems, ensures that Bluetooth subsystems can send or receive data simultaneously, and improves communication reliability and quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ACTIONS ZHUHAI TECH CO
- Filing Date
- 2024-12-06
- Publication Date
- 2026-06-09
AI Technical Summary
Because the radio frequency modules of the two Bluetooth subsystems on the chip are very close together, there will be strong signal interference when they are working freely, causing the Bluetooth subsystems to malfunction. Existing technologies solve this problem by using time-sharing operation, but this wastes bandwidth resources.
By synchronizing the Bluetooth clocks in the dual Bluetooth system, Bluetooth event alignment is achieved, enabling the two Bluetooth subsystems to receive or send data simultaneously, thus avoiding interference between the radio frequency modules.
Without wasting bandwidth advantages, reduce interference between radio frequency modules to ensure the normal operation of the Bluetooth subsystem and improve communication reliability and quality.
Smart Images

Figure CN122179876A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Bluetooth technology, specifically to a Bluetooth event alignment method, device, dual Bluetooth system, and storage medium. Background Technology
[0002] Bluetooth is a wireless technology that enables short-range communication between devices, allowing for wireless information exchange between a wide range of devices, including mobile phones, PDAs, wireless headsets, laptops, and related peripherals. Bluetooth technology effectively simplifies communication between mobile communication terminals and between devices and the Internet, making data transmission faster and more efficient, thus paving the way for wireless communication.
[0003] To broaden the channel bandwidth of Bluetooth communication, Bluetooth chips equipped with dual Bluetooth systems have emerged.
[0004] However, because the radio frequency modules of the two Bluetooth subsystems on the chip are very close together, there will be strong signal interference between the two radio frequency modules when the two Bluetooth subsystems are working freely, causing the Bluetooth subsystems to malfunction. Summary of the Invention
[0005] In view of the above problems, this application provides a Bluetooth event alignment method, apparatus, dual Bluetooth system and storage medium to solve the above technical problems.
[0006] In a first aspect, this application provides a Bluetooth event alignment method, which is applied to a Bluetooth subsystem to be aligned, the Bluetooth subsystem to be aligned being located in a dual Bluetooth system, the dual Bluetooth system further including a target Bluetooth subsystem, the Bluetooth event alignment method comprising:
[0007] Once the alignment trigger condition is met, obtain the status information of the target Bluetooth subsystem;
[0008] Once the status information is determined to meet the clock synchronization condition, the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned are synchronized and latched to determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock.
[0009] Based on the target operating time and the synchronization deviation value, the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned is determined so that the local Bluetooth event is aligned with the target Bluetooth event; wherein, the target operating time is the operating time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
[0010] In one possible implementation of this application, determining that the alignment triggering condition is met includes:
[0011] When the Bluetooth subsystem to be aligned is detected to be active, the alignment trigger condition is determined to be met.
[0012] In one possible implementation of this application, when the Bluetooth subsystem to be aligned is detected to be in an active state, the alignment trigger condition is determined to be met, including:
[0013] If the sleep state variable of the Bluetooth subsystem to be aligned is detected to be the preset first state value, it is determined that the Bluetooth subsystem to be aligned has entered the active state, thus satisfying the alignment trigger condition.
[0014] In one possible implementation of this application, determining that the alignment triggering condition is met includes:
[0015] When a dual Bluetooth clock synchronization request is received from the target Bluetooth subsystem, it is determined that the alignment trigger condition is met.
[0016] In one possible implementation of this application, determining that the state information satisfies the clock synchronization condition includes:
[0017] If the state information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem is active, then the clock synchronization condition is satisfied.
[0018] In one possible implementation of this application, determining that the alignment triggering condition is met includes:
[0019] When the Bluetooth subsystem to be aligned is powered on and completes initialization, the alignment trigger condition is determined to be met.
[0020] In one possible implementation of this application, determining that the state information satisfies the clock synchronization condition includes:
[0021] If the status information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem has been powered on and completed initialization, then the clock synchronization condition is satisfied.
[0022] In one possible implementation of this application, the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned are synchronized and latched to determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock, including:
[0023] Obtain the target Bluetooth clock latch value and the local Bluetooth clock latch value corresponding to the target Bluetooth subsystem and the Bluetooth subsystem to be aligned at the latch time, respectively;
[0024] The synchronization deviation value is obtained based on the difference between the target Bluetooth clock latch value and the local Bluetooth clock latch value.
[0025] In one possible implementation of this application, after determining the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock, the method further includes:
[0026] Set the local synchronization information variable of the Bluetooth subsystem to be aligned to the preset synchronization success status value to indicate that the dual Bluetooth clocks of the Bluetooth subsystem to be aligned have been successfully synchronized.
[0027] In one possible implementation of this application, the local synchronization information variable of the Bluetooth subsystem to be aligned is set to a preset synchronization success status value. The method then further includes:
[0028] Obtain the target synchronization information variable of the target Bluetooth subsystem. If the target synchronization information variable indicates that the dual Bluetooth clock synchronization of the target Bluetooth subsystem has failed, then send a dual Bluetooth clock synchronization request to the target Bluetooth subsystem.
[0029] Secondly, this application also provides a Bluetooth event alignment device, which is applied to a Bluetooth subsystem to be aligned, the Bluetooth subsystem to be aligned being located in a dual Bluetooth system, the dual Bluetooth system further including a target Bluetooth subsystem, the Bluetooth event alignment device comprising:
[0030] The detection and acquisition module is used to acquire the status information of the target Bluetooth subsystem when the alignment trigger condition is determined to be met.
[0031] The latching module is used to synchronize and latch the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned when the state information meets the clock synchronization conditions, and to determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock.
[0032] The synchronization alignment module is used to determine the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned based on the target operating time and the synchronization deviation value, so as to align the local Bluetooth event with the target Bluetooth event; wherein, the target operating time is the operating time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
[0033] Thirdly, this application also provides a dual Bluetooth system, which includes two Bluetooth subsystems. Each Bluetooth subsystem includes a memory and a processor. The memory is used to store a computer program. When the computer program is executed by the processor, it is used to implement the steps of the Bluetooth event alignment method of the first aspect.
[0034] Fourthly, this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the Bluetooth event alignment method of the first aspect.
[0035] From the above, it can be concluded that this application has the following beneficial effects:
[0036] The Bluetooth event alignment method provided in this application obtains the state information of the target Bluetooth subsystem when the alignment trigger condition is met by the Bluetooth subsystem to be aligned. When the state information of the target Bluetooth subsystem meets the clock synchronization condition, the target Bluetooth clock and the local Bluetooth clock are synchronously latched to obtain the synchronization deviation value between the Bluetooth clocks of the two Bluetooth subsystems. Then, based on the synchronization deviation value and the target operating time of the target Bluetooth event of the target Bluetooth subsystem, the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned is obtained, so that the local Bluetooth event is aligned with the target Bluetooth event. This means that the two Bluetooth subsystems can send or receive data simultaneously, avoiding signal interference between the radio frequency modules when the two Bluetooth subsystems are working freely, ensuring that the Bluetooth subsystems can work normally, and improving communication reliability and communication quality. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating a Bluetooth event alignment method provided in an embodiment of this application;
[0039] Figure 2 This is a schematic diagram of an architecture of a dual Bluetooth system provided in the embodiments of this application;
[0040] Figure 3 This is an interactive schematic diagram of the Bluetooth clock synchronization latch provided in the embodiments of this application;
[0041] Figure 4 This is a schematic diagram of a Bluetooth event alignment device provided in an embodiment of this application. Detailed Implementation
[0042] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0043] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0044] In the embodiments of this application, it should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0045] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.
[0046] In the description of the embodiments of this application, the words "example" or "for example" are used to indicate exemplification, illustration, or description. Any embodiment or design described as "example" or "for example" in the embodiments of this application is not to be construed as being more preferred or having more advantages than another embodiment or design. The use of the words "example" or "for example" is intended to present relative concepts in a clear manner.
[0047] Furthermore, in the embodiments of this application, "multiple" refers to two or more. Therefore, in the embodiments of this application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, such as one, two, or more. For example, including at least one means including one, two, or more, and is not limited to which ones are included. For example, including at least one of A, B, and C, then it could include A, B, C, A and B, A and C, B and C, or A and B and C.
[0048] Before introducing the Bluetooth event alignment method, apparatus, dual Bluetooth system and storage medium of this application, we will first introduce the relevant background information of the embodiments of this application.
[0049] The operation of Bluetooth subsystems is based on the Bluetooth clock. For on-chip dual Bluetooth systems, their Bluetooth clocks operate independently. Because the RF modules of the on-chip dual Bluetooth systems are very close together, if the two Bluetooth subsystems operate independently, the interference between the RF modules will be very strong, causing the Bluetooth subsystems to malfunction. For example, if the dual Bluetooth system includes Bluetooth subsystem A and Bluetooth subsystem B, and Bluetooth subsystem B is transmitting data while Bluetooth subsystem A is receiving data, there will be strong signal interference between the RF modules of Bluetooth subsystem A and Bluetooth subsystem B, affecting the normal operation of the other.
[0050] To address this issue, a solution in related technologies is to allow the two Bluetooth subsystems to work in a time-sharing manner. For example, when Bluetooth subsystem A is receiving data, Bluetooth subsystem B is in sleep mode. In this way, the radio frequency module of Bluetooth subsystem B will not affect the operation of Bluetooth subsystem A. However, this solution wastes the bandwidth of the two Bluetooth systems and fails to take full advantage of the bandwidth of the two Bluetooth systems, resulting in a waste of resources.
[0051] Based on this, embodiments of this application provide a Bluetooth event alignment method, apparatus, dual Bluetooth system, and storage medium. The Bluetooth event alignment method achieves Bluetooth event alignment of the two Bluetooth subsystems in the dual Bluetooth system by synchronizing their Bluetooth clocks, enabling the two Bluetooth subsystems to receive or transmit data simultaneously. Without wasting the bandwidth advantage of dual Bluetooth, it greatly reduces mutual interference between radio frequency modules and ensures that the Bluetooth subsystems can work normally.
[0052] The Bluetooth event alignment method, device, dual Bluetooth system, and storage medium provided in this application are described in detail below.
[0053] First, this application provides a Bluetooth event alignment method. The subject executing this method can be a Bluetooth event alignment device or a Bluetooth system that integrates the Bluetooth event alignment device.
[0054] Please see Figure 1 , Figure 1 This is a flowchart illustrating a Bluetooth event alignment method provided in an embodiment of this application. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0055] This Bluetooth event alignment method can be applied to Bluetooth subsystems to be aligned. These subsystems can be located within a dual Bluetooth system, and the dual Bluetooth system can also include a target Bluetooth subsystem. It is understood that the Bluetooth subsystem to be aligned can be any Bluetooth subsystem within the dual Bluetooth system, and correspondingly, the target Bluetooth subsystem can be the other Bluetooth subsystem within the dual Bluetooth system. This Bluetooth event alignment method can include the following steps.
[0056] Step S101: Determine if the alignment trigger condition is met, and obtain the status information of the target Bluetooth subsystem.
[0057] In this embodiment, by controlling the Bluetooth subsystem to be aligned and the target Bluetooth subsystem to send or receive data simultaneously, mutual interference between the radio frequency modules of the two Bluetooth subsystems can be avoided while making full use of the bandwidth advantage of the dual Bluetooth systems, thus ensuring successful Bluetooth communication.
[0058] The Bluetooth subsystem to be aligned and the target Bluetooth subsystem send data or receive data simultaneously, which means that the local Bluetooth events of the Bluetooth subsystem to be aligned are aligned with the target Bluetooth events of the target Bluetooth subsystem.
[0059] Understandably, for dual Bluetooth systems, their Bluetooth clocks operate independently. By establishing a connection between the Bluetooth clocks of the two Bluetooth subsystems and maintaining the continuous update of this connection, it is possible to achieve synchronization of the two Bluetooth clocks, thereby achieving Bluetooth event alignment.
[0060] For the Bluetooth subsystem to be aligned and the target Bluetooth subsystem in a dual Bluetooth system, the clock source of the two Bluetooth subsystems in the active state can be the same high-frequency clock source. In this case, the deviation between the Bluetooth clocks of the two Bluetooth subsystems can be considered as a fixed value, and the Bluetooth clocks of the two Bluetooth subsystems are synchronized based on this fixed value.
[0061] In other application scenarios, the two Bluetooth subsystems can use two different high-frequency clock sources when active. In this scenario, to achieve Bluetooth clock synchronization between the two subsystems, the two high-frequency clock sources can be adjusted at regular intervals during the active state to achieve synchronization. Then, the Bluetooth clock synchronization of the two subsystems can be achieved based on the synchronized high-frequency clock sources. This time interval can be selected as 23ms, 25ms, 28ms, etc., depending on the specific application scenario; no limitation is imposed here. For example, if the frequency accuracy of the high-frequency clock source is 20ppm, the Bluetooth clock is 1MHz, and the Bluetooth subsystem clock synchronization accuracy requirement is 1μs, then 1*10... -6 =((20+20) / 1000000)*(25*10 -3The maximum clock drift corresponding to 25ms is ±1μs. Therefore, a 25ms interval can be selected. In active mode, if the time elapsed since the last synchronization reaches 25ms, the two high-frequency clock sources can be synchronized again. In scenarios where Bluetooth clock accuracy requirements are not high, such as a requirement of 10μs, the corresponding interval can be selected as 250ms. That is, in active mode, the interval between two adjacent Bluetooth clock synchronizations can be 250ms.
[0062] However, considering system power consumption, if either of the two Bluetooth subsystems does not work for a long time, it can enter a sleep state. When a Bluetooth subsystem enters a sleep state, its clock source will switch from a high-frequency clock source to a low-frequency clock source. At this time, the Bluetooth clock will have a large jitter relative to the active state. Therefore, the deviation between the Bluetooth clocks of the two Bluetooth subsystems will change, and the Bluetooth clocks of the two Bluetooth subsystems will lose synchronization.
[0063] Therefore, in order to ensure that the Bluetooth clocks of the two Bluetooth subsystems are synchronized when they are active, the Bluetooth subsystem to be aligned can obtain the status information of the target Bluetooth subsystem when it is determined that the alignment trigger condition is met.
[0064] The alignment trigger condition can be that the Bluetooth subsystem to be aligned exits from the sleep state and enters the active state, or it receives a dual Bluetooth clock synchronization request from the target Bluetooth subsystem, or the Bluetooth subsystem to be aligned is powered on and completes initialization. The specific condition can be determined according to the actual application scenario and is not limited here.
[0065] Understandably, the Bluetooth subsystem can be in an active or sleep state. Therefore, the state information of the target Bluetooth subsystem can be used to characterize whether the target Bluetooth subsystem is currently in an active or sleep state.
[0066] Step S102: Determine that the status information meets the clock synchronization condition, perform synchronization latching on the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned, and determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock.
[0067] In this embodiment of the application, if it is determined that the state information of the target Bluetooth subsystem meets the clock synchronization condition, the target Bluetooth clock and the local Bluetooth clock can be synchronously latched, the synchronization deviation value between the two Bluetooth clocks can be calculated, and dual Bluetooth clock synchronization can be achieved.
[0068] Understandably, dual Bluetooth clock synchronization is only meaningful when both the Bluetooth subsystem to be aligned and the target Bluetooth subsystem are active. Therefore, the clock synchronization condition can be that the target Bluetooth subsystem is currently active.
[0069] Synchronizing and latching the target Bluetooth clock and the local Bluetooth clock can be achieved by latching the Bluetooth clocks of the target Bluetooth subsystem and the Bluetooth subsystem to be aligned at the same time. Then, based on the two latched values, the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock can be obtained. The synchronization deviation value can be used to achieve synchronization of the two Bluetooth clocks.
[0070] Step S103: Determine the local working time of the local Bluetooth event of the Bluetooth subsystem to be aligned based on the target working time and the synchronization deviation value, so that the local Bluetooth event is aligned with the target Bluetooth event; wherein, the target working time is the working time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
[0071] In this embodiment, the local Bluetooth events of the Bluetooth subsystem to be aligned must be aligned with the target Bluetooth events of the target Bluetooth subsystem. This means that the Bluetooth subsystem to be aligned and the target Bluetooth subsystem transmit data or receive data at the same time, so that the two radio frequency modules will not interfere with each other.
[0072] Therefore, the local operating time of the local Bluetooth event can be calculated based on the target operating time of the target Bluetooth event and the synchronization deviation value obtained in step S102. When the target Bluetooth event is triggered in the clock domain of the target Bluetooth subsystem, the local Bluetooth event can be synchronously triggered in the clock domain of the Bluetooth subsystem to be aligned. Thus, for external devices communicating with dual Bluetooth systems, it can be considered that the target Bluetooth event and the local Bluetooth event are triggered simultaneously, which means that the local Bluetooth event is aligned with the target Bluetooth event, avoiding mutual interference between the radio frequency modules when the Bluetooth subsystem to be aligned and the target Bluetooth subsystem are working freely.
[0073] In this embodiment, Bluetooth events can be broadcast events, scan events, connection events, etc. Since different Bluetooth events have different transmission and reception rules, in order to ensure Bluetooth event alignment, the target Bluetooth event and the local Bluetooth event should be of the same type in this embodiment. For example, if the target Bluetooth event is a broadcast event, then the corresponding local Bluetooth event should also be a broadcast event. Thus, the two Bluetooth subsystems can trigger Bluetooth events simultaneously and transmit or receive data synchronously, or they can complete Bluetooth events simultaneously and end data transmission or reception synchronously.
[0074] Understandably, after each update of the synchronization deviation value, it is necessary to re-align the Bluetooth events to be aligned with the target Bluetooth events. As an example, all local Bluetooth events of the Bluetooth subsystem to be aligned, operating based on dual Bluetooth synchronization clocks, can be added to a queue, such as event_q. Each time the Bluetooth subsystem to be aligned updates the synchronization deviation value (i.e., after dual Bluetooth clock synchronization), the local operating times of all local Bluetooth events in queue event_q are updated based on this synchronization deviation value and the target operating time of the target Bluetooth event, thereby achieving alignment between the local Bluetooth events and the target Bluetooth events.
[0075] The Bluetooth event alignment method provided in this application involves the Bluetooth subsystem to be aligned acquiring the state information of the target Bluetooth subsystem when the alignment trigger condition is met. When the state information of the target Bluetooth subsystem meets the clock synchronization condition, the target Bluetooth clock and the local Bluetooth clock are synchronously latched to obtain the synchronization deviation value between the Bluetooth clocks of the two Bluetooth subsystems. Then, based on the synchronization deviation value and the target operating time of the target Bluetooth event of the target Bluetooth subsystem, the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned is obtained, so that the local Bluetooth event is aligned with the target Bluetooth event. This ensures that the two Bluetooth subsystems can send or receive data simultaneously, avoids signal interference between the radio frequency modules when the two Bluetooth subsystems are working freely, ensures that the Bluetooth subsystems can work normally, and improves communication reliability and communication quality.
[0076] Next, continue with Figure 1 The steps shown are explained in detail, as well as the specific implementation methods that may be used in practical applications.
[0077] In some embodiments of this application, determining that the alignment trigger condition is met may further include: determining that the alignment trigger condition is met when the Bluetooth subsystem to be aligned is detected to be in an active state.
[0078] Understandably, when both the Bluetooth subsystem to be aligned and the target Bluetooth subsystem are active, the simultaneous transmission or reception of data by the two subsystems can resolve the interference between their radio frequency modules when they are operating freely.
[0079] Therefore, when the Bluetooth subsystem to be aligned is detected to enter an active state, that is, to enter an active state from a dormant state, the alignment trigger condition can be considered to be met. Then, the status information of the target Bluetooth subsystem is obtained to determine whether the target Bluetooth subsystem is in an active state.
[0080] For the Bluetooth subsystem to be aligned, the detection of its state transition can be performed by its own Central Processing Unit (CPU), or by the main CPU of the dual Bluetooth system. The specific method can be determined based on the actual application scenario and is not limited here.
[0081] As an example, if the local Bluetooth clock source is detected to have switched from a low-frequency clock source to a high-frequency clock source, it can be determined that the Bluetooth subsystem to be aligned has entered an active state, satisfying the alignment trigger condition.
[0082] Understandably, for the Bluetooth subsystem to be aligned, if it does not work for a long time, it can enter a sleep state to avoid unnecessary power consumption. At this time, the clock source of the Bluetooth subsystem to be aligned can be switched from a high-frequency clock source to a low-frequency clock source. In other words, when the Bluetooth subsystem to be aligned is in a sleep state, its clock source is a low-frequency clock source.
[0083] Therefore, if the clock source of the Bluetooth subsystem to be aligned is detected to switch from a low-frequency clock source back to a high-frequency clock source, it can be considered that the Bluetooth subsystem to be aligned has exited the sleep state and entered the active state. At this time, the Bluetooth subsystem to be aligned can attempt to synchronize the dual Bluetooth clocks with the target Bluetooth subsystem and update the synchronization deviation value.
[0084] As another example, if the sleep state variable of the Bluetooth subsystem to be aligned is detected to be a preset first state value, it can also be determined that the Bluetooth subsystem to be aligned has entered the active state and meets the alignment trigger condition.
[0085] In this embodiment, the CPU of the Bluetooth subsystem to be aligned or the main CPU of the dual Bluetooth system can maintain a sleep state variable to indicate the current state of the Bluetooth subsystem to be aligned. That is, the sleep state variable can characterize whether the Bluetooth subsystem to be aligned is currently in an active state or a sleep state.
[0086] In one embodiment, the preset first state value can be set to 0. For example, when the Bluetooth subsystem to be aligned enters a sleep state, the CPU can modify the value of the register to set the sleep state variable to 1, thereby indicating that the Bluetooth subsystem to be aligned is in a sleep state; and when the Bluetooth subsystem to be aligned exits the sleep state, the CPU can modify the value of the register to set the sleep state variable to 0, thereby indicating that the Bluetooth subsystem to be aligned is in an active state.
[0087] Understandably, in other examples, the preset first state value can also be set to 1 or other numerical values or symbols that can be recognized by a computer. The specific value can be determined according to the actual application scenario, and is not limited here.
[0088] Specifically, if the CPU detects that the Bluetooth subsystem to be aligned is not working within a certain time range, it can modify the value of the register to set the sleep state variable to 1 in order to reduce power consumption, thus controlling the Bluetooth subsystem to be aligned to enter the sleep state. When the Bluetooth subsystem to be aligned needs to work, the CPU can modify the value of the register to set the sleep state variable to 0, thus controlling the Bluetooth subsystem to be aligned to exit the sleep state and enter the active state.
[0089] In some embodiments of this application, determining that the alignment trigger condition is met may further include: when a dual Bluetooth clock synchronization request is received from the target Bluetooth subsystem, determining that the alignment trigger condition is met.
[0090] In this embodiment, the Bluetooth subsystem to be aligned can also respond to a dual Bluetooth clock synchronization request from the target Bluetooth subsystem and attempt to synchronize its dual Bluetooth clock with the target Bluetooth subsystem to obtain the target Bluetooth subsystem's status information. It is understood that if the Bluetooth subsystem to be aligned is active, it will respond to the target Bluetooth subsystem's dual Bluetooth clock synchronization request and perform Bluetooth clock synchronization latching to achieve Bluetooth clock synchronization. If the Bluetooth subsystem to be aligned is in a sleep state, upon receiving a dual Bluetooth clock synchronization request, it can respond to the request, be woken up from the sleep state, and then perform Bluetooth clock synchronization latching to achieve Bluetooth clock synchronization. However, generally, if the Bluetooth subsystem to be aligned is in a sleep state, the target Bluetooth subsystem does not need to send a dual Bluetooth clock synchronization request.
[0091] Therefore, the Bluetooth subsystem to be aligned can respond to the dual Bluetooth clock synchronization request and attempt to synchronize the dual Bluetooth clocks with the target Bluetooth subsystem, which means that the Bluetooth subsystem to be aligned is active at this time.
[0092] As an example, the CPU of the Bluetooth subsystem to be aligned or the main CPU of the dual Bluetooth system can characterize whether the dual Bluetooth clock synchronization of the Bluetooth subsystem to be aligned is successful by maintaining local synchronization information variables.
[0093] For example, if the target Bluetooth subsystem is in a sleep state and the Bluetooth subsystem to be aligned sends a dual Bluetooth clock synchronization request, this request can wake up the target Bluetooth subsystem, causing it to exit sleep mode and perform Bluetooth clock synchronization latching, thus achieving Bluetooth clock synchronization. However, under normal circumstances, if the target Bluetooth subsystem is in a sleep state, the Bluetooth subsystem to be aligned will not send a dual Bluetooth clock synchronization request.
[0094] If the target Bluetooth subsystem sends a dual Bluetooth clock synchronization request to it while the target Bluetooth subsystem is active, the target Bluetooth subsystem can respond to this request and perform subsequent synchronization operations, such as Bluetooth clock synchronization latching and updating synchronization deviation values. Once dual Bluetooth clock synchronization is complete, the CPU can modify the register value to set the local synchronization information variable to 0, thus indicating successful dual Bluetooth clock synchronization of the target Bluetooth subsystem. Similarly, the CPU of the target Bluetooth subsystem or the main CPU of the dual Bluetooth systems can maintain the target synchronization information variable to indicate whether the dual Bluetooth clock synchronization of the target Bluetooth subsystem is successful. For details on maintaining the local synchronization information variable, please refer to the documentation; further details are omitted here.
[0095] In some embodiments of this application, determining that the state information satisfies the clock synchronization condition may further include: if the state information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem is in an active state, then it is determined that the clock synchronization condition is satisfied.
[0096] It is understandable that dual Bluetooth clock synchronization is only meaningful when both the target Bluetooth subsystem and the Bluetooth subsystem to be aligned are active. Therefore, if the status information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem is active, it can be determined that the clock synchronization condition is met, and then the target Bluetooth clock and the local Bluetooth clock can be synchronized and latched.
[0097] In this embodiment, the status information is specifically a sleep state variable. The CPU of the Bluetooth subsystem to be aligned or the main CPU of the dual Bluetooth system can read the sleep state variable of the target Bluetooth subsystem. If the sleep state variable is 0, the target Bluetooth subsystem can be considered to be in an active state, thus determining that the clock synchronization condition is met; otherwise, if the sleep state variable is 1, the target Bluetooth subsystem can be considered to be in a sleep state and does not meet the clock synchronization condition.
[0098] In some embodiments of this application, determining that the alignment trigger condition is met may further include: determining that the alignment trigger condition is met when the Bluetooth subsystem to be aligned is powered on and completes initialization.
[0099] In this embodiment, the status information specifically refers to initialization information variables. When the Bluetooth subsystem starts up and completes initialization, it can also attempt the first dual Bluetooth clock synchronization. Specifically, the CPU can maintain initialization information variables in registers to characterize the initialization status of the Bluetooth subsystem.
[0100] For example, for the Bluetooth subsystem to be aligned, after power-on and initialization, the initialization information variable can be set to 1 by modifying the value of the register, which indicates that the Bluetooth subsystem to be aligned has completed initialization and meets the alignment trigger condition. It can then attempt to synchronize the dual Bluetooth clocks with the target Bluetooth subsystem to obtain the status information of the target Bluetooth subsystem.
[0101] If the target Bluetooth subsystem's status information, such as the initialization information variable, is also detected to be 1, it can be determined that the target Bluetooth subsystem has also powered on and completed initialization, satisfying the clock synchronization condition. Thus, the target Bluetooth clock and the local Bluetooth clock are synchronized and latched, the synchronization deviation value is calculated, and a certain delay is applied.
[0102] In this embodiment, the synchronization and latching of the target Bluetooth clock and the local Bluetooth clock can be achieved through the Bluetooth clock synchronization latching circuits on each of the Bluetooth subsystems to be aligned and the target Bluetooth subsystem. The delay after calculating the synchronization deviation value is to ensure that the target Bluetooth subsystem also completes the first dual Bluetooth clock synchronization. Since the CPU instruction checking of status information and the hardware latching of the Bluetooth clock are both very fast processes, a delay of a few microseconds is usually sufficient; the specific delay can be determined based on the actual application scenario.
[0103] In some embodiments of this application, the synchronization latching of the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned, and the determination of the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock, may further include: obtaining the target Bluetooth clock latch value and the local Bluetooth clock latch value corresponding to the target Bluetooth subsystem and the Bluetooth subsystem to be aligned at the latching time, respectively; and obtaining the synchronization deviation value based on the difference between the target Bluetooth clock latch value and the local Bluetooth clock latch value.
[0104] like Figure 2 As shown, Figure 2 This is a schematic diagram of an architecture of a dual Bluetooth system provided in this application embodiment. The Bluetooth subsystem to be aligned and the target Bluetooth subsystem in the dual Bluetooth system are each equipped with a corresponding Bluetooth clock synchronization latch circuit. The Bluetooth subsystem to be aligned and the target Bluetooth subsystem can interact with each other based on bus access to realize hardware status information. Furthermore, the CPU of the Bluetooth subsystem to be aligned, the CPU of the target Bluetooth subsystem, and the main CPU of the dual Bluetooth system can share memory to realize software information interaction. At the same time, the Bluetooth subsystem to be aligned and the target Bluetooth subsystem can also establish an interrupt path for real-time interaction.
[0105] like Figure 3As shown in the embodiment of this application, the synchronization latching of the target Bluetooth clock and the local Bluetooth clock can be achieved by a trigger signal provided by the software write register of the Bluetooth subsystem to be aligned. This trigger signal is divided into two paths: one path is sent to the synchronization logic of the Bluetooth subsystem to be aligned to generate latch signal a, and the other path is sent to the synchronization logic of the target Bluetooth subsystem to generate latch signal b.
[0106] For the Bluetooth subsystem to be aligned, the local Bluetooth clock latch value A at the latching time is obtained in response to latch signal a; for the target Bluetooth subsystem, the target local Bluetooth clock latch value B at the latching time is obtained in response to latch signal b; then the target local Bluetooth clock latch value B is sent to the Bluetooth subsystem to be aligned to obtain the target Bluetooth clock latch value B'. The Bluetooth subsystem to be aligned obtains the target Bluetooth clock latch value B' and the local Bluetooth clock latch value A through the register, and uses the difference (B'-A) obtained by subtracting the local Bluetooth clock latch value A from the target Bluetooth clock latch value B', which is the synchronization deviation value.
[0107] In some embodiments of this application, determining the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned based on the target operating time and the synchronization deviation value may further include: obtaining the local operating time based on the difference between the target operating time and the synchronization deviation value.
[0108] In this embodiment, the synchronization deviation value is the difference (B'-A) between the target Bluetooth clock latch value B' and the local Bluetooth clock latch value A, and the target operating time T is... B The target Bluetooth time is the operating time of the target Bluetooth subsystem. Therefore, the target operating time T is used. B Subtracting the synchronization deviation value (B'-A) yields the local operating time T of the Bluetooth subsystem to be aligned. A The local working time T A =T B -(B'-A).
[0109] By updating the Bluetooth clock of all local Bluetooth events in the Bluetooth subsystem to be aligned that rely on dual Bluetooth synchronization clocks based on the synchronization deviation value (B'-A), the alignment of local Bluetooth events with the target Bluetooth event can be achieved.
[0110] In some embodiments of this application, after determining the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock, the method may further include: setting the local synchronization information variable of the Bluetooth subsystem to be aligned to a preset synchronization success status value to indicate that the dual Bluetooth clocks of the Bluetooth subsystem to be aligned have been successfully synchronized.
[0111] In this embodiment, after the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock is updated, that is, a dual Bluetooth clock synchronization is completed. Therefore, the local synchronization information variable of the Bluetooth subsystem to be aligned can be set to a preset synchronization success status value, such as 0, through the configuration register to indicate that the dual Bluetooth clock synchronization of the Bluetooth subsystem to be aligned is successful. This allows the CPU of the target Bluetooth subsystem or the dual Bluetooth system to determine the status of the dual Bluetooth clock synchronization of the Bluetooth subsystem to be aligned based on the preset synchronization success status value.
[0112] In some embodiments of this application, the local synchronization information variable of the Bluetooth subsystem to be aligned is set to a preset synchronization success status value. The method may then further include:
[0113] Obtain the target synchronization information variable of the target Bluetooth subsystem. If the target synchronization information variable indicates that the dual Bluetooth clock synchronization of the target Bluetooth subsystem has failed, then send a dual Bluetooth clock synchronization request to the target Bluetooth subsystem.
[0114] In this embodiment of the application, after the Bluetooth subsystem to be aligned successfully synchronizes the dual Bluetooth clocks, it can also obtain the target synchronization information variable of the target Bluetooth subsystem.
[0115] If the target synchronization information variable is 1, it can be determined that the dual Bluetooth clock synchronization of the target Bluetooth subsystem has failed. Thus, the Bluetooth subsystem to be aligned can send a dual Bluetooth clock synchronization request to the target Bluetooth subsystem, so that the target Bluetooth subsystem can respond to the dual Bluetooth clock synchronization request and attempt to perform dual Bluetooth clock synchronization.
[0116] Conversely, if the target synchronization information variable is a preset synchronization success status value, such as 0, it indicates that the dual Bluetooth clocks of the target Bluetooth subsystem have been successfully synchronized, and the two Bluetooth subsystems can achieve Bluetooth event alignment based on the current synchronization deviation value.
[0117] Understandably, if the status information of the target Bluetooth subsystem does not meet the clock synchronization conditions, the synchronization information variable of the Bluetooth subsystem to be aligned can be set to a preset synchronization failure status value to indicate that the dual Bluetooth clock synchronization of the Bluetooth subsystem to be aligned has failed.
[0118] In this embodiment of the application, if the status information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem is in a sleep state, it can be determined that the clock synchronization condition is not met. Therefore, the register can be configured to set the synchronization information variable of the Bluetooth subsystem to be aligned to a preset synchronization failure status value, such as 1, so as to characterize the failure of the dual Bluetooth clock synchronization of the Bluetooth subsystem to be aligned.
[0119] Based on the above embodiments, this application also provides a Bluetooth event alignment device. This Bluetooth event alignment device is applied to a Bluetooth subsystem to be aligned, which is located in a dual Bluetooth system. The dual Bluetooth system also includes a target Bluetooth subsystem, such as... Figure 4 As shown, the Bluetooth event alignment device 400 may include:
[0120] The detection and acquisition module 401 can be used to acquire the status information of the target Bluetooth subsystem when it is determined that the alignment trigger condition is met;
[0121] The latch module 402 can be used to synchronize and latch the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned when it is determined that the state information of the target Bluetooth subsystem meets the clock synchronization conditions, and determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock.
[0122] The synchronization alignment module 403 can be used to determine the local working time of the local Bluetooth event of the Bluetooth subsystem to be aligned based on the target working time and the synchronization deviation value, so as to align the local Bluetooth event with the target Bluetooth event; wherein, the target working time is the working time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
[0123] The Bluetooth event alignment device provided in this application obtains the status information of the target Bluetooth subsystem by the detection and acquisition module 401 when it determines that the Bluetooth subsystem to be aligned meets the alignment trigger condition. When the status information of the target Bluetooth subsystem meets the clock synchronization condition, the latching module 402 synchronously latches the target Bluetooth clock and the local Bluetooth clock to obtain the synchronization deviation value between the Bluetooth clocks of the two Bluetooth subsystems. Then, the synchronization alignment module 403 obtains the local working time of the local Bluetooth event of the Bluetooth subsystem to be aligned based on the synchronization deviation value and the target working time of the target Bluetooth event of the target Bluetooth subsystem, so that the local Bluetooth event is aligned with the target Bluetooth event. This allows the two Bluetooth subsystems to send or receive data simultaneously, avoids signal interference between the radio frequency modules when the two Bluetooth subsystems are working freely, ensures that the Bluetooth subsystems can work normally, and improves communication reliability and communication quality.
[0124] In some embodiments of this application, the detection acquisition module 401 can be specifically used to: determine that the alignment triggering condition is met when the Bluetooth subsystem to be aligned is detected to enter an active state.
[0125] In some embodiments of this application, the detection and acquisition module 401 can also be used to: if the sleep state variable of the Bluetooth subsystem to be aligned is detected to be a preset first state value, then determine that the Bluetooth subsystem to be aligned has entered an active state and meets the alignment triggering condition.
[0126] In some embodiments of this application, the detection and acquisition module 401 may be specifically used to: determine that the alignment triggering condition is met when a dual Bluetooth clock synchronization request is received from the target Bluetooth subsystem.
[0127] In some embodiments of this application, the latch module 402 may be specifically used to: determine that the clock synchronization condition is met if the state information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem is in an active state.
[0128] In some embodiments of this application, the detection and acquisition module 401 can be specifically used to: determine that the alignment triggering condition is met when the Bluetooth subsystem to be aligned is powered on and completes initialization.
[0129] In some embodiments of this application, the latch module 402 can be specifically used to: if the state information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem has been powered on and completed initialization, then determine that the clock synchronization condition is met.
[0130] In some embodiments of this application, the latch module 402 may also be used to: obtain the target Bluetooth clock latch value and the local Bluetooth clock latch value corresponding to the target Bluetooth subsystem and the Bluetooth subsystem to be aligned at the latching time, respectively; and obtain the synchronization deviation value based on the difference between the target Bluetooth clock latch value and the local Bluetooth clock latch value.
[0131] In some embodiments of this application, the synchronization alignment module 403 can be specifically used to: obtain the local working time based on the difference between the target working time and the synchronization deviation value.
[0132] In some embodiments of this application, after determining the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock, the latch module 402 can also be used to: set the local synchronization information variable of the Bluetooth subsystem to be aligned to a preset synchronization success status value, so as to indicate that the dual Bluetooth clocks of the Bluetooth subsystem to be aligned are successfully synchronized.
[0133] In some embodiments of this application, the local synchronization information variable of the Bluetooth subsystem to be aligned is set to a preset synchronization success status value. Then, the detection and acquisition module 401 can be further used to: acquire the target synchronization information variable of the target Bluetooth subsystem; if the target synchronization information variable indicates that the dual Bluetooth clock synchronization of the target Bluetooth subsystem has failed, then send a dual Bluetooth clock synchronization request to the target Bluetooth subsystem.
[0134] It should be noted that the relevant contents of the detection acquisition module 401, latching module 402, and synchronization alignment module 403 in this application correspond one-to-one with those described above. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the Bluetooth event alignment device and its corresponding unit modules described above can be referred to as follows: Figure 1The description of the Bluetooth event alignment method corresponding to any embodiment will not be repeated here.
[0135] Based on the Bluetooth event alignment method in the above embodiments, this application also provides a dual Bluetooth system, which includes two Bluetooth subsystems. Each Bluetooth subsystem includes a processor and a memory. The memory can be used to store a computer program, which, when executed by the processor, can be used to implement the following functions:
[0136] Once the alignment trigger condition is met, obtain the status information of the target Bluetooth subsystem;
[0137] Once the status information is determined to meet the clock synchronization condition, the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned are synchronized and latched to determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock.
[0138] Based on the target operating time and the synchronization deviation value, the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned is determined so that the local Bluetooth event is aligned with the target Bluetooth event; wherein, the target operating time is the operating time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
[0139] Specifically, the dual Bluetooth system may include processors with two or more processing cores, memories with two or more computer-readable storage media, power supplies, and input units. The processor is the control center of the dual Bluetooth system, connecting various parts of the system via various interfaces and lines. It executes software programs and / or unit modules stored in the memory, and calls data stored in the memory to perform various functions and process data, thereby providing overall monitoring of the dual Bluetooth system. Optionally, the processor may include one or more processing cores; the processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Preferably, the processor may integrate an application processor and a modem processor, where the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understandable that the aforementioned modem processor may not be integrated into the processor.
[0140] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc.; the data storage area can store data created based on the use of the dual Bluetooth system, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0141] Specifically, in this application, the processor in the dual Bluetooth system loads the executable files corresponding to the processes of one or more applications into the memory according to the following instructions, and the processor runs the applications stored in the memory to achieve various functions, as follows:
[0142] Once the alignment trigger condition is met, obtain the status information of the target Bluetooth subsystem;
[0143] Once the status information is determined to meet the clock synchronization condition, the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned are synchronized and latched to determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock.
[0144] Based on the target operating time and the synchronization deviation value, the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned is determined so that the local Bluetooth event is aligned with the target Bluetooth event; wherein, the target operating time is the operating time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
[0145] Those skilled in the art will understand that all or part of the steps in the various methods described above can be accomplished by instructions, or by instructions controlling related hardware, and these instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0146] Therefore, this application provides a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc. Computer instructions are stored thereon, and these computer instructions are loaded by a processor to execute the steps in any of the Bluetooth event alignment methods provided in this application. For example, when the computer instructions are executed by the processor, they perform the following functions:
[0147] Once the alignment trigger condition is met, obtain the status information of the target Bluetooth subsystem;
[0148] Once the status information is determined to meet the clock synchronization condition, the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned are synchronized and latched to determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock.
[0149] Based on the target operating time and the synchronization deviation value, the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned is determined so that the local Bluetooth event is aligned with the target Bluetooth event; wherein, the target operating time is the operating time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
[0150] The computer instructions stored in the computer-readable storage medium can execute the present application as follows. Figure 1 Corresponding to the steps in the Bluetooth event alignment method in any embodiment, this application can be implemented as described above. Figure 1 For details on the beneficial effects that the Bluetooth event alignment method can achieve in any embodiment, please refer to the preceding description, which will not be repeated here.
[0151] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Although this application has disclosed preferred embodiments as above, it is not intended to limit this application. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the technical solution of this application. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.
Claims
1. A Bluetooth event alignment method, characterized in that, The method, applied to a Bluetooth subsystem to be aligned, located in a dual Bluetooth system, the dual Bluetooth system further comprising a target Bluetooth subsystem, includes: Once the alignment trigger condition is met, the status information of the target Bluetooth subsystem is obtained; Once the status information is determined to meet the clock synchronization condition, the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned are synchronously latched, and the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock is determined. Based on the target operating time and the synchronization deviation value, the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned is determined so that the local Bluetooth event is aligned with the target Bluetooth event; wherein, the target operating time is the operating time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
2. The Bluetooth event alignment method according to claim 1, characterized in that, The determination that the alignment trigger condition is met includes: When the Bluetooth subsystem to be aligned is detected to be active, it is determined that the alignment trigger condition is met.
3. The Bluetooth event alignment method according to claim 2, characterized in that, When the Bluetooth subsystem to be aligned is detected to be in an active state, determining that the alignment trigger condition is met includes: If the sleep state variable of the Bluetooth subsystem to be aligned is detected to be a preset first state value, then it is determined that the Bluetooth subsystem to be aligned has entered the active state, thus satisfying the alignment trigger condition.
4. The Bluetooth event alignment method according to claim 1, characterized in that, The determination that the alignment trigger condition is met includes: When a dual Bluetooth clock synchronization request is received from the target Bluetooth subsystem, it is determined that the alignment trigger condition is met.
5. The Bluetooth event alignment method according to claim 2 or 4, characterized in that, Determining that the state information satisfies the clock synchronization condition includes: If the status information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem is in an active state, then the clock synchronization condition is determined to be met.
6. The Bluetooth event alignment method according to claim 1, characterized in that, The determination that the alignment trigger condition is met includes: When the Bluetooth subsystem to be aligned is powered on and completes initialization, it is determined that the alignment trigger condition is met.
7. The Bluetooth event alignment method according to claim 6, characterized in that, Determining that the state information satisfies the clock synchronization condition includes: If the status information of the target Bluetooth subsystem indicates that the target Bluetooth subsystem has been powered on and completed initialization, then the clock synchronization condition is determined to be met.
8. The Bluetooth event alignment method according to claim 1, characterized in that, The step of synchronizing and latching the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned, and determining the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock, includes: Obtain the target Bluetooth clock latch value and the local Bluetooth clock latch value corresponding to the target Bluetooth subsystem and the Bluetooth subsystem to be aligned at the latch time, respectively; The synchronization deviation value is obtained based on the difference between the target Bluetooth clock latch value and the local Bluetooth clock latch value.
9. The Bluetooth event alignment method according to claim 1, characterized in that, After determining the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock, the method further includes: The local synchronization information variable of the Bluetooth subsystem to be aligned is set to a preset synchronization success status value to indicate that the dual Bluetooth clocks of the Bluetooth subsystem to be aligned have been successfully synchronized.
10. The Bluetooth event alignment method according to claim 9, characterized in that, After setting the local synchronization information variable of the Bluetooth subsystem to be aligned to a preset synchronization success status value, the method further includes: Obtain the target synchronization information variable of the target Bluetooth subsystem. If the target synchronization information variable indicates that the dual Bluetooth clock synchronization of the target Bluetooth subsystem has failed, then send a dual Bluetooth clock synchronization request to the target Bluetooth subsystem.
11. A Bluetooth event alignment device, characterized in that, Applied to a Bluetooth subsystem to be aligned, the Bluetooth subsystem to be aligned is located in a dual Bluetooth system, the dual Bluetooth system further comprising a target Bluetooth subsystem, the device comprising: The detection and acquisition module is used to acquire the status information of the target Bluetooth subsystem when it is determined that the alignment trigger condition is met; The latching module is used to latch the target Bluetooth clock of the target Bluetooth subsystem and the local Bluetooth clock of the Bluetooth subsystem to be aligned when it is determined that the state information meets the clock synchronization condition, and to determine the synchronization deviation value between the target Bluetooth clock and the local Bluetooth clock. The synchronization alignment module is used to determine the local operating time of the local Bluetooth event of the Bluetooth subsystem to be aligned based on the target operating time and the synchronization deviation value, so as to align the local Bluetooth event with the target Bluetooth event; wherein, the target operating time is the operating time of the target Bluetooth event, and the target Bluetooth event is the Bluetooth event of the target Bluetooth subsystem.
12. A dual Bluetooth system, characterized in that, The method includes two Bluetooth subsystems, each of which includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the steps of the Bluetooth event alignment method according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the steps of the Bluetooth event alignment method according to any one of claims 1-10.