Link synchronization method and apparatus, electronic device, and storage medium
By establishing an information synchronization link in the wireless microphone four-transmitting and two-receiving devices, obtaining the synchronous connection event anchor points and intervals, and synchronizing the audio link timing of the two main devices, the RF interference problem is solved and stable and accurate audio data transmission is achieved.
Patent Information
- Application Number
- PCT/CN2024/113137
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-18
- Filing Date
- 2024-08-19
- Publication Date
- 2025-07-24
AI Technical Summary
In the wireless microphone four-transmitting and two-receiving device, due to the lack of synchronization mechanism between the two main devices, the audio data transmission and reception process overlaps, resulting in the problem of radio frequency interference.
By establishing an information synchronization link, obtaining the synchronous connection event anchor points and intervals, synchronizing the audio link timing of the two master devices, and using different available channels within the same timing to avoid radio frequency interference.
It realizes the stable transmission of four channels of audio data, eliminates radio frequency interference during audio data transmission and reception, and ensures the accuracy of audio data transmission.
Smart Images

Figure CN2024113137_24072025_PF_FP_ABST
Abstract
Description
Link synchronization method, device, electronic device and storage medium Technical Field
[0001] The present application relates to the field of Bluetooth transmission technology, and in particular to a link synchronization method, device, electronic device, and computer-readable storage medium. Background Art
[0002] For a wireless microphone (mic) with four transmitters and two receivers (four transmitters and two receivers), to obtain sufficient bandwidth when receiving four channels of mic audio data, it is necessary to integrate two master devices on the receiving end to connect to the two mic slave devices respectively. The timing of the CIS link air data packet of LE Audio (Low Energy Audio) is shown in Figure 1.
[0003] LE over-the-air timing is solely dependent on the Bluetooth clock of the master device. Because there's no synchronization mechanism between the two master devices, their transmission and reception processes overlap. Furthermore, because the two devices are located close together within a single receiver, the data transmission channel radiates power from adjacent channels, leading to RF interference when transmitting and receiving data.
[0004] Summary of the Invention
[0005] Embodiments of the present application provide a link synchronization method, apparatus, electronic device, and computer-readable storage medium, which are intended to synchronize audio link timing and avoid inter-channel radio frequency interference.
[0006] In a first aspect, an embodiment of the present application provides a link synchronization method, the link synchronization method being applied to an audio transmission system, the audio transmission system comprising: a first master device, a second master device, a plurality of target slave devices matching the first master device, and a plurality of target slave devices matching the second master device;
[0007] The method comprises:
[0008] In response to a device connection event, establishing an information synchronization link between the first master device and the second master device, and obtaining a synchronization connection event anchor point and a synchronization connection event interval of the information synchronization link;
[0009] performing link timing synchronization on a first audio link corresponding to the first master device and a second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval;
[0010] The first audio link is an audio link between the first master device and a plurality of correspondingly matched target slave devices, and the second audio link is an audio link between the second master device and a plurality of correspondingly matched target slave devices.
[0011] In a second aspect, an embodiment of the present application provides a link synchronization device, including:
[0012] An establishing module, configured to establish an information synchronization link between the first master device and the second master device in response to a device connection event, and obtain a synchronization connection event anchor point and a synchronization connection event interval of the information synchronization link;
[0013] a synchronization module, configured to synchronize the link timing of a first audio link corresponding to the first master device and a second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval;
[0014] The first audio link is an audio link between the first master device and a plurality of correspondingly matched target slave devices, and the second audio link is an audio link between the second master device and a plurality of correspondingly matched target slave devices.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the above-mentioned link synchronization method.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the above-mentioned link synchronization method.
[0017] Beneficial effects of the embodiments of the present application:
[0018] Compared with the four-transmit and two-receive audio transmission method in the prior art, in the present application, the two master devices can first establish an information synchronization link, which can be used to synchronize the timing of the two master devices and obtain the synchronization connection event anchor point and the synchronization connection event interval of the information synchronization link. Then, based on the synchronization connection event anchor point and the synchronization connection event interval, the first audio link between the first master device and the multiple slave devices matched by the first master device, and the second frequency link between the second master device and the multiple slave devices matched by the second master device, link timing synchronization can be performed. Through the above-mentioned timing synchronization mechanism between the two master devices, the overlap of the audio data transmission and reception processes of the two master devices is avoided, and the interference between adjacent channels during the audio data transmission and reception process is eliminated, thereby ensuring the accuracy of audio data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0020] FIG1 is a schematic diagram of a two-transmit and one-receive link provided in an embodiment of the present application;
[0021] FIG2 is a first schematic diagram of a four-transmit and two-receive link provided in an embodiment of the present application;
[0022] FIG3 is a second schematic diagram of a four-transmit and two-receive link provided in an embodiment of the present application;
[0023] FIG4 is a schematic diagram of a four-transmitter and two-receiver structure provided in an embodiment of the present application;
[0024] FIG5 is a schematic diagram of a process flow provided in an embodiment of the present application;
[0025] FIG6 is a schematic diagram of the SyncACL link timing provided in an embodiment of the present application;
[0026] FIG7 is a schematic diagram of timing synchronization of a four-transmit and two-receive link provided in an embodiment of the present application;
[0027] FIG8-1 is a first schematic diagram of initial available channels provided in an embodiment of the present application;
[0028] FIG8-2 is a schematic diagram of an even channel sequence provided in an embodiment of the present application;
[0029] FIG8-3 is a schematic diagram of an odd channel sequence provided in an embodiment of the present application;
[0030] FIG9 is a schematic diagram of a data packet provided in an embodiment of the present application;
[0031] FIG10 is a schematic diagram of an odd-even channel sequence switching embodiment of the present application;
[0032] FIG11 is a second schematic diagram of initial available channels provided in an embodiment of the present application;
[0033] FIG12-1 is a first schematic diagram of a channel cyclic left shift provided in an embodiment of the present application;
[0034] FIG12-2 is a second schematic diagram of a channel cyclic left shift provided in an embodiment of the present application;
[0035] FIG12-3 is a third schematic diagram of a channel cyclic left shift provided in an embodiment of the present application;
[0036] FIG12-4 is a fourth schematic diagram of a channel cyclic left shift provided in an embodiment of the present application;
[0037] FIG13 is a schematic diagram of a micCE counter provided in an embodiment of the present application;
[0038] FIG14 is a schematic structural diagram of a link synchronization device provided in an embodiment of the present application;
[0039] FIG15 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The following will provide a clear and complete description of the technical solutions in the embodiments of this application, in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments derived by persons skilled in the art without inventive effort are within the scope of protection of this application. Furthermore, it should be understood that the specific embodiments described herein are intended only to illustrate and explain this application and are not intended to limit this application. In this application, unless otherwise indicated, directional terms such as "upper" and "lower" generally refer to the upper and lower sides of the device in actual use or operation, specifically the directions in the drawings; while "inner" and "outer" refer to the outline of the device. Furthermore, in the description of the embodiments of this application, the terms "first" and "second" are used solely to distinguish descriptions and should not be construed as indicating or implying relative importance. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise specifically defined.
[0041] As shown in Figure 2, a wireless microphone (wireless microphone) usually has two transmitters and one receiver (used to receive audio sent by the microphone, and can provide USB, line-in and other interfaces to the outside). The LE Audio (Low Energy Audio) master device at the receiving end establishes CIS links with two mic slave devices respectively, forming a CIG link. In order to ensure the audio quality of the mic, the LE Audio master device needs to reserve a certain bandwidth for each audio channel to meet the maximum 5 data packet retransmissions during each CIS connection event. Each master device is connected to a maximum of two mic slave devices.
[0042] In order to obtain sufficient bandwidth when receiving audio data from four mics (four slave devices), the wireless mic with four transmitters and two receivers needs to integrate two master devices at the receiving end to connect to the two mic slave devices respectively. The LE Audio CIS link air data packet timing is shown in Figure 1. The LE air timing is only related to the Bluetooth clock of the master device. There is no synchronization mechanism between the two master devices, and the transmission and reception processes of the two master devices may overlap. In addition, the two master devices are integrated into a receiver and are close to each other. Therefore, the transmission channel for sending data will have a certain radiation on the power of the adjacent channel, resulting in the problem of RF (radio frequency) mutual interference when sending and receiving data.
[0043] Therefore, in order to solve the above problems, the present application synchronizes the CIS audio data receiving and transmitting timing of the two master devices and the communication channel selection of the two master devices, so that the receiving and transmitting processes of the two master devices are non-overlapping, interference is minimized to the maximum extent, and stable transmission of four-channel audio data is achieved.
[0044] It is worth noting that in this application, as shown in Figure 3, after BLE (Bluetooth Low Energy) enters the connected state, the link layer should only transmit data physical channel packets during connection events (CE). During CE, the master and slave devices alternately send and receive data packets. The master device controls the timing of CE, and the CE timing of the master and slave devices occurs synchronously. The master and slave devices should each have a 16-bit connection event counter containing the CE count value CE(counter) for each connected link. CE(counter) can be used to synchronize link layer control. At the first CE, CE(counter) should be set to zero, and for each new CE, CE(counter) increments until it reaches 0xFFFF and is reset to 0. The starting point of each CE is called the connection event anchor point (CEap), and the time between two CEs is called the connection event interval (CEinterval). This value has an accuracy of 1us in Bluetooth clock (BTCLK) units.
[0045] On this basis, the communication structure of the present application is shown in Figure 4. After LE Audio enters the connection state, CE is initiated by the master device and the CEap of the master device is specified by the master device during the establishment process. Therefore, the present application can synchronize the BTCLKs of the two master devices (including the first master device and the second master device) before the master device establishes a connection with the slave device, and then set the anchor point to the same BTCLK when the slave device (including the first slave device and the second slave device corresponding to the master device, the slave device in this embodiment can be a mic) establishes a BLE connection, so as to achieve synchronization of Bluetooth data transmission and reception timing. Moreover, after the Bluetooth timing is synchronized, in order to prevent the two master devices from using the same frequency channel to communicate within the same timing and causing RF interference, the two master devices can also be controlled to use different available channels within the same timing.
[0046] Specifically, the link synchronization method in the present application is applied to an audio transmission system, which is shown in Figure 4 and includes a first master device, a second master device, multiple target slave devices matching the first master device, and multiple target slave devices matching the second master device.
[0047] In this embodiment, it is explained by taking the example that each master device can be connected to two target slave devices (mic), and the multiple target slave devices matching the first master device (also referred to as master device 1) may include mic1 and mic2, and the multiple target slave devices matching the second master device (also referred to as master device 2) may include mic3 and mic4.
[0048] As shown in FIG5 , the link synchronization method in this embodiment specifically includes the following steps:
[0049] S10, in response to a device connection event, establishing an information synchronization link between the first master device and the second master device, and obtaining a synchronization connection event anchor point and a synchronization connection event interval of the information synchronization link;
[0050] It should be noted that in this embodiment, the two master devices (including master device 1 and master device 2) on the receiving end hardware use the same clock source, which can avoid relative offset of the two master device clocks due to crystal oscillator error, thereby continuously maintaining Bluetooth clock synchronization of the two master devices.
[0051] On this basis, an information synchronization link for information synchronization is established between master device 1 and master device 2 through special broadcast information (hereinafter referred to as SyncACL link, which has the same meaning), and the synchronization connection event anchor point SyncACL (ap) and synchronization connection event interval SyncACL (connect interval) of the information synchronization link are obtained. The above-mentioned synchronization connection event anchor point can be directly determined when the information synchronization link is established.
[0052] It should be noted that, in this embodiment, since the information synchronization link is used to synchronize the Bluetooth clock and channel, the synchronization connection event interval of the information synchronization link can be set to be much larger than the audio connection event interval of the audio link to reduce the impact on the audio link bandwidth.
[0053] Specifically, for example, SyncACL(connectinterval) = MIC(connect interval) * n. Here, SyncACL(connect interval) is the synchronization connection event interval of the information synchronization link, and MIC(connect interval) is the audio connection event interval of the audio link (the audio link includes the first audio link corresponding to the first master device or the second audio link corresponding to the second master device). For example, as shown in Figure 6, when n is 5, if the audio connection event interval of the audio link is 20ms, then the synchronization connection event interval of the information synchronization link is 100ms.
[0054] S20: Synchronize the link timing of the first audio link corresponding to the first master device and the second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval;
[0055] The first audio link is an audio link between the first master device and the matched multiple target slave devices, and the second audio link is an audio link between the second master device and the matched multiple target slave devices.
[0056] In this embodiment, after the first master device establishes an information synchronization link with the second master device and obtains the synchronization connection event anchor point and the synchronization connection event interval of the information synchronization link, the first audio link corresponding to the first master device and the second audio link corresponding to the second master device can be synchronized in link timing according to the synchronization connection event anchor point and the synchronization connection event interval.
[0057] As shown in FIG7 , the first audio link constructed by the master device 1 , mic1 and mic2 and the second audio link constructed by the master device 2 , mic3 and mic4 are completely synchronized in terms of Bluetooth air timing.
[0058] Therefore, compared with the four-transmit and two-receive audio transmission mode in the prior art, in this embodiment, the two master devices can first establish an information synchronization link, which can be used to synchronize the timing of the two master devices, and obtain the synchronization connection event anchor point and the synchronization connection event interval of the information synchronization link. Then, based on the synchronization connection event anchor point and the synchronization connection event interval, the first audio link between the first master device and multiple slave devices matched by the first master device, and the second frequency link between the second master device and multiple slave devices matched by the second master device can be synchronized. Through the above-mentioned synchronization mechanism between the two master devices, the overlapping of the audio data transmission and reception processes of the two master devices is avoided, and the interference between adjacent channels during the audio data transmission and reception process is eliminated, thereby ensuring the accuracy of audio data transmission.
[0059] In one embodiment, in the above step S20, “synchronizing the first audio link corresponding to the first master device with the second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval” may include:
[0060] S201, obtaining an audio connection event interval corresponding to the synchronization connection event interval, and calculating an anchor point offset according to the audio connection event interval;
[0061] S202: Calculate, based on the anchor point offset, an audio connection event anchor point of a first audio link corresponding to the first master device and an audio connection event anchor point of a second audio link corresponding to the second master device;
[0062] S203: Synchronize the link timing of the first audio link and the second audio link according to the audio connection event anchor points.
[0063] In this embodiment, after the first master device and the second master device establish an information synchronization link and obtain the corresponding synchronization connection event anchor point and synchronization connection event interval, they can obtain the audio connection event interval corresponding to the synchronization connection event interval, and then calculate the anchor point offset based on the audio connection event interval.
[0064] Specifically, for example, if the synchronization connection event interval of the information synchronization link is 100ms, according to the above description, the audio connection event interval can be 20ms. On this basis, in order to ensure that the audio link can communicate with two mics once within 20ms, the anchor point offset can be set to 10ms.
[0065] Furthermore, based on the above-mentioned anchor point offset, the audio connection event anchor point of the first audio link corresponding to the first master device and the audio connection event anchor point of the second audio link corresponding to the second master device can be calculated. Furthermore, based on the multiple audio connection event anchor points obtained by the above calculation, the link timing of the first audio link and the second audio link can be synchronized.
[0066] In the above S202, "calculating, based on the anchor point offset, the audio connection event anchor point of the first audio link corresponding to the first master device and the audio connection event anchor point of the second audio link corresponding to the second master device" may include:
[0067] S2021, setting the synchronization connection event anchor point to a first audio connection event anchor point of an audio link between the first master device and a first slave device corresponding to the first master device, and offsetting the first audio connection event anchor point by the anchor point offset to obtain a second audio connection event anchor point of an audio link between the first master device and a second slave device corresponding to the first master device; and
[0068] S2021, set the synchronous connection event anchor point to the third audio connection event anchor point of the audio link between the second master device and the first slave device corresponding to the second master device, and offset the third audio connection event anchor point by the anchor point offset to obtain the fourth audio connection event anchor point of the audio link between the second master device and the second slave device corresponding to the second master device.
[0069] In this embodiment, according to the above description, the target slave devices matched by the first master device may include mic1 and mic2, and the target slave devices matched by the second master device may include mic3 and mic4.
[0070] On this basis, the audio connection event anchor point of the mic1 link can be consistent with the synchronization connection event anchor point of the information synchronization link, and the audio connection event anchor point of the mic2 link can be calculated by adding the anchor point offset 10ms to the audio connection event anchor point of the mic1 link.
[0071] Therefore, the anchor points when establishing the first audio link between the first master device and the two mics (mic1, mic2) are:
[0072] mic1(ap)=SyncACL(ap)
[0073] mic2(ap)=SyncACL(ap)+10ms
[0074] SyncACL(ap) is the synchronization connection event anchor point of the information synchronization link, mic1(ap) is the audio connection event anchor point of the mic1 audio link, and mic2(ap) is the audio connection event anchor point of the mic2 audio link.
[0075] Similarly, the anchor points when establishing the first audio link between the second master device and the two mics (mic3, mic4) are:
[0076] mic3(ap)=SyncACL(ap)
[0077] mic4(ap)=SyncACL(ap)+10ms
[0078] Among them, SyncACL(ap) is the synchronization connection event anchor point of the information synchronization link, mic3(ap) is the audio connection event anchor point of the mic3 audio link, and mic4(ap) is the audio connection event anchor point of the mic4 audio link.
[0079] Therefore, in this embodiment, after establishing an information synchronization link between the two main devices, the audio connection event anchor points corresponding to the first audio link and the second audio link can be calculated based on the synchronization connection event anchor point of the information synchronization link. Through multiple audio connection event anchor points, the link timing synchronization of the first audio link and the second audio link is achieved, avoiding the overlap of the audio data receiving and sending processes of the two main devices and eliminating the interference between adjacent channels during the audio data receiving and sending process.
[0080] In one embodiment, after the above S20, "synchronizing the first audio link corresponding to the first master device with the second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval," the following may also be included:
[0081] S30, synchronously sharing a preset initial available channel between the first master device and the second master device;
[0082] S40: Acquire a target available channel of the first audio link and a target available channel of the second audio link according to the least significant bit count value of the connection event count and a parity sequence switching point corresponding to the channel sequence with different parities.
[0083] It should be noted that, in this embodiment, after the first master device and the second master device establish the SyncACL link, the first master device can periodically (for example, 2s) scan the background channel, wherein the background channel in this embodiment can be a wireless channel used for communication between the master and slave devices. On this basis, a channel index sequence containing at least 10 available channels (channels without strong interference, i.e., the initial available channels in this embodiment) can be calculated from the above-mentioned background channel according to the anti-interference algorithm.
[0084] On this basis, the above-mentioned initial available channels can be synchronously shared between the first master device and the second master device through the above-mentioned information synchronization link, so that the first master device and the second master device can obtain a set of identical channel index sequences of the initial available channels through the information synchronization link.
[0085] Furthermore, the target available channel of the first audio link and the target available channel of the second audio link may be acquired according to the channel sequence index of the initial available channel and the information synchronization link.
[0086] It is worth noting that in order to fully utilize all available channel resources and ensure that channels do not conflict at the same time, in this embodiment, the target available channels used by the two master devices at the same time sequence are different.
[0087] It is worth noting that in this embodiment, when the available channels of the first master device are updated, the channel sequence of the updated available channels can be indexed to the second master device through the information synchronization link according to the LL_CHANNEL_STATUS_IND command (it can be understood that this command is used to describe the status of the channel in Bluetooth communication, such as whether the channel is available or unavailable, etc.). In this way, the two master devices can realize real-time sharing of the available channel sequence.
[0088] In the above S40, "acquiring a target available channel for the first audio link and a target available channel for the second audio link according to the channel sequence index of the initial available channel and the information synchronization link" may include:
[0089] S401, dividing the preset initial available channels into channel sequences with different parities according to the channel sequence indexes of the initial available channels;
[0090] S402, obtaining a connection event count corresponding to the information synchronization link;
[0091] S403: Acquire a target available channel of the first audio link and a target available channel of the second audio link according to the least significant bit count value of the connection event count and a parity sequence switching point corresponding to the channel sequence with different parities.
[0092] It should be noted that, in this embodiment, according to the above description, in order to avoid the two master devices using the same RF channel at the same timing, which causes data transmission and reception to interfere with each other, the first master device and the second master device cannot directly use the above-mentioned initial available channel. Therefore, in order to make full use of all available channel resources and ensure that the channels do not conflict at the same time, this embodiment can realize dynamic switching of channel sequences based on the original BLE frequency hopping algorithm, and divide the available channels into two sub-sequences, even sequence and odd sequence, according to the channel sequence index of the available channels. The mic links corresponding to the two master devices will dynamically switch the odd and even sequences during the data transmission process, so that all available channel resources can be fully utilized and the channels can be guaranteed to be mutually exclusive at the same time.
[0093] Specifically, for example, if the initial available channels are as shown in FIG8-1, then the even channel sequence and the odd channel sequence are as shown in FIG8-2 and FIG8-3 respectively.
[0094] Furthermore, when the mic link connection is established, the master device may send a CONNECT_IND data packet to the mic according to BLE SPC (BLE Security Manager Protocol Control, one of the protocols responsible for handling BLE security management).
[0095] Among them, the data packet contains available channel information. The format of part of the link layer data LLDatad in the CONNECT_IND packet data is shown in Figure 9. Chm (Connection Hop Master) represents the connection frequency hopping master device in Bluetooth communication, which is used to specify the frequency hopping mode of the connection. Among them, Chm contains 40 bits of data, of which the lower 37 bits are the available channel status (transmitting information about the available channel sequence), and the upper 3 bits are not used. The highest bit can be defined as the initial channel sequence selection bit. Setting this bit to 0 indicates that the even channel sequence is used after the mic link is connected, and setting it to 1 indicates that the odd channel sequence is used after the mic link is connected.
[0096] In this embodiment, when the first master device is connected to the mic link, the value of this bit can be the value of the lowest bit of the connection event count value of the information synchronization link. When the second master device is connected to the mic link, the value of this bit can be the inverse of the value of the lowest bit of the connection event count value of the information synchronization link. Since the synchronization connection event interval of the information synchronization link is 5 times the audio connection event interval of the mic link, after the mic link is connected, the frequency is switched alternately with a period of 5*CE(interval). This ensures that the odd-even sequence switching point is aligned with the synchronization connection event anchor point of the information synchronization link, and that when the lowest bit of the connection event count value is 0, the first master device corresponds to the even channel sequence, and the second master device corresponds to the odd channel sequence. It also satisfies that when the lowest bit of the connection event count value is 1, the first master device corresponds to the odd sequence, and the second master device corresponds to the even sequence.
[0097] The master device can send the data packet after the above configuration is completed to the corresponding mic through the LL_CHANNEL_STATUS_IND command. As shown in Figure 10, the mic can calculate the corresponding even channel sequence and odd channel sequence (i.e., the target available channel in this embodiment) according to the initial channel sequence selection bit in the data packet, and alternately switch the odd and even available channel sequences according to the odd and even sequence switching point within the range of the connection event count value.
[0098] It is worth noting that in this embodiment, when the master device updates the available channel sequence according to the anti-interference algorithm, the two master devices of the information synchronization link will use the new channel sequence at the same time within the specified connection event count value. Similarly, the two master devices will update the channel sequence index of the updated available channel to the mic end through the LL_CHANNEL_STATUS_IND command within the range of the connection event count value. The mic recalculates the corresponding even channel sequence and odd channel sequence, and alternately switches the odd and even available channel sequences according to the corresponding odd and even sequence switching points within the range of the connection event count value.
[0099] In another embodiment, in the above S40, "acquiring a target available channel for the first audio link and a target available channel for the second audio link according to the channel sequence index of the initial available channel and the information synchronization link" may include:
[0100] S404, starting a radio frequency counter according to the first synchronization connection event anchor point of the information synchronization link;
[0101] S405, shifting the initial available channel sequence multiple times according to the count value of the radio frequency counter and the number of the initial available channels;
[0102] S406: Calculate, based on the number of channels and the count value of the RF counter, a target available channel in the shifted initial available channel sequence corresponding to the first audio link, and a target available channel in the shifted initial available channel sequence corresponding to the second audio link.
[0103] It should be noted that in this embodiment, in addition to the above-mentioned embodiment in which the target channel can be selected by odd-even channel division, the target available channel can also be determined from the initial available channels by a self-incrementing channel selection algorithm: if the number of channels of the initial available channel is n (n>=10), the channel sequence index of the mic link CE is RF_index (that is, the channel sequence index of the target available channel in this embodiment), the channel corresponding to the RF_index sequence of the available channel sequence is the channel used by the current CE, and the channel sequence index RF_index of the target available channel = (CE(counter)%n), where CE(counter) is the CE(counter) of the mic link, and RF_index is the channel sequence index used by the MIC link CE.
[0104] It is worth noting that after the information synchronization link is established, the two master devices start a radio frequency counter RF (counter) at the first audio connection event anchor point. The period of this radio frequency counter is consistent with the connection event interval of the mic link. However, since the above radio frequency counter is synchronized in timing, that is, the value is the same at the same time, the initial channels obtained by each mic at the same time are mutually exclusive.
[0105] Therefore, in this embodiment, in order to allow the mic link to be used starting from the RFx_micy (x is the main device, y is the mic index) channel after it is established, the initial available channel sequence q shared by the information synchronization link can be cyclically shifted left by RFx_micy to obtain a new channel sequence q', and the target available channel is selected based on the new channel sequence q', so as to ensure that the channels of each mic link at the same time sequence do not conflict.
[0106] The specific calculation method of the above RFx_micy can be:
[0107] RF channel between the first master device and mic1: RFa_mic1=((RF(counter)%n)+0
[0108] RF channel between the first master device and mic2: RFa_mic2=((RF(counter)%n)+2
[0109] RF channel between the second master device and mic3: RFb_mic3 = ((RF(counter)%n)+5
[0110] The RF channel between the second master device and mic4 is: RFb_mic4=((RF(counter)%n)+7.
[0111] Specifically, for example, when RF(counter) = 100, the initial available channels at this time are shown in Figure 11. Then, RF(counter) is 100 and the number of channels of the initial available channels is 10. The initial available channels are shifted left by 0, 2, 5 and 7 bits respectively, and the available channel sequence between the first master device and mic1 shown in Figure 12-1, the available channel sequence between the first master device and mic2 shown in Figure 12-2, the available channel sequence between the second master device and mic3 shown in Figure 12-3, and the available channel sequence between the second master device and mic4 shown in Figure 12-4 are obtained.
[0112] Specifically, in the above S406, "calculating the target available channel corresponding to the first audio link and the target available channel corresponding to the second audio link according to the number of channels and the count value of the RF counter" may include:
[0113] S4061: Obtain a first connection event count value of the first slave device in the first audio link, a second connection event count value of the second slave device in the first audio link, a third connection event count value of the first slave device in the second audio link, and a fourth connection event count value of the second slave device in the second audio link, corresponding to the count value of the radio frequency counter;
[0114] S4062: Calculate, based on the first connection event count value and the number of channels, a target available channel in the shifted initial available channel sequence corresponding to the first slave device in the first audio link;
[0115] S4063: Calculate, according to the second connection event count value and the number of channels, a target available channel in the shifted initial available channel sequence corresponding to the second slave device in the first audio link;
[0116] S4064: Calculate, based on the third connection event count value and the number of channels, a target available channel in the shifted initial available channel sequence corresponding to the first slave device in the second audio link;
[0117] S4065: Calculate a target available channel in the shifted initial available channel sequence corresponding to the second slave device in the second audio link according to the fourth connection event count value and the number of channels.
[0118] In this embodiment, according to the above description, the channel sequence index RF_index of the target available channel=(CE(counter)%n).
[0119] As shown in FIG13 , when the mic link establishes a connection, the synchronization event anchor point of the information synchronization link is aligned, and the CE (counter) difference of each mic is an integer multiple of 5.
[0120] On this basis, the terminal device can first obtain the first connection event count value of mic1, the second connection event count value of mic2, the third connection event count value of mic3, and the fourth connection event count value of mic4 corresponding to the count value of the RF counter, and substitute the above multiple connection event count values into RF_index = (CE(counter)%n), and the channel sequence index of the target available channel of mic1, the channel sequence index of the target available channel of mic2, the channel sequence index of the target available channel of mic3, and the channel sequence index of the target available channel of mic4 can be calculated.
[0121] Specifically, for example, as shown in FIG13 , according to the above description, since the period of the RF counter RF(counter) is consistent with the CE(interval) of the mic link, when RF(counter)=100, there is only communication between the first master device and mic1 and communication between the second master device and mic3; when RF(counter)=101, there is only communication between the first master device and mic2 and communication between the second master device and mic4. At this time, as shown in FIG13 , if when RF(counter)=100, the first connection event count value of mic1 is 185 and the third connection event count value of mic3 is 95, and when RF(counter)=101, the second connection event count value of mic2 is 85 and the fourth connection event count value of mic4 is 0, then it can be calculated that the channel sequence index of the target available channel of mic1, the channel sequence index of the target available channel of mic2, the channel sequence index of the target available channel of mic3, and the channel sequence index of the target available channel of mic4 are all 5, and correspondingly, the available channels corresponding to the channel sequence index 5 are the target available channels. For example, when RF(counter) = 100, since there is only communication between the first master device and mic1 and between the second master device and mic3, as shown in Figures 12-1 and 12-3, the target available channels corresponding to channel sequence index 5 are channels 21 and 2, respectively. Similarly, when RF(counter) = 101, since there is only communication between the first master device and mic2 and between the second master device and mic4, as shown in Figures 12-1 and 12-3, the target available channels corresponding to channel sequence index 5 are channels 30 and 15, respectively.
[0122] Therefore, in this embodiment, the above-mentioned odd-even channel sequence switching or channel cyclic movement can be used to ensure that the available channels at the same timing do not intersect when the two master devices communicate with the mic slave device, thereby avoiding interference with audio data transmission and reception caused by using the same channel at the same timing.
[0123] This embodiment further provides a link synchronization device, which can be integrated into a terminal device. For example, as shown in FIG14 , the link synchronization device can include:
[0124] Establishing module 1001, configured to establish an information synchronization link between a first master device and a second master device in response to a device connection event, and obtain a synchronization connection event anchor point and a synchronization connection event interval of the information synchronization link;
[0125] A synchronization module 1002 is configured to synchronize the first audio link corresponding to the first master device with the second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval;
[0126] The first audio link is an audio link between the first master device and a plurality of correspondingly matched target slave devices, and the second audio link is an audio link between the second master device and a plurality of correspondingly matched target slave devices.
[0127] The target slave device includes a first slave device and a second slave device, and the synchronization module 1002 includes:
[0128] a first calculation unit, configured to obtain an audio connection event interval corresponding to the synchronization connection event interval, and calculate an anchor point offset according to the audio connection event interval;
[0129] a second calculating unit, configured to calculate, according to the anchor point offset, an audio connection event anchor point of a first audio link corresponding to the first master device and an audio connection event anchor point of a second audio link corresponding to the second master device;
[0130] The synchronization unit is configured to synchronize the first audio link with the second audio link in link timing according to each of the audio connection event anchor points.
[0131] Optionally, the target slave device includes a first slave device and a second slave device, and the second computing unit includes:
[0132] a first setting subunit, configured to set the synchronization connection event anchor point to a first audio connection event anchor point of an audio link between the first master device and a first slave device corresponding to the first master device, and offset the first audio connection event anchor point by the anchor point offset to obtain a second audio connection event anchor point of an audio link between the first master device and a second slave device corresponding to the first master device; and
[0133] The second setting sub-unit is used to set the synchronous connection event anchor point to the third audio connection event anchor point of the audio link between the second master device and the first slave device corresponding to the second master device, and offset the third audio connection event anchor point by the anchor point offset to obtain the fourth audio connection event anchor point of the audio link between the second master device and the second slave device corresponding to the second master device.
[0134] Optionally, the link synchronization device in the present application further includes:
[0135] a sharing module, configured to synchronously share a preset initial available channel between the first master device and the second master device;
[0136] An acquisition module is used to acquire a target available channel of the first audio link and a target available channel of the second audio link based on the channel sequence index of the initial available channel and the information synchronization link, wherein the target available channel of the first audio link and the target available channel of the second audio link are different channels.
[0137] Optionally, the acquisition module includes:
[0138] a dividing unit, configured to divide the preset initial available channels into channel sequences with different parities according to the channel sequence indexes of the initial available channels;
[0139] A first acquiring unit, configured to acquire a connection event count corresponding to the information synchronization link;
[0140] The second acquiring unit is configured to acquire a target available channel of the first audio link and a target available channel of the second audio link according to the least significant bit count value of the connection event count and a parity sequence switching point corresponding to the channel sequence with different parities.
[0141] Optionally, the acquisition module includes:
[0142] a starting unit, configured to start a radio frequency counter according to a first synchronization connection event anchor point of the information synchronization link;
[0143] a shifting unit, configured to shift the initial available channel sequence multiple times according to a count value of the radio frequency counter and the number of channels of the initial available channels;
[0144] A third calculation unit is configured to calculate, based on the number of channels and the count value of the RF counter, a target available channel in the initial available channel sequence after the shift corresponding to the first audio link, and a target available channel in the initial available channel sequence after the shift corresponding to the second audio link. Optionally, the third calculation unit includes:
[0145] an acquiring subunit, configured to acquire a first connection event count value of the first slave device in the first audio link, a second connection event count value of the second slave device in the first audio link, a third connection event count value of the first slave device in the second audio link, and a fourth connection event count value of the second slave device in the second audio link, corresponding to the count value of the RF counter;
[0146] a first calculating subunit, configured to calculate, according to the first connection event count value and the number of channels, a target available channel in the shifted initial available channel sequence corresponding to the first slave device in the first audio link;
[0147] a second calculating subunit, configured to calculate, according to the second connection event count value and the number of channels, a target available channel in the shifted initial available channel sequence corresponding to the second slave device in the first audio link;
[0148] a third calculating subunit, configured to calculate, according to the third connection event count value and the number of channels, a target available channel in the shifted initial available channel sequence corresponding to the first slave device in the second audio link;
[0149] The fourth calculation subunit is configured to calculate a target available channel in the shifted initial available channel sequence corresponding to the second slave device in the second audio link according to the fourth connection event count value and the number of channels.
[0150] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0151] Accordingly, an embodiment of the present application further provides an electronic device, as shown in Figure 15, which is a schematic diagram of the structure of the electronic device provided in an embodiment of the present application. The electronic device 1100 includes a processor 1101 having one or more processing cores, a memory 1102 having one or more computer-readable storage media, and a computer program stored in the memory 1102 and executable on the processor. The processor 1101 is electrically connected to the memory 1102. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0152] The processor 1101 is the control center of the electronic device 1100. It connects the various parts of the entire electronic device 1100 using various interfaces and lines. By running or loading software programs and / or units stored in the memory 1102 and calling data stored in the memory 1102, it executes various functions of the electronic device 1100 and processes data, thereby monitoring the entire electronic device 1100. The processor 1101 can be a processor CPU and a network processor (NP), etc., and can implement or execute the various methods, steps, and logic blocks disclosed in the embodiments of this application.
[0153] In the embodiment of the present application, the processor 1101 in the electronic device 1100 loads instructions corresponding to one or more application processes into the memory 1102 according to the following steps, and the processor 1101 runs the application stored in the memory 1102 to implement various functions, such as:
[0154] In response to a device connection event, establishing an information synchronization link between the first master device and the second master device, and obtaining a synchronization connection event anchor point and a synchronization connection event interval of the information synchronization link;
[0155] performing link timing synchronization on a first audio link corresponding to the first master device and a second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval;
[0156] The first audio link is an audio link between the first master device and a plurality of correspondingly matched target slave devices, and the second audio link is an audio link between the second master device and a plurality of correspondingly matched target slave devices.
[0157] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0158] Optionally, as shown in FIG15 , the electronic device 1100 further includes: a radio frequency circuit 1103, an audio circuit 1104, an input unit 1105, and a power supply 1106. The processor 1101 is electrically connected to the radio frequency circuit 1103, the audio circuit 1104, the input unit 1105, and the power supply 1106, respectively. Those skilled in the art will appreciate that the electronic device structure shown in FIG15 does not limit the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0159] The radio frequency circuit 1103 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals with the network device or other electronic devices.
[0160] The audio circuit 1104 can be used to provide an audio interface between the user and the electronic device through a speaker and microphone. The audio circuit 1104 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 1104 and converted into audio data. The audio data is then output to the processor 1101 for processing, and then sent to another electronic device through the radio frequency circuit 1103, or the audio data is output to the memory 1102 for further processing. The audio circuit 1104 may also include an earphone jack to provide communication between external headphones and the electronic device.
[0161] The input unit 1105 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and generate keyboard, mouse, joystick, optical, or trackball signal input related to user settings and function control.
[0162] Power supply 1106 is used to supply power to the various components of electronic device 1100. Optionally, power supply 1106 can be logically connected to processor 1101 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 1106 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0163] Although not shown in FIG. 15 , the electronic device 1100 may further include a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0164] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0165] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0166] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs. The computer programs can be loaded by a processor to execute any one of the link synchronization methods provided in the embodiments of the present application. The computer programs can execute the following steps of the link synchronization method:
[0167] In response to a device connection event, establishing an information synchronization link between the first master device and the second master device, and obtaining a synchronization connection event anchor point and a synchronization connection event interval of the information synchronization link;
[0168] performing link timing synchronization on a first audio link corresponding to the first master device and a second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval;
[0169] The first audio link is an audio link between the first master device and a plurality of correspondingly matched target slave devices, and the second audio link is an audio link between the second master device and a plurality of correspondingly matched target slave devices.
[0170] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0171] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0172] Since the computer program stored in the computer-readable storage medium can execute any link synchronization method provided in the embodiments of the present application, the beneficial effects that can be achieved by any link synchronization method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0173] In the above-described link synchronization device, computer-readable storage medium, and electronic device, the descriptions of each embodiment have different emphases. For portions not described in detail in one embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the link synchronization device, computer-readable storage medium, computer program product, electronic device, and their corresponding units described above can be referred to in the description of the link synchronization method in the above embodiments, and the details will not be repeated here.
[0174] The above is a detailed introduction to a link synchronization method, system, electronic device, and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core ideas. At the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A link synchronization method, characterized in that, The described link synchronization method is applied to an audio transmission system, which includes: a first master device, a second master device, multiple target slave devices matched with the first master device, and multiple target slave devices matched with the second master device; The method includes: Responding to a device connection event, establishing an information synchronization link between the first master device and the second master device, and obtaining the synchronization connection event anchor point and the synchronization connection event interval of the information synchronization link; and According to the synchronization connection event anchor point and the synchronization connection event interval, performing link timing synchronization on the first audio link corresponding to the first master device and the second audio link corresponding to the second master device; Wherein, the first audio link is the audio link between the first master device and multiple target slave devices matched therewith, and the second audio link is the audio link between the second master device and multiple target slave devices matched therewith.
2. The link synchronization method according to claim 1, wherein The performing link timing synchronization on the first audio link corresponding to the first master device and the second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval includes: Obtaining the audio connection event interval corresponding to the synchronization connection event interval, and calculating the anchor point offset according to the audio connection event interval; According to the anchor point offset, calculating the audio connection event anchor point of the first audio link corresponding to the first master device and the audio connection event anchor point of the second audio link corresponding to the second master device; and, Performing link timing synchronization on the first audio link and the second audio link according to each audio connection event anchor point.
3. The link synchronization method according to claim 2, characterized in that, The target slave device includes a first slave device and a second slave device. The calculating the audio connection event anchor point of the first audio link corresponding to the first master device and the audio connection event anchor point of the second audio link corresponding to the second master device according to the anchor point offset includes: Setting the synchronization connection event anchor point as the first audio connection event anchor point of the audio link between the first master device and the first slave device corresponding to the first master device, and offsetting the first audio connection event anchor point by the anchor point offset to obtain the second audio connection event anchor point of the audio link between the first master device and the second slave device corresponding to the first master device; and, Setting the synchronization connection event anchor point as the third audio connection event anchor point of the audio link between the second master device and the first slave device corresponding to the second master device, and offsetting the third audio connection event anchor point by the anchor point offset to obtain the fourth audio connection event anchor point of the audio link between the second master device and the second slave device corresponding to the second master device.
4. The link synchronization method according to claim 1, characterized in that After performing link timing synchronization on the first audio link corresponding to the first master device and the second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval, it includes: Synchronously sharing a preset initial available channel between the first master device and the second master device; Obtain the target available channels of the first audio link and the target available channels of the second audio link according to the channel sequence index of the initial available channels and the information synchronization link, where the target available channels of the first audio link and the target available channels of the second audio link are different channels.
5. The link synchronization method according to claim 4, wherein The obtaining of the target available channels of the first audio link and the target available channels of the second audio link according to the channel sequence index of the initial available channels and the information synchronization link includes: Divide the preset initial available channels into channel sequences with different parities according to the channel sequence index of the initial available channels; Obtain the connection event count corresponding to the information synchronization link; Obtain the target available channels of the first audio link and the target available channels of the second audio link according to the least significant bit count value of the connection event count and the parity sequence switching points corresponding to the channel sequences with different parities.
6. The link synchronization method according to claim 4, characterized in that, The obtaining of the target available channels of the first audio link and the target available channels of the second audio link according to the channel sequence index of the initial available channels and the information synchronization link includes: Start a radio frequency counter according to the first synchronization connection event anchor point of the information synchronization link; Perform multiple translations on the initial available channel sequence according to the count value of the radio frequency counter and the number of channels of the initial available channels; Calculate the target available channels in the translated initial available channel sequence corresponding to the first audio link and the target available channels in the translated initial available channel sequence corresponding to the second audio link according to the number of channels and the count value of the radio frequency counter.
7. The link synchronization method according to claim 6, characterized in that, The calculating of the target available channels in the translated initial available channel sequence corresponding to the first audio link and the target available channels in the translated initial available channel sequence corresponding to the second audio link according to the number of channels and the count value of the radio frequency counter includes: Obtain the first connection event count value of the first slave device in the first audio link, the second connection event count value of the second slave device in the first audio link, the third connection event count value of the first slave device in the second audio link, and the fourth connection event count value of the second slave device in the second audio link corresponding to the count value of the radio frequency counter; Calculate the target available channels in the translated initial available channel sequence corresponding to the first slave device in the first audio link according to the first connection event count value and the number of channels; Calculate the target available channels in the translated initial available channel sequence corresponding to the second slave device in the first audio link according to the second connection event count value and the number of channels; Calculate the target available channels in the translated initial available channel sequence corresponding to the first slave device in the second audio link according to the third connection event count value and the number of channels; Calculate a target available channel in a translated initial available channel sequence corresponding to a second slave device in the second audio link according to the fourth connection event count value and the number of channels.
8. A link synchronization device, characterized in that, Including: A establishing module, configured to respond to a device connection event, establish an information synchronization link between a first master device and a second master device, and obtain a synchronization connection event anchor point and a synchronization connection event interval of the information synchronization link; A synchronization module, configured to perform link timing synchronization on a first audio link corresponding to the first master device and a second audio link corresponding to the second master device according to the synchronization connection event anchor point and the synchronization connection event interval; Wherein, the first audio link is an audio link between the first master device and a plurality of corresponding target slave devices, and the second audio link is an audio link between the second master device and a plurality of corresponding target slave devices.
9. An electronic device, characterized in that, It includes a processor and a memory. Wherein, the memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the steps of the link synchronization method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It includes a computer program, and when the computer program runs on an electronic device, the computer program is used to cause the electronic device to execute the steps of the link synchronization method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Bluetooth communication method and device, equipment and storage medium
CN116996857A
Data transmission method and device, storage medium, Bluetooth equipment and system
CN117412272A
Synchronization of Bluetooth low energy transmissions across connected isochronous groups
US11075968B1
Audio data receiving method, audio data sending method, audio receiving apparatus, and audio sending apparatus
WO2022222648A1