Dual-mode bluetooth communication switching management method, system and device for audio transmission
Patent Information
- Application Number
- CN202511250180.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2045-09-03
AI Technical Summary
[0003]第一方面,本申请的实施例提供一种用于音频传输的双模蓝牙通信切换管理方法,解决现有双模蓝牙模块的功能单一,无法实现更多场景下的功能的问题
[0005]By employing the above method, the dual-mode Bluetooth switching management method of this application separates the audio data transmitted via Bluetooth into primary audio data and secondary audio data. Depending on the usage scenario, the primary audio data and secondary audio data are transmitted individually or in combination, allowing the receiving end to select different audio and quality according to the actual usage scenario. This enables the selection of high-quality or low-quality audio playback, or original call tone or noise-reduced call tone, from the Bluetooth path, thus expanding the functionality of the low-power Bluetooth module and fulfilling the actual needs of users.
Smart Images

Figure CN121218141B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Bluetooth communication control, and in particular to a dual-mode Bluetooth communication switching management method, system, and device for audio transmission. Background Technology
[0002] Bluetooth is a common wireless transmission method between electronic devices. Existing Bluetooth modes are divided into two types: classic Bluetooth and Bluetooth Low Energy (BLE). Current dual-mode Bluetooth communication typically uses device type identification to select the appropriate Bluetooth mode for transmission during communication management. BLE is used for identification and connection, and after connection is established, data transmission is performed via classic Bluetooth. However, task segmentation and management are not possible during communication, resulting in limited functionality for dual-mode Bluetooth modules and an inability to support a wider range of scenarios. Summary of the Invention
[0003] In a first aspect, embodiments of this application provide a dual-mode Bluetooth communication switching management method for audio transmission, which solves the problem that existing dual-mode Bluetooth modules have limited functionality and cannot achieve functions in more scenarios.
[0004] The method includes: Establish a dual-mode Bluetooth connection between the transmitter and receiver, wherein the dual-mode Bluetooth connection includes a classic Bluetooth connection and a low-power Bluetooth connection; The sending end receives or collects audio and generates audio data. The audio data is parsed and separated into first audio data and second audio data; Identify the data source type of the audio data, which includes decoding data sources and call data sources; Depending on the data source type, the first audio data can be sent to the receiving end via a classic Bluetooth connection, or the first audio data can be sent to the receiving end via a classic Bluetooth connection and the second audio data can be sent to the receiving end via a Bluetooth Low Energy connection. When the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection at the same time, the receiving end synchronizes the received first audio data and second audio data with a clock, and merges the synchronized first audio data and second audio data into third audio data. The receiving end executes the playback of the third audio data.
[0005] By employing the above method, the dual-mode Bluetooth switching management method of this application separates the audio data transmitted via Bluetooth into primary audio data and secondary audio data. Depending on the usage scenario, the primary audio data and secondary audio data are transmitted individually or in combination, allowing the receiving end to select different audio and quality according to the actual usage scenario. This enables the selection of high-quality or low-quality audio playback, or original call tone or noise-reduced call tone, from the Bluetooth path, thus expanding the functionality of the low-power Bluetooth module and fulfilling the actual needs of users.
[0006] In one possible implementation, the sending end receives or acquires audio, and the generated audio data includes, Receive audio data transmitted from external data sources through the data interface; Alternatively, audio signals can be acquired using a data acquisition device and converted into audio data.
[0007] In one possible implementation, parsing the audio data and separating it into first audio data and second audio data further includes: The audio data is decoded to obtain the bitstream encoding of the audio data; The frequency domain coefficients of the audio are obtained based on the bitstream encoding. The audio data is separated into first audio data and second audio data according to the high, medium and low frequencies corresponding to the frequency domain coefficients. The first audio data includes audio data with a mid-frequency frequency coefficient, and the second audio data includes audio data or feature data with a high-frequency and / or low-frequency frequency coefficient.
[0008] In one possible implementation, identifying the data source type of the audio data, wherein the data source type includes decoding data sources and call data sources, further includes: The request information for calling the Bluetooth port is used to obtain the application currently occupying the Bluetooth connection for audio data transmission based on the request information; Identify the data source type of the audio data based on the application type.
[0009] In one possible implementation, the step of selecting to send the first audio data to the receiving end via a classic Bluetooth connection, or simultaneously sending the first audio data to the receiving end via a classic Bluetooth connection and the second audio data to the receiving end via a Bluetooth Low Energy connection, based on the data source type, is as follows: When the data source type is a call-type data source, the first audio data is sent to the receiving end via a classic Bluetooth connection; When the data source type is a decoding data source, the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection.
[0010] In one possible implementation, when the first audio data is simultaneously sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection, the receiving end performs clock synchronization on the received first and second audio data, and merges the synchronized first and second audio data into third audio data, further comprising: The first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection. The receiving end receives data packets of the first audio data and data packets of the second audio data, wherein the data packets include timestamps; The first audio data and the second audio data are time-aligned according to the timestamp; The first and second audio data, after being time-aligned, are merged to generate the third audio data.
[0011] In one possible implementation, sending the second audio data to the receiving end via a Bluetooth Low Energy connection further includes: Set a low-energy frequency domain coefficient threshold; Read the frequency domain coefficients encoded from the first audio data; Delete the portion of the frequency domain coefficients that are lower than the low-energy frequency domain coefficient threshold; The remaining parts are merged to generate simplified audio data, which is then used as the second audio data for low-power Bluetooth transmission.
[0012] In one possible implementation, when the second audio data includes feature data with frequency domain coefficients of high and / or low frequencies, The second audio data is processed at the transmitting end to calculate the short-time energy of the audio signal of the second audio data, and characteristic parameters are obtained based on the short-time energy. The feature parameters are compressed using adaptive differential pulse code modulation to obtain feature data; The feature data is sent to the receiving end, which reconstructs the feature data and generates narrow pulse audio at the corresponding time point through a pulse generator to simulate a low-frequency effect. Alternatively, a noise generator and filter can be used to synthesize virtual noise.
[0013] Secondly, embodiments of this application also provide a dual-mode Bluetooth communication switching management system, the system comprising: The transmitter and receiver each include a dual-mode Bluetooth communication module, which includes a classic Bluetooth unit and a low-power Bluetooth unit. The transmitting end includes a data interface module, a voice acquisition module, a first control module, and an audio parsing module. The data interface module receives audio data, and the voice acquisition module acquires audio signals and generates audio data from the first control module. The first control module parses the audio data and separates it into first audio data and second audio data; Identify the data source type of the audio data, which includes decoding data sources and call data sources; Depending on the data source type, the first audio data can be sent to the receiving end via a classic Bluetooth connection, or the first audio data can be sent to the receiving end via a classic Bluetooth connection and the second audio data can be sent to the receiving end via a Bluetooth Low Energy connection. The receiving end also includes an audio synchronization module. When the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection, the audio synchronization module performs clock synchronization on the received first audio data and second audio data, and merges the synchronized first audio data and second audio data into third audio data. The receiving end executes the playback of the third audio data.
[0014] Thirdly, embodiments of this application also provide an apparatus that includes the system described in the second aspect above. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating the overall process of the first embodiment of the present invention; Figure 2 This is a detailed flowchart of step S3 in the first embodiment of the present invention; Figure 3 This is a detailed flowchart of step S4 in the first embodiment of the present invention; Figure 4 This is a detailed flowchart of step S5 in the first embodiment of the present invention; Figure 5 This is a flowchart of step S6 in the first embodiment of the present invention; Figure 6 This is a flowchart of step S52 in the first embodiment of the present invention. Detailed Implementation
[0016] The following detailed description, in conjunction with specific embodiments and accompanying drawings, clarifies that the described embodiments are only a portion, not all, of the embodiments. All other embodiments obtained by those skilled in the art based on the following embodiments without inventive effort are also within the scope of protection of this invention.
[0017] It should be understood that if the controllers or control circuits involved in the embodiments are conventional control technologies or units for those skilled in the art, such as the control circuits of the controllers, they can be implemented by those skilled in the art using existing technologies.
[0018] The disclosure of the embodiments provides many different implementations or examples for different ways of implementing the invention. To simplify the disclosure of the invention, specific examples of components and arrangements are described in the embodiments. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or reference letters may be repeated in different examples in the embodiments; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various implementations and / or arrangements discussed.
[0019] To facilitate understanding of the problems to be solved and the background and principles of the technical solutions implemented in the embodiments of this application, the basic situation of existing multimode Bluetooth communication is first explained.
[0020] First, Classic Bluetooth is based on BR (Basic Rate) and EDR (Enhanced Data Rate), uses GFSK modulation, has a frequency hopping rate of 1600 times / second, and supports connection-oriented ACL links and synchronization-oriented SCO links. Bluetooth Low Energy (BLE), on the other hand, is based on the IEEE 802.15.1 standard, employs more efficient modulation methods (such as π / 4-DQPSK), has a higher frequency hopping rate (3200 times / second), and supports GATT (General Attribute Profile) and ATT (Attribute Protocol), making it more suitable for scenarios with low data volume and periodic transmissions. In terms of transmission rate, Classic Bluetooth BR and EDR have maximum rates of 1Mbps and 3Mbps respectively, while BLE has increased from 1Mbps in 4.0 to 2Mbps in 5.3 (2Mbps optional).
[0021] Due to the differences in the physical layer and link layer principles mentioned above, there is a power consumption difference between Bluetooth Classic and Bluetooth Low Energy (BLE). Power consumption is a core advantage of BLE. Typical power consumption for Bluetooth Classic is 5-100mA, while BLE consumes only a few microamps when idle, with an operating current of approximately 1-10mA. In terms of connection methods, Bluetooth Classic requires establishing a persistent connection (such as an ACL link), while BLE supports broadcast / scan modes, allowing devices to connect on demand and reducing standby power consumption. Regarding topology, Bluetooth Classic is mostly point-to-point (P2P) or piconet, while BLE supports various topologies such as star and mesh, making it suitable for interconnecting multiple devices.
[0022] Therefore, classic Bluetooth is mainly used in scenarios requiring high bandwidth, such as audio transmission (A2DP), file transmission (OBEX), and automotive Bluetooth (HFP / HSP). BLE, on the other hand, is suitable for low-power, low-data-volume scenarios, such as smartwatches (heart rate monitoring), sensors (temperature / humidity), IoT devices (smart light bulbs, door locks), and medical devices (blood glucose meters).
[0023] Existing mobile computing terminals, such as mobile phones, tablets, and laptops, often employ dual-mode Bluetooth modules that integrate both Bluetooth Classic and Bluetooth Low Energy (BLE) units to accommodate both. For example, a Bluetooth Classic module connects to Bluetooth headsets, speakers, and other Bluetooth playback devices to play audio, while a BLE unit handles command or information exchange, such as playback control and battery level feedback. However, Bluetooth Classic and BLE are not interoperable; due to their underlying physical and data link layer differences, they cannot directly transmit data.
[0024] In reality, in addition to simple command and information exchange, Bluetooth Low Energy also has the ability to transmit small amounts of data.
[0025] When playing audio and video, mobile phones and other terminals can connect via Bluetooth to send audio data to a Bluetooth playback device for playback. Similarly, audio signals acquired during phone calls and voice calls can be converted into audio data and sent to the Bluetooth device for playback. In these scenarios, due to varying playback quality requirements, the audio data is often pre-processed before transmission. For example, audio data typically has different file sizes depending on its sound quality. High-quality music has more sound details and a larger data volume compared to low-quality music. Taking network acquisition as an example, different files corresponding to different sound qualities are usually stored on the server. After downloading to the playback terminal, switching sound qualities often requires downloading the file again. Multiple versions of the same audio content need to be stored from the server to the terminal to accommodate this switching requirement, consuming more storage space. For example, during telephone or voice calls, in order to highlight the content of the call and reduce background noise interference, it is usually necessary to identify the background noise and remove it from the transmitted data to achieve noise reduction. To achieve noise reduction, a lot of costs are required, from the directionality of the microphone, the addition of microphones to pick up background noise, to the design of noise reduction algorithms. Different manufacturers achieve different results. In particular, noise reduction will also weaken the effect of the original voice. Users have no recourse when using it. When the original voice is weakened too much in some cases, the customer cannot adjust it by himself.
[0026] Based on the above problems and in combination with actual audio Bluetooth transmission scenarios, embodiments of the present invention provide a dual-mode Bluetooth communication switching management method. The overall design direction is to separate audio data into two paths for transmission according to sound conditions. One path is the main audio data, such as mainly human voices and musical instruments, or human voices during a call. The other path is auxiliary audio data, such as high and low frequency details of music, or background sounds during a call. The main audio data is transmitted as a larger data volume through the classic Bluetooth path, and the auxiliary audio data is transmitted as a smaller data volume through the low-power Bluetooth path. Then, depending on the situation, it is selected whether to merge and decode the audio for playback.
[0027] The first embodiment of the present invention provides a dual-mode Bluetooth communication switching management method for audio transmission, which solves the problem that existing dual-mode Bluetooth modules have limited functionality and cannot achieve functions in more scenarios. The method includes: S1. Establish a dual-mode Bluetooth connection between the transmitter and receiver, wherein the dual-mode Bluetooth connection includes a classic Bluetooth connection and a low-power Bluetooth connection; S2. The sending end receives or collects audio and generates audio data; S3. Parse the audio data and separate it into first audio data and second audio data; S4. Identify the data source type of the audio data, where the data source type includes decoding data sources and call data sources; S5. Select, based on the data source type, whether to send the first audio data to the receiving end via a classic Bluetooth connection, or to simultaneously send the first audio data to the receiving end via a classic Bluetooth connection and the second audio data to the receiving end via a low-power Bluetooth connection. S6. When the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection at the same time, the receiving end performs clock synchronization on the received first audio data and second audio data, and merges the synchronized first audio data and second audio data into third audio data. S7. The receiving end executes the playback of the third audio data.
[0028] In step S1, establishing a dual-mode Bluetooth connection between the sending and receiving ends involves establishing and maintaining a Bluetooth connection via Bluetooth Low Energy (BLE). BLE is sufficient to support pairing and maintaining connections between devices, and using BLE to establish and maintain the connection reduces power consumption. In step S2, the sending end receives or acquires audio and generates audio data, including... Receive audio data transmitted from external data sources through the data interface; Alternatively, audio signals can be acquired using a data acquisition device and converted into audio data.
[0029] The audio data received by the data interface is either a storable file or a transmittable data stream, which can be directly used as the processing object for subsequent steps. However, the data collected during real-time calls is electrical signal, so it needs to be converted into audio data for file storage or data stream transmission.
[0030] In step S3, parsing the audio data and separating it into first audio data and second audio data further includes: S31. Decode the audio data to obtain the bitstream encoding of the audio data; S32. Obtain the frequency domain coefficients of the audio based on the bitstream encoding; S33. Based on the high, medium and low frequencies corresponding to the frequency domain coefficients, the audio data is separated into first audio data and second audio data. The first audio data includes audio data with a mid-frequency frequency coefficient, and the second audio data includes audio data or feature data with a high-frequency and / or low-frequency frequency coefficient.
[0031] Since audio data is a file formed by compressing and encoding audio, to identify the parameters of an audio file, the audio data needs to be decoded first. The core of audio coding is to convert time-domain signals into frequency-domain coefficients through MDCT (Modified Discrete Cosine Transform). The index position (k value) of each frequency-domain coefficient is directly related to the actual frequency, which is the basis for frequency-domain coefficients to reflect high, medium and low frequencies.
[0032] When calculating the frequency of MDCT, for an MDCT block with length N (for example, N=1024 is commonly used for MP3, and N=1024 or 2048 is commonly used for AAC), the actual frequency corresponding to the k-th frequency-domain coefficient (0≤k<N / 2) is: Where: : sampling rate (e.g., 44.1kHz); k: index of the frequency-domain coefficient (starting from 0); N: MDCT block length (determines frequency resolution).
[0033] Obtain the index range division of high, medium and low frequencies; According to the perception characteristics of the human ear to frequency (low frequency: 0-300Hz, medium frequency: 300Hz-5kHz, high frequency: 5kHz-20kHz), combined with common sampling rates (such as 44.1kHz), the k value ranges corresponding to each frequency band can be calculated: Frequency range (Hz) k value range under 44.1kHz sampling rate (N=1024) Low frequency (LF) 0-300 0≤k<13 (300×1024 / 44100≈7, rounded in practice) Medium frequency (MF) 300-5000 7≤k<227 (5000×1024 / 44100≈116, rounded in practice) High frequency (HF) 5000-20000 116≤k<471 (20000×1024 / 44100≈465, rounded in practice) In actual calculation, the Nyquist frequency needs to be considered ( / 2=22050Hz), so the upper limit of the high frequency band is 22050Hz (corresponding to k=511, when N=1024).
[0034] The amplitude (energy) of the frequency-domain coefficient directly reflects the signal strength of the corresponding frequency band. The energy distribution characteristics of different frequency bands are jointly determined by the audio content itself and the psychoacoustic model during coding, where: Low-frequency band (0-300Hz): Concentrated energy and large amplitude. Low-frequency signals (such as bass and kick drum) have long time-domain waveform periods and concentrated energy. Therefore, in the frequency domain: the amplitude of low-frequency coefficients (small k values) is larger: for example, the fundamental frequency of a bass (100Hz) corresponds to k≈7, and the amplitude of its frequency domain coefficients is usually much higher than that of high-frequency coefficients. Concentrated energy distribution: the energy of the frequency domain coefficients in the low-frequency band is mainly concentrated near a few consecutive k values (such as the fundamental frequency of a bass and its harmonics), forming obvious "peaks".
[0035] Mid-frequency range (300Hz-5kHz): Highest energy, richest detail. The mid-frequency range is the most sensitive to most people's ears (such as the fundamental frequency of human voice and the tonic of most musical instruments). Therefore, in the frequency domain: the amplitude of the mid-frequency coefficient (mid-k value) is the highest: for example, the fundamental frequency of human voice (1kHz) corresponds to k≈46, and its frequency domain coefficient amplitude is usually the largest in the entire frequency band. Dense energy distribution: The mid-frequency range contains a large number of harmonics (such as the second and third harmonics of human voice), so the frequency domain coefficient has a high amplitude in a continuous range of k values, forming a "broad peak".
[0036] High-frequency band (5kHz-20kHz): Lower energy, dispersed details. High-frequency signals (such as cymbals, sibilants) have short time-domain waveform periods and dispersed energy. Therefore, in the frequency domain: the amplitude of high-frequency coefficients (large k values) is lower: for example, the fundamental frequency of a cymbal (8kHz) corresponds to k≈186, and the amplitude of its frequency domain coefficients is usually much lower than that of the mid-frequency coefficients. Sparse energy distribution: the energy in the high-frequency band is mainly distributed in a few k values (such as the tonic frequency of a cymbal and its overtones), and the amplitude difference of coefficients between adjacent k values is large (e.g., the amplitude of overtones may drop sharply).
[0037] Therefore, in audio playback and call noise reduction processing, the mid-frequency content should be preserved first, while other frequency bands can be used as optional elements for sound quality adjustment to determine whether they need to be transmitted. Thus, in this step, the first audio data includes audio data with mid-frequency coefficients, and the second audio data includes audio data or feature data with high-frequency and / or low-frequency coefficients.
[0038] In this embodiment, since the sound quality of general music signals is distinguished by the perception of sound, it mainly depends on whether low-frequency signals are preserved. When there are many low-frequency signals in a music genre, the transmission rate of Bluetooth Low Energy is often insufficient to meet the transmission requirements of such low-frequency audio data. In order to achieve the requirements of frequency division transmission and transmission rate, this embodiment also provides a processing method for converting low-frequency data into feature data, as follows: At the transmitting end, the second audio data is processed to calculate the short-time energy of the audio signal; pulse points exceeding a set threshold are detected on the time axis; the pulse timestamp and amplitude are quantized into integer values to form feature parameters, such as a timestamp accuracy of 1 ms and an amplitude resolution of 8 bits; for background sound, a Fast Fourier Transform (FFT) is performed on the high and low frequency signals to obtain the energy spectrum every 20 ms; the energy values of four predefined frequency bands (e.g., 0–200 Hz, 4–8 kHz, 8–12 kHz, 12–20 kHz) are calculated; the energy values are quantized into 12 bits to form feature parameters; the feature parameters are compressed using Adaptive Differential Pulse Code Modulation (ADPCM) to obtain feature data; the compressed data size is approximately 1–5 kbps, far lower than the actual effective throughput of BLE 5.0 (approximately 300 kbps).
[0039] During transmission, the sending and receiving ends establish two parallel links through a dual-mode Bluetooth module. The classic Bluetooth link uses the Advanced Audio Distribution Profile (A2DP) to transmit intermediate frequency (IF) audio signals, with a transmission rate of 256 kbps to 512 kbps (depending on the encoding method, such as SBC or AAC). The low-power Bluetooth link uses the Generic Attribute Profile (GATT) to set custom services and characteristics for transmitting low-frequency and background sound characteristic data. Each GATT packet has a payload of 20–244 bytes, and the transmission interval is 7.5–10 ms.
[0040] Then, the feature data is reconstructed at the receiving end. The dual-mode Bluetooth module at the earphone end receives data from both links. The intermediate frequency signal processing receives the intermediate frequency audio stream from the classic Bluetooth link; decodes it and converts it into an analog signal through a digital-to-analog converter (DAC); and outputs it to the speaker driver unit. Feature data processing receives feature data from the BLE link; low-frequency signal reconstruction: a narrow pulse audio at the corresponding time point is generated by a pulse generator to simulate the low-frequency effect; background sound signal reconstruction: virtual noise is synthesized using a noise generator and a filter, and its frequency band energy and amplitude are adjusted to restore the ambient background sound.
[0041] In step S4, identifying the data source type of the audio data, where the data source type includes decoding data sources and call data sources, further includes: S41. Call the request information of the Bluetooth port, and obtain the application currently occupying the Bluetooth connection for audio data transmission based on the request information; S42. Identify the data source type of the audio data based on the application type.
[0042] The data source type is used to determine the specific content of the second audio data, such as low-frequency sounds in music or background sounds during a call, and then accordingly sets the processing and execution of the audio data.
[0043] Accordingly, in step S5, the step of selecting, based on the data source type, to send the first audio data to the receiving end via a classic Bluetooth connection, or simultaneously sending the first audio data to the receiving end via a classic Bluetooth connection and sending the second audio data to the receiving end via a Bluetooth Low Energy connection, is as follows: S51. When the data source type is a call data source, the first audio data is sent to the receiving end via a classic Bluetooth connection; S52. When the data source type is a decoding data source, the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection.
[0044] In step S6, when the first audio data is simultaneously sent to the receiving end via a classic Bluetooth connection and the second audio data is simultaneously sent to the receiving end via a low-power Bluetooth connection, the receiving end performs clock synchronization on the received first and second audio data, and merges the synchronized first and second audio data into third audio data, further including: S61. The first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection; S62. The receiving end receives the data packet of the first audio data and the data packet of the second audio data, wherein the data packet includes a timestamp; S63. Perform time-series alignment of the first audio data and the second audio data according to the timestamp; S64. Merge the first audio data and the second audio data after time alignment to generate the third audio data.
[0045] Data sorting and alignment during Bluetooth audio playback can be summarized in the following steps: Sending end encapsulation: After the audio data is compressed and encoded, it is encapsulated into RTP packets (with sequence number and timestamp added), and then segmented into PDUs suitable for the link MTU by L2CAP; Transmission fragmentation: The L2CAP layer divides large RTP packets into multiple PDUs and adds segmentation markers; Receiver reassembly: The L2CAP layer reassembles the complete RTP packet based on the segmentation flag; Sequence number sorting: The receiving end detects packet loss / out-of-order packets by RTP sequence number, buffers and corrects them; Timestamp alignment: Adjust the local playback clock based on the RTP timestamp to ensure that data is played at the correct time; Mechanism safeguards: FEC corrects minor packet loss, frequency hopping synchronization ensures fragmented reception, and delay compensation optimizes synchronization.
[0046] These steps together ensure the continuity, clarity, and synchronization of Bluetooth audio playback.
[0047] Through the above method, the dual-mode Bluetooth switching management method of the first embodiment separates the audio data transmitted via Bluetooth into main audio data and auxiliary audio data. Depending on the usage scenario, the main audio data and auxiliary audio data are transmitted individually or in combination, so that the receiving end can select different audio and quality according to the actual usage scenario. This realizes the selection of high and low quality audio playback or original call tone or noise-reduced call tone from the Bluetooth path, expanding the function of the low power Bluetooth module and realizing the actual needs of users.
[0048] Because Bluetooth Low Energy (BLE) has a low transmission rate, even if the high-frequency and low-frequency components of the audio data are separated and transmitted via BLE, the transmission rate may still exceed the BLE transmission rate limit. This results in a large time difference between the arrival times of data in the first and second audio data that are in the same sequence, making timely synchronization impossible. To solve this problem, the second embodiment further proposes a method that can reduce the amount of data transmitted via BLE, based on the first embodiment. In the second embodiment, step S52, which involves sending the second audio data to the receiving end via BLE, further includes: S521. Set the threshold for low-energy frequency domain coefficients; S522. Read the frequency domain coefficients of the first audio data encoding; S523. Delete the portion of the frequency domain coefficients that are lower than the low-energy frequency domain coefficient threshold; S524. Merge the remaining parts to generate simplified audio data, and use the simplified audio data as the second audio data for low-power Bluetooth transmission.
[0049] In an audio stream, the silent portions (i.e., quiet parts) are not completely blank in the audio file's encoding; they exist as specific data. In analog audio, silence is a continuous period of time with zero sound wave amplitude (e.g., 0.5 seconds of silence). When converted to digital PCM, the amplitude value of each sample point is quantized to an integer (e.g., the range of 16-bit PCM is -32768 to +32767). The amplitude value of each sample point in a silent portion is 0 (or the minimum quantization value close to 0). Silence is a zero-amplitude signal in the time domain and, in the frequency domain, all frequency components have zero (or extremely low) energy. Compression encoding (such as the MDCT transform in MP3) converts silence into frequency domain coefficients, but these coefficients have extremely low energy (close to zero).
[0050] Therefore, the frequency domain coefficients can also be used to determine which data segments in the second audio data do not have sound characteristics. These data segments still occupy transmission space. Therefore, deleting these data segments before transmitting the second audio data can significantly reduce the amount of data that needs to be transmitted.
[0051] The third embodiment of this application also provides a dual-mode Bluetooth communication switching management system, the system comprising: The transmitter and receiver each include a dual-mode Bluetooth communication module, which includes a classic Bluetooth unit and a low-power Bluetooth unit. The transmitting end includes a data interface module, a voice acquisition module, a first control module, and an audio parsing module. The data interface module receives audio data, and the voice acquisition module acquires audio signals and generates audio data from the first control module. The first control module parses the audio data and separates it into first audio data and second audio data; Identify the data source type of the audio data, which includes decoding data sources and call data sources; Depending on the data source type, the first audio data can be sent to the receiving end via a classic Bluetooth connection, or the first audio data can be sent to the receiving end via a classic Bluetooth connection and the second audio data can be sent to the receiving end via a Bluetooth Low Energy connection. The receiving end also includes an audio synchronization module. When the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection, the audio synchronization module performs clock synchronization on the received first audio data and second audio data, and merges the synchronized first audio data and second audio data into third audio data. The receiving end executes the playback of the third audio data.
[0052] The above description is merely a preferred embodiment of the present application and does not limit the scope of disclosure of the embodiments of the present application. Any equivalent structural or procedural transformations made using the description and drawings of the embodiments of the present application, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection supported by the embodiments of the present application.
Claims
1. A dual-mode Bluetooth communication switching management method for audio transmission, characterized in that, include: Establish a dual-mode Bluetooth connection between the transmitter and receiver, wherein the dual-mode Bluetooth connection includes a classic Bluetooth connection and a low-power Bluetooth connection; The sending end receives or collects audio and generates audio data. The audio data is parsed and separated into first audio data and second audio data, specifically including: decoding the audio data to obtain the bitstream encoding of the audio data; The frequency domain coefficients of the audio are obtained based on the bitstream encoding. The audio data is separated into first audio data and second audio data according to the high, medium and low frequencies corresponding to the frequency domain coefficients. The first audio data includes audio data with a mid-frequency frequency coefficient, and the second audio data includes audio data or feature data with a high-frequency and / or low-frequency frequency coefficient. Identify the data source type of the audio data, which includes decoding data sources and call data sources. Specifically, when the data source type is a call data source, send the first audio data to the receiving end via a classic Bluetooth connection. When the data source type is a decoding data source, the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection. When the first audio data is simultaneously sent to the receiving end via a classic Bluetooth connection and the second audio data is simultaneously sent to the receiving end via a low-power Bluetooth connection, the receiving end synchronizes the received first and second audio data using a clock, and merges the synchronized first and second audio data into a third audio data, specifically including: The first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection. The receiving end receives data packets of the first audio data and data packets of the second audio data, wherein the data packets include timestamps; The first audio data and the second audio data are time-aligned according to the timestamp; The first and second audio data, after time alignment, are merged to generate the third audio data. The receiving end executes the playback of the third audio data.
2. The dual-mode Bluetooth communication switching management method for audio transmission as described in claim 1, characterized in that, The sending end receives or acquires audio, and the generated audio data includes, Receive audio data transmitted from external data sources through the data interface; Alternatively, audio signals can be acquired using a data acquisition device and converted into audio data.
3. The dual-mode Bluetooth communication switching management method for audio transmission as described in claim 1, characterized in that, The step of identifying the data source type of the audio data, wherein the data source type includes decoding data sources and call data sources, further includes: The request information for calling the Bluetooth port is used to obtain the type of application currently using the Bluetooth connection for audio data transmission. Identify the data source type of the audio data based on the application type.
4. The dual-mode Bluetooth communication switching management method for audio transmission as described in claim 1, characterized in that, The step of sending the second audio data to the receiving end via Bluetooth Low Energy connection further includes: Set a low-energy frequency domain coefficient threshold; Read the frequency domain coefficients of the second audio data encoding; Delete the portion of the frequency domain coefficients that are lower than the low-energy frequency domain coefficient threshold; The remaining parts are merged to generate simplified audio data, which is then used as the second audio data for low-power Bluetooth transmission.
5. The dual-mode Bluetooth communication switching management method for audio transmission as described in claim 1, characterized in that, When the second audio data includes feature data with frequency domain coefficients of high and / or low frequencies, The second audio data is processed at the transmitting end to calculate the short-time energy of the audio signal of the second audio data, and characteristic parameters are obtained based on the short-time energy. The feature parameters are compressed using adaptive differential pulse code modulation to obtain feature data; The feature data is sent to the receiving end, which reconstructs the feature data and generates narrow pulse audio at the corresponding time point through a pulse generator to simulate a low-frequency effect. Alternatively, a noise generator and filter can be used to synthesize virtual noise.
6. A dual-mode Bluetooth communication switching management system for audio transmission, characterized in that, The system includes: The transmitter and receiver each include a dual-mode Bluetooth communication module, which includes a classic Bluetooth unit and a low-power Bluetooth unit. The transmitting end includes a data interface module, a voice acquisition module, a first control module, and an audio parsing module. The data interface module receives audio data, and the voice acquisition module acquires audio signals and generates audio data from the first control module. The first control module decodes the audio data to obtain the bitstream encoding of the audio data, obtains the frequency domain coefficients of the audio based on the bitstream encoding, and separates the audio data into first audio data and second audio data based on the high, mid and low frequencies corresponding to the frequency domain coefficients. The first audio data includes audio data with a mid-frequency coefficient, and the second audio data includes audio data or feature data with a high and / or low-frequency coefficient. Identify the data source type of the audio data, which includes decoding data sources and call data sources; When the data source type is a call data source, the first audio data is sent to the receiving end via a classic Bluetooth connection; when the data source type is a decoding data source, the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a Bluetooth Low Energy connection. The receiving end also includes an audio synchronization module. When the first audio data is sent to the receiving end via a classic Bluetooth connection and the second audio data is sent to the receiving end via a low-power Bluetooth connection, the receiving end receives the data packet of the first audio data and the data packet of the second audio data. The data packet includes a timestamp. The audio synchronization module performs time-series alignment of the first audio data and the second audio data according to the timestamp, and merges the time-series aligned first audio data and second audio data to generate third audio data. The receiving end executes the playback of the third audio data.
7. A dual-mode Bluetooth communication switching management device for audio transmission, characterized in that, The device includes the system described in claim 6.
Citation Information
Patent Citations
Audio data transmission method and device, readable storage medium and mobile terminal
CN110933216A