Method and system for realizing synchronous playing of Bluetooth earphone equipment
The method and system for Bluetooth earphone synchronization address the issue of audio desynchronization by establishing a distributed clock synchronization network with time stamps and direct communication links, ensuring precise and reliable audio playback across multiple earphones.
Patent Information
- Application Number
- CN202510583596.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-07-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
How to achieve high-precision audio synchronization of Bluetooth headset devices during synchronous playback and reduce the risk of single point failure under master-slave topology, especially the problem of different transmission delays when multiple Bluetooth headsets are connected to terminal devices.
By establishing a multi-level distributed synchronization architecture, using a multi-source clock synchronization network and a direct communication link, the signal transmission delay and audio processing capability parameters of each Bluetooth headset are obtained, a unique time synchronization identifier is assigned, and the audio data packets are sent and played under the instruction of a predetermined playback time stamp.
High-precision audio synchronous playback under a multi-level distributed synchronization architecture is realized, which eliminates the problem of audio out-of-synchronization caused by transmission delay differences, reduces the risk of single point failure under the master-slave topology, and improves the stability and synchronization accuracy of the system.
Smart Images

Figure CN120321756A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Bluetooth technology, and particularly to a method and system for realizing synchronous playback of Bluetooth headset devices. Background Art
[0002] Bluetooth technology is a low-cost, low-power and short-range wireless communication technology, which can be widely applied to headsets. After a terminal device establishes a Bluetooth connection with a Bluetooth headset, it can play audio through the Bluetooth headset. When the terminal device simultaneously establishes Bluetooth connections with multiple Bluetooth headsets, how to achieve synchronous playback among the Bluetooth headsets is a difficult problem to solve. Summary of the Invention
[0003] Based on the above problems, the present invention proposes a method and system for realizing synchronous playback of Bluetooth headset devices. Through the solution of the present invention, high-precision audio synchronous playback under a multi-level distributed synchronous architecture can be achieved, effectively eliminating the audio out-of-sync problem caused by transmission delay differences, and reducing the single-point failure risk under the master-slave topology.
[0004] In view of this, one aspect of the present invention proposes a method for realizing synchronous playback of Bluetooth headset devices, including:
[0005] Regarding multiple Bluetooth headset devices connected to a master device as a synchronous node group, and determining at least two auxiliary nodes among the node devices of the synchronous node group;
[0006] Establishing a multi-source clock synchronization network between the master device and each Bluetooth headset device, the master device broadcasting a synchronization signal carrying a reference timestamp to each Bluetooth headset device, and simultaneously activating a direct communication link between each Bluetooth headset device to form a distributed clock correction channel;
[0007] Obtaining the signal transmission delay parameter and audio processing ability parameter of each Bluetooth headset device;
[0008] Based on the signal transmission delay parameter and audio processing ability parameter, assigning a unique time synchronization identifier to each Bluetooth headset device;
[0009] The master device sending a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device;
[0010] Each Bluetooth headset device receiving the data packet, and calculating the playback moment according to the predetermined playback timestamp and its own time synchronization identifier;
[0011] At the playback moment, each Bluetooth headset device synchronously plays the audio data.
[0012] Optionally, the signal transmission delay parameter is obtained through the following steps:
[0013] Each node device synchronously activates the multi - band clock measurement module. The master device selects two auxiliary nodes with the highest time - delay stability as reference nodes through a preset auxiliary node selection algorithm, and establishes a three - dimensional synchronization parameter space based on the clock offsets of the reference nodes.
[0014] The master device sends a time calibration request to each Bluetooth headset device.
[0015] After receiving the time calibration request, each Bluetooth headset device immediately returns a response signal.
[0016] The master device measures the round - trip time from sending the request to receiving the response, and calculates the dynamic clock compensation function in combination with the three - dimensional synchronization parameter space.
[0017] Optionally, the audio processing ability parameters include audio decoding speed, buffer size, and processor load status, and are obtained through the following steps:
[0018] The master device sends test audio data to each Bluetooth headset device.
[0019] Each Bluetooth headset device processes the test audio data and records the processing time and resource occupancy.
[0020] Each Bluetooth headset device returns the processing result to the master device.
[0021] The master device analyzes the processing result to obtain the audio processing ability parameters of each Bluetooth headset device.
[0022] Optionally, the following steps are also included:
[0023] The master device and each Bluetooth headset device respectively collect motion state data in real - time through the built - in inertial measurement unit, and combine the environmental electromagnetic interference sensor data to construct a dynamic delay compensation model, specifically including: predicting the change in signal transmission time - delay caused by headphone displacement according to the accelerometer data; generating a channel quality index based on the interference intensity in the 2.4GHz band identified by the spectrum analysis module; fusing the motion compensation factor and the channel attenuation coefficient to calculate the real - time delay compensation value.
[0024] The displacement change of the device is detected by the MEMS motion sensors built in each node device in the synchronization node group. When the three - dimensional acceleration vector of any node device exceeds the preset threshold, the topology reorganization protocol is started, and the optimal auxiliary node combination is recalculated according to the latest signal strength matrix.
[0025] Optionally, the following steps are also included:
[0026] The master device collects the interference spectrum in the 2.4GHz frequency band in real time. When Wi-Fi channel overlap is detected, it triggers the adaptive frequency hopping mechanism and synchronously updates the frequency band switching compensation parameters of each node. The compensation parameters include the predicted value of the Bluetooth data packet retransmission times and the pre-compensation value of the frequency offset.
[0027] When the delay deviation of any Bluetooth headset device is detected to exceed the preset threshold, the cooperative re-synchronization mechanism is triggered:
[0028] The master device switches to the multicast retransmission mode;
[0029] The normal headset sends a sound wave positioning signal to assist the abnormal headset to synchronize quickly;
[0030] Record the characteristics of abnormal events based on blockchain technology for subsequent synchronization strategy optimization.
[0031] Optionally, the predetermined playback timestamp is generated through the following steps:
[0032] The master device calculates the required buffer time according to the signal transmission delay parameters and audio processing ability parameters of each Bluetooth headset device;
[0033] Add the buffer time and the preset additional safety margin time to the current time to generate a predetermined playback timestamp;
[0034] Embed the predetermined playback timestamp into the audio data packet and send it to each Bluetooth headset device.
[0035] Optionally, it further includes the following steps:
[0036] The master device divides the audio data stream into N equal-length sub-frames, and each sub-frame is appended with a unique verification code containing quantum random numbers, and sends it to each Bluetooth headset device through heterogeneous transmission paths: the master device and the first headset use the BLE low-power link to transmit control instructions; the master device and the second headset use the EDR enhanced data link to transmit audio data; the first headset and the second headset exchange verification information through the direct connection channel encoded by LC3;
[0037] After each Bluetooth headset device receives the data, it performs space-time alignment operations: eliminates the cumulative error of clock drift through a Kalman filter; uses a cross-check algorithm to compare the data consistency between the direct connection channel and the main channel; dynamically adjusts the depth of the local buffer according to the compensation value generated by the dynamic delay compensation model.
[0038] Optionally, the step of the master device sending a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device further includes:
[0039] Hierarchically encode the audio data, including: base layer audio data containing necessary audio information; enhanced layer audio data containing additional information for improving sound quality;
[0040] The master device adaptively adjusts the level of the audio data sent according to the processing capabilities and network conditions of each Bluetooth headset device;
[0041] A Bluetooth headset device with a processing capability lower than the first preset capability value only receives and processes the base layer audio data;
[0042] A Bluetooth headset device with a processing capability higher than the second preset capability value receives and processes the complete audio data.
[0043] Optionally, it further includes a battery power management step:
[0044] Periodically obtain the battery power status of each Bluetooth headset device;
[0045] When it is detected that the battery power of any Bluetooth headset device is lower than the preset threshold, automatically adjust the audio processing strategy to reduce the processing load of this device;
[0046] Dynamically adjust the clock synchronization frequency according to the power status to reduce the energy consumption of the low - power device.
[0047] Another aspect of the present invention provides a system for realizing synchronous playback of Bluetooth headset devices, which is used to execute a method for realizing synchronous playback of Bluetooth headset devices, including: a master device, multiple Bluetooth headset devices and a server;
[0048] The server is configured to:
[0049] Regard multiple Bluetooth headset devices connected to the master device as a synchronous node group, and determine at least two auxiliary nodes among the node devices of the synchronous node group;
[0050] Establish a multi - source clock synchronization network between the master device and each Bluetooth headset device. The master device broadcasts a synchronization signal carrying a reference timestamp to each Bluetooth headset device, and at the same time activates the direct communication link between each Bluetooth headset device to form a distributed clock correction channel;
[0051] Obtain the signal transmission delay parameters and audio processing capability parameters of each Bluetooth headset device;
[0052] Based on the signal transmission delay parameters and audio processing capability parameters, assign a unique time synchronization identifier to each Bluetooth headset device;
[0053] The master device is configured to: send a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device;
[0054] The Bluetooth headset device is configured to:
[0055] Receive the data packet and calculate the playback time based on the predetermined playback timestamp and its own time synchronization identifier;
[0056] At the playback time, synchronously play the audio data.
[0057] Adopting the technical solution of the present invention, the method for realizing synchronous playback of Bluetooth headset devices includes: taking multiple Bluetooth headset devices connected to the master device as a synchronous node group, and determining at least two auxiliary nodes among the node devices of the synchronous node group; establishing a multi-source clock synchronization network between the master device and each Bluetooth headset device, the master device broadcasts a synchronization signal carrying a reference timestamp to each Bluetooth headset device, and at the same time activates the direct communication link between each Bluetooth headset device to form a distributed clock correction channel; obtaining the signal transmission delay parameter and audio processing capability parameter of each Bluetooth headset device; based on the signal transmission delay parameter and audio processing capability parameter, assigning a unique time synchronization identifier to each Bluetooth headset device; the master device sends a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device; each Bluetooth headset device receives the data packet and calculates the playback time according to the predetermined playback timestamp and its own time synchronization identifier; at the playback time, each Bluetooth headset device synchronously plays the audio data. Through the solution of the present invention, high-precision audio synchronous playback under a multi-level distributed synchronization architecture can be realized, effectively eliminating the audio asynchronization problem caused by transmission delay differences, and reducing the single-point failure risk under the master-slave topology. Description of the Drawings
[0058] Figure 1 is a flowchart of a method for realizing synchronous playback of Bluetooth headset devices provided by an embodiment of the present invention;
[0059] Figure 2 is a schematic block diagram of a system for realizing synchronous playback of Bluetooth headset devices provided by an embodiment of the present invention. Detailed Embodiments
[0060] In order to be able to more clearly understand the above objects, features and advantages of the present invention, the present invention will be further described in detail below in conjunction with the drawings and specific embodiments. In some possible embodiments of the present invention, without conflict, the embodiments of the present application and the features in the embodiments may be combined with each other.
[0061] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0062] The terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0063] Referring to "embodiments" herein means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of this application. The phrase appearing in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0064] The following refers to Figures 1 to 2 to describe a method and system for realizing synchronous playback of Bluetooth headset devices according to some embodiments of the present invention.
[0065] As Figure 1 shown, an embodiment of the present invention provides a method for realizing synchronous playback of Bluetooth headset devices, including:
[0066] Regarding multiple Bluetooth headset devices connected to the master device as a synchronous node group, and determining at least two auxiliary nodes among the node devices of the synchronous node group;
[0067] In this step, the auxiliary nodes dynamically undertake the synchronous relay function, forming a two-level synchronous architecture of the master device - auxiliary nodes.
[0068] Establish a multi-source clock synchronization network between the master device and each Bluetooth headset device. The master device broadcasts a synchronization signal carrying a reference timestamp to each Bluetooth headset device, and at the same time activates the direct communication link between each Bluetooth headset device to form a distributed clock correction channel;
[0069] Obtain the signal transmission delay parameters and audio processing ability parameters of each Bluetooth headset device;
[0070] Based on the signal transmission delay parameters and audio processing ability parameters, assign a unique time synchronization identifier to each Bluetooth headset device;
[0071] The master device sends a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device;
[0072] Each Bluetooth headset device receives the data packet and calculates the playback time according to the predetermined playback timestamp and its own time synchronization identifier;
[0073] At the playback time, each Bluetooth headset device synchronously plays the audio data.
[0074] By adopting the technical solution of this embodiment, high-precision audio synchronous playback under a multi-level distributed synchronization architecture can be realized, effectively eliminating the audio out-of-sync problem caused by transmission delay differences, and reducing the single-point failure risk under the master-slave topology.
[0075] In some possible embodiments of the present invention, the steps of taking multiple Bluetooth headset devices connected to the master device as a synchronization node group and determining at least two auxiliary nodes in each node device of the synchronization node group include:
[0076] The master device starts and enters the extended broadcast mode, and at the same time configures the periodic broadcast (PAwR) parameters, sets the broadcast interval to 5 - 20 ms, and embeds the unique device identifier and the synchronization group identifier in the broadcast data;
[0077] The master device sets the service class flags (Service Class Flags) in the broadcast data to indicate that it has the function of the master device of the synchronization node group, and enables the extended connectable advertising (Extended Connectable Advertising);
[0078] The Bluetooth headset devices to be synchronized detect the master device broadcast through passive scanning, and generate a device capability index (DCI, Device Capability Index) according to the comprehensive score of the received signal strength (RSSI), battery power and processor performance;
[0079] The master device collects the DCI values of all responding devices, and executes the auxiliary node selection algorithm based on the device capability index, the link quality between devices and the device space topology distribution;
[0080] The master device sends an auxiliary node invitation to at least two Bluetooth headset devices with the highest DCI values in the synchronization node group, and the invitation includes auxiliary node role assignment parameters and initial synchronization relay configuration;
[0081] After the selected Bluetooth headset device accepts the auxiliary node invitation, it establishes an enhanced directional connection (Enhanced Directional Connection) with the master device and obtains the complete synchronization group member list;
[0082] The master device broadcasts the selected auxiliary node information to other node devices in the synchronization node group, and instructs each non-auxiliary node device to establish a subordinate connection with the nearest auxiliary node;
[0083] The auxiliary node receives the Master Clock Reference and the synchronization control instruction from the master device, and establishes a local synchronization cache for providing real-time synchronization information to the slave devices;
[0084] Each auxiliary node forwards the synchronization information to its slave devices through a low-latency broadcast channel, forming a two-level synchronization architecture of master device - auxiliary node - slave node;
[0085] The master device periodically evaluates the performance of the auxiliary nodes, including clock stability, relay delay, and slave node connection quality, and triggers the dynamic switching process of the auxiliary nodes when the preset switching conditions are met.
[0086] In some possible embodiments of the present invention, the auxiliary node selection algorithm includes:
[0087] Calculating the Average Connection Quality Index (ACQI) of each candidate node device with other node devices:
[0088] ACQI = Σ(RSSI[a,b] × SNR[a,b]) / n, where a is the candidate device, b is the other device, and n is the total number of node devices in the synchronization node group; RSSI[a,b] is the Received Signal Strength Indicator between device a and device b, representing the strength of the signal, and SNR[a,b] is the Signal-to-Noise Ratio between device a and device b, representing the clarity of the signal quality;
[0089] Constructing a device spatial distribution matrix and estimating the relative position relationship based on the signal strength between node devices;
[0090] Performing the K-means clustering algorithm to divide all devices into k spatial regions, and the value of k is dynamically determined according to the total number of node devices;
[0091] Selecting the device with the highest DCI value and the highest ACQI value in each spatial region as the candidate for the auxiliary node in that region;
[0092] Resolving the ownership conflicts of the devices at the regional boundaries through a mutual negotiation mechanism to ensure that each device can be assigned to the auxiliary node with the best signal.
[0093] In some possible embodiments of the present invention, the auxiliary node dynamic switching process includes:
[0094] The master device continuously monitors the performance metrics of the auxiliary nodes, including clock offset rate, packet forwarding delay, remaining battery power, and processing load;
[0095] When the performance metric of any auxiliary node is lower than the preset threshold, start the seamless switching preparation program;
[0096] Within the area responsible by the current auxiliary node, select the device with the second highest DCI value as the standby auxiliary node;
[0097] The master device sends a pre-activation instruction to the standby auxiliary node, transmitting the current synchronization status and the list of slave devices;
[0098] The standby auxiliary node pre-loads synchronization parameters and establishes a connection to be activated with the slave devices;
[0099] At the frame boundary of the audio stream, the master device sends a synchronization switching trigger signal;
[0100] The original auxiliary node sends a redirection instruction to the slave devices, indicating the connection transfer target;
[0101] The standby auxiliary node activates the pre-established connection and immediately starts the synchronization relay function;
[0102] After the switching is completed, the original auxiliary node degrades to the role of an ordinary device or a slave node.
[0103] In some possible embodiments of the present invention, the synchronization relay function of the auxiliary node is implemented by the following method:
[0104] The auxiliary node maintains a dual-buffer synchronization queue, one for receiving data from the master device and one for distributing data to the slave devices;
[0105] The auxiliary node receives a synchronization reference frame containing a global timestamp sent by the master device;
[0106] The auxiliary node calculates a clock drift compensation factor based on the difference between the local clock and the global timestamp;
[0107] The auxiliary node applies time compensation to the received audio data and adds a region-specific relay identifier;
[0108] The auxiliary node uses a priority-based transmission queue to ensure that synchronization control commands are transmitted prior to regular audio data;
[0109] The auxiliary node maintains an independent connection state machine for each slave device to achieve device-level transmission parameter optimization;
[0110] When detecting an abnormal response from a slave device, the auxiliary node can independently execute a local recovery process without the intervention of the master device.
[0111] In some possible embodiments of the present invention, the steps of establishing a multi-source clock synchronization network between the master device and each Bluetooth headset device, where the master device broadcasts a synchronization signal carrying a reference timestamp to each Bluetooth headset device and simultaneously activates the direct communication link between each Bluetooth headset device to form a distributed clock correction channel, include:
[0112] The master device initializes the clock synchronization module, generates a 64-bit high-precision global time stamp (GTS) as the system reference clock, and embeds the current GTS value into the synchronization initialization frame;
[0113] The master device broadcasts the synchronization initialization frame to all headphone devices periodically through the Bluetooth extended synchronization broadcast (Periodic Advertising with Responses) function, and the broadcast period is set to a dynamic value between 10 ms and 30 ms;
[0114] After receiving the synchronization initialization frame, each Bluetooth headphone device records the local clock value at the receiving moment, calculates the initial clock deviation value with the GTS in the frame, and returns an acknowledgment frame to the master device. The acknowledgment frame includes the local clock value and the processing delay estimation value;
[0115] The master device collects the acknowledgment frames of all headphone devices, calculates the one-way transmission delay estimation value, and sends a clock synchronization instruction to each Bluetooth headphone device, including: device ID, initial clock deviation compensation value, and one-way delay compensation value;
[0116] Each Bluetooth headphone device adjusts the local clock based on the received compensation value and activates the clock drift detection module. The module corrects the local crystal oscillator frequency deviation in real time through the temperature sensor and the voltage monitoring unit;
[0117] The master device analyzes the physical location distribution and signal quality of each Bluetooth headphone device, generates a direct connection communication topology map between the headphones, and determines the headphone pairs that need to establish direct connection communication;
[0118] The master device sends a direct connection pairing instruction to the relevant Bluetooth headphone devices, including: the ID of the peer device, communication channel parameters, and connection priority;
[0119] The Bluetooth headphone device that receives the pairing instruction establishes a point-to-point connection through the low-power Bluetooth (BLE 5.2) directed broadcast function to form a direct connection communication link;
[0120] The directly connected Bluetooth headphone devices exchange local clock information and the latest GTS value obtained from the master device periodically to form a distributed clock correction network;
[0121] Each Bluetooth headphone device executes a weighted fusion algorithm based on the GTS provided by the master device and the clock information provided by the directly connected device to calculate the optimal local clock adjustment value.
[0122] In some possible embodiments of the present invention, the process of establishing the direct connection communication link includes:
[0123] The first Bluetooth headphone device configures the directed broadcast parameters of the LE 2M PHY mode and sets a low-latency scan window;
[0124] The second Bluetooth headset device enters the directional scanning state and locks the broadcast signal of the first Bluetooth headset device;
[0125] After the two devices complete the initial connection, they negotiate the optimal connection parameters, including: the connection interval is set to 7.5 ms - 15 ms, the upper limit of the transmission delay is set to 10 ms, and the payload length is optimized to the minimum necessary length;
[0126] The two devices execute the security pairing process, generate a session key, and configure a low-latency encryption mode;
[0127] After the connection is established, the two devices register the clock information notification feature with each other and enable the automatic data update mechanism.
[0128] In some possible embodiments of the present invention, the weighted fusion algorithm includes the following steps:
[0129] The Bluetooth headset device assigns an initial weight to each clock source: the weight of the master device GTS is 1.0, and the clock weights of each directly connected device are determined according to the signal quality and the connection stability index;
[0130] For the clock information provided by each clock source, calculate the deviation value from the local clock;
[0131] According to the stability of the historical deviation values, dynamically adjust the weight coefficients of each clock source;
[0132] Detect and exclude abnormal deviation values to prevent the local clock from being polluted by incorrect clock sources;
[0133] Apply a Kalman filter to smooth the weighted multi-source clock deviation values;
[0134] Calculate the final clock adjustment value: δT = Σ(wti × δTti), where wti is the weight of the clock source ti and δTti is the corresponding clock deviation value;
[0135] Apply the calculated clock adjustment value to the local clock to achieve precise calibration.
[0136] In some possible embodiments of the present invention, the distributed clock correction network further includes a fault detection and self-healing mechanism:
[0137] Each Bluetooth headset device continuously monitors the stability and consistency of the clock information received from the master device and the directly connected devices;
[0138] When it is detected that the information of a certain clock source significantly deviates from other sources, mark this source as a suspicious state and temporarily reduce its weight;
[0139] If a directly connected device provides abnormal clock information three times in a row, the local device reports the abnormal state to the master device;
[0140] After receiving the exception report, the master device sends a diagnostic command to the suspicious device and may trigger a re - synchronization process;
[0141] If the signal of the master device is temporarily lost, each Bluetooth headset device automatically switches to the network consensus mode and maintains the synchronization state based on the clock information of all available direct - connected devices;
[0142] When the signal of the master device is restored, each device executes a smooth transition algorithm to avoid abnormal playback caused by sudden clock changes.
[0143] In some possible embodiments of the present invention, the direct - connection communication link also bears the following functions:
[0144] Audio data verification: The checksum of audio data frames is exchanged between direct - connected devices to detect potential data corruption;
[0145] Playback state synchronization: Share the current buffer state, decoding progress, and actual playback position information;
[0146] Battery and temperature state monitoring: Exchange device health state information for performance optimization decisions;
[0147] Emergency data repair: When it is detected that the audio data packet of a certain device is lost, the direct - connected device with complete data can provide repair data;
[0148] Collaborative noise reduction optimization: Share environmental noise characteristics to implement an active noise reduction algorithm for multi - device collaboration.
[0149] In some possible embodiments of the present invention, the signal transmission delay parameter is obtained through the following steps:
[0150] Each node device synchronously activates the multi - band clock measurement module. The master device selects two auxiliary nodes with the highest time - delay stability as reference nodes through a preset auxiliary node selection algorithm, and establishes a three - dimensional synchronization parameter space based on the clock offsets of the reference nodes;
[0151] The master device sends a time calibration request to each Bluetooth headset device;
[0152] After receiving the time calibration request, each Bluetooth headset device immediately returns a response signal;
[0153] The master device measures the round - trip time from sending the request to receiving the response, and calculates the dynamic clock compensation function in combination with the three - dimensional synchronization parameter space.
[0154] In this embodiment, the master device broadcasts a clock measurement activation signal to all Bluetooth headset devices in the synchronization node group. The signal includes a measurement period, a sampling frequency, and a frequency band switching sequence. After receiving the activation signal, each Bluetooth headset device synchronously starts the built-in multi-band clock measurement module, which can collect clock signals in parallel on different channels in the 2.4 GHz frequency band. The master device and each Bluetooth headset device perform L rounds of two-way timestamp exchanges, and each round of exchange is carried out on M different frequency bands defined in advance, generating M×L groups of timestamp sample pairs. For each Bluetooth headset device, the master device calculates the round-trip delay and its standard deviation of all timestamp sample pairs to form a delay stability index. The master device sorts the delay stability indexes of all Bluetooth headset devices and selects the two devices with the smallest index values as reference nodes. The master device performs high-precision time synchronization with the selected reference nodes, and calculates the clock offset and drift rate between the master device and each reference node through the extended Precision Time Protocol (PTP). A three-dimensional coordinate system is established with the master device clock as the origin and the clock offsets of the two reference nodes as the base axes. The three dimensions of the coordinate system respectively represent the clock offset, the drift rate, and the acceleration (second-order drift). The master device measures the clock offsets between all other non-reference nodes and the master device and maps these offsets into the established three-dimensional synchronization parameter space. In the three-dimensional synchronization parameter space, the spatial position of each non-reference node relative to the reference plane is calculated to generate a global clock relationship map. Based on the global clock relationship map, the master device calculates personalized clock correction parameters for each Bluetooth headset device, including an offset correction value, a drift compensation coefficient, and an acceleration compensation factor. Through the solution of this embodiment, the multi-band measurement technology significantly improves the clock synchronization accuracy, reduces the synchronization error compared with single-band measurement, and achieves microsecond-level clock alignment. The three-dimensional synchronization parameter space model can simultaneously characterize the three key characteristics of clock offset, drift, and acceleration, and more comprehensively represents the clock behavior than the traditional one-dimensional or two-dimensional model, improving the long-term synchronization stability. The selection of auxiliary nodes based on delay stability ensures the reliability of the reference points and enhances the anti-interference ability of the entire synchronization network. The global clock relationship map realizes a unified time standard among all devices, eliminates the error accumulation problem in the traditional master-slave synchronization structure. The personalized clock correction parameters can adapt to the clock characteristic differences of different devices, provide a more accurate time reference, and lay a foundation for subsequent precise synchronous playback. Compared with the traditional two-way ranging method, this method establishes a three-dimensional compensation model through the three-dimensional parameter space, improves the synchronization accuracy, and significantly improves the auditory experience of multi-device audio synchronous playback.
[0155] In this embodiment, by using the spatio-temporal parameters of multiple nodes to establish a three-dimensional compensation model, the accuracy is greatly improved compared with the traditional two-way ranging method, providing a more accurate time reference for subsequent synchronization.
[0156] In some possible embodiments of the present invention, the audio processing capability parameters include audio decoding speed, buffer size, and processor load status, and are obtained through the following steps:
[0157] The master device sends test audio data to each Bluetooth headset device;
[0158] Each Bluetooth headset device processes the test audio data and records the processing time and resource occupancy;
[0159] Each Bluetooth headset device returns the processing result to the master device;
[0160] The master device analyzes the processing result to obtain the audio processing capability parameters of each Bluetooth headset device.
[0161] In this embodiment, by evaluating the device performance in real time, synchronous playback is ensured among heterogeneous devices.
[0162] In some possible embodiments of the present invention, the steps of allocating a unique time synchronization identifier to each Bluetooth headset device based on the signal transmission delay parameter and the audio processing capability parameter include:
[0163] The master device sends a parameter acquisition request containing a predefined test mode to each Bluetooth headset device, and the test mode includes: a delay measurement sequence, an audio decoding load test, and a processing resource evaluation task;
[0164] After each Bluetooth headset device receives the request, it enters the parameter measurement mode and returns a ready confirmation signal to the master device;
[0165] The master device performs signal transmission delay measurement, specifically including:
[0166] a) Sending a high-precision timestamp probe packet to each headset device and requiring the device to immediately return a response;
[0167] b) Recording the round-trip time (RTT) from sending the probe packet to receiving the response;
[0168] c) Repeating the above measurement at least 10 times, removing the maximum and minimum outliers, and then calculating the average RTT;
[0169] d) Calculating a one-way transmission delay estimate value based on the average RTT value, denoted as TD_i (transmission delay of device i);
[0170] The master device sends a standardized audio decoding test data packet containing samples of various codec formats, and requires each headset device to complete decoding and return the processing time index;
[0171] Each Bluetooth headset device performs audio processing capability evaluation, specifically including:
[0172] a) Measure the audio decoding speed: Record the processing time required to complete the decoding of a standard test sample.
[0173] b) Evaluate the buffer management efficiency: Measure the throughput and latency of data read and write operations.
[0174] c) Monitor the processor load level: Record the peak and average CPU occupancy rates during the test.
[0175] d) Combine the above indicators to generate a comprehensive audio processing ability score, denoted as AP_i (the audio processing ability of device i).
[0176] The master device collects and analyzes the TD_i and AP_i values of all headphone devices, and calculates the synchronization time compensation requirement TSC_i for each device: TSC_i = α × TD_i + β × (1 / AP_i), where α and β are weighting coefficients that are dynamically adjusted according to the application scenario.
[0177] The master device sorts all headphone devices according to the TSC_i value, and sequentially assigns a 32-bit unique time synchronization identifier (TSID_i) from smallest to largest. Devices with lower TSC_i values receive smaller TSID values.
[0178] The master device associates the following synchronization parameters with each TSID_i:
[0179] a) Base clock offset (BCO): A fixed offset value relative to the master device's clock.
[0180] b) Dynamic adjustment factor (DAF): A variable parameter for real-time correction.
[0181] c) Priority level (PL): Determines the processing order in case of resource competition.
[0182] d) Clock drift compensation value (CDC): A correction parameter based on the device's clock stability characteristics.
[0183] The master device sends a configuration instruction containing its TSID_i and associated synchronization parameters to each headphone device.
[0184] Each headphone device saves the assigned TSID_i and synchronization parameters, and confirms the completion of reception, thus completing the distribution process of the time synchronization identifier.
[0185] In some possible implementation manners of the present invention, a dynamic optimization step is further included:
[0186] The master device periodically re-evaluates the TD_i and AP_i values of each headphone device, and detects the change trends of these parameters.
[0187] When the TD_i or AP_i value of any device changes by more than a preset threshold, recalculate the TSC_i value of that device while keeping the TSID_i unchanged;
[0188] Update the synchronization parameters associated with TSID_i, especially the dynamic adjustment factor (DAF) and the clock drift compensation value (CDC);
[0189] Without interrupting the audio playback, send a parameter update instruction to the relevant device;
[0190] The receiving device smoothly transitions to the new synchronization parameters at the next audio frame boundary.
[0191] In some possible embodiments of the present invention, the structure of the unique time synchronization identifier (TSID_i) includes:
[0192] 8-bit group identification segment: Identifies the synchronization group to which the device belongs;
[0193] 4-bit role identification segment: Identifies the role of the device in the synchronization topology (master device, auxiliary node, or slave device);
[0194] 12-bit serial number segment: A unique serial number assigned according to the TSC_i value of the device;
[0195] 8-bit check segment: A cyclic redundancy check code used to verify the integrity of TSID_i.
[0196] In some possible embodiments of the present invention, it further includes a precise playback time calculation step based on TSID_i:
[0197] The master device embeds the target global playback timestamp GTS in the audio data packet;
[0198] After each headphone device receives the data packet, calculate the device-specific precise playback time EPT_i based on its own TSID_i:
[0199] EPT_i = GTS + [BCO + (TSID_i × TPF) + DAF × f(CPU_load) + CDC × f(Temp)], where: TPF is the time precision factor used to convert TSID_i into a time offset; f(CPU_load) is the processor load compensation function; f(Temp) is the temperature compensation function that adjusts the clock drift compensation according to the current device temperature;
[0200] Each headphone device precisely triggers the audio frame playback at the calculated EPT_i moment.
[0201] In some possible embodiments of the present invention, it further includes a group synchronization optimization mechanism:
[0202] According to the group identification segment of TSID_i, multiple headphone devices are divided into several synchronization subgroups;
[0203] A coordination device is designated for each subgroup to be responsible for local synchronization control within the subgroup;
[0204] The master device mainly communicates with the coordination devices of each subgroup, reducing the number of devices directly managed;
[0205] Fine-grained synchronization control is implemented within each subgroup based on the sequence number segment of TSID_i;
[0206] When a synchronization deviation between subgroups is detected, the master device adjusts the base clock offset (BCO) of the relevant subgroups to achieve large-range synchronization correction.
[0207] In some possible implementation manners of the present invention, the following steps are further included:
[0208] The master device and each Bluetooth headphone device respectively collect motion state data in real time through the built-in inertial measurement unit, and combine the environmental electromagnetic interference sensor data to construct a dynamic delay compensation model, specifically including: predicting the change amount of signal transmission time delay caused by headphone displacement according to the accelerometer data; generating a channel quality index by identifying the interference intensity in the 2.4GHz frequency band based on the spectrum analysis module; calculating the real-time delay compensation value by fusing the motion compensation factor and the channel attenuation coefficient;
[0209] The displacement change amount of the device is detected through the MEMS motion sensors built in each node device in the synchronization node group. When the three-dimensional acceleration vector of any node device exceeds the preset threshold, the topology reorganization protocol is started, and the optimal auxiliary node combination is recalculated according to the latest signal strength matrix.
[0210] In this embodiment, each Bluetooth headset device periodically activates the built-in MEMS motion sensors, including a three-axis accelerometer, a gyroscope, and a magnetometer, to collect the motion state data of the device; each Bluetooth headset device filters the collected motion state data to eliminate high-frequency noise and random fluctuations and extracts an effective three-dimensional acceleration vector; each Bluetooth headset device calculates the modulus value of the three-dimensional acceleration vector and compares it with a pre-set displacement detection threshold, which is set according to typical human head movement characteristics; when it is detected that the modulus value of the three-dimensional acceleration vector of any Bluetooth headset device exceeds the preset threshold, the device sends a displacement event notification to the master device, and the notification includes the device identifier and the acceleration vector data; after receiving the displacement event notification, the master device broadcasts a topology reorganization request to all devices within the synchronization group to trigger a global signal strength measurement; after receiving the topology reorganization request, each Bluetooth headset device sequentially activates the Bluetooth signal transmission module and sends test signals according to a pre-determined time slot sequence; all other devices within the synchronization node group measure the received signal strength indicator (RSSI) during their respective receiving time slots and report the measurement results to the master device; the master device constructs an N×N signal strength matrix based on the collected RSSI data, where N is the total number of devices within the synchronization group, and each element in the matrix represents the signal strength between devices; the master device applies graph theory algorithms to analyze the signal strength matrix, constructs a network connection graph, and calculates the minimum spanning tree to identify the subset of nodes with the optimal connection quality; according to the identified optimal subset of nodes, the master device performs the following auxiliary node reorganization operations: a) select the two nodes with the best signal quality as the new auxiliary nodes; b) allocate higher relay priorities and resource quotas to the new auxiliary nodes; c) send a role-switching instruction to the original auxiliary nodes to reduce their relay task priorities; the master device broadcasts the updated topology structure information to each Bluetooth headset device, including the new auxiliary node list, the routing table, and the synchronization parameters; each Bluetooth headset device updates its local routing configuration according to the received topology structure information and adjusts the data transmission path and synchronization relationship.The solution of this embodiment can respond to the changes in the location of user devices in real time, dynamically optimize the network topology structure, and improve the stability and adaptability of the system in daily usage scenarios; the active topology reorganization triggered by displacement detection avoids the problems of delay and packet loss in traditional passive detection methods, and reduces the topology adjustment delay; the auxiliary node selection based on the latest signal strength matrix ensures the maintenance of the best connection quality in a changing environment, reduces the data transmission error rate; the dynamic role switching mechanism balances the task loads of each node, avoids excessive power consumption of specific devices due to continuously undertaking the relay function, and extends the overall system operation time; the displacement detection method based on multi-sensor fusion significantly improves the accuracy of environmental change perception, reduces the false threshold triggering rate, and reduces unnecessary topology reorganization operations; the node selection process optimized by graph theory algorithms ensures a globally optimal network structure, and improves the network throughput compared with simple signal strength sorting methods; the smooth switching mechanism in the topology reorganization process realizes network optimization without user perception, avoids audio playback interruption or sudden delay changes, and ensures a continuous and stable auditory experience.
[0211] This embodiment can dynamically perceive the impact of physical environment changes on synchronization accuracy, adapt to changes in the physical location of devices, and ensure synchronization continuity in mobile scenarios.
[0212] In some possible implementation manners of the present invention, the following steps are further included:
[0213] The master device collects the interference spectrum map in the 2.4GHz frequency band in the environment in real time. When detecting Wi-Fi channel overlap, it triggers the adaptive frequency hopping mechanism and synchronously updates the frequency band switching compensation parameters of each node. The compensation parameters include the predicted value of the Bluetooth data packet retransmission times and the pre-compensation value of the frequency offset;
[0214] When detecting that the delay deviation of any Bluetooth headset device exceeds the preset threshold, trigger the cooperative re-synchronization mechanism:
[0215] The master device switches to the multicast retransmission mode;
[0216] The normal headset sends a sound wave positioning signal to assist the abnormal headset to synchronize quickly;
[0217] Record the characteristics of abnormal events based on blockchain technology for subsequent synchronization strategy optimization.
[0218] This embodiment can achieve the maintenance of synchronization stability in an interference environment, reduce sudden delay fluctuations, and ensure fast recovery and system self-learning ability in abnormal scenarios.
[0219] In some possible implementation manners of the present invention, the predetermined playback timestamp is generated through the following steps:
[0220] The master device calculates the required buffer time according to the signal transmission delay parameters and audio processing capability parameters of each Bluetooth headset device;
[0221] Add the buffer time and a preset additional safety margin time to the current time to generate a predetermined playback timestamp;
[0222] Embed the predetermined playback timestamp into the audio data packet and send it to each Bluetooth headset device.
[0223] This embodiment can ensure that all devices have sufficient preparation time to process the received data, while maintaining precise synchronization of playback.
[0224] In some possible embodiments of the present invention, the steps for each Bluetooth headset device to receive the data packet and calculate the playback moment according to the predetermined playback timestamp and its own time synchronization identifier include:
[0225] Each Bluetooth headset device receives the data packet sent by the master device, which contains audio data and a predetermined playback timestamp;
[0226] Each Bluetooth headset device extracts the predetermined playback timestamp and its corresponding time synchronization identifier from the data packet;
[0227] Each Bluetooth headset device performs time normalization conversion based on the offset between the local clock and the master device clock, and converts the predetermined playback timestamp to the local clock domain;
[0228] Each Bluetooth headset device queries the pre-established device characteristic database according to its own time synchronization identifier to obtain the device-specific processing delay parameter set, and the parameter set includes audio decoding delay, buffer processing delay, and output delay;
[0229] Each Bluetooth headset device reads the real-time operating status, including the current processor load, remaining buffer capacity, and battery status, and generates a status adjustment factor;
[0230] Each Bluetooth headset device applies the status adjustment factor to the processing delay parameter set to calculate a real-time compensation value;
[0231] Each Bluetooth headset device subtracts the real-time compensation value from the predetermined playback timestamp in the local clock domain to obtain the precise playback moment;
[0232] Each Bluetooth headset device temporarily stores the audio data in the local buffer and sets a timing trigger based on the precise playback moment;
[0233] When the local clock reaches the playback moment, each Bluetooth headset device synchronously activates the audio processing unit to output the audio data.
[0234] The solution of this embodiment can achieve sub-millisecond-level synchronous playback accuracy among multiple devices, effectively eliminate the audible audio out-of-sync problem, and improve the stereo and surround sound effects experience; through the device characteristic database and real-time state adjustment, it adapts to Bluetooth headset devices with different performances and states, ensuring a consistent playback experience in a heterogeneous device environment; dynamically compensates for the processing delay differences of each device, enabling the audio output to be precisely aligned at the physical level and avoiding sound stacking or echo effects; compared with traditional fixed-delay compensation methods, this method can adapt to changes in the device operating state, improve the stability and reliability of the system during long-term use; reduce the computational burden of the master device, distribute part of the compensation calculation to each terminal device, achieve distributed optimization, and improve the overall system efficiency.
[0235] In some possible embodiments of the present invention, the following steps are further included:
[0236] The master device divides the audio data stream into N equal-length sub-frames, attaches a unique verification code containing quantum random number generation to each sub-frame, and sends it to each Bluetooth headset device through heterogeneous transmission paths: the master device uses a BLE low-power link to transmit control instructions to the first headset (such as the left headset); the master device uses an EDR enhanced data link to transmit audio data to the second headset (such as the right headset); the first headset and the second headset (such as between the left and right headsets) exchange verification information through a direct connection channel encoded by LC3;
[0237] After receiving the data, each Bluetooth headset device performs space-time alignment operations: eliminates the cumulative error of clock drift through a Kalman filter; uses a cross-check algorithm to compare the data consistency between the direct connection channel and the main channel; dynamically adjusts the depth of the local buffer according to the compensation value generated by the dynamic delay compensation model.
[0238] This embodiment enhances the system robustness through multi-path transmission, improves data integrity through quantum verification, achieves sub-millisecond-level synchronous accuracy, and maintains lip synchronization.
[0239] In some possible embodiments of the present invention, the step of the master device sending a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device further includes:
[0240] Performs hierarchical encoding on the audio data, including: base layer audio data, containing necessary audio information; enhanced layer audio data, containing additional information to improve the sound quality;
[0241] The master device adaptively adjusts the level of the audio data sent according to the processing capabilities and network conditions of each Bluetooth headset device;
[0242] A Bluetooth headset device with a processing capacity lower than the first preset capacity value only receives and processes the base layer audio data;
[0243] A Bluetooth headset device with processing power higher than the second preset value receives and processes complete audio data.
[0244] This embodiment can ensure synchronous playback while maintaining a large difference in device performance, and provide the best sound quality according to the device capabilities.
[0245] In some possible embodiments of the present invention, it further includes a battery power management step:
[0246] Periodically obtain the battery power status of each Bluetooth headset device;
[0247] When it is detected that the battery power of any Bluetooth headset device is lower than the preset threshold, automatically adjust the audio processing strategy to reduce the processing load of the device;
[0248] Dynamically adjust the clock synchronization frequency according to the power status to reduce the energy consumption of the low-power device.
[0249] This embodiment extends the usage time of the low-power device through intelligent power management, ensuring the continuity of the overall synchronous playback experience.
[0250] In some possible embodiments of the present invention, it further includes the following steps:
[0251] In the audio output stage, the master device generates differential audio frames with time-domain phase compensation based on the final delay measurement values of the nodes in the synchronization node group. The audio frames contain HRTF filtering parameters for the left and right channels, and achieve spatial audio synchronization compensation through low-complexity convolution operations;
[0252] Detect the ambient noise level of each Bluetooth headset device;
[0253] Based on the noise level, calculate the acoustic characteristic differences of each device environment;
[0254] Perform device-specific preprocessing on the audio data, including frequency response adjustment and volume adaptation.
[0255] This embodiment can maintain the consistency of the stereo field through acoustic processing when the physical delay difference is inevitable, and optimize the audio output effect of each device through environmental perception technology.
[0256] Please refer to Figure 2 , Another embodiment of the present invention provides a system for realizing synchronous playback of Bluetooth headset devices, which is used to execute a method for realizing synchronous playback of Bluetooth headset devices, including: a master device, multiple Bluetooth headset devices, and a server;
[0257] The server is configured to:
[0258] Regarding multiple Bluetooth headset devices connected to a master device as a synchronization node group, and determining at least two auxiliary nodes among the node devices of the synchronization node group;
[0259] Establish a multi-source clock synchronization network between the master device and each Bluetooth headset device. The master device broadcasts a synchronization signal carrying a reference timestamp to each Bluetooth headset device, and simultaneously activates the direct communication link between each Bluetooth headset device to form a distributed clock correction channel;
[0260] Obtain the signal transmission delay parameter and audio processing capability parameter of each Bluetooth headset device;
[0261] Based on the signal transmission delay parameter and audio processing capability parameter, assign a unique time synchronization identifier to each Bluetooth headset device;
[0262] The master device is configured to: send a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device;
[0263] The Bluetooth headset device is configured to:
[0264] Receive the data packet, and calculate the playback moment according to the predetermined playback timestamp and its own time synchronization identifier;
[0265] Synchronously play the audio data at the playback moment.
[0266] It should be known that, Figure 2 The block diagram of the system for realizing synchronous playback of Bluetooth headset devices shown is only for illustration, and the number of each module shown does not limit the protection scope of the present invention. The system for realizing synchronous playback of Bluetooth headset devices provided in this embodiment can be used to execute the implementation solutions of the corresponding methods for realizing synchronous playback of Bluetooth headset devices. Please refer to the descriptions of each method embodiment for the specific implementation process, which will not be elaborated here.
[0267] In some possible implementation manners of the present invention, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0268] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0269] In several embodiments provided by this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.
[0270] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0271] In addition, in each embodiment of this application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0272] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above methods in each embodiment of this application. And the aforementioned memory includes: USB flash drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk, or optical disc and other media that can store program codes.
[0273] Those of ordinary skill in the art can understand that all or part of the steps in the above various methods can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable memory. The memory can include: flash drive, read-only memory (abbreviation: ROM), random access memory (abbreviation: RAM), magnetic disk, or optical disc, etc.
[0274] The above has introduced the embodiments of the present application in detail. Specific examples are used herein to illustrate the principle and implementation manner of the present application. The description of the above embodiments is only for helping to understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
[0275] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present invention, and various modifications and changes can be made, including combinations of the above different functions and implementation steps, including software and hardware implementation manners, all within the protection scope of the present invention.
Claims
1. A method for realizing synchronous playback of a Bluetooth headset device, characterized in that, Including: Regarding multiple Bluetooth headset devices connected to the master device as a synchronization node group, and determining at least two auxiliary nodes among the node devices of the synchronization node group; Establishing a multi-source clock synchronization network between the master device and each Bluetooth headset device. The master device broadcasts a synchronization signal carrying a reference timestamp to each Bluetooth headset device, and at the same time activates the direct communication links between the Bluetooth headset devices to form a distributed clock correction channel; Obtaining the signal transmission delay parameters and audio processing capability parameters of each Bluetooth headset device; Based on the signal transmission delay parameters and audio processing capability parameters, assigning a unique time synchronization identifier to each Bluetooth headset device; The master device sends a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device; Each Bluetooth headset device receives the data packet and calculates the playback moment according to the predetermined playback timestamp and its own time synchronization identifier; At the playback moment, each Bluetooth headset device synchronously plays the audio data.
2. The method for realizing synchronous playback of a Bluetooth headset device according to claim 1, wherein, The signal transmission delay parameters are obtained through the following steps: Each node device synchronously activates a multi-band clock measurement module. The master device selects the two auxiliary nodes with the highest time delay stability as reference nodes through a preset auxiliary node selection algorithm, and establishes a three-dimensional synchronization parameter space based on the clock offsets of the reference nodes; The master device sends a time calibration request to each Bluetooth headset device; After receiving the time calibration request, each Bluetooth headset device immediately returns a response signal; The master device measures the round-trip time from sending the request to receiving the response, and calculates a dynamic clock compensation function in combination with the three-dimensional synchronization parameter space.
3. The method for realizing synchronous playback of a Bluetooth headset device according to claim 2, wherein, The audio processing capability parameters include audio decoding speed, buffer size, and processor load status, and are obtained through the following steps: The master device sends test audio data to each Bluetooth headset device; Each Bluetooth headset device processes the test audio data and records the processing time and resource occupancy; Each Bluetooth headset device returns the processing result to the master device; The master device analyzes the processing results to obtain the audio processing capability parameters of each Bluetooth headset device.
4. The method for realizing synchronous playback of a Bluetooth headset device according to claim 3, wherein, It also includes the following steps: The master device and each Bluetooth headset device respectively collect motion state data in real time through the built-in inertial measurement unit, and combine the environmental electromagnetic interference sensor data to construct a dynamic delay compensation model, specifically including: predicting the change in signal transmission time delay caused by the displacement of the headset according to the accelerometer data; generating a channel quality index by identifying the interference intensity in the 2.4GHz band based on the spectrum analysis module; fusing the motion compensation factor and the channel attenuation coefficient to calculate the real-time delay compensation value; Detecting the device displacement change amount through the MEMS motion sensors built in each node device of the synchronization node group. When the three-dimensional acceleration vector of any node device exceeds the preset threshold, start the topology reorganization protocol, and recalculate the optimal auxiliary node combination according to the latest signal strength matrix.
5. The method for realizing synchronous playback of a Bluetooth headset device according to claim 4, wherein It also includes the following steps: The master device collects the interference spectrum in the 2.4GHz frequency band in real time. When Wi-Fi channel overlap is detected, an adaptive frequency hopping mechanism is triggered and the frequency band switching compensation parameters of each node are synchronously updated. The compensation parameters include the predicted value of the Bluetooth data packet retransmission times and the pre-compensation value of the frequency offset. When the delay deviation of any Bluetooth headset device is detected to exceed the preset threshold, a cooperative resynchronization mechanism is triggered: The master device switches to the multicast retransmission mode; The normal headset sends an acoustic positioning signal to assist the abnormal headset to synchronize quickly; Record the characteristics of abnormal events based on blockchain technology for subsequent synchronization strategy optimization.
6. The method for realizing synchronous playback of a Bluetooth headset device according to claim 5, wherein, The predetermined playback timestamp is generated through the following steps: The master device calculates the required buffer time according to the signal transmission delay parameters and audio processing ability parameters of each Bluetooth headset device; Add the buffer time and the preset additional safety margin time to the current time to generate a predetermined playback timestamp; Embed the predetermined playback timestamp into the audio data packet and send it to each Bluetooth headset device.
7. The method for realizing synchronous playback of a Bluetooth headset device according to claim 6, wherein It also includes the following steps: The master device divides the audio data stream into N equal-length sub-frames, and each sub-frame is attached with a unique verification code generated by quantum random numbers, and sent to each Bluetooth headset device through heterogeneous transmission paths: The master device and the first headset use a BLE low-power link to transmit control instructions; The master device and the second headset use an EDR enhanced data link to transmit audio data; The first headset and the second headset exchange verification information through a direct connection channel encoded by LC3; After receiving the data, each Bluetooth headset device performs space-time alignment operations: eliminate the cumulative error of clock drift through a Kalman filter; use a cross-check algorithm to compare the data consistency between the direct connection channel and the main channel; dynamically adjust the depth of the local buffer according to the compensation value generated by the dynamic delay compensation model.
8. The method for realizing synchronous playback of a Bluetooth headset device according to claim 7, characterized in that, The step of the master device sending a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device further includes: Perform hierarchical encoding on the audio data, including: base layer audio data, containing necessary audio information; enhanced layer audio data, containing additional information for improving sound quality; The master device adaptively adjusts the audio data level sent according to the processing ability and network conditions of each Bluetooth headset device; The Bluetooth headset device with a processing ability lower than the first preset ability value only receives and processes the base layer audio data; The Bluetooth headset device with a processing ability higher than the second preset ability value receives and processes the complete audio data.
9. The method for realizing synchronous playback of a Bluetooth headset device according to claim 8, characterized in that, It also includes battery power management steps: Periodically obtain the battery power status of each Bluetooth headset device; When the battery power of any Bluetooth headset device is detected to be lower than the preset threshold, automatically adjust the audio processing strategy to reduce the processing load of the device; Dynamically adjust the clock synchronization frequency according to the power status to reduce the energy consumption of the low-power device.
10. A system for implementing synchronous playback of Bluetooth headset devices, which is used to execute the method for implementing synchronous playback of Bluetooth headset devices according to any one of claims 1 to 9, characterized in that, It includes: A master device, multiple Bluetooth headset devices and a server; The server is configured to: Regard multiple Bluetooth headset devices connected to the master device as a synchronization node group, and determine at least two auxiliary nodes among the node devices of the synchronization node group; Establish a multi-source clock synchronization network between the master device and each Bluetooth headset device. The master device broadcasts a synchronization signal carrying a reference timestamp to each Bluetooth headset device, and at the same time activates the direct communication link between each Bluetooth headset device to form a distributed clock correction channel; Obtain the signal transmission delay parameters and audio processing capability parameters of each Bluetooth headset device; Based on the signal transmission delay parameters and audio processing capability parameters, assign a unique time synchronization identifier to each Bluetooth headset device; The master device is configured to: send a data packet containing audio data and a predetermined playback timestamp to each Bluetooth headset device; The Bluetooth headset device is configured to: Receive the data packet and calculate the playback time according to the predetermined playback timestamp and its own time synchronization identifier; At the playback time, synchronously play the audio data.
Citation Information
Cited By
Method and system for realizing Device mode of USB audio equipment, storage medium and equipment
CN120872885A
Earthquake early warning equipment and method based on campus broadcast
CN121053745A
Synchronous audio playing method and device applied to translation earphone
CN121560268A