A rate control method, device and computer storage medium

By establishing LE ACL and CIS connections between Bluetooth devices and dynamically adjusting encoding and transmission parameters, the problem of difficulty in adaptive adjustment of the rate in the prior art is solved, and efficient and adaptive audio data transmission is achieved.

CN115426687BActive Publication Date: 2025-05-09HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210890144.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-22
Publication Date
2025-05-09
Estimated Expiration
2038-12-22

AI Technical Summary

Technical Problem

The prior art is difficult to adaptively adjust the encoding rate and transmission rate in the case of continuous connection between Bluetooth devices to match the channel quality changes and the difference in the amount of data to be transmitted.

Method used

By establishing LE ACL connection and CIS connection between the BLE devices, these parameters are automatically updated to adjust the encoding rate and transmission rate using the first and second encoding parameters as well as the first and second transmission parameters. The specific method includes dynamically adjusting the encoding parameters and transmission parameters according to the channel quality parameters and the amount of data to be transmitted to match them.

Benefits of technology

It realizes adaptive adjustment of the encoding rate and transmission rate without interrupting the CIS connection, improves the efficiency and quality of audio data transmission, and adapts to different channel conditions and data volume requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115426687B_ABST
    Figure CN115426687B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a rate control method and device, which relates to the field of electronic technology, and can adaptively adjust the encoding rate and transmission rate without disconnecting the CIS connection. The specific scheme is: the first BLE device establishes an LE ACL connection with the second BLE device and uses the first transmission parameter to establish a CIS connection; the first encoding parameter is used to encode the audio data; the first transmission parameter is used to send the encoded audio data to the second BLE device through the CIS connection; the second encoding parameter and the second transmission parameter are determined, and the second encoding parameter and the second transmission parameter are used to determine the encoding rate and the transmission rate respectively; the second encoding parameter is used to encode the audio data; while using the first encoding parameter to send the audio data to the second BLE device through the CIS connection, the second transmission parameter is sent to the second BLE device through the LE ACL connection; based on the second transmission parameter, the encoded audio data is sent to the second BLE device. The embodiment of the present application is used to control the rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic technology, and in particular to a rate control method, device, and computer storage medium. Background Art

[0002] Bluetooth is a wireless technology standard that enables short-distance data exchange. Bluetooth mainly includes two types: Bluetooth low energy (BLE) and basic rate (BR) / enhanced data rate (EDR). Among them, since BLE Bluetooth can reduce power consumption and cost, the transmission mechanism based on BLE is currently a hot topic for research and use. For example, the transmission mechanism can include point-to-multipoint connected isochronous stream (CIS) transmission protocol. Based on CIS connection, Bluetooth devices can exchange data. Summary of the invention

[0003] The embodiments of the present application provide a rate control method, device and computer storage medium, which can adaptively adjust the encoding rate and transmission rate without disconnecting the CIS connection.

[0004] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:

[0005] On the one hand, an embodiment of the present application provides a rate control method, including: a first low-power Bluetooth BLE device establishes a low energy asynchronous connection link / logical transport (LE ACL) connection with a second BLE device, and establishes a CIS connection with the second BLE device according to a first transmission parameter of CIS, wherein the first transmission parameter is used to determine the transmission rate of audio data. The first BLE device encodes the audio data using a first encoding parameter; the first encoding parameter is used to determine the encoding rate of the audio data. The first BLE device uses the first transmission parameter to send the encoded audio data to the second BLE device through the CIS connection. The first BLE device determines a second encoding parameter and a second transmission parameter, the second encoding parameter is used to determine the encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter; the second transmission parameter is used to determine the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter. The first BLE device encodes the audio data using the second encoding parameter. While the first BLE device uses the first transmission parameter to send audio data to the second BLE device through the CIS connection, the second transmission parameter is sent to the second BLE device through the LE ACL connection. The first BLE device uses the second transmission parameter to send the audio data encoded using the second encoding parameter to the second BLE device through the CIS connection.

[0006] In this scheme, the first BLE device can automatically update the coding parameters and transmission parameters based on reference parameters such as the channel quality of the CIS connection without disconnecting the CIS connection, thereby adaptively adjusting the coding rate and transmission rate to match the coding rate and transmission rate.

[0007] In a possible implementation, before the first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, the method further includes: the first BLE device sends update time indication information to the second BLE device. The first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, including: the first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection at the time indicated by the update time indication information.

[0008] That is, the first BLE device and the second BLE device can automatically start the second transmission parameter at the agreed update time, thereby updating the transmission rate at the same time.

[0009] In another possible implementation, before the first BLE device determines the second coding parameter and the second transmission parameter, the method further includes: the first BLE device acquires a reference parameter. The first BLE device determines the second coding parameter and the second transmission parameter, including: when the reference parameter meets a preset condition, the first BLE device determines the second coding parameter and the second transmission parameter according to the reference parameter.

[0010] In another possible implementation, the reference parameter includes a channel quality parameter of the CIS connection; when the reference parameter meets a preset condition, the first BLE device determines the second coding parameter and the second transmission parameter according to the reference parameter, including: if the channel quality parameter of the CIS connection is greater than or equal to a first preset value, the first BLE device determines the second coding parameter and the second transmission parameter according to the channel quality parameter of the CIS connection, so that the coding rate determined by the second coding parameter is greater than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is greater than the transmission rate determined by the first transmission parameter. If the channel quality parameter of the CIS connection is less than the second preset value, the first BLE device determines the second transmission parameter according to the channel quality parameter of the CIS connection, so that the coding rate determined by the second coding parameter is less than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.

[0011] In another possible implementation, if the channel quality parameter of the CIS connection is greater than or equal to the first preset value, before the first BLE device encodes the audio data with the second encoding parameter, the first BLE device uses the second transmission parameter to send the audio data encoded with the first encoding parameter to the second BLE device through the CIS connection. If the channel quality parameter of the CIS connection is less than the second preset value, after the first BLE device encodes the audio data with the second encoding parameter, the first BLE device uses the second transmission parameter to send the audio data encoded with the second encoding parameter to the second BLE device through the CIS connection.

[0012] In another possible implementation, the reference parameter also includes the amount of data to be transmitted of the encoded audio data. If the first BLE device determines that the channel quality parameter is worse than a preset value, or the channel quality parameter deteriorates, or the amount of data to be transmitted is greater than or equal to a first preset threshold, then after the first BLE device encodes the audio data based on the second encoding parameter, the first BLE device sends the audio data encoded based on the second encoding parameter to the second BLE device through the CIS connection based on the second transmission parameter; wherein the encoding rate corresponding to the second encoding parameter is lower than the encoding rate corresponding to the first encoding parameter.

[0013] That is to say, when the first BLE device determines that the coding rate and the transmission rate need to be reduced based on reference parameters such as the channel quality parameter and the amount of data to be transmitted, the first BLE device can first reduce the coding rate and then reduce the transmission rate.

[0014] In another possible implementation, if the first BLE device determines that the channel quality parameter is better than the preset value, or the channel quality parameter becomes better, or the amount of data to be transmitted is less than or equal to the second preset threshold, then before the first BLE device encodes the audio data based on the second encoding parameter, the first BLE device sends the audio data encoded based on the first encoding parameter to the second BLE device through the CIS connection based on the second transmission parameter; wherein the encoding rate corresponding to the second encoding parameter is higher than the encoding rate corresponding to the first encoding parameter.

[0015] That is to say, when the first BLE device determines that the coding rate and transmission rate need to be increased based on reference parameters such as channel quality parameters and the amount of data to be transmitted, it can first increase the transmission rate and then increase the coding rate so that the first BLE device has sufficient transmission capacity to transmit the encoded audio data.

[0016] In another possible implementation, the channel quality parameter includes a packet loss rate, and the second coding parameter includes a bitpool value. The first BLE device determines the second coding parameter according to the reference parameter, including: the first BLE device determines a corresponding target coding rate and a target bitpool value according to the packet loss rate, and the second coding parameter includes the target bitpool value.

[0017] In this solution, the first BLE device can adjust the bitpool value in the coding parameter according to the packet loss rate, thereby adjusting the coding rate.

[0018] In another possible implementation, the reference parameter includes the amount of data to be transmitted of the encoded audio data, and the first BLE device determines the second transmission parameter based on the reference parameter when the reference parameter meets the preset condition, including: if the amount of data to be transmitted of the encoded audio data is greater than or equal to the preset threshold, the first BLE device determines the second encoding parameter and the second transmission parameter based on the mapping relationship between the amount of data to be transmitted and the preset amount of data to be transmitted and the encoding parameter and the transmission parameter, so that the encoding rate of the audio data determined by the second encoding parameter is less than the encoding rate determined by the first encoding parameter, and the transmission rate of the audio data determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.

[0019] In another possible implementation, the reference parameter also includes the amount of data to be transmitted of the encoded audio data, and the first BLE device is provided with a plurality of gears of encoding parameters. The first BLE device determines the second encoding parameter according to the reference parameter, including: if the amount of data to be transmitted is greater than or equal to the first preset threshold, the first BLE device sets the second encoding parameter to the encoding parameter corresponding to the first gear with the lowest encoding rate; the first BLE device periodically detects the amount of data to be transmitted; if the amount to be transmitted is less than the first preset threshold, the first BLE device sets the second encoding parameter to the encoding parameter of the second gear, the second gear being the previous gear of the first gear, and the encoding rate corresponding to the encoding parameter of the second gear is higher than the encoding rate corresponding to the encoding parameter of the first gear.

[0020] In this solution, the first BLE device may slowly increase the coding rate step by step.

[0021] In another possible implementation, the reference parameter also includes the amount of data to be transmitted of the encoded audio data, and the first BLE device is provided with a plurality of gears of encoding parameters. The first BLE device determines the second encoding parameter according to the reference parameter, including: if the amount of data to be transmitted is less than or equal to the second preset threshold, the first BLE device sets the second encoding parameter to the encoding parameter corresponding to the third gear with the highest encoding rate; the first BLE device periodically detects the amount of data to be transmitted; if the amount to be transmitted is greater than the second preset threshold, the first BLE device sets the second encoding parameter to the encoding parameter of the fourth gear, the fourth gear is the next gear of the third gear, and the encoding rate corresponding to the encoding parameter of the fourth gear is lower than the encoding rate corresponding to the encoding parameter of the third gear.

[0022] In this solution, the first BLE device may slowly reduce the coding rate step by step.

[0023] In another possible implementation, the reference parameter also includes the amount of data to be transmitted of the encoded audio data. The first BLE device determines the second encoding parameter and the second transmission parameter according to the reference parameter, including: if the amount of data to be transmitted is greater than or equal to the first preset threshold, the first BLE device determines the second encoding parameter and the second transmission parameter, the second encoding parameter is used to reduce the encoding rate, and the second transmission parameter is used to reduce the transmission rate.

[0024] In this way, when the amount of data to be transmitted is greater than or equal to the first preset threshold, the channel quality of the CIS connection may be poor, and the coding rate and the transmission rate can be reduced by adjusting the coding parameters and the transmission parameters.

[0025] In another possible implementation, if the amount of data to be transmitted is less than or equal to a second preset threshold, the first BLE device determines a second encoding parameter and a second transmission parameter, the second encoding parameter is used to increase the encoding rate, and the second transmission parameter is used to increase the transmission rate.

[0026] In this way, when the amount of data to be transmitted is less than or equal to the second preset threshold, the channel quality of the CIS connection may be good, and the coding rate and the transmission rate can be increased by adjusting the coding parameters and the transmission parameters.

[0027] In another possible implementation, after the first BLE device determines the second encoding parameter according to the reference parameter, the method further includes: the first BLE device notifying the second BLE device of the second encoding parameter.

[0028] In this way, the second BLE device can decode the received encoded audio data according to the second encoding parameter.

[0029] In another possible implementation manner, the audio data encoded by using the second encoding parameter includes indication information of the second encoding parameter.

[0030] That is, the first BLE device may notify the second BLE device of the second encoding parameter through the encoded audio data packet.

[0031] In another possible implementation, the first BLE device includes a first host and a first link layer, and the second BLE device includes a second link layer. The first BLE device sends the second transmission parameter to the second BLE device through an LE ACL connection, including: the first host sends parameter update information to the first link layer, and the parameter update information includes the second transmission parameter. The first link layer sends CIS update request information to the second link layer, and the CIS update request information includes the second transmission parameter.

[0032] Among them, the BLE device may include a host and a link layer, and the process of negotiating and adjusting transmission parameters can be performed between the host and the link layer of the first BLE device, between the host and the link layer of the second BLE device, and between the link layers of the first BLE device and the second BLE device.

[0033] In another possible implementation, inside the first BLE device, the first host and the first link layer exchange information through the host controller interface protocol HCI commands; the first link layer of the first BLE device and the second link layer of the second BLE device exchange information through the link layer LL commands.

[0034] In another possible implementation, the first BLE device may not send update time indication information to the second BLE device, and the first BLE device and the second BLE device may pre-agree on a preset time. For example, the first BLE device enables the second transmission parameter at the Mth time after sending the parameter update information; for another example, the second BLE device enables the second transmission parameter at the Kth time after receiving the CIS update request information.

[0035] In another possible implementation, the first BLE device may not send update time indication information to the second BLE device, and the first BLE device automatically enables the second transmission parameter after sending the parameter update information; for example, the second BLE device automatically enables the second transmission parameter after receiving the CIS update request information.

[0036] In another possible implementation, the second transmission parameter includes one or more of the following: burst number BN, sub-event number NSE, refresh timeout FT, sub-event duration and PHY type; wherein the PHY type includes transmission bandwidth and modulation mode.

[0037] In this way, the first BLE device can adjust the transmission rate by adjusting at least one of the burst number BN, the sub-event number NSE, the refresh timeout FT, the sub-event duration and the PHY type.

[0038] In another possible implementation, the first BLE device determines a second transmission parameter based on a reference parameter, and the second transmission parameter is used to increase the transmission rate of the audio data, including: if the first BLE device determines that the channel quality parameter is better than a preset value or the channel quality parameter becomes better, the first BLE device determines the second transmission parameter. Compared with the first transmission parameter, the second transmission parameter increases the number of bursts BN, increases the number of sub-events NSE, reduces the refresh timeout FT, increases the duration of the sub-event, increases the transmission bandwidth, or the modulation method used has a higher transmission rate.

[0039] In this way, when it is determined that the transmission rate needs to be increased based on reference parameters such as the channel quality parameter and the amount of data to be transmitted, the first BLE device can increase the transmission rate by adjusting the transmission parameters.

[0040] In another possible implementation, the first BLE device determines a second transmission parameter based on a reference parameter, and the second transmission parameter is used to reduce the transmission rate of the audio data, including: if the first BLE device determines that the channel quality parameter is worse than a preset value or the channel quality parameter deteriorates, the first BLE device determines the second transmission parameter. Compared with the first transmission parameter, the second transmission parameter reduces the number of bursts BN, reduces the number of sub-events NSE, increases the refresh timeout FT, reduces the duration of the sub-event, reduces the transmission bandwidth, or the modulation method used has a lower transmission rate.

[0041] In this way, when it is determined that the transmission rate needs to be reduced based on reference parameters such as the channel quality parameter and the amount of data to be transmitted, the first BLE device can reduce the transmission rate by adjusting the transmission parameters.

[0042] In another possible implementation manner, the first BLE device acquiring the reference parameter includes: the first BLE device acquiring the reference parameter from itself; or the first BLE device acquiring the reference parameter from the second BLE device.

[0043] For example, the first BLE device may obtain the channel quality parameter from its own controller; or may obtain the channel quality parameter from the controller of the second BLE device.

[0044] On the other hand, an embodiment of the present application provides a rate control device, which is included in a first BLE device, and the device has the function of implementing the behavior of the first BLE device in the above aspects and possible implementation methods. The function can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a connection module or unit, an encoding module or unit, a transmission module or unit, an acquisition module or unit, a determination module or unit, etc.

[0045] On the other hand, an embodiment of the present application provides a transmission rate control method, including: a second low-power Bluetooth LE BLE device establishes a low-power asynchronous connection link LE ACL with a first BLE device, and establishes a CIS connection with the first BLE device according to a first transmission parameter of the CIS, and the first transmission parameter is used to determine the transmission rate of the audio data. The second BLE device adopts the first transmission parameter to receive the audio data sent by the first BLE device through the CIS connection. The second BLE device decodes the audio data received from the first BLE device according to the first encoding parameter; the first encoding parameter is used to determine the encoding rate of the audio data. If the second BLE device obtains the second encoding parameter from the first BLE device, the second BLE device decodes the audio data received from the first BLE device according to the second encoding parameter; the second encoding parameter is used to determine the encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter. If the second BLE device adopts the first transmission parameter and receives the audio data sent by the first BLE device through the CIS connection, and at the same time receives the second transmission parameter sent by the first BLE device through the LE ACL connection; the second transmission parameter is used to determine the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; then the second BLE device adopts the second transmission parameter and receives the audio data sent by the first BLE device through the CIS connection.

[0046] In this scheme, the second BLE device can adaptively adjust the transmission rate according to the transmission parameters sent by the first BLE device without disconnecting the CIS connection, and decode the received audio data according to the updated encoding parameters notified by the first BLE device, so that the encoding rate and the transmission rate match.

[0047] In a possible implementation manner, the second BLE device acquires the second encoding parameter from the first BLE device, including: the second BLE device acquires the second encoding parameter from audio data sent by the first BLE device and encoded by using the second encoding parameter.

[0048] That is, the second BLE device can learn the updated encoding parameters of the first BLE device through the encoded audio data.

[0049] In another possible implementation, before the second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection, the method further includes: the second BLE device receives the update time indication information sent by the first BLE device. The second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection, including: the second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection at the time indicated by the update time indication information.

[0050] That is, the first BLE device and the second BLE device may simultaneously start the second transmission parameter at the agreed update time.

[0051] In another possible implementation, the first BLE device includes a first link layer, and the second BLE device includes a second host and a second link layer. The second BLE device receives the second transmission parameter sent by the first BLE device through the LE ACL connection, including: the second link layer receives the CIS update request information sent by the first link layer, and the update request information includes the second transmission parameter. The second BLE device enables the second transmission parameter, including: the second link layer enables the second transmission parameter; the second link layer sends an update completion message to the second host to indicate that the second transmission parameter has been enabled.

[0052] Among them, the BLE device may include a host and a link layer, and the process of adjusting the transmission parameters can be performed between the host and the link layer of the first BLE device, between the host and the link layer of the second BLE device, and between the link layers of the first BLE device and the second BLE device.

[0053] In another possible implementation, inside the second BLE device, the second host and the second link layer exchange information through the host controller interface protocol HCI commands; the first link layer of the first BLE device and the second link layer of the second BLE device exchange information through the link layer LL commands.

[0054] In another possible implementation, before the second BLE device receives the second transmission parameter sent by the first BLE device through the LE ACL connection, and the second BLE device decodes the audio data received from the first BLE device based on the second encoding parameter, the method also includes: the second BLE device sends the channel quality parameter of the CIS connection to the first BLE device.

[0055] In this way, the first BLE device can determine the second coding parameter and the second transmission parameter according to the channel quality parameter sent by the second BLE device.

[0056] In another possible implementation, the second BLE device may be a wireless headset.

[0057] On the other hand, an embodiment of the present application provides a rate control device, which is included in a second BLE device, and the device has the function of implementing the behavior of the second BLE device in any of the above aspects and possible implementations. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a connection module or unit, a decoding module or unit, a transmission module or unit, an acquisition module or unit, etc.

[0058] On the other hand, an embodiment of the present application provides a system, which may include a first BLE device and a second BLE device in any possible implementation of any of the above aspects, and may implement the rate control method described above.

[0059] On the other hand, an embodiment of the present application provides a BLE device, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the BLE device executes the rate control method executed by the first BLE device or the second BLE device in any of the above aspects and any possible implementations.

[0060] On the other hand, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on a computer, the computer executes the rate control method executed by the first BLE device or the second BLE device in any of the above aspects and any possible implementations.

[0061] On the other hand, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the rate control method executed by the first BLE device or the second BLE device in any possible implementation of the first aspect or the second aspect mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of a system structure provided for an embodiment of the present application;

[0063] Figure 2 A schematic diagram of the structure of a mobile phone provided in an embodiment of the present application;

[0064] Figure 3A A schematic diagram of the structure of an earplug provided in an embodiment of the present application;

[0065] Figure 3B A schematic diagram of a TWS headset and an earphone box provided in an embodiment of the present application;

[0066] Figure 3C A schematic diagram of an earplug provided in an embodiment of the present application;

[0067] Figure 4 A schematic diagram of a Bluetooth system provided in an embodiment of the present application;

[0068] Figure 5 An audio transmission flow chart provided in an embodiment of the present application;

[0069] Figure 6 A flow chart of a method for adjusting transmission parameters provided in an embodiment of the present application;

[0070] Figure 7 A transmission parameter adjustment schematic diagram provided in an embodiment of the present application;

[0071] Figure 8 A flow chart of adjusting rate provided in an embodiment of the present application;

[0072] Fig. 9 Another transmission parameter adjustment schematic diagram provided in an embodiment of the present application;

[0073] Fig.10 Another transmission parameter adjustment schematic diagram provided in an embodiment of the present application;

[0074] Fig.11 Another transmission parameter adjustment schematic diagram provided in an embodiment of the present application;

[0075] Fig.12 Another flow chart of adjusting the rate provided in an embodiment of the present application;

[0076] Fig.13 Another transmission parameter adjustment schematic diagram provided in an embodiment of the present application;

[0077] Fig.14 Another transmission parameter adjustment schematic diagram provided in an embodiment of the present application;

[0078] Fig.15 Another flow chart of adjusting the rate provided in an embodiment of the present application;

[0079] Fig.16 Another flow chart of adjusting the rate provided in an embodiment of the present application;

[0080] Fig.17 A schematic diagram of the structure of a first BLE device provided in an embodiment of the present application;

[0081] Fig.18 A schematic diagram of the structure of a second BLE device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0083] like Figure 1 As shown, the pairing connection method provided in the embodiment of the present application can be applied to a system composed of an electronic device 01 and at least one external device 02. In the system, the electronic device 01 and the external device 02 are connected wirelessly. Among them, the wireless method can be Bluetooth (bluetooth, BT), wireless fidelity (wireless fidelity, Wi-Fi) network, global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other connections. For example, the electronic device 01 can be a mobile phone, a media player (such as MP3, MP4, etc.) tablet computer, a laptop computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a personal digital assistant (personal digital assistant, PDA), a television and other devices. For example, the external device 02 can be a wireless headset, a wireless speaker, a wireless bracelet, a wireless car, wireless smart glasses, augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) equipment, etc., and the embodiment of the present application does not impose any restrictions on this. The wireless headset may be a headset, an earbud or other portable listening device.

[0084] The external device 02 may include a main body, or may include a first main body 021 and a second main body 022 for use in pair, and the first main body 021 and the second main body 022 cooperate with each other and work in coordination. For example, when the external device 02 is an earbud-type TWS headset, the external device 02 may include a left earbud (usually marked with "L") and a right earbud (usually marked with "R") for use in pair, and the left earbud and the right earbud are used for stereo playback, the left earbud can be used to play the left channel signal of the audio data, and the right earbud can be used to synchronously play the right channel signal of the audio data.

[0085] exist Figure 1 In the system shown, the electronic device 01 is a mobile phone, and the external device 02 is an earbud-type TWS headset and a bracelet. It is understandable that the electronic device 01 and the external device 02 in the system can also be other devices, and the embodiment of the present application does not impose any restrictions on this.

[0086] Exemplarily, when the electronic device 01 is a mobile phone 100, Figure 2 1 shows a schematic diagram of the structure of a mobile phone 100. The mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0087] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0088] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0089] The controller may be the nerve center and command center of the mobile phone 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0090] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0091] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0092] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface to realize the touch function of the mobile phone 100.

[0093] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve functions such as answering a call via a Bluetooth headset.

[0094] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to implement the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0095] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0096] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to realize the shooting function of the mobile phone 100. The processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the mobile phone 100.

[0097] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0098] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transfer data between the mobile phone 100 and an external device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other mobile phones, such as AR devices, etc.

[0099] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0100] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the mobile phone 100. While the charging management module 140 is charging the battery 142, it may also power the mobile phone through the power management module 141.

[0101] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0102] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0103] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0104] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0105] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0106] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0107] For example, in an embodiment of the present application, the mobile phone 100 can use the wireless communication module 160 to establish a wireless connection with an external device through wireless communication technology (such as Bluetooth). Based on the established wireless connection, the mobile phone 100 can send audio data to the external device and can also receive audio data from the external device. In an embodiment of the present application, the processor 110 can also adaptively adjust the transmission rate when the mobile phone sends audio data to the external device according to factors such as the channel quality of the link between the mobile phone 100 and the external device and the amount of data to be transmitted.

[0108] In some embodiments, the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0109] The mobile phone 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0110] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0111] The mobile phone 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.

[0112] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0113] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0114] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the mobile phone 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0115] Video codecs are used to compress or decompress digital videos. Mobile phone 100 may support one or more video codecs. Thus, mobile phone 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0116] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, the intelligent cognition of the mobile phone 100 can be realized, such as: image recognition, face recognition, voice recognition, text understanding, etc.

[0117] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0118] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 can establish a wireless pairing connection between two main bodies of the external device through the wireless communication module 160 by executing the instructions stored in the internal memory 121, and perform short-range data exchange with the external device to realize functions such as calling and playing music through the external device. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0119] In an embodiment of the present application, the mobile phone 100 can use wireless communication technology (such as Bluetooth) to establish a wireless connection with the two bodies of the external device. For example, the mobile phone 100 establishes a wireless connection with the first body, and then establishes a wireless connection between the mobile phone 100 and the second body through the first body. After establishing the wireless connection, the mobile phone 100 can store the Bluetooth address of the external device in the internal memory 121. In some embodiments, when the external device is a device including two bodies, such as a TWS headset, the left and right earplugs of the TWS headset have their own Bluetooth addresses, and the mobile phone 100 can associate the Bluetooth addresses of the left and right earplugs of the TWS headset and store them in the internal memory 121, so that the left and right earplugs of the TWS headset can be used as a pair of devices.

[0120] The mobile phone 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0121] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 may also include an encoder and a decoder for encoding and decoding audio signals. In some embodiments, the audio module 170 may be arranged in the processor 110, or some functional modules of the audio module 170 may be arranged in the processor 110.

[0122] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The mobile phone 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0123] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the mobile phone 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.

[0124] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The mobile phone 100 can be provided with at least one microphone 170C. In other embodiments, the mobile phone 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the mobile phone 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0125] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0126] In an embodiment of the present application, when the mobile phone 100 establishes a wireless connection with an external device such as a TWS headset, the TWS headset can be used as an audio input / output device of the mobile phone 100. Exemplarily, the audio module 170 can receive the audio electrical signal transmitted by the wireless communication module 160 to realize functions such as answering calls and playing music through the TWS headset. For example, when the user is making a call, the TWS headset can collect the user's voice signal, convert it into an audio electrical signal and send it to the wireless communication module 160 of the mobile phone 100. The wireless communication module 160 transmits the audio electrical signal to the audio module 170. The audio module 170 can convert the received audio electrical signal into a digital audio signal, and transmit it to the mobile communication module 150 after encoding. It is transmitted to the call peer device by the mobile communication module 150 to realize the call. For another example, when the user uses the media player of the mobile phone 100 to play music, the application processor can transmit the audio electrical signal corresponding to the music played by the media player to the audio module 170. The audio electrical signal is transmitted to the wireless communication module 160 by the audio module 170. The wireless communication module 160 can send the audio electrical signal to the TWS headset so that the TWS headset converts the audio electrical signal into a sound signal and plays it.

[0127] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The mobile phone 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the mobile phone 100 detects the touch operation intensity according to the pressure sensor 180A. The mobile phone 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0128] The gyroscope sensor 180B can be used to determine the motion posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shaking of the mobile phone 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the mobile phone 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0129] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the mobile phone 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0130] The magnetic sensor 180D includes a Hall sensor. The mobile phone 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the mobile phone 100 is a flip phone, the mobile phone 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.

[0131] The acceleration sensor 180E can detect the magnitude of the acceleration of the mobile phone 100 in all directions (generally three axes). When the mobile phone 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the mobile phone, and is applied to applications such as horizontal and vertical screen switching, pedometers, etc.

[0132] The distance sensor 180F is used to measure the distance. The mobile phone 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the mobile phone 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0133] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The mobile phone 100 emits infrared light outward through the light emitting diode. The mobile phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100. The mobile phone 100 can use the proximity light sensor 180G to detect that the user holds the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in the leather case mode and the pocket mode to automatically unlock and lock the screen.

[0134] The ambient light sensor 180L is used to sense the ambient light brightness. The mobile phone 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in a pocket to prevent accidental touches.

[0135] The fingerprint sensor 180H is used to collect fingerprints. The mobile phone 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0136] The temperature sensor 180J is used to detect temperature. In some embodiments, the mobile phone 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the mobile phone 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the mobile phone 100 heats the battery 142 to avoid abnormal shutdown of the mobile phone 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the mobile phone 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.

[0137] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the mobile phone 100, which is different from the position of the display screen 194.

[0138] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0139] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key or a touch key. The mobile phone 100 can receive key input and generate key signal input related to the user settings and function control of the mobile phone 100.

[0140] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0141] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0142] The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the mobile phone 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The mobile phone 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the mobile phone 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.

[0143] For example, when the external device 02 is a TWS headset, Figure 3A FIG. 1 shows a schematic diagram of the structure of one of the main bodies of a TWS headset, namely an earplug (left earplug or right earplug). Figure 3A As shown, the earplug of the TWS headset may include: a processor 301, a memory 302, a sensor 303, a wireless communication module 304, a receiver 305, a microphone 306 and a power supply 307.

[0144] Among them, the memory 302 can be used to store application codes, such as application codes used to establish a wireless connection with another earplug of the TWS headset, and to pair the earplug with the above-mentioned electronic device 01.

[0145] The processor 301 can control the execution of the above application code to implement the functions of the earplug of the TWS headset in the embodiment of the present application. For example, the function of adaptively adjusting the encoding rate and transmission rate of the audio data sent by the TWS headset to the electronic device according to factors such as the channel quality of the link between the TWS headset and the electronic device and the amount of data to be transmitted is implemented.

[0146] The memory 302 may also store a Bluetooth address for uniquely identifying the earplug, and a Bluetooth address of the other earplug of the TWS headset. In addition, the memory 302 may also store a pairing history of the electronic device 01 that has been successfully paired with the earplug before. For example, the pairing history may include the Bluetooth address of the electronic device 01 that has been successfully paired with the earplug. Based on the pairing history, the earplug can automatically connect back to the paired giant electronic device 01. The above Bluetooth address may be a media access control (MAC) address.

[0147] The sensor 303 may be a distance sensor or a proximity light sensor. The earplug may determine whether it is worn by the user through the sensor 303. For example, the earplug may use a proximity light sensor to detect whether there is an object near the earplug, thereby determining whether the earplug is worn by the user. When it is determined that the earplug is worn, the earplug may turn on the receiver 305. In some embodiments, the earplug may also include a bone conduction sensor, combined into a bone conduction headset. Using the bone conduction sensor, the earplug may obtain the vibration signal of the vocal bone, parse the voice signal, and realize the voice function. In other embodiments, the earplug may also include a touch sensor for detecting the user's touch operation. In other embodiments, the earplug may also include a fingerprint sensor for detecting the user's fingerprint, identifying the user's identity, etc. In other embodiments, the earplug may also include an ambient light sensor, which may adaptively adjust some parameters, such as the volume, according to the brightness of the perceived ambient light.

[0148] The wireless communication module 304 is used to support wireless data exchange between the current earplug and the other earplug of the TWS headset and various electronic devices 01. In some embodiments, the wireless communication module 304 can be a Bluetooth transceiver. The earplug of the TWS headset can establish a wireless connection with the above-mentioned electronic device 01 through the Bluetooth transceiver to achieve short-distance data exchange between the two. For example, exchange audio data, exchange control data, etc.

[0149] The audio module 300 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 300 may also include an encoder and a decoder for encoding and decoding audio signals. In some embodiments, the audio module 300 may be arranged in the processor 301, or some functional modules of the audio module 300 may be arranged in the processor 301.

[0150] At least one receiver 305, which may also be referred to as a "receiver", may be used to convert an audio electrical signal into a sound signal and play it. For example, when the earplug of a TWS headset is used as an audio output device of the electronic device 01, the receiver 305 may convert the received audio electrical signal into a sound signal and play it.

[0151] At least one microphone 306, which may also be referred to as a "microphone" or "microphone", is used to convert a sound signal into an audio electrical signal. For example, when the earplug of a TWS headset is used as an audio input device of the above-mentioned electronic device 01, when the user is speaking (such as talking or sending a voice message), the microphone 306 can collect the user's voice signal and convert it into an audio electrical signal. The above-mentioned audio electrical signal is the audio data in the embodiment of the present application.

[0152] The power supply 307 can be used to supply power to various components included in the earplug of the TWS headset. In some embodiments, the power supply 307 can be a battery, such as a rechargeable battery.

[0153] Usually, TWS earphones are equipped with an earphone box (such as Figure 3B The earphone box 023 shown in FIG. 2 can be used to store the left and right earplugs of the TWS earphone. Figure 3A ,like Figure 3B As shown, the earphone box 023 can be used to store the left earplug 022 and the right earplug 021 of the TWS headset. In some embodiments, at least one touch control 024 may be provided on the earphone box 023, which can be used to trigger operations such as re-pairing the TWS headset with the electronic device 01. The earphone box 023 may also be provided with a charging port 025 for charging the earphone box itself. It is understandable that the earphone box 023 may also include other controls, which are not described one by one here. In addition, the earphone box 023 can also charge the left and right earplugs of the TWS headset. Accordingly, in some embodiments, the earplugs of the above-mentioned TWS headset may also include: an input / output interface 308.

[0154] The input / output interface 308 can be used to provide any wired connection between the earplug of the TWS headset and the earphone box (such as the above-mentioned earphone box 023). In some embodiments, the input / output interface 308 can be an electrical connector. When the earplug of the TWS headset is placed in the earphone box, the earplug of the TWS headset can be electrically connected to the earphone box (such as the input / output interface included in the earphone box) through the electrical connector. After the electrical connection is established, the earphone box can charge the power supply 307 of the earplug of the TWS headset. After the electrical connection is established, the earplug of the TWS headset can also communicate data with the earphone box. For example, the earplug of the TWS headset can receive a pairing instruction from the earphone box through the electrical connection. The pairing command is used to instruct the earplug of the TWS headset to turn on the wireless communication module 304, so that the earplug of the TWS headset can be paired with the electronic device 01 using the corresponding wireless communication protocol (such as Bluetooth).

[0155] Of course, the earplug of the TWS headset may not include the input / output interface 308. In this case, the earplug can realize the charging or data communication function based on the wireless connection established with the headset box through the wireless communication module 304.

[0156] In addition, in some embodiments, the earphone box (such as the earphone box 023 described above) may also include components such as a processor and a memory. The memory may be used to store application code, and the processor of the earphone box controls the execution to realize the functions of the earphone box. For example, when the user opens the lid of the earphone box, the processor of the earphone box executes the application code stored in the memory, and can send a pairing command to the earplug of the TWS earphone in response to the user's operation of opening the lid.

[0157] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the earplug of the TWS headset. Figure 3A More or fewer components shown in the figure may be combined with two or more components, or may have different component configurations. For example, the earplug may also include an indicator light 309 (which may indicate the battery level of the earplug, etc.), a display screen 310 (which may prompt the user with relevant information), a dust screen (which may be used in conjunction with an earpiece), a motor, and other components. Figure 3A The various components shown in the drawings may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.

[0158] For example, Figure 3C Provided is a schematic diagram of the structure of an earplug, which may include a receiver 305, a microphone 306, an input / output interface 308, an indicator light 309, a display screen 310, a touch key 311, and a proximity light sensor 312. The touch key 311 is used in conjunction with the touch sensor to trigger operations such as pause, play, record, turn on MIC, turn off MIC, etc.

[0159] It should be noted that the structures of the left and right earplugs of the TWS headset can be the same. For example, the left and right earplugs of the TWS headset can both include Figure 3A Alternatively, the structures of the left and right earplugs of the TWS headset may be different. For example, one earplug of the TWS headset (such as the right earplug) may include Figure 3A , while the other earbud (such as the left earbud) may include Figure 3A Other components except microphone 306.

[0160] It should also be noted that Figure 3A , Figure 3B , Figure 3C The structure shown is for illustrative purposes only and is not intended to limit the structure or function of the TWS earphones and earphone box.

[0161] The embodiment of the present application will be described by taking a mobile phone as the electronic device 01, a TWS headset as the external device 02, and establishing a connection between the mobile phone and the TWS headset via Bluetooth as an example.

[0162] TWS earphones can exchange audio data and control data (such as synchronization data, link configuration parameters, previous song, volume up, pause or answer control instructions, etc.) with mobile phones through the Bluetooth connection. Among them, the audio data can include media data and voice data, etc. For example, TWS earphones can play music, recordings, sounds in video files and other media data for users; in phone, audio call, and video call scenarios, they can play incoming call prompts, play the voice data of the other end of the call, and collect the user's voice data and send it to the mobile phone; in game scenarios, they can play background music, game prompts, teammates' voice data, etc., and collect the user's voice data and send it to the mobile phone; in WeChat voice message scenarios, they can play voice messages, collect the user's recorded voice data and send it to the mobile phone; in voice assistant and other scenarios, they can collect the user's voice data and send it to the mobile phone.

[0163] In order to enable various audio applications such as music, phone calls, games, etc. to be realized through Bluetooth technology, Bluetooth devices need to follow certain Bluetooth protocols. Figure 4 A schematic diagram of a Bluetooth system is shown, which may include an application, an application adaptation layer, a Bluetooth host, a host controller interface protocol (HCI) and a Bluetooth controller. Among them, the application adaptation layer can be used to adapt the corresponding relationship between different applications and the underlying protocols of different manufacturers. The Bluetooth host may include an application specification (profile), a protocol stack and a rate control unit. Among them, the protocol stack may include a service discovery protocol (SDP), a profile's basic general access profile (GAP) and other protocols. The rate control unit may adaptively adjust the encoding rate of the Bluetooth device audio encoder and the transmission rate of the audio data sent to other devices according to parameters such as the channel quality of the link between the current Bluetooth device and other devices and the amount of data to be transmitted. The controller may include a link layer (LL), a baseband, and a wireless radio frequency (Bluetooth radio frequency) unit. Among them, LL is responsible for managing the communication between Bluetooth devices and realizing operations such as link establishment, verification, and link configuration. The baseband mainly performs mutual conversion between radio frequency signals and digital or voice signals to realize baseband protocols and other underlying connection procedures. The wireless radio frequency unit is used to transmit and receive Bluetooth signals. The controller may also be used to detect the channel quality of the link between the Bluetooth device and other devices.

[0164] The Bluetooth connection solutions between TWS headphones and mobile phones can include monitoring solutions, forwarding solutions, near field magnetic induction (NFMI) solutions and dual-transmission solutions (or dual-connection solutions).

[0165] Among them, in the monitoring scheme, the TWS headset may include a main earbud and a secondary earbud. The mobile phone and the main earbud establish a Bluetooth connection, complete the sending of audio data to the main earbud, and complete the service actions triggered by the mobile phone and the TWS headset (for example, play, pause, switch to the previous song, increase the volume, etc.); a Bluetooth connection is established between the two earbuds to complete the information synchronization between the two earbuds; the secondary earbud obtains audio data by monitoring the Bluetooth link between the main earbud and the mobile phone.

[0166] In the forwarding scheme, the TWS headset may include a main earbud and a secondary earbud. A Bluetooth connection is established between the mobile phone and the main earbud to complete the sending of audio data to the main earbud and complete the service actions triggered by the mobile phone and the TWS headset. A Bluetooth connection is established between the two earbuds to complete the information synchronization between the two earbuds. The main earbud forwards audio data to the secondary earbud through the Bluetooth link between the main earbud and the secondary earbud.

[0167] In the NFMI solution, a TWS headset may include a main earbud and a secondary earbud. A Bluetooth connection is established between the mobile phone and the main earbud to send audio data to the main earbud and complete the service actions triggered by the mobile phone and the TWS headset. An NFMI connection is established between the two earbuds to synchronize information between the two earbuds. The main earbud forwards audio data to the secondary earbud through the NFMI link between the main earbud and the secondary earbud.

[0168] Among them, in the monitoring scheme, forwarding scheme and NFMI scheme, since the mobile phone only establishes a Bluetooth connection with the main earbud and exchanges audio data with the main earbud; the mobile phone does not establish a Bluetooth connection with the auxiliary earbud and does not exchange audio data with the auxiliary earbud, these connection schemes can also be called single-shot schemes.

[0169] In the dual-transmission solution, the mobile phone establishes Bluetooth connections with the two earbuds of TWS respectively, and then exchanges audio data, service control data, etc. through the Bluetooth links between the two earbuds of TWS respectively, so as to realize operations such as audio data playback and service action control. The two earbuds of TWS can maintain or disconnect the wireless connection.

[0170] After establishing a Bluetooth connection between the mobile phone and the TWS headset, audio data can be exchanged between the mobile phone and the TWS headset.

[0171] For example, the audio transmission process of audio data from the source end (source) to the destination end (sink) can be seen in Figure 5 .Depend on Figure 5 It can be seen that the source end decodes the audio data in the application (APP) through the audio management module (such as the audio service AudioFlinger in the Android system), obtains the configuration information of the hardware device, sets the audio parameters, etc.; the decoded data enters the buffer 1 for buffering; the audio encoder obtains the audio data from the buffer 1 and encodes it; the encoded audio data enters the buffer 2 for buffering, and the buffer 2 can be called the data buffer to be transmitted; the audio data in the buffer 2 is sent to the destination through the channel between the destination and the source. The destination buffers the audio data received from the source in the buffer 3; the audio decoder obtains the audio data from the buffer 3 and decodes it; the decoded audio data is buffered in the buffer 4; the codec sends the data in the buffer 4 to the speaker for playback.

[0172] In an embodiment of the present application, the transmission channel between the source and the destination may include a low-power asynchronous connection link LE ACL (also referred to as LE ACL connection, LE ACL link or LE ACL connection link in the following embodiments) and a connection-based isochronous audio stream (connected isochronous stream, CIS) connection link (also referred to as CIS link or CIS connection in the following embodiments). Among them, the LE ACL link can be used to transmit control data, and the CIS link can be used to transmit audio data and response information. CIS is a point-to-multipoint isochronous (ISO) synchronous transmission mechanism based on BLE.

[0173] After the LE ACL connection link and the CIS connection link are established, the LE ACL connection link and the CIS connection link exist independently and send data independently. Data can be sent on the LE ACL connection link and the CIS connection link at the same time. The simultaneous data transmission here does not limit the time synchronization of the LE ACL connection link and the CIS connection link when sending data, but means that data can be sent on the LE ACL connection link and the CIS connection link at the same time.

[0174] In the process of transmitting audio data from the source to the destination, the channel quality of the transmission channel, the amount of data to be transmitted, etc. are different, and the encoding rate and transmission rate of the audio data are also different. The technical solution provided by the embodiment of the present application can automatically and dynamically and adaptively adjust the encoding rate and transmission rate of the audio data according to factors such as the channel quality of the transmission channel and the amount of data to be transmitted without interrupting data transmission and disconnecting the CIS link, so that the user can be unaware of the adjustment process of the encoding rate and transmission rate; and there is no need to disconnect the CIS link between the source and the destination when adjusting the encoding rate and transmission rate, reconfigure the relevant parameters, and then re-initiate the connection of the CIS link.

[0175] Among them, the coding rate can be understood as Figure 5 The encoding rate of the audio encoder in the audio data transmission rate can be understood as the amount of audio data sent from the source end to the destination end per unit time. Increasing the transmission rate means increasing the amount of audio data sent from the source end to the destination end per unit time; reducing the transmission rate means reducing the amount of audio data sent from the source end to the destination end per unit time.

[0176] Specifically, when the channel quality is poor, the coding rate and transmission rate can be reduced to ensure that there are enough retransmission time slots to improve the transmission performance; when the channel quality is good, the coding rate and transmission rate can be increased to improve the audio quality; thereby, the coding rate and transmission rate can be matched with the channel quality conditions, taking into account both transmission performance and audio quality, achieving an adaptive balance between transmission performance and audio quality, and ensuring continuous transmission and playback of audio data.

[0177] In one implementation, when the channel quality is poor, the encoding rate can be lowered first and then the transmission rate; when the channel quality is good, the transmission rate can be increased first and then the encoding rate can be lowered; this ensures that there is sufficient transmission capacity to transmit the encoded audio data before and after the encoding rate and transmission rate are adjusted.

[0178] The following embodiments of the present application take a dual connection established between a mobile phone and a TWS headset, with the mobile phone (i.e., the first BLE Bluetooth device) as the source of audio data, and the first earplug of the TWS headset (i.e., the second BLE Bluetooth device, which can be any earplug of the TWS headset) as the destination of the audio data as an example to illustrate the rate control method provided in the embodiments of the present application.

[0179] In the method, when the first earplug is used, the mobile phone may be configured with a coding parameter (i.e., a first coding parameter), and the audio encoder of the mobile phone encodes according to the configured coding parameter to obtain encoded audio data. The mobile phone sends the coding parameter to the first earplug via an audio data packet, so that the first earplug can decode according to the coding parameter.

[0180] Furthermore, when the first earplug is used, the mobile phone and the first earplug can negotiate the transmission parameters of the CIS link (ie, the first transmission parameters) through the LE ACL link, and establish the CIS link according to the transmission parameters. Figure 6 .like Figure 6 As shown, the mobile phone can set CIS group (CIS group, CIG) parameters and enable CIS between the mobile phone and the first earplug. The process may include, 601, the Bluetooth host host in the mobile phone sends CIG parameter setting information (such as LE Set CIG parameters message) to the link layer LL in the Bluetooth controller in the mobile phone, thereby passing the transmission parameters (i.e., the first transmission parameters) to the mobile phone LL. 602, the mobile phone LL replies with a first confirmation message (such as a command complete message) to the mobile phone host. 603, the mobile phone host sends a CIS creation message (such as a LE Create CIS message) to the mobile phone LL. 604, the mobile phone LL replies with a second confirmation message (such as an HCI Command status message) to the mobile phone host. 605, the mobile phone LL sends a CIS connection request message (such as LL_CIS_REQ message) carrying the transmission parameters to the link layer LL in the Bluetooth controller in the first earplug to request to establish a CIS connection according to the transmission parameters. 606, the first earplug LL sends a CIS connection request message (such as a LE CIS Request message) to the Bluetooth host host in the first earplug. 607. The first earplug host replies to the first earplug LL with the CIS connection acceptance information (e.g., LE Accept CIS message). 608. The first earplug LL replies to the first earplug host with the third confirmation information (e.g., HCI Command status message). 609. After confirmation by the first earplug host, the first earplug LL sends the CIS connection response information (e.g., LL_CIS_RSP message) to the mobile phone LLC. 610. The mobile phone LL sends the fourth confirmation information (e.g., LL_CIS_IND message) to the first earplug LL. 611. The mobile phone LL sends the CIS connection established information (e.g., LE CISEstablished message) to the mobile phone host. At this point, a CIS connection link is established between the mobile phone and the first earplug.

[0181] After the CIS link is established, the mobile phone can send the audio data encoded by the audio encoder to the first earplug through the CIS link according to the configured transmission parameters. The first earplug can receive the audio data sent by the mobile phone through the CIS link and reply with response information (for example, a positive response ACK message, a negative response NACK message, a lost MISSING message, etc.) according to the configured transmission parameters. Subsequently, the mobile phone can also determine a new encoding parameter (i.e., a second encoding parameter) based on the reference parameter, and the new encoding parameter is different from the previous encoding parameter, and the audio data is encoded according to the new encoding parameter, thereby increasing or decreasing the encoding rate. In addition, while the mobile phone sends audio data to the first earplug through the CIS link, the mobile phone and the first earplug can also negotiate new transmission parameters (i.e., second transmission parameters) through the LE ACL link according to the reference parameters, and the new transmission parameters are different from the previous transmission parameters, so as to increase or decrease the transmission rate of the audio data through the new transmission parameters. After negotiating the new transmission parameters, the mobile phone and the first earplug can automatically start the new transmission parameters; or, the mobile phone and the first earplug can also negotiate the update time, and the mobile phone and the first earplug enable the new transmission parameters of the CIS link at the update time. Subsequently, the mobile phone sends audio data to the first earbud through the CIS link according to the new transmission parameters, and the first earbud receives the audio data sent by the mobile phone through the CIS link according to the new transmission parameters. In other words, the mobile phone and the first earbud can update the CIS transmission parameters without disconnecting the CIS connection, so as to transmit audio data using the updated transmission parameters.

[0182] The reference parameter may include a channel quality parameter, which is used to indicate the quality of the channel. For example, the channel quality parameter may include: packet loss rate (PLR), packet error rate (PER), signal noise ratio (SNR), signal to interference ratio (SIR), received signal strength indication (RSSI), channel quality indicator (CQI), cyclic redundancy check (CRC), and quality of service (Qos) parameters. The Qos parameters may include one or more parameters such as retransmission rate, jitter, delay, throughput, availability, etc.

[0183] There may be many encoders for audio data, such as sub-band coding (SBC), advanced audio coding (AAC), aptX encoder, aptX LL (low latency aptX) encoder, aptXHD (high quality aptX) encoder, LDAC encoder, HWA encoder, and HWA LL (low latency HWA) encoder. Different encoders have different encoding parameters that affect the encoding rate. For example, in an SBC encoder, the encoding parameters may include one or more of the bitpool value, block length, number of subbands, number of channels, sampling rate, frame length, and allocation method. For another example, in an AAC encoder, the encoding parameters may include parameters such as sampling rate and number of channels.

[0184] In addition, in encoders such as SBC and AAC, the coding rate can also be related to the coding bandwidth. When the coding bandwidth is reduced (for example, the coding bandwidth is reduced from 80Hz-20kHz to 80Hz-10kHz), the coding rate can also be increased. For example, in the SBC encoder, when the number of subbands is reduced, the coding rate can be increased. When the coding bandwidth is increased (for example, the coding bandwidth is expanded from 80Hz-10kHz to 80Hz-20kHz), the coding rate can also be reduced. For example, in the SBC encoder, when the number of subbands is increased, the coding rate can be reduced.

[0185] The following embodiments of the present application are mainly described by taking the SBC encoder as an example.

[0186] In SBC coding, a method for calculating the coding rate may be: coding rate, i.e., coding bit rate per unit time = 8*frame length*sampling rate / number of subbands / block length; wherein, frame length = 4+(4*number of subbands*number of channels) / 8+ceiling(block length*number of channels*bitpool value / 8), where ceiling means rounding up. In this encoder, the coding rate may be increased or decreased by adjusting one or more of the bitpool value, block length, number of subbands, number of channels, sampling rate, and frame length. For example, when the coding rate needs to be increased, the mobile phone may increase one or more of the bitpool value, sampling rate, or number of channels; when the coding rate needs to be decreased, the mobile phone may decrease one or more of the bitpool value, sampling rate, or number of channels. Wherein, different channel modes (e.g., mono, dual-channel, or joint stereo) have different calculation methods for frame length, and the corresponding coding rates are also different. Moreover, different encoding parameters corresponding to different sound qualities (e.g., medium sound quality or high sound quality) are also different. Exemplarily, a correspondence between different sound qualities and encoding parameters can be seen in Table 1.

[0187] Table 1

[0188]

[0189] There may be multiple transmission parameters that affect the transmission rate, and the transmission rate may be increased or decreased by adjusting the transmission parameters. For example, the transmission parameters may include one or more of the burst number (BN), the number of subevents (NSE), the flush timeout (FT), the subevent duration, and the PHY type. In the time domain, the audio data may be transmitted within an ISO interval. Among them, NSE represents the number of subevents within an ISO interval; BN represents the number of bursts carried by each ISO interval at most, and the content of the burst is the payload; the subevent duration represents the time of each subevent, and the burst is transmitted within the subevent duration, and the subevent duration depends on the size of the payload; FT is in units of ISO intervals, indicating that a burst can be transmitted within a maximum of several ISO intervals; the PHY type may include air interface parameters such as the transmission bandwidth and modulation mode. Within a subevent duration, the mobile phone may send a burst and receive a response message from the first earplug, and the burst is the payload, and the payload is the audio data.

[0190] For example, when BN=2, NSE=4, and FT=1, a data transmission diagram can be seen in Figure 7 . Where NSE = 4 means that each ISO interval includes 4 sub-event durations; BN = 2 means that each ISO interval carries a maximum of 2 bursts, that is, 2 payloads; FT = 1 means that a burst can be transmitted in at most 1 ISO interval. At the refresh point of payload k, regardless of whether the payload k is successfully received by the destination, the transmission of payload k is stopped and payload k+1 is started. For the case where BN is equal to 1, the refresh point of the payload is at the end of the ISO interval. For the case where BN is greater than 1, for the data packet corresponding to the first payload in an ISO interval, its refresh point is located at the end of the Nth sub-event after the start of the ISO interval; where N = FLOOR (NSE / BN) + MOD (NSE, BN). For the data packet corresponding to the i-th payload in an ISO interval, its refresh point is located at the end of the Mth sub-event after the refresh point of the data packet corresponding to the first payload in the ISO interval; where M = FLOOR (NSE / BN) * (i–1). FLOOR means rounding down, FLOOR(NSE / BN) means the quotient of NSE divided by BN rounded down, and MOD(NSE, BN) means the modulo of NSE divided by BN.

[0191] Specifically, if the channel quality is determined to be poor based on the channel quality parameters, the mobile phone can reduce the coding rate by adjusting the coding parameters, and the mobile phone and the first earplug can reduce the transmission rate by adjusting the transmission parameters to improve the transmission performance; if the channel quality is determined to be good based on the channel quality parameters, the mobile phone and the first earplug can increase the transmission rate by adjusting the transmission parameters, and the mobile phone can increase the coding rate by adjusting the coding parameters.

[0192] That is to say, when adjusting the coding parameters and transmission parameters and thus adjusting the coding rate and transmission rate, the new coding parameters can be determined by the mobile phone, and the mobile phone can send the new coding parameters to the first earbud through an audio data packet so that the first earbud can decode according to the new coding parameters; the new transmission parameters can be negotiated by the mobile phone and the first earbud.

[0193] The specific application scenarios are different, the order of adjusting the coding parameters and the transmission parameters is different, and the specific adjustment methods may also be different. The following describes the different scenarios respectively.

[0194] Scenario 1: When the channel quality is good, first increase the transmission rate and then increase the coding rate.

[0195] In this scenario, the mobile phone and the first earplug may first negotiate new transmission parameters to increase the transmission rate; and then, the mobile phone determines new encoding parameters to increase the encoding rate.

[0196] In one case, the mobile phone can actively initiate the adjustment of the transmission rate.

[0197] For example, in one embodiment, the mobile phone performs channel quality monitoring and initiates adjustment of the transmission rate according to the channel quality parameters. If the mobile phone determines through channel quality monitoring that the channel quality parameters meet the first preset condition, it can be indicated that the channel quality is good, so the mobile phone can initiate negotiation of new transmission parameters and update time to increase the transmission rate. The mobile phone and the first earplug enable the new transmission parameters at the update time, and then exchange data (such as audio data and response information, etc.) on the CIS link according to the new transmission parameters.

[0198] In one implementation of this embodiment, the first preset condition is that the channel quality parameter is better than a preset value. For example, the channel quality parameter includes a packet loss rate, and the first preset condition is that the packet loss rate is less than or equal to a preset value 1. For another example, the channel quality parameter includes a packet loss rate and a packet error rate, and the first preset condition is that the packet loss rate is less than or equal to a preset value 1, and the packet error rate is less than or equal to a preset value 2. For another example, the channel quality parameter includes a signal-to-noise ratio, and the first preset condition is that the signal-to-noise ratio is greater than or equal to a preset value 3 (i.e., the first preset value).

[0199] In another implementation of this embodiment, the first preset condition is that the channel quality parameter becomes better. For example, the channel quality parameter includes CQI, and the first preset condition is that the CQI increases. For another example, the channel quality parameter includes signal-to-interference ratio, and the first preset condition is that the amplitude of the increase in the signal-to-interference ratio is greater than or equal to a preset value of 4. For another example, the channel quality parameter includes CQI and jitter, and the first preset condition is that the amplitude of the increase in CQI is greater than or equal to a preset value of 5, and the amplitude of the reduction in jitter is greater than or equal to a preset value of 6.

[0200] In one solution, if the previous channel quality parameter and the current channel quality parameter are both better than the preset value, and the degree of optimization of the current channel quality parameter over the previous channel quality parameter (such as the difference between the two) exceeds the adjustment threshold, the coding parameter and the transmission parameter are adjusted to increase the transmission rate and the coding rate; if the degree of optimization of the current channel quality parameter over the previous channel quality parameter does not exceed the adjustment threshold, the transmission rate and the coding rate are not increased. If the current channel quality parameter is worse than the preset value, but the degree of optimization of the current channel quality parameter over the previous channel quality parameter (such as the difference between the two) exceeds the adjustment threshold, the coding parameter and the transmission parameter are adjusted to increase the transmission rate and the coding parameter.

[0201] In another implementation of this embodiment, the channel quality parameter includes multiple channel quality parameters, each channel quality parameter corresponds to its own weight, and the first preset condition is that the total score of the channel quality parameter is greater than or equal to the preset value 0. Exemplarily, the scores of the channel quality parameters can be seen in the following Table 2. If the preset value 0 is 0.6 and the current total score is 0.8, the first preset condition is met.

[0202] Table 2

[0203]

[0204] When the mobile phone determines that the transmission parameters and update time need to be negotiated based on the channel quality parameters, the mobile phone can initiate the negotiation of the new transmission parameters and update time in different messages respectively; or, the mobile phone can also initiate the negotiation of the new transmission parameters and update time in the same message, which is not limited to the embodiments of the present application.

[0205] There are many ways for the mobile phone to initiate negotiation of new transmission parameters and update time.

[0206] For example, in a technical solution of this embodiment, the mobile phone can determine new transmission parameters and update time, and send them to the first earplug; the first earplug sends a confirmation message to the mobile phone; after receiving the confirmation message from the first earplug, the mobile phone implements the negotiation of new transmission parameters and update time.

[0207] The update time may be a time after the preset current time, or a time after the current time determined by the mobile phone according to the feedback capability of the underlying chip. For example, the update time may be the start time of the next ISO interval after the current ISO interval.

[0208] It should be noted that the mobile phone and the first earplug negotiate new transmission parameters through the LE ACL link. Specifically, the mobile phone and the first earplug may include a host and a link layer LL respectively, and the mobile phone also includes an audio encoder. Figure 8, the mobile phone monitors the channel quality by the mobile phone host instructing the mobile phone LL to monitor the channel quality, and the mobile phone LL reports it to the mobile phone host after determining that the first preset condition is met; or the mobile phone LL periodically detects the channel quality parameters and reports the channel quality parameters to the mobile phone host; the mobile phone host determines to increase the transmission rate and initiates negotiation on the transmission rate and update time. During the negotiation process, the mobile phone and the first earplug, and the mobile phone LL and the first earplug LL exchange negotiation information through LL commands; inside the mobile phone, the mobile phone host and the mobile phone LL exchange negotiation information through HCI commands; inside the first earplug, the first earplug host and the first earplug LL exchange negotiation information through HCI commands. The audio encoder of the mobile phone encodes the audio data output by the audio source, such as the pulse code modulation (PCM) code stream, and the mobile phone host transmits the encoded data packet according to the negotiated transmission parameters.

[0209] For example, after the CIS connection is established, the process of negotiating new transmission parameters and update time between the mobile phone and the first earplug can be seen in Figure 6 .like Figure 6 As shown, the process may include: 612. The mobile phone host may determine the new transmission parameters and update time, and send CIG parameter update information (such as LE Update CIG parameters message) to the mobile phone link layer LL, thereby delivering the new transmission parameters to the mobile phone LL. 613. The mobile phone LL replies to the mobile phone host with the fifth confirmation information (such as

[0210] 614. The mobile phone LL sends a CIS update request message (for example, a LL_CIS_update_REQ message) carrying the new transmission parameters and the update time to the first earplug LL, to request to update the established CIS connection according to the new transmission parameters. 615. The first earplug LL sends a CIS update response message (for example, a LL_CIS_update_RSP message) to the mobile phone LLC. 616. At the update time, the mobile phone LL and the first earplug LL enable the new transmission parameters. 617. The first earplug LL sends an update completion message (for example, a CIS_update_complete message) to the first earplug host to notify the first earplug host that the first earplug LL has received the new transmission parameters and the update time. 618. The first earplug LL sends an update confirmation message (for example, a CIS_update_complete or HCI Command status message) to the mobile phone LL. At this point, the negotiation of the new transmission parameters and the update time of the CIS link and the update of the new transmission parameters are completed between the mobile phone and the first earplug. Subsequently, the mobile phone and the first earplug exchange audio data and the response data of the audio data according to the new transmission parameters.

[0211] In another solution, the mobile phone and the first earbud do not need to negotiate the update time. After the mobile phone LL sends the CIS update request information to the first earbud LL, the new transmission parameters can be automatically enabled immediately and an update confirmation message can be sent to the mobile phone host. After the first earbud LL receives the CIS update request information sent by the mobile phone LL, the new transmission parameters can be automatically enabled and an update completion message can be sent to the first earbud host.

[0212] In another solution, the update time may not be negotiated between the mobile phone and the first earbud. After the mobile phone LL sends the CIS update request information to the first earbud LL, if the mobile phone LL receives a response message from the first earbud confirming receipt of the CIS update request information, the new transmission parameters will be enabled immediately. After the first earbud LL receives the CIS update request information sent by the mobile phone LL, the new transmission parameters can be automatically enabled and an update completion message can be sent to the first earbud host.

[0213] In another solution, the mobile phone and the first earplug may pre-agree on an update time, and the mobile phone enables the new transmission parameters at the Mth time after sending the CIS update request information, and the first earplug enables the new transmission parameters at the Kth time after receiving the CIS update request information. M and K are natural numbers.

[0214] After the mobile phone and the first earplug enable the new transmission parameters, when there is audio data that needs to be transmitted, the mobile phone and the first earplug can use the new transmission parameters to transmit the audio data. The moment when the mobile phone uses the new transmission parameters to send audio data can be the same as or different from the moment when the mobile phone enables the new transmission parameters. For example, the mobile phone can enable the new transmission parameters after sending the CIS update request information, and use the new transmission parameters to send audio data after receiving the update confirmation information sent by the first earplug. The moment when the first earplug uses the new transmission parameters to receive audio data can be the same as or different from the moment when the first earplug enables the new transmission parameters. For example, the first earplug can enable the new transmission parameters after receiving the CIS update request information, and use the new transmission parameters to receive audio data after receiving the update completion information.

[0215] In an embodiment of the present application, the method for improving the transmission rate by adjusting the transmission parameters may include increasing the duty cycle of the effective load or reducing retransmissions by adjusting the transmission parameters, thereby improving the transmission rate.

[0216] There are many specific methods for increasing the transmission rate by adjusting the transmission parameters. For example, when other transmission parameters remain unchanged, increase BN and NSE to increase the number of bursts that can be transmitted within the ISO interval and improve the transmission rate. For example, Figure 7 The transmission diagram shown corresponds to BN=2, NSE=4, FT=1, and the mobile phone transmits 2 payloads (i.e., payload 0 and 1) in ISO interval 1. Figure 7 On this basis, if the transmission rate needs to be increased, the negotiated NSE increases to 6 and the negotiated BN increases to 3 while other transmission parameters remain unchanged, that is, the number of bursts that can be transmitted within the ISO interval increases to 3. Fig. 9 FIG. 1 is a transmission diagram based on the adjusted new transmission parameters. The mobile phone can transmit three payloads (ie, payloads 2, 3, and 4) in ISO interval 2. Also, see Fig. 9 , the mobile phone and the first earplug can simultaneously enable new transmission parameters at the negotiated update time (ie, time 1), and transmit audio data and response information according to the new transmission parameters.

[0217] For another example, when other transmission parameters remain unchanged, BN is increased (where BN is less than NSE) to increase the number of bursts that can be transmitted within the ISO interval and improve the transmission rate. Figure 7 On the basis of, when BN increases to 3, the transmission diagram based on the new transmission parameters can be seen in Fig.10 .exist Fig.10 In ISO interval 2, the mobile phone can transmit 3 payloads (ie, payloads 2, 3 and 4).

[0218] For another example, when other transmission parameters remain unchanged, the ratio of BN to NSE is increased to transmit more bursts within the ISO interval, thereby improving the transmission rate.

[0219] For another example, the type of PHY is adjusted to increase the transmission bandwidth, thereby increasing the transmission rate.

[0220] For another example, when other transmission parameters remain unchanged, FT is reduced (where FT is greater than or equal to 1) to reduce the time occupied by retransmission, so that more audio data can be transmitted.

[0221] For another example, when other transmission parameters remain unchanged, the sub-event duration can be increased, and multiple payloads can be aggregated and transmitted within one sub-event duration, or the payload size can be increased to increase the time length during which the payload can be transmitted within the sub-event duration, thereby increasing the number of payloads that can be transmitted within the sub-event duration and improving the transmission rate. Figure 7 On the basis of, if the sub-event duration is doubled, two payloads can be aggregated within one sub-event duration. The transmission diagram corresponding to the new transmission parameters can be found in Fig.11 .exist Fig.11 In the example, two payloads (eg, payload 2 and payload 3) can be sent within one sub-event duration within ISO interval 2.

[0222] For another example, any combination of increasing BN, increasing BN and NSE, increasing the ratio of BN to NSE, increasing sub-event duration, decreasing FT, and increasing transmission bandwidth.

[0223] In addition, if the first earbud cannot accept the new transmission parameters sent by the mobile phone, the transmission parameter update request of the mobile phone can be rejected; or, the first earbud can notify the mobile phone that it cannot be accepted, and the mobile phone can re-determine the new transmission parameters and send them to the first earbud for confirmation.

[0224] In another technical solution of this embodiment, the mobile phone can determine the candidate values ​​and update time of the new transmission parameters and send them to the first earplug. The first earplug determines the target value of the new transmission parameter from the candidate values ​​and sends it to the mobile phone. After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug, thereby realizing the negotiation of the new transmission parameters and update time. Exemplarily, the candidate values ​​of the new transmission parameters can be candidate value 1: BN=3, NSE=4, FT=1; candidate value 2: BN=3, NSE=6, FT=1. Among them, the transmission parameters not involved in the candidate values, such as PHY type, sub-event duration, etc., do not change by default.

[0225] In another technical solution of this embodiment, the mobile phone can determine the maximum value and minimum value of the new transmission parameter and the update time, and send them to the first earplug. The first earplug determines the target value according to the maximum value and minimum value range of the new transmission parameter and sends it to the mobile phone. After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug, thereby realizing the negotiation of the new transmission parameter and the update time.

[0226] In another technical solution of this embodiment, the mobile phone can determine the reference value of the new transmission parameter and the update time, and send them to the first earplug. The first earplug determines the target value (the target value may be the same as or different from the reference value) according to the reference value of the new transmission parameter and sends it to the mobile phone. After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug, thereby realizing the negotiation of the new transmission parameter and the update time.

[0227] In another technical solution of this embodiment, the mobile phone notifies the first earplug to start negotiating transmission parameters; the first earplug sends new transmission parameters and update time to the mobile phone. The mobile phone replies a confirmation message to the first earplug to achieve the negotiation of new transmission parameters and update time.

[0228] In another technical solution of this embodiment, the mobile phone notifies the first earplug to start negotiating new transmission parameters; the first earplug sends a confirmation message to the mobile phone. The mobile phone determines the new transmission parameters and update time and sends them to the first earplug. After the mobile phone receives the confirmation message replied by the first earplug, the negotiation of the new transmission parameters and update time is realized.

[0229] In another technical solution of this embodiment, the mobile phone can determine the new transmission parameters and send them to the first earbud; after receiving the confirmation message from the first earbud, the new transmission parameters are negotiated. Then, the mobile phone can also determine the update time and send it to the first earbud; after receiving the confirmation message from the first earbud, the update time is negotiated.

[0230] It should be noted that the above description of the method for the mobile phone to initiate negotiation of new transmission parameters and update time is only an example, and there may be other negotiation methods, which are not limited in the embodiments of the present application.

[0231] In another embodiment, the first earplug monitors the channel quality and sends the channel quality parameters to the mobile phone, and then the mobile phone initiates the adjustment of the transmission rate, that is, initiates the negotiation of new transmission parameters and update time with the first earplug to improve the transmission rate. The specific negotiation process of the new transmission parameters and update time can refer to the description of the above embodiment, for example, Figure 6 The CIS transmission parameter update process in the subsequent embodiments will not be described in detail.

[0232] In another embodiment, the mobile phone instructs the first earplug to monitor the channel quality. The first earplug monitors the channel quality according to the instruction of the mobile phone and sends the channel quality parameters to the mobile phone. The mobile phone initiates transmission rate adjustment according to the channel quality parameters to improve the transmission rate.

[0233] In another embodiment, the mobile phone instructs the first earbud to monitor the channel quality, and the first earbud monitors the channel quality according to the instruction of the mobile phone. When the first earbud determines that the channel quality parameter meets the first preset condition, it can send a first message to the mobile phone; the mobile phone initiates the adjustment of the transmission rate according to the first information, that is, initiates the negotiation of new transmission parameters and update time with the first earbud to improve the transmission rate.

[0234] In another case, the first earbud may actively initiate the adjustment of the transmission rate.

[0235] In one embodiment, the first earplug performs channel quality monitoring, or the first earplug performs channel quality monitoring after receiving an instruction from the mobile phone, and initiates adjustment of the transmission rate according to the channel quality parameter. If the first earplug determines that the channel quality parameter meets the first preset condition, it initiates negotiation of new transmission parameters and update time to increase the transmission rate.

[0236] In another embodiment, the mobile phone monitors the channel quality and sends the channel quality parameter to the first earplug, and then the first earplug initiates the adjustment of the transmission rate according to the channel quality parameter.

[0237] In another embodiment, the first earplug instructs the mobile phone to monitor the channel quality. The mobile phone monitors the channel quality according to the instruction of the first earplug and sends the channel quality parameters to the first earplug. Then the first earplug initiates the adjustment of the transmission rate according to the channel quality parameters.

[0238] In another embodiment, the first earplug instructs the mobile phone to monitor the channel quality, and the mobile phone monitors the channel quality according to the instruction of the first earplug. When the mobile phone determines that the channel quality parameter meets the first preset condition, the mobile phone can send a first message to the first earplug; the first earplug initiates negotiation of new transmission parameters and update time according to the first information to improve the transmission rate.

[0239] It should be noted that Figure 8 The scheme shown is consistent with that in other schemes, the mobile phone and the first earplug can still negotiate new transmission parameters and update time through host, LL, HCI commands and LL commands, which will not be described in detail in the embodiments of the present application.

[0240] It should also be noted that in the above-mentioned transmission parameter negotiation process, the transmission parameters exchanged between the mobile phone and the first earplug may include only the changed transmission parameters or the unchanged transmission parameters, which is not limited in the present embodiment. For example, the changed transmission parameters are BN, and the transmission parameters such as NSE and FT have not changed; in one method, Figure 6 The LE Update CIG parameters message and LL_CIS_update_REQ message in the LL_CIS_update_REQ message include the changed BN, but do not include other transmission parameters such as NSE and FT that have not changed. In another method, Figure 6 The LE Update CIGparameters message and LL_CIS_update_REQ message include the changed BN, as well as other transmission parameters such as NSE and FT that have not changed.

[0241] When the channel quality parameters meet the first preset condition mentioned above, after the mobile phone and the first earplug negotiate new transmission parameters, the mobile phone can also determine new coding parameters to increase the coding rate. In other words, if the channel quality parameters meet the first preset condition, it can indicate that the channel quality is good, so the mobile phone can determine new coding parameters to increase the coding rate; and initiate negotiation of new transmission parameters and update time to increase the transmission rate. In addition, the mobile phone can also carry the new coding parameters in the audio data packet and send it to the first earplug. After receiving the audio data packet, the first earplug decodes according to the coding parameters. For example, see Figure 8 , after satisfying the first preset condition and adjusting the transmission parameters, the mobile phone can determine new encoding parameters to increase the encoding rate. As described above, there are many ways to increase the encoding rate by adjusting the encoding parameters. For example, in the mono case shown in Table 1, when the sampling rate, number of sub-bands, number of channels, block length, allocation method and other parameters remain unchanged, the bitpool value can be increased from 18 to 29, thereby increasing the encoding rate from 132kb / s to 198kb / s. For another example, in the joint stereo case shown in Table 1, when the number of sub-bands, number of channels, block length, allocation method and other parameters remain unchanged, the sampling rate can be increased from 44.1kHz to 48kHz, and the bitpool value can be increased from 35 to 51, thereby increasing the encoding rate from 229kb / s to 345kb / s.

[0242] In a specific example, for an SBC encoder, a mobile phone can determine the target coding rate to be adopted according to the packet loss rate, thereby achieving the target coding rate of the mobile phone by adjusting the bitpool corresponding to the target coding rate. For example, referring to Table 3, the mobile phone is provided with a corresponding relationship between a packet loss rate of 1, a preset value of 1, a target coding rate, and a target bitpool value. When the packet loss rate is less than or equal to the preset value 1, the channel quality is good, and the mobile phone can adjust the bitpool value to the corresponding target bitpool value of 53, thereby using a higher target coding rate of 328 kb / s to encode the audio data; when the packet loss rate is greater than the preset value 1, the channel quality is poor, and the mobile phone can adjust the bitpool value to the corresponding target bitpool value of 35, thereby using a lower target coding rate of 229 kb / s to encode the audio data.

[0243] Table 3

[0244] First Precondition Target encoding rate Bipool value The packet loss rate is less than or equal to the preset value 1 328kb / s 53 The packet loss rate is greater than the preset value 1 229kb / s 35 … … …

[0245] The other specific methods of increasing the encoding rate by adjusting the encoding parameters are not described in detail in the embodiment of the present application. Then, the audio encoder of the mobile phone encodes the audio data according to the new encoding parameters.

[0246] After determining the new encoding parameters, the mobile phone may send the new encoding parameters to the first earplug via an audio data packet, so that the first earplug may perform decoding according to the new encoding parameters.

[0247] The above is mainly explained by taking the case where the channel quality parameters need to satisfy the same conditions when increasing the coding rate and when increasing the transmission rate as an example. In other embodiments, the conditions that the channel quality parameters need to satisfy when increasing the coding rate and when increasing the transmission rate may also be different. For example, the mobile phone may monitor the channel quality, or the mobile phone may instruct the first earplug to monitor the channel quality.

[0248] When the mobile phone determines by itself or according to the information reported by the first earplug that the channel quality parameter meets the first preset condition, the transmission rate can be increased. The specific method of increasing the transmission rate can refer to the relevant description in the above embodiment and will not be repeated here.

[0249] When the mobile phone determines by itself or according to the information reported by the first earplug that the channel quality parameter meets the third preset condition, it can be indicated that the channel quality is good, so that a new coding parameter can be determined to increase the coding rate. Among them, the third preset condition is different from the first preset condition. For example, the first preset condition can be that the packet loss rate is less than or equal to the preset value 1, and the third preset condition can be that the packet loss rate is less than or equal to the preset value 9, and the preset value 9 is not equal to the preset value 1. The specific method of adjusting the transmission parameters and the method of adjusting the coding parameters can refer to the description in the above embodiment, which will not be repeated here.

[0250] Scenario 2: When the channel quality is poor, first reduce the coding rate and then reduce the transmission rate.

[0251] In this scenario, the mobile phone may first determine new encoding parameters to reduce the encoding rate; and then, the mobile phone and the first earplug negotiate new transmission parameters to reduce the transmission rate.

[0252] Similar to the case in which the mobile phone increases the transmission rate and the coding rate when determining that the first preset condition is met in scenario 1, in scenario 2, the mobile phone can monitor the channel quality, or the mobile phone can instruct the first earplug to monitor the channel quality. When the mobile phone determines by itself or based on the information reported by the first earplug that the channel quality parameter meets the second preset condition, it can indicate that the channel quality is poor, and thus a new coding parameter can be determined to reduce the coding rate.

[0253] Corresponding to the first preset condition, in one embodiment, the second preset condition is that the channel quality parameter is worse than the preset value. For example, the channel quality parameter includes the packet loss rate, and the first preset condition is that the packet loss rate is greater than or equal to the preset value 11, and the preset value 11 is greater than or equal to the preset value 1. For another example, the channel quality parameter includes the packet loss rate and the packet error rate, and the first preset condition is that the packet loss rate is greater than or equal to the preset value 11, and the packet error rate is greater than or equal to the preset value 12, and the preset value 12 is greater than or equal to the preset value 2. For another example, the channel quality parameter includes the signal-to-noise ratio, and the first preset condition is that the signal-to-noise ratio is less than or equal to the preset value 13 (i.e., the second preset value), and the preset value 13 is less than or equal to the preset value 3.

[0254] In another embodiment, the second preset condition is that the channel quality parameter deteriorates. For example, the channel quality parameter includes COI, and the first preset condition is that the CQI decreases. For another example, the channel quality parameter includes signal-to-interference ratio, and the first preset condition is that the amplitude of the decrease in the signal-to-interference ratio is greater than or equal to a preset value of 14. For another example, the channel quality parameter includes CQI and jitter, and the first preset condition is that the amplitude of the decrease in CQI is greater than or equal to a preset value of 15, and the amplitude of the increase in jitter is greater than or equal to a preset value of 16.

[0255] In another embodiment, the channel quality parameter includes multiple channel quality parameters, each channel quality parameter has its own corresponding weight, and the second preset condition is that the total score of the channel quality parameter is less than the preset value 10. Exemplarily, the score of the channel quality parameter can be seen in Table 1, and the preset value 10 can be 0.5.

[0256] For example, see Fig.12 , the mobile phone host instructs the mobile phone LL to monitor the channel quality, and the mobile phone LL reports to the mobile phone host after determining that the second preset condition is met, and the mobile phone host determines new coding parameters to reduce the coding rate. As described above, there are many ways to reduce the coding rate by adjusting the coding parameters. For example, in the case of mono, when the sampling rate, number of sub-bands, number of channels, block length, allocation method and other parameters remain unchanged, the mobile phone can reduce the bitpool value from 18 to 16 to reduce the coding rate. Other specific ways of reducing the coding rate by adjusting the coding parameters are not described in detail in the embodiments of the present application.

[0257] If the mobile phone determines through channel quality monitoring that the channel quality parameter meets the second preset condition, it can indicate that the channel quality is poor, so the mobile phone can initiate negotiation of new transmission parameters and update time to reduce the transmission rate. For example, see Fig.12 , the mobile phone initiates negotiation of new transmission parameters and update time to reduce the transmission rate. The mobile phone and the first earplug enable the new transmission parameters at the update time, and then exchange data (such as audio data and response information, etc.) on the CIS link according to the new transmission parameters.

[0258] In an embodiment of the present application, the method of reducing the transmission rate by adjusting the transmission parameters may include reducing the duty cycle of the effective load or increasing retransmissions by adjusting the transmission parameters, thereby reducing the transmission rate.

[0259] There are many specific methods for reducing the transmission rate by adjusting the transmission parameters. For example, when other transmission parameters remain unchanged, reduce BN (where BN is less than NSE) to reduce the number of bursts that can be transmitted within the ISO interval and reduce the transmission rate. Figure 7 On the basis of, when BN is reduced to 1, the transmission diagram based on the new transmission parameters can be seen in Fig.13 .exist Fig.13 Only one payload can be transmitted in ISO interval 2.

[0260] For another example, when other transmission parameters remain unchanged, BN and NSE are reduced to reduce the number of bursts that can be transmitted within the ISO interval and reduce the transmission rate.

[0261] For another example, when other transmission parameters remain unchanged, the ratio of BN to NSE is reduced to transmit a smaller number of bursts within the ISO interval, thereby reducing the transmission rate.

[0262] For another example, the type of PHY is adjusted to reduce the transmission bandwidth, thereby lowering the transmission rate.

[0263] For another example, when other transmission parameters remain unchanged, FT is increased (where FT is greater than or equal to 1) to increase the time available for retransmission, thereby reducing the amount of audio data that can be transmitted and reducing the transmission rate. Figure 7 On the basis of , when FT increases to 2, the transmission diagram based on the new transmission parameters can be seen in Fig.14 .exist Fig.14 In the embodiment, the refresh point of payload 2 that starts to be transmitted in ISO interval 2 is within ISO interval 3. Therefore, if payload 2 is not successfully received within ISO interval 2, it can be continuously retransmitted until the refresh point within ISO interval 3, thereby reducing the time for transmitting other payloads.

[0264] For another example, when other transmission parameters remain unchanged, the sub-event duration is reduced to reduce the time length that can transmit the effective load and reduce the transmission rate.

[0265] For another example, any combination of reducing BN, reducing BN and NSE, reducing the ratio of BN to NSE, reducing sub-event duration, increasing FT, and reducing transmission bandwidth.

[0266] In a specific example of adjusting the encoding rate and transmission rate, see Fig.15, the mobile phone side (i.e. the source end) includes an audio application, an encoder, a rate adjustment module, a channel quality monitoring module, a protocol stack and a controller. The first earplug side (i.e. the destination end) includes a controller, a protocol stack, a decoder and an analog output module. The channel quality monitoring module can be performed through the retransmission rate or other QoS indicators reported by the controller. When the channel quality is lower than the threshold, the channel quality is poor. The rate adjustment module can first adjust the Bluetooth encoder to reduce its encoding rate, for example, modify the SBC bitpool value from 53 to 35, and the encoding rate from 328kbps to 229kbps. Then, the rate adjustment module controls the protocol stack to update the transmission parameters of the CIS to adapt to the change in the encoding rate. The protocol stack sends the above-mentioned HCI command (such as the LE Update CIG parameters message) to the controller, and then the controller sends a command (such as the above-mentioned LL_CIS_update_REQ message) to the other end through the above-mentioned LL command to adjust the transmission parameters of the CIS. For example, the transmission parameters of the original CIS may include: Interval = 20ms, NSE = 8, BN = 2, and the new transmission parameters of the updated CIS may include: Interval = 20ms, NSE = 8, BN = 1. The purpose of updating the CIS transmission parameters is to reduce the throughput of the actual over the air technology (OTA) and the transmission rate when the channel quality deteriorates, so that each packet of data has more retransmission opportunities, so that the destination can correctly receive the data packet, thereby improving the audio quality.

[0267] The above is mainly explained by taking the same conditions that the channel quality parameters need to meet when reducing the coding rate and reducing the transmission rate as an example. In other embodiments, the conditions that the channel quality parameters need to meet when reducing the coding rate and reducing the transmission rate may also be different. For example, when the channel quality parameter meets the second preset condition, the coding rate is reduced; when the fourth preset condition is met, the transmission rate is reduced.

[0268] In some other embodiments, the mobile phone may adjust the encoding parameters and the transmission parameters respectively according to different scenarios and adjustment sequences.

[0269] For adjusting the coding parameters, the mobile phone may monitor the channel quality, or the mobile phone may instruct the first earplug to monitor the channel quality. When the mobile phone determines by itself or according to the information reported by the first earplug that the channel quality parameter meets the second preset condition, the coding parameters are adjusted to increase or decrease the coding rate.

[0270] For the adjustment of transmission parameters, the mobile phone and the first earplug can adjust the transmission parameters in the manner described in scenario 1, thereby increasing the transmission rate; correspondingly, the mobile phone and the first earplug can also adjust the transmission parameters in a similar manner, thereby reducing the transmission rate. For example, the mobile phone performs channel quality monitoring and initiates the adjustment of the transmission rate according to the channel quality parameters. If the mobile phone determines through channel quality monitoring that the channel quality parameters meet the first preset condition, it can be indicated that the channel quality is good, so the mobile phone can determine new transmission parameters and update time, and send them to the first earplug; the first earplug sends a confirmation message to the mobile phone; after receiving the confirmation message from the first earplug, the mobile phone implements the negotiation of new transmission parameters and update time to increase the transmission rate. If the mobile phone determines through channel quality monitoring that the channel quality parameters meet the second preset condition, it can be indicated that the channel quality is poor, so the mobile phone can determine new transmission parameters and update time, and send them to the first earplug; the first earplug sends a confirmation message to the mobile phone; after receiving the confirmation message from the first earplug, the mobile phone implements the negotiation of new transmission parameters and update time to reduce the transmission rate.

[0271] For another example, the mobile phone instructs the first earplug to monitor the channel quality. The first earplug monitors the channel quality according to the instruction of the mobile phone. The first earplug can send a first message to the mobile phone when it is determined that the channel quality parameter meets the first preset condition; the mobile phone initiates a negotiation of a new transmission parameter and an update time according to the first message to increase the transmission rate. The first earplug can send a second message to the mobile phone when it is determined that the channel quality parameter meets the second preset condition; the mobile phone initiates a negotiation of a new transmission parameter and an update time according to the second message to reduce the transmission rate.

[0272] In addition, in other embodiments, different transmission parameters and coding parameters can be negotiated between the mobile phone and the first earplug according to the quality of the channel. For example, the better the channel quality, the higher the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earplug, and the higher the coding rate corresponding to the coding parameter determined by the mobile phone; the worse the channel quality, the lower the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earplug, and the lower the coding rate corresponding to the new coding parameter determined by the mobile phone. For example, the channel quality parameter includes a packet loss rate. If the packet loss rate is less than or equal to a preset value of 1, the new transmission parameter negotiated between the mobile phone and the first earplug is transmission parameter 1, and the new coding parameter determined by the mobile phone is coding parameter 1. If the packet loss rate is less than or equal to a preset value of 17, the new transmission parameter negotiated between the mobile phone and the first earplug is transmission parameter 2, and the new coding parameter determined by the mobile phone is coding parameter 2. Among them, the preset value 17 is less than the preset value 1. The smaller the packet loss rate, the better the channel quality, the transmission rate corresponding to transmission parameter 2 is higher than the transmission rate corresponding to transmission parameter 1; the coding rate corresponding to coding parameter 2 is higher than the coding rate corresponding to coding parameter 1. In one embodiment, the channel quality may include multiple gears, and the higher the gear, the better the channel quality; and the higher the gear, the higher the transmission rate corresponding to the new transmission parameters negotiated between the mobile phone and the first earplug, and the higher the transmission rate corresponding to the new encoding parameters determined by the mobile phone.

[0273] In other embodiments, different transmission parameters and coding parameters may be negotiated between the mobile phone and the first earplug according to the magnitude of improvement or reduction of the channel quality. For example, the greater the magnitude of channel quality improvement, the higher the transmission rate corresponding to the transmission parameter negotiated between the mobile phone and the first earplug, and the higher the coding rate corresponding to the coding parameter determined by the mobile phone; the greater the magnitude of channel quality reduction, the lower the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earplug, and the lower the coding rate corresponding to the coding parameter determined by the mobile phone. For example, the channel quality parameter includes a packet loss rate. If the magnitude of the decrease in the packet loss rate is greater than or equal to a preset value of 18, the new transmission parameter negotiated between the mobile phone and the first earplug is transmission parameter 3, and the new coding parameter determined by the mobile phone is coding parameter 3; if the magnitude of the packet loss rate is smaller than or equal to a preset value of 19, the new transmission parameter negotiated between the mobile phone and the first earplug is transmission parameter 4, and the new coding parameter determined by the mobile phone is coding parameter 4. Among them, the preset value 19 is less than the preset value 18, the smaller the amplitude of the packet loss rate reduction is, the greater the amplitude of the channel quality improvement is, the transmission rate corresponding to the transmission parameter 4 is higher than the transmission rate corresponding to the transmission parameter 3, and the coding rate corresponding to the coding parameter 4 is higher than the coding rate corresponding to the coding parameter 3. In one embodiment, the amplitude of the channel quality improvement may include multiple gears, and the higher the gear, the greater the amplitude of the channel quality improvement is; and the higher the gear, the higher the transmission rate corresponding to the new transmission parameters negotiated between the mobile phone and the first earplug, and the higher the coding rate corresponding to the new coding parameters determined by the mobile phone. The amplitude of the channel quality reduction may also include multiple gears, and the higher the gear, the greater the amplitude of the channel quality reduction is; and the higher the gear, the lower the transmission rate corresponding to the transmission parameters negotiated between the mobile phone and the first earplug, and the lower the coding rate corresponding to the new coding parameters determined by the mobile phone.

[0274] In addition, the transmission parameters may also include multiple gears, and the transmission parameters of different gears correspond to different transmission rates; and the higher the gear of the transmission parameter, the higher the corresponding transmission rate. For example, the transmission parameter corresponding to the current CIS link is the transmission parameter corresponding to gear i; when the transmission rate needs to be increased, the mobile phone can send the transmission parameter of the previous gear i to the first earplug; when the transmission rate needs to be reduced, the mobile phone can send the transmission parameter of the next gear i to the first earplug. Exemplarily, the correspondence between gears, transmission parameters, encoding parameters and transmission rates can be seen in Table 4 below.

[0275] Table 4

[0276]

[0277] In addition, in other embodiments, the coding parameters may also be determined by negotiation between the mobile phone and the first earplug. For example, the mobile phone notifies the first earplug, the first earplug sends the range of the coding parameters to the mobile phone, the mobile phone determines the target coding parameters according to the range of the coding parameters, and sends the target coding parameters to the first earplug, and the mobile phone implements the negotiation of the coding parameters after receiving the confirmation message from the first earplug. Specifically, the negotiation process of the coding parameters between the mobile phone and the first earplug can be analogous to the negotiation process of the transmission parameters, which will not be repeated here.

[0278] In other embodiments, the reference parameter may include the amount of data to be transmitted. The amount of data to be transmitted may be Figure 5 The amount of audio data that has been encoded and not yet transmitted in the buffer 2 in the buffer. In one scheme, when the amount of data to be transmitted is greater than or equal to the first preset threshold, it can be indicated that the transmission rate is low or the encoding rate is high, and the data to be transmitted is accumulated, so the transmission rate can be increased and / or the encoding rate can be reduced to prevent the buffer 2 from overflowing. In another scheme, when the amount of data to be transmitted is greater than or equal to the first preset threshold, the channel quality may be poor, so that the data to be transmitted is accumulated, so the encoding rate and the transmission rate can be reduced, so that the data packet has more retransmission opportunities, so that the destination can correctly receive the data packet, thereby improving the audio quality. In another scheme, when the amount of data to be transmitted is less than or equal to the second preset threshold, it can be indicated that the transmission rate is high or the encoding rate is low, and the amount of data to be transmitted is small, so the transmission rate can be reduced and / or the encoding rate can be increased. In another scheme, when the amount of data to be transmitted is less than or equal to the second preset threshold, the data to be transmitted is small, and the channel quality may be good, so the encoding rate and the transmission rate can be increased to improve the transmission performance. Among them, the second preset threshold is less than the first preset threshold, for example, the first preset threshold can be 80%, and the second preset threshold can be 20%. The first preset threshold may be waterline 1 in buffer zone 2, and the second preset threshold may be waterline 2 in buffer zone 2; the second preset threshold may be less than or equal to the first preset threshold.

[0279] It should be noted that, according to the above description, when the amount of data to be transmitted is greater than or equal to the first preset threshold, the transmission rate can be reduced or increased, but due to the limitations of existing technology, reducing the transmission rate is more feasible.

[0280] In a specific example of adjusting the coding rate, the mobile phone is provided with a plurality of gears (such as the gears shown in Table 4) of coding rate. If the amount of data to be transmitted is greater than or equal to the first preset threshold value and the coding rate needs to be reduced, the mobile phone can reduce the coding rate to the lowest gear (such as gear 1); then, the mobile phone can periodically detect the size of the amount to be transmitted, and if the amount of data to be transmitted is still greater than or equal to the first preset threshold value, the mobile phone can continue to use the coding rate of the lowest gear; if the amount of data to be transmitted is less than the first preset threshold value, the mobile phone can increase the coding rate by one gear.

[0281] If the amount of data to be transmitted is less than or equal to the second preset threshold and the encoding rate needs to be increased, the mobile phone can increase the encoding rate to the highest level; then, the mobile phone can periodically detect the size of the amount to be transmitted. If the amount of data to be transmitted is still less than or equal to the second preset threshold, the mobile phone can continue to use the highest level encoding rate; if the amount of data to be transmitted is greater than the second preset threshold, the mobile phone can reduce the encoding rate by one level.

[0282] It is understandable that, similar to the encoding parameters of multiple gears, the mobile phone can also have transmission parameters of multiple gears, and the mobile phone can also adjust the transmission rate through the transmission parameters of multiple gears, which will not be elaborated here.

[0283] In a specific example of adjusting the encoding rate and transmission rate, see Fig.16, the mobile phone side includes an audio application, an encoder, a rate adjustment module, a sending queue, a queue monitoring module, a protocol stack and a controller. The first earplug side includes a controller, a protocol stack, a decoder and an analog output module. When the queue monitoring module determines that the sending queue exceeds the waterline 1, the amount of data to be transmitted is greater than or equal to the first preset threshold, and the channel quality may be poor. The rate adjustment module can first adjust the Bluetooth encoder to reduce its encoding rate, for example, modify the bitpool value of SBC from 53 to 35, and the encoding rate from 328kbps to 229kbps. Then, the rate adjustment module controls the protocol stack to update the transmission parameters of the CIS to adapt to the change of the encoding rate. The protocol stack sends the above-mentioned HCI command (such as the LE Update CIG parameters message) to the controller, and then the controller sends a command (such as the above-mentioned LL_CIS_update_REQ message) to the opposite end through the above-mentioned LL command to adjust the transmission parameters of the CIS. For example, the transmission parameters of the original CIS may include: Interval=20ms, NSE=8, BN=2, and the new transmission parameters of the updated CIS may include: Interval=20ms, NSE=8, BN=1. The purpose of updating the CIS transmission parameters is to reduce the actual over the air technology (OTA) throughput and the transmission rate when the channel quality deteriorates, so that each packet of data has more retransmission opportunities, so that the destination can correctly receive the data packet, thereby improving the audio quality.

[0284] On the contrary, when the queue monitoring module determines that the sending queue is below waterline 2, the amount of data to be transmitted is less than or equal to the second preset threshold, and the channel quality may be good. The rate adjustment module can also first adjust the transmission parameters to increase the transmission rate, and then adjust the encoding parameters to increase the encoding rate, so that the transmission rate and the encoding rate are adapted, which will not be elaborated here.

[0285] In another scheme, a mapping relationship between a preset amount of data to be transmitted, encoding parameters, and transmission parameters is stored on the mobile phone. If the amount of data to be transmitted of the encoded audio data is greater than or equal to a preset threshold value 1, the mobile phone determines new transmission parameters based on the mapping relationship between the amount of data to be transmitted and the preset amount of data to be transmitted, encoding parameters, and transmission parameters, so that the rate of audio data encoding using the new encoding parameters is less than the rate of audio data encoding using the original encoding parameters, and the transmission rate of audio data transmitted using the new transmission parameters is less than the transmission rate using the original transmission parameters. If the amount of data to be transmitted of the encoded audio data is less than or equal to a preset threshold value 2, the mobile phone determines new transmission parameters based on the mapping relationship between the amount of data to be transmitted and the preset amount of data to be transmitted, encoding parameters, and transmission parameters, so that the rate of audio data encoding using the new encoding parameters is greater than the rate of audio data encoding using the original encoding parameters, and the transmission rate of audio data transmitted using the new transmission parameters is greater than the transmission rate using the original transmission parameters.

[0286] In other embodiments, the reference parameters may include channel quality parameters and the amount of data to be transmitted. In one embodiment, when the amount of data to be transmitted is greater than or equal to the third preset threshold, and the channel quality parameter meets the situation described in the above embodiment where the transmission rate and the coding rate need to be increased, the method described in the above embodiment may be used to adjust the transmission parameters and the coding parameters, thereby increasing the transmission rate and the coding rate. In another embodiment, when the amount of data to be transmitted is less than the third preset threshold, and the channel quality parameter meets the situation described in the above embodiment where the coding rate and the transmission rate need to be reduced, the method described in the above embodiment may be used to adjust the coding parameters and the transmission parameters, thereby reducing the coding rate and the transmission rate. In another embodiment, when the amount of data to be transmitted is less than the third preset threshold, and the channel quality parameter meets the situation described in the above embodiment where the transmission rate and the coding rate need to be increased, the transmission parameters and the coding parameters may not be adjusted, thereby not increasing the transmission rate and the coding rate. In another embodiment, when the amount of data to be transmitted is greater than or equal to the third preset threshold, and the channel quality parameter meets the situation described in the above embodiment where the coding rate and the transmission rate need to be reduced, the transmission parameters may not be adjusted, thereby not reducing the coding rate and the transmission rate.

[0287] It should also be noted that the above is explained by taking the example of a mobile phone adjusting the encoding rate by adjusting the encoding parameters of the encoder used. In other embodiments, the encoder used by the mobile phone may also include different encoding modes, and different encoding modes may correspond to different encoding rates. The mobile phone may also adjust the encoding rate by switching different encoding modes. For example, in one division method, the HWA encoder may include a high-speed encoding mode, a medium-speed encoding mode, and a low-speed encoding mode. If the encoding mode currently used is a medium-speed encoding mode, when it is determined according to the above reference parameters that the encoding rate needs to be increased, it can be switched to a high-speed encoding mode; when it is determined according to the above reference parameters that the encoding rate needs to be reduced, it can be switched to a low-speed encoding mode. In addition, the mobile phone can also notify the first earplug of the current encoding mode in the audio data packet so that the first earplug uses the corresponding decoding method for decoding.

[0288] In other embodiments, the mobile phone may further include a plurality of different encoders, and different encoders may correspond to different encoding rates. The mobile phone may also adjust the encoding rate by switching different encoders. For example, in one division method, the encoder in the mobile phone may include three types of encoders: high sound quality, medium sound quality, and low delay. High sound quality encoders may include LDAC encoders, aptX HD encoders, HWA encoders, etc.; medium sound quality encoders may include SBC encoders, AAC encoders, aptX encoders, etc.; low delay encoders may include aptX LL encoders, HWA LL encoders, etc. If the encoder currently used is a medium sound quality encoder, for example, an SBC encoder, when it is determined according to the above reference parameters that the encoding rate needs to be increased, it may be switched to a high sound quality encoder, such as an aptX HD encoder; when it is determined according to the above reference parameters that the encoding rate needs to be reduced, it may be switched to a low delay encoder, such as an aptX LL encoder. After switching the encoder, the mobile phone may also notify the first earplug of the switched new encoder through control signaling on the LE ACL link, so that the first earplug uses the corresponding decoding method for decoding.

[0289] It should be noted that in the embodiments of the present application, there may be multiple strategies for the mobile phone to adjust the coding rate and the transmission rate. For example, the mobile phone may use a preset rate adjustment method to adjust the coding rate and the transmission rate. For another example, the mobile phone is preset with multiple rate adjustment methods, and the mobile phone may randomly select one of them to adjust the coding rate and the transmission rate. For another example, the mobile phone may store a correspondence between preset conditions and rate adjustment methods, and the mobile phone may use the corresponding rate adjustment method to adjust the coding rate and the transmission rate when a certain preset condition is met. For another example, when adjusting the coding rate, the mobile phone may adjust a different coding parameter each time to increase or decrease the coding rate; when adjusting the transmission rate, the mobile phone may adjust a different transmission rate each time to increase or decrease the transmission rate. For another example, when the channel quality is good, the mobile phone can adjust fewer types of coding parameters and transmission parameters to increase the coding rate and transmission rate; when the channel quality is very good, the mobile phone can adjust more types of coding parameters and transmission parameters to increase the coding rate and transmission rate; correspondingly, when the channel quality is poor, the mobile phone can adjust fewer types of coding parameters and transmission parameters to reduce the coding rate and transmission rate; when the channel quality is very poor, the mobile phone can adjust more types of coding parameters and transmission parameters to reduce the coding rate and transmission rate. Alternatively, the mobile phone can adjust one or more coding parameters and transmission parameters in a preset order or randomly each time; the adjustment process can be a dynamic adjustment, each time the parameters are adjusted according to a preset step size, and the reference parameters are continuously detected after the adjustment, and whether to continue to adjust and how to adjust are determined according to the detection results. Alternatively, the mobile phone can refer to the existing rate adjustment strategy in the prior art to adjust the transmission rate, which is not limited in the embodiments of the present application. Alternatively, the mobile phone can refer to the existing rate adjustment strategy in the prior art to adjust the coding rate and transmission rate, which is not limited in the embodiments of the present application.

[0290] It should also be noted that the above embodiment is described by taking the example of adaptively adjusting the encoding rate and transmission rate of audio data between the mobile phone and the first earplug of the TWS headset in the dual-transmission scheme. In the non-dual-transmission scheme, the encoding rate and transmission rate of audio data can also be adaptively adjusted between the mobile phone and the main earplug of the TWS. The specific process can be found in the description in the above embodiment, which will not be repeated here. In addition, the auxiliary earplug can also obtain the adjusted new encoding parameters and transmission parameters from the main earplug, so as to receive the audio data sent by the mobile phone according to the new encoding parameters and transmission parameters.

[0291] It should be noted that the above embodiments are mainly illustrated by taking the dual-transmission solution in which the mobile phone is the source of audio data and the first earplug of the TWS headset is the destination of the audio data as an example. When the second earplug of the TWS headset is the destination, the adaptive adjustment process of the coding rate and the transmission rate is the same as the above process and will not be repeated here.

[0292] In the dual-transmission scheme, when the mobile phone is the source of audio data and the two earplugs of the TWS headset are the destinations of audio data, the encoding rate and transmission rate of the audio data sent by the mobile phone to the two earplugs can be the same or different, which is not limited in the embodiment of the present application. For the audio data received from the mobile phone, the two earplugs of the TWS headset can play synchronously.

[0293] It should also be noted that the above embodiments are described by taking the mobile phone as the source of audio data and the TWS earplug as the destination of audio data. In some other embodiments, when the TWS earplug is the source of audio data (for example, the MIC of the TWS earplug collects voice data) and the mobile phone is the destination of audio data, the TWS earplug can still use the method in the above embodiment to adaptively adjust the encoding rate and transmission rate, which will not be repeated here.

[0294] It is understandable that in order to implement the above functions, the first BLE device and the second BLE device include hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.

[0295] Each BLE device disclosed in the embodiments of the present application is used to implement the above method embodiments. Therefore, the first BLE device can be divided into functional modules according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0296] In the case of dividing each functional module into corresponding functional modules, Fig.17 A possible schematic diagram of the composition of the first BLE device 1700 involved in the above embodiment is shown, as shown in FIG. Fig.17 As shown, the first BLE device 1700 may include: a connecting unit 1701, an encoding unit 1702, a transmitting unit 1703, an acquiring unit 1704, a determining unit 1705, and the like.

[0297] Among them, the connection unit 1701 can be used to support the first BLE device 1700 to execute the above-mentioned steps of establishing a low-power asynchronous connection link LE ACL connection with the second BLE device; establishing a CIS connection with the second BLE device according to the first transmission parameters of the CIS, and / or other processes for the technology described in this article.

[0298] The encoding unit 1702 can be used to support the first BLE device 1700 to perform the above-mentioned steps of encoding the audio data based on the first encoding parameter; encoding the audio data based on the second encoding parameter, and / or other processes for the technology described in this article.

[0299] The transmission unit 1703 can be used to support the first BLE device 1700 to execute the above-mentioned steps of sending the encoded audio data to the second BLE device through the CIS connection based on the first transmission parameter; sending the second transmission parameter to the second BLE device through the LE ACL connection while sending the audio data to the second BLE device through the CIS connection, and / or other processes for the technology described in this article.

[0300] The acquiring unit 1704 may be configured to support the first BLE device 1700 in executing the above-mentioned steps of acquiring reference parameters, and / or other processes for the technology described herein.

[0301] The determination unit 1705 may be configured to support the first BLE device 1700 in executing the above steps of determining the second coding parameter and the second transmission parameter according to the reference parameter, and / or other processes for the technology described herein.

[0302] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0303] The first BLE device 1700 provided in this embodiment is used to execute the above-mentioned rate control method, and thus can achieve the same effect as the above-mentioned implementation method.

[0304] In the case of using an integrated unit, the first BLE device 1700 may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the first BLE device 1700, for example, it can be used to support the first BLE device 1700 to execute the steps performed by the above-mentioned connection unit 1701, encoding unit 1702, acquisition unit 1704 and determination unit 1705. The storage module can be used to support the first BLE device 1700 to store program codes and data, etc. The communication module can be used to support the communication between the first BLE device 1700 and other devices, for example, it can be used to support the first BLE device 1700 to execute the steps performed by the above-mentioned transmission unit 1703.

[0305] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other first BLE devices.

[0306] In one embodiment, when the processing module is a processor and the storage module is a memory, the first BLE device involved in this embodiment may be a device having Figure 2 A mobile phone 100 of the structure shown.

[0307] An embodiment of the present application also provides a computer storage medium, which stores computer instructions. When the computer instructions are executed on a first BLE device, the first BLE device executes the above-mentioned related method steps to implement the rate control method in the above-mentioned embodiment.

[0308] An embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the rate control method executed by the first BLE device in the above-mentioned embodiment.

[0309] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor may execute the computer execution instructions stored in the memory so that the chip executes the rate control method executed by the first BLE device in the above-mentioned method embodiments.

[0310] Among them, the first BLE device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0311] In the case of dividing each functional module into corresponding functional modules, Fig.18 A possible schematic diagram of the composition of the second BLE device 1800 involved in the above embodiment is shown, such as Fig.18 As shown, the second BLE device 1800 may include: a connecting unit 1801, a decoding unit 1802, a transmitting unit 1803, an acquiring unit 1804, and the like.

[0312] Among them, the connection unit 1801 can be used to support the second BLE device 1800 to execute the above-mentioned steps of establishing a low-power asynchronous connection link LE ACL connection with the first BLE device; establishing a CIS connection with the first BLE device according to the first transmission parameter of CIS, and / or other processes for the technology described in this article.

[0313] The decoding unit 1802 can be used to support the second BLE device 1800 to perform the above-mentioned steps of decoding the audio data received from the first BLE device based on the first encoding parameters; decoding the audio data received from the first BLE device based on the second encoding parameters, and / or other processes for the technology described in this article.

[0314] The transmission unit 1803 can be used to support the second BLE device 1800 to execute the above-mentioned steps of receiving the audio data sent by the first BLE device through the CIS connection based on the first transmission parameter; while receiving the audio data sent by the first BLE device through the CIS connection, receiving the second transmission parameter sent by the first BLE device through the LE ACL connection, and / or other processes for the technology described in this article.

[0315] The acquisition unit 1804 may be configured to support the second BLE device 1800 to execute the above steps of acquiring the second coding parameter from the first BLE device, and / or other processes for the technology described herein.

[0316] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0317] The second BLE device 1800 provided in this embodiment is used to execute the above-mentioned rate control method, and thus can achieve the same effect as the above-mentioned implementation method.

[0318] In the case of using an integrated unit, the second BLE device 1800 may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the second BLE device 1800, for example, it can be used to support the second BLE device 1800 to execute the steps performed by the above-mentioned connection unit 1801, decoding unit 1802 and acquisition unit 1804. The storage module can be used to support the second BLE device 1800 to store program codes and data, etc. The communication module can be used to support the communication between the second BLE device 1800 and other devices, for example, it can be used to support the second BLE device 1800 to execute the steps performed by the above-mentioned transmission unit 1803.

[0319] In one embodiment, the second BLE device involved in this embodiment may be a device having Figure 3ATWS earphones with the structure shown.

[0320] An embodiment of the present application also provides a computer storage medium, which stores computer instructions. When the computer instructions are executed on a second BLE device, the second BLE device executes the above-mentioned related method steps to implement the rate control method in the above-mentioned embodiment.

[0321] An embodiment of the present application further provides a computer program product. When the computer program product is executed on a computer, the computer is caused to execute the above-mentioned related steps to implement the rate control method executed by the second BLE device in the above-mentioned embodiment.

[0322] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor may execute the computer execution instructions stored in the memory so that the chip executes the rate control method executed by the second BLE device in the above-mentioned method embodiments.

[0323] Among them, the second BLE device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0324] Another embodiment of the present application provides a system, which may include the first BLE device and the second BLE device, and may be used to implement the rate control method.

[0325] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0326] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0327] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0328] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0329] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0330] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A rate control method, characterized in that: include: The first low-power Bluetooth BLE device establishes a low-power asynchronous connection link LE ACL connection with the second BLE device; The first BLE device establishes a CIS connection with the second BLE device according to a first transmission parameter of an isochronous audio stream CIS based on the connection; the first transmission parameter is used to determine a transmission rate of audio data; The first BLE device encodes the audio data using a first encoding parameter; The first encoding parameter is used to determine the encoding rate of the audio data; The first BLE device uses the first transmission parameter to send the audio data encoded using the first encoding parameter to the second BLE device through the CIS connection; The first BLE device determines a second encoding parameter and a second transmission parameter, wherein the second encoding parameter is used to determine an encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter; the second transmission parameter is used to determine a transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; The first BLE device encodes the audio data using the second encoding parameter; The first BLE device uses the first transmission parameter to send the second transmission parameter to the second BLE device through the LE ACL connection; The first BLE device uses the second transmission parameter to send the audio data encoded using the second encoding parameter to the second BLE device through the CIS connection.

2. The method according to claim 1, characterized in that Before the first BLE device determines the second encoding parameter and the second transmission parameter, the method further includes: The first BLE device obtains reference parameters; The first BLE device determines a second encoding parameter and a second transmission parameter, including: When the reference parameter meets a preset condition, the first BLE device determines the second encoding parameter and the second transmission parameter according to the reference parameter.

3. The method according to claim 2, characterized in that The reference parameters include channel quality parameters of the CIS connection; When the reference parameter meets a preset condition, the first BLE device determines the second encoding parameter and the second transmission parameter according to the reference parameter, including: If the channel quality parameter of the CIS connection is greater than or equal to a first preset value, the first BLE device determines the second coding parameter and the second transmission parameter according to the channel quality parameter of the CIS connection, so that the coding rate determined by the second coding parameter is greater than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is greater than the transmission rate determined by the first transmission parameter; If the channel quality parameter of the CIS connection is less than a second preset value, the first BLE device determines the second coding parameter and the second transmission parameter based on the channel quality parameter of the CIS connection, so that the coding rate determined by the second coding parameter is less than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.

4. The method according to claim 3, characterized in that If the channel quality parameter of the CIS connection is greater than or equal to a first preset value, before the first BLE device encodes the audio data using the second encoding parameter, the first BLE device uses the second transmission parameter to send the audio data encoded using the first encoding parameter to the second BLE device through the CIS connection; If the channel quality parameter of the CIS connection is less than a second preset value, after the first BLE device encodes the audio data using the second encoding parameter, the first BLE device uses the second transmission parameter to send the audio data encoded using the second encoding parameter to the second BLE device through the CIS connection.

5. The method according to claim 3 or 4, characterized in that: The channel quality parameter includes a packet loss rate, and the second coding parameter includes a bitpool value; The first BLE device determines the second encoding parameter according to the reference parameter, including: The first BLE device determines a corresponding target coding rate and a target bitpool value according to the packet loss rate, and the second coding parameter includes the target bitpool value.

6. The method according to claim 2, characterized in that The reference parameter includes the amount of data to be transmitted of the encoded audio data, and when the reference parameter meets a preset condition, the first BLE device determines the second encoding parameter and the second transmission parameter according to the reference parameter, including: If the amount of data to be transmitted of the encoded audio data is greater than or equal to a preset threshold, the first BLE device determines the second encoding parameter and the second transmission parameter based on the mapping relationship between the amount of data to be transmitted and the preset amount of data to be transmitted and the encoding parameter and the transmission parameter, so that the encoding rate determined by the second encoding parameter is less than the encoding rate determined by the first encoding parameter, and the transmission rate determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.

7. The method according to any one of claims 1 to 4 and 6, characterized in that: Before the first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, the method further includes: The first BLE device sends update time indication information to the second BLE device; The first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, including: The first BLE device sends the audio data to the second BLE device through the CIS connection using the second transmission parameter at the time indicated by the update time indication information.

8. The method according to any one of claims 1 to 4 and 6, characterized in that: After the first BLE device determines the second encoding parameter, the method further includes: The first BLE device notifies the second BLE device of the second encoding parameter.

9. The method according to claim 8, characterized in that The audio data encoded using the second encoding parameter includes indication information of the second encoding parameter.

10. The method according to any one of claims 1 to 4 and 6, characterized in that: The first BLE device includes a first host and a first link layer, and the second BLE device includes a second link layer; The first BLE device sends the second transmission parameter to the second BLE device through the LE ACL connection, including: The first host sends parameter update information to the first link layer, where the parameter update information includes the second transmission parameter; The first link layer sends CIS update request information to the second link layer, and the CIS update request information includes the second transmission parameter.

11. The method according to claim 10, characterized in that The first host and the first link layer exchange information via host controller interface protocol HCI commands; the first link layer and the second link layer exchange information via link layer LL commands.

12. The method according to any one of claims 2 to 4, characterized in that: The reference parameter includes a channel quality parameter of the CIS connection, and the first BLE device acquires the channel quality parameter of the CIS connection including: The first BLE device obtains the channel quality parameter of the CIS connection from itself; or, The first BLE device obtains a channel quality parameter of the CIS connection from the second BLE device.

13. The method according to any one of claims 1 to 4 and 6, characterized in that: The second transmission parameter includes one or more of the following: burst number BN, sub-event number NSE, refresh timeout FT, sub-event duration and PHY type; wherein the PHY type includes transmission bandwidth and modulation mode.

14. A transmission rate control method, characterized in that: include: The second low-power Bluetooth BLE device establishes a low-power asynchronous connection link LE ACL connection with the first BLE device; The second BLE device establishes a CIS connection with the first BLE device according to a first transmission parameter of the connected isochronous audio stream CIS; the first transmission parameter is used to determine a transmission rate of the audio data; The second BLE device uses the first transmission parameter to receive the audio data sent by the first BLE device through the CIS connection; The second BLE device decodes the audio data received from the first BLE device according to the first encoding parameter; The first encoding parameter is used to determine the encoding rate of the audio data; If the second BLE device obtains the second encoding parameter from the first BLE device, the second BLE device decodes the audio data received from the first BLE device according to the second encoding parameter; The second encoding parameter is used to determine an encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter; If the second BLE device adopts the first transmission parameter and receives the second transmission parameter sent by the first BLE device through the LE ACL connection; the second transmission parameter is used to determine the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; then the second BLE device adopts the second transmission parameter and receives the audio data sent by the first BLE device through the CIS connection.

15. The method according to claim 14, characterized in that The second BLE device acquires the second encoding parameter from the first BLE device, including: The second BLE device obtains the second encoding parameter from the audio data encoded by the second encoding parameter and sent by the first BLE device.

16. The method according to claim 14 or 15, characterized in that Before the second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection, the method further includes: The second BLE device receives the update time indication information sent by the first BLE device; The second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection, including: The second BLE device receives the audio data sent by the first BLE device through the CIS connection using the second transmission parameter at the time indicated by the update time indication information.

17. The method according to claim 14 or 15, characterized in that The first BLE device includes a first link layer, and the second BLE device includes a second host and a second link layer; The second BLE device receives, through the LE ACL connection, a second transmission parameter sent by the first BLE device, including: The second link layer receives CIS update request information sent by the first link layer, where the update request information includes the second transmission parameter.

18. The method according to claim 17, characterized in that The second host and the second link layer exchange information via host controller interface protocol HCI commands; the first link layer and the second link layer exchange information via link layer LL commands.

19. The method according to claim 14, 15 or 18, characterized in that Before the second BLE device receives the second transmission parameter sent by the first BLE device through the LEACL connection, and the second BLE device decodes the audio data received from the first BLE device using the second encoding parameter, the method further includes: The second BLE device sends a channel quality parameter of the CIS connection to the first BLE device.

20. The method according to claim 14, 15 or 18, characterized in that The second BLE device is a wireless headset.

21. A low-power Bluetooth BLE device, characterized in that: include: One or more processors; one or more memories; wherein the one or more memories store computer program instructions, and when the instructions are executed by the one or more processors, the BLE device performs the following steps: Establish a low-power asynchronous connection link LE ACL connection with another BLE device; Establishing a CIS connection with another BLE device according to a first transmission parameter of a connection-based isochronous audio stream CIS; the first transmission parameter is used to determine a transmission rate of audio data; Encoding the audio data using a first encoding parameter; The first encoding parameter is used to determine the encoding rate of the audio data; Using the first transmission parameter, sending the encoded audio data to the other BLE device through the CIS connection; Determine a second encoding parameter and a second transmission parameter, wherein the second encoding parameter is used to determine an encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter; the second transmission parameter is used to determine a transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; encoding the audio data using the second encoding parameter; Using the first transmission parameter, sending the second transmission parameter to the other BLE device through the LE ACL connection; The second transmission parameter is used to send the audio data encoded using the second encoding parameter to the other BLE device through the CIS connection.

22. The device according to claim 21, characterized in that When the instructions are executed by the one or more processors, the BLE device performs the following steps: Before determining the second encoding parameter and the second transmission parameter, obtaining a reference parameter; When the reference parameter meets a preset condition, the second encoding parameter and the second transmission parameter are determined according to the reference parameter.

23. The device according to claim 22, characterized in that The reference parameter includes a channel quality parameter of the CIS connection; when the instruction is executed by the one or more processors, the BLE device performs the following steps: If the channel quality parameter of the CIS connection is greater than or equal to a first preset value, determining the second coding parameter and the second transmission parameter according to the channel quality parameter of the CIS connection, so that the coding rate determined by the second coding parameter is greater than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is greater than the transmission rate determined by the first transmission parameter; If the channel quality parameter of the CIS connection is less than a second preset value, the second coding parameter and the second transmission parameter are determined according to the channel quality parameter of the CIS connection, so that the coding rate determined by the second coding parameter is less than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.

24. The device according to claim 23, characterized in that When the instructions are executed by the one or more processors, the BLE device performs the following steps: If the channel quality parameter of the CIS connection is greater than or equal to a first preset value, before encoding the audio data with the second encoding parameter, using the second transmission parameter to send the audio data encoded with the first encoding parameter to the other BLE device through the CIS connection; If the channel quality parameter of the CIS connection is less than a second preset value, after encoding the audio data using the second encoding parameter, the second transmission parameter is used to send the audio data encoded using the second encoding parameter to the other BLE device through the CIS connection.

25. The device according to claim 23 or 24, characterized in that The channel quality parameter includes a packet loss rate, and the second coding parameter includes a bitpool value; when the instruction is executed by the one or more processors, the BLE device performs the following steps: A corresponding target coding rate and a target bitpool value are determined according to the packet loss rate, and the second coding parameter includes the target bitpool value.

26. The device according to claim 22, characterized in that The reference parameter includes the amount of encoded audio data to be transmitted. When the instruction is executed by the one or more processors, the BLE device performs the following steps: If the amount of data to be transmitted of the encoded audio data is greater than or equal to a preset threshold, the second encoding parameter and the second transmission parameter are determined according to the mapping relationship between the amount of data to be transmitted and the preset amount of data to be transmitted and the encoding parameter and the transmission parameter, so that the encoding rate determined by the second encoding parameter is less than the encoding rate determined by the first encoding parameter, and the transmission rate determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.

27. The device according to any one of claims 21 to 24 and 26, characterized in that When the instructions are executed by the one or more processors, the BLE device performs the following steps: Before sending the audio data to the other BLE device through the CIS connection using the second transmission parameter, sending update time indication information to the other BLE device; At the time indicated by the update time indication information, the second transmission parameter is used to send audio data to the other BLE device through the CIS connection.

28. The device according to any one of claims 21 to 24 and 26, characterized in that When the instructions are executed by the one or more processors, the BLE device performs the following steps: After determining the second encoding parameter, the second encoding parameter is notified to the other BLE device.

29. The device according to claim 28, characterized in that The audio data encoded using the second encoding parameter includes indication information of the second encoding parameter.

30. The device according to any one of claims 21-24, 26 and 29, characterized in that The BLE device includes a first host and a first link layer, and the other BLE device includes a second link layer; when the instruction is executed by the one or more processors, the BLE device performs the following steps: The first host sends parameter update information to the first link layer, where the parameter update information includes the second transmission parameter; The first link layer sends CIS update request information to the second link layer, and the CIS update request information includes the second transmission parameter.

31. The device according to claim 30, characterized in that The first host and the first link layer exchange information via host controller interface protocol HCI commands; the first link layer and the second link layer exchange information via link layer LL commands.

32. The device according to claim 23 or 24, characterized in that When the instructions are executed by the one or more processors, the BLE device performs the following steps: Acquire the channel quality parameter of the CIS connection from itself; or, Acquire a channel quality parameter of the CIS connection from the other BLE device.

33. The device according to any one of claims 21-24, 26, 29 and 31, characterized in that The second transmission parameter includes one or more of the following: burst number BN, sub-event number NSE, refresh timeout FT, sub-event duration and PHY type; wherein the PHY type includes transmission bandwidth and modulation mode.

34. The device according to any one of claims 21-24, 26, 29, 31, characterized in that The BLE device is a chip.

35. A low-power Bluetooth BLE device, characterized in that: include: One or more processors; one or more memories; wherein the one or more memories store computer program instructions, and when the instructions are executed by the one or more processors, the BLE device performs the following steps: Establish a low-power asynchronous connection link LE ACL connection with another BLE device; Establishing a CIS connection with the other BLE device according to a first transmission parameter of the connection-based isochronous audio stream CIS; the first transmission parameter is used to determine the transmission rate of the audio data; Using the first transmission parameter, receiving the audio data sent by the other BLE device through the CIS connection; Decoding the audio data received from the other BLE device according to a first encoding parameter, wherein the first encoding parameter is used to determine an encoding rate of the audio data; If a second encoding parameter is obtained from the other BLE device, the audio data received from the other BLE device is decoded according to the second encoding parameter; the second encoding parameter is used to determine the encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter; If the first transmission parameter is used, and the second transmission parameter sent by the other BLE device is received through the LE ACL connection; the second transmission parameter is used to determine the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; then the second transmission parameter is used to receive the audio data sent by the other BLE device through the CIS connection.

36. The device according to claim 35, characterized in that When the instructions are executed by the one or more processors, the BLE device performs the following steps: The second encoding parameter is obtained from the audio data encoded using the second encoding parameter and sent by the other BLE device.

37. Apparatus according to claim 35 or 36, characterised in that When the instructions are executed by the one or more processors, the BLE device performs the following steps: Before using the second transmission parameter to receive the audio data sent by the other BLE device through the CIS connection, receiving update time indication information sent by the other BLE device; At the time indicated by the update time indication information, the second transmission parameter is adopted to receive the audio data sent by the other BLE device through the CIS connection.

38. The device according to claim 35 or 36, characterized in that The other BLE device includes a first link layer, and the BLE device includes a second host and a second link layer; when the instruction is executed by the one or more processors, the BLE device performs the following steps: The second link layer receives CIS update request information sent by the first link layer, where the update request information includes the second transmission parameter.

39. The device according to claim 38, characterized in that The second host and the second link layer exchange information via host controller interface protocol HCI commands; the first link layer and the second link layer exchange information via link layer LL commands.

40. Apparatus according to claim 35, 36 or 39, characterised in that When the instructions are executed by the one or more processors, the BLE device performs the following steps: Before receiving the second transmission parameter sent by the other BLE device through the LE ACL connection and decoding the audio data received from the other BLE device using the second encoding parameter, the channel quality parameter of the CIS connection is sent to the other BLE device.

41. Apparatus according to claim 35, 36 or 39, characterised in that The BLE device is a wireless headset.

42. Apparatus according to claim 35, 36 or 39, characterised in that The BLE device is a chip.

43. A computer storage medium, characterized in that The method comprises computer instructions, and when the computer instructions are executed on a Bluetooth Low Energy (BLE) device, the BLE device executes the rate control method as described in any one of claims 1 to 20.

44. A low-power Bluetooth BLE device, characterized in that: The BLE device comprises means for performing the method according to any one of claims 1-20.

Citation Information

Patent Citations

  • Method of Bluetooth low energy communication, Bluetooth devices and system

    CN104135741A

  • Data transmission method and device

    CN105978663A