CN112789883A - Rate control method and device - Google Patents

Rate control method and device Download PDF

Info

Publication number
CN112789883A
CN112789883A CN201880098321.6A CN201880098321A CN112789883A CN 112789883 A CN112789883 A CN 112789883A CN 201880098321 A CN201880098321 A CN 201880098321A CN 112789883 A CN112789883 A CN 112789883A
Authority
CN
China
Prior art keywords
parameter
ble device
transmission
encoding
audio data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201880098321.6A
Other languages
Chinese (zh)
Other versions
CN112789883B (en
Inventor
朱宇洪
王良
郑勇
张景云
倪观军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210890144.3A priority Critical patent/CN115426687A/en
Publication of CN112789883A publication Critical patent/CN112789883A/en
Application granted granted Critical
Publication of CN112789883B publication Critical patent/CN112789883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • H04W28/22Negotiating communication rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a rate control method and device, relates to the technical field of electronics, and can adaptively adjust coding rate and transmission rate without disconnecting CIS connection. The specific scheme is as follows: the first BLE equipment and the second BLE equipment establish LE ACL connection and adopt first transmission parameters to establish CIS connection; encoding the audio data using the first encoding parameter; transmitting the encoded audio data to a second BLE device through the CIS connection using the first transmission parameters; determining a second encoding parameter and a second transmission parameter, wherein the second encoding parameter and the second transmission parameter are respectively used for determining an encoding rate and a transmission rate; encoding the audio data using the second encoding parameter; sending second transmission parameters to the second BLE device through the LE ACL connection while sending audio data to the second BLE device through the CIS connection using the first encoding parameters; transmitting the encoded audio data to a second BLE device based on the second transmission parameters. The embodiment of the application is used for controlling the rate.

Description

Rate control method and device Technical Field
The embodiment of the application relates to the technical field of electronics, in particular to a rate control method and device.
Background
Bluetooth is a wireless technology standard that enables short-range data exchange. Bluetooth mainly includes Bluetooth Low Energy (BLE) and bluetooth Basic Rate (BR)/enhanced rate (EDR). Among them, BLE bluetooth is a hot spot currently studied and used because BLE bluetooth can reduce power consumption and cost. For example, the transmission mechanism may include a point-to-multipoint connection-based isochronous audio stream (CIS) transmission protocol or the like. Based on CIS connection, data can be interacted between Bluetooth devices.
Disclosure of Invention
The embodiment of the application provides a rate control method and device, which can adaptively adjust the coding rate and the transmission rate without disconnecting the CIS connection.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in one aspect, an embodiment of the present application provides a rate control method, including: the method comprises the steps that a first low-power Bluetooth BLE device and a second BLE device establish low-power asynchronous connection link/local transport (LE ACL) connection, CIS connection is established with the second BLE device according to first transmission parameters of the CIS, and the first transmission parameters are used for determining the transmission rate of audio data. The first BLE device encodes the audio data with the first encoding parameters; the first encoding parameter is used to determine an encoding rate of the audio data. The first BLE device transmits the encoded audio data to the second BLE device through the CIS connection using the first transmission parameters. The first BLE device determining a second encoding parameter and a second transmission parameter, the second encoding parameter being used to determine an encoding rate of the audio data, and the second encoding parameter being 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 with the second encoding parameter. The first BLE device transmits the second transmission parameters to the second BLE device through the LE ACL connection while transmitting the audio data to the second BLE device through the CIS connection using the first transmission parameters. And the first BLE device transmits the audio data coded by the second coding parameter to the second BLE device through the CIS connection by adopting the second transmission parameter.
In this scheme, the first BLE device may automatically update the encoding parameter and the transmission parameter according to a reference parameter such as channel quality of the CIS connection without disconnecting the CIS connection, so as to adaptively adjust the encoding rate and the transmission rate, so that the encoding rate and the transmission rate are matched.
In one possible implementation, before the first BLE device transmits audio data to the second BLE device through the CIS connection using the second transmission parameter, the method further includes: the first BLE device transmits update time indication information to the second BLE device. The first BLE device transmits audio data to the second BLE device through the CIS connection using the second transmission parameters, including: and the first BLE device transmits audio data to the second BLE device through the CIS connection by adopting the second transmission parameter at the time indicated by the updating time indication information.
That is, the first BLE device and the second BLE device may automatically start the second transmission parameter at the same time at the agreed update time, thereby updating the transmission rate at the same time.
In another possible implementation, before the first BLE device determines the second encoding parameter and the second transmission parameter, the method further includes: the first BLE device acquires a reference parameter. The first BLE device determines a second encoding parameter and a second transmission parameter, including: the first BLE device determines a second encoding parameter and a second transmission parameter according to the reference parameter when the reference parameter satisfies a preset condition.
In another possible implementation, the reference parameter comprises a channel quality parameter of the CIS connection; when the reference parameter meets a preset condition, the first BLE device determines a second encoding parameter and a second transmission parameter according to the reference parameter, including: if the channel quality parameter of the CIS connection is greater than or equal to the first preset value, the first BLE device determines a second encoding parameter and a second transmission parameter according to the channel quality parameter of the CIS connection, so that the encoding rate determined by the second encoding parameter is greater than the encoding rate determined by the first encoding 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 smaller than a second preset value, the first BLE device determines a 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 smaller than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is smaller than the transmission rate determined by the first transmission parameter.
In another possible implementation manner, if the channel quality parameter of the CIS connection is greater than or equal to a first preset value, after the first BLE device encodes the audio data by using the second encoding parameter, the first BLE device transmits the audio data encoded by using the second encoding parameter to the second BLE device through the CIS connection by using the second transmission parameter. And if the channel quality parameter connected by the CIS is smaller than a second preset value, the first BLE device transmits the audio data coded by the second coding parameter to the second BLE device through the CIS connection by adopting the second transmission parameter before the first BLE device codes the audio data by adopting the second coding parameter.
In another possible implementation manner, the reference parameter further includes a data amount 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 is worse, or the amount of data to be transmitted is greater than or equal to a first preset threshold value, after the first BLE device encodes the audio data based on the second encoding parameter, the first BLE device transmits the audio data encoded based on the second encoding parameter to the second BLE device through CIS connection based on the second transmission parameter; and the coding rate corresponding to the second coding parameter is lower than the coding rate corresponding to the first coding parameter.
That is to say, when determining that the coding rate and the transmission rate need to be reduced according to the reference parameters such as the channel quality parameter and the data amount to be transmitted, the first BLE device may reduce the coding rate first and then reduce the transmission rate.
In another possible implementation manner, if the first BLE device determines that the channel quality parameter is better than a preset value, or the channel quality parameter becomes optimal, or the amount of data to be transmitted is less than or equal to a second preset threshold, the first BLE device sends the audio data encoded based on the second encoding parameter to the second BLE device through CIS connection based on the second transmission parameter before the first BLE device encodes the audio data based on the second encoding parameter; and the coding rate corresponding to the second coding parameter is higher than the coding rate corresponding to the first coding parameter.
That is to say, when determining that the coding rate and the transmission rate need to be increased according to the reference parameters such as the channel quality parameter and the data amount to be transmitted, the first BLE device may increase the transmission rate first and then increase the coding rate, so that the first BLE device has sufficient transmission capability to transmit the encoded audio data.
In another possible implementation manner, the channel quality parameter includes a packet loss rate, and the second encoding parameter includes a bitpool value. The first BLE device determines a second encoding parameter from 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.
In this scheme, the first BLE device may adjust a bitpool value in the coding parameter according to a packet loss rate condition, so as to adjust a coding rate.
In another possible implementation manner, the reference parameter includes a data amount to be transmitted of the encoded audio data, and the determining, by the first BLE device, the second transmission parameter according to the reference parameter when the reference parameter meets a preset condition includes: if the data volume to be transmitted of the encoded audio data is greater than or equal to the preset threshold value, the first BLE device determines a second encoding parameter and a second transmission parameter according to the mapping relation between the data volume to be transmitted and the preset data volume 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.
In another possible implementation manner, the reference parameter further includes a data amount to be transmitted of the encoded audio data, and the first BLE device is provided with encoding parameters of a plurality of gears. The first BLE device determining the second encoding parameter from the reference parameter comprises: if the data volume to be transmitted is greater than or equal to a first preset threshold value, the first BLE equipment sets the second encoding parameter as an encoding parameter corresponding to a first gear with the lowest encoding rate; the first BLE device periodically detects an amount of data to be transmitted; if the number to be transmitted is smaller than a first preset threshold value, the first BLE device sets the second encoding parameter as an encoding parameter of a second gear, the second gear is a previous gear of the first gear, and an encoding rate corresponding to the encoding parameter of the second gear is higher than an encoding rate corresponding to the encoding parameter of the first gear.
In this scheme, the first BLE device may ramp up the coding rate slowly, gear by gear.
In another possible implementation manner, the reference parameter further includes a data amount to be transmitted of the encoded audio data, and the first BLE device is provided with encoding parameters of a plurality of gears. The first BLE device determining the second encoding parameter from the reference parameter comprises: if the data volume to be transmitted is less than or equal to a second preset threshold value, the first BLE equipment sets the second coding parameter as a coding parameter corresponding to a third gear with the highest coding rate; the first BLE device periodically detects an amount of data to be transmitted; if the number to be transmitted is larger than a second preset threshold value, the first BLE device sets the second encoding parameter as an encoding parameter of a fourth gear, the fourth gear is a next gear of the third gear, and an encoding rate corresponding to the encoding parameter of the fourth gear is lower than an encoding rate corresponding to the encoding parameter of the third gear.
In this scheme, the first BLE device may slowly reduce the coding rate from gear to gear.
In another possible implementation manner, the reference parameter further includes a data amount to be transmitted of the encoded audio data. The first BLE device determining the second encoding parameter and the second transmission parameter from the reference parameter comprises: if the data volume to be transmitted is greater than or equal to a first preset threshold, the first BLE device determines a second encoding parameter and a second transmission parameter, wherein the second encoding parameter is used for reducing the encoding rate, and the second transmission parameter is used for reducing the transmission rate.
Therefore, under the condition that the data volume 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.
In another possible implementation manner, 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, where the second encoding parameter is used to increase an encoding rate, and the second transmission parameter is used to increase a transmission rate.
Therefore, under the condition that the data volume to be transmitted is less than or equal to the second preset threshold, the channel quality of the CIS connection is possibly better, and the coding rate and the transmission rate can be improved by adjusting the coding parameters and the transmission parameters.
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 informs the second BLE device of the second encoding parameter.
In this way, the second BLE device may decode the received encoded audio data according to the second encoding parameters.
In another possible implementation manner, the audio data encoded by using the second encoding parameter includes indication information of the second encoding parameter.
That is, the first BLE device may inform the second BLE device of the second encoding parameters through encoded audio data packets.
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 parameters to the second BLE device through the LE ACL connection, including: the first host sends parameter updating information to the first link layer, wherein the parameter updating information comprises second transmission parameters. And the first link layer sends CIS updating request information to the second link layer, wherein the CIS updating request information comprises second transmission parameters.
Wherein the BLE device may include a host and a link layer, and the process of negotiating and adjusting the transmission parameters may 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 layer of the first BLE device and the second BLE device.
In another possible implementation, inside the first BLE device, the first host and the first link layer exchange information through a host controller interface protocol HCI command; information is exchanged between a first link layer of the first BLE device and a second link layer of the second BLE device through a link layer LL command.
In another possible implementation, the first BLE device may not send the update time indication information to the second BLE device, and the first BLE device and the second BLE device agree in advance at a preset time, for example, the first BLE device enables the second transmission parameter at an mth time after sending the parameter update information; for another example, the second BLE device enables the second transmission parameter at a kth time after receiving the CIS update request message.
In another possible implementation, the first BLE device may not transmit the update time indication information to the second BLE device, and the first BLE device automatically enables the second transmission parameter after transmitting the parameter update information; as another example, the second BLE device automatically enables the second transmission parameter upon receiving the CIS update request message.
In another possible implementation, the second transmission parameter includes one or more of: burst number BN, sub-event number NSE, refresh timeout FT, sub-event duration and PHY type; the PHY type includes a transmission bandwidth and a modulation scheme.
In this way, the first BLE device may adjust the transmission rate by adjusting at least one of the number of bursts BN, the number of sub-events NSE, the refresh timeout FT, the sub-event duration, and the PHY type.
In another possible implementation manner, the determining, by the first BLE device, a second transmission parameter according to the reference parameter, where the second transmission parameter is used to increase a transmission rate of the audio data includes: and 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 a second transmission parameter. Compared with the first transmission parameter, the second transmission parameter increases the burst number BN, the sub-event number NSE, the refresh timeout FT, the sub-event duration and the transmission bandwidth, or the transmission rate corresponding to the adopted modulation mode is higher.
Therefore, when the transmission rate needs to be increased according to the reference parameters such as the channel quality parameter and the data volume to be transmitted, the first BLE device can increase the transmission rate by adjusting the transmission parameters.
In another possible implementation, the first BLE device determines a second transmission parameter according to the reference parameter, where the second transmission parameter is used to reduce a transmission rate of the audio data, and includes: if the first BLE device determines that the channel quality parameter is worse than a preset value or the channel quality parameter is worse, the first BLE device determines a second transmission parameter. Compared with the first transmission parameter, the second transmission parameter reduces the burst number BN, the sub-event number NSE, the refresh timeout FT, the sub-event duration and the transmission bandwidth, or the transmission rate corresponding to the adopted modulation mode is lower.
Thus, when it is determined that the transmission rate needs to be reduced according to the reference parameters such as the channel quality parameter and the data amount to be transmitted, the first BLE device may reduce the transmission rate by adjusting the transmission parameters.
In another possible implementation, the acquiring, by the first BLE device, the reference parameter includes: the first BLE device obtaining reference parameters from itself; alternatively, the first BLE device obtains the reference parameter from the second BLE device.
For example, the first BLE device may obtain the channel quality parameters from its own controller; the channel quality parameter may also be obtained from a controller of the second BLE device.
In another aspect, embodiments of the present application provide a rate control apparatus, where the apparatus is included in a first BLE device, and the apparatus has a function of implementing behaviors of the first BLE device in the above aspects and possible implementations. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above-described 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.
In another aspect, an embodiment of the present application provides a transmission rate control method, including: and the second low-power Bluetooth Low Energy (BLE) equipment and the first BLE equipment establish a low-power asynchronous connection link (LE ACL), and establish CIS connection with the first BLE equipment according to a first transmission parameter of the CIS, wherein the first transmission parameter is used for determining the transmission rate of the audio data. And the second BLE device receives audio data sent by the first BLE device through the CIS connection by adopting the first transmission parameters. The second BLE device decodes audio data received from the first BLE device according to the first encoding parameter; the first encoding parameter is used to determine an 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 equipment adopts the first transmission parameters, the audio data sent by the first BLE equipment is received through CIS connection, and meanwhile, the second transmission parameters sent by the first BLE equipment are received through LE ACL connection; the second transmission parameter is used for determining the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; the second BLE device receives audio data transmitted by the first BLE device over the CIS connection using the second transmission parameters.
In this scheme, the second BLE device may adaptively adjust the transmission rate according to the transmission parameter sent by the first BLE device without disconnecting the CIS connection, and decode the received audio data according to the updated encoding parameter notified by the first BLE device, so that the encoding rate and the transmission rate match.
In one possible implementation, the obtaining, by the second BLE device, the second encoding parameter from the first BLE device includes: and the second BLE device acquires the second coding parameter from the audio data which is transmitted by the first BLE device and is coded by adopting the second coding parameter.
That is, the second BLE device may learn updated encoding parameters of the first BLE device from the encoded audio data.
In another possible implementation manner, before the second BLE device receives audio data transmitted by the first BLE device through the CIS connection using the second transmission parameter, the method further includes: the second BLE device receives the update time indication information transmitted by the first BLE device. The second BLE device receives audio data sent by the first BLE device through the CIS connection by using a second transmission parameter, and the method comprises the following steps: and the second BLE device receives the audio data sent by the first BLE device through the CIS connection by adopting the second transmission parameters at the time indicated by the updated time indication information.
That is, the first BLE device and the second BLE device may simultaneously initiate the second transmission parameters at the agreed update time.
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, through the LE ACL connection, a second transmission parameter sent by the first BLE device, including: and the second link layer receives CIS updating request information sent by the first link layer, wherein the updating request information comprises a second transmission parameter. The second BLE device enables second transmission parameters, including: enabling a second transmission parameter by a second link layer; the second link layer sends update completion information to the second host to indicate that the second transmission parameter is enabled.
Wherein the BLE device may include a host and a link layer, and the process of adjusting the transmission parameter may 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 layer of the first BLE device and the second BLE device.
In another possible implementation, inside the second BLE device, the second host exchanges information with the second link layer through a host controller interface protocol HCI command; information is exchanged between a first link layer of the first BLE device and a second link layer of the second BLE device through a link layer LL command.
In another possible implementation, before the second BLE device receives, through the LE ACL connection, the second transmission parameters transmitted by the first BLE device, and the second BLE device decodes the audio data received from the first BLE device based on the second encoding parameters, the method further includes: the second BLE device transmits channel quality parameters of the CIS connection to the first BLE device.
In this way, the first BLE device may determine the second encoding parameter and the second transmission parameter from the channel quality parameter transmitted by the second BLE device.
In another possible implementation, the second BLE device may be a wireless headset.
In another aspect, embodiments of the present application provide a rate control apparatus, where the apparatus is included in a second BLE device, and the apparatus has a function of implementing the behavior of the second BLE device in any one of the above aspects and possible implementations. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above-described functions. For example, a connection module or unit, a decoding module or unit, a transmission module or unit, an acquisition module or unit, etc.
In another aspect, embodiments of the present application provide a system, which may include the first BLE device and the second BLE device in any possible implementation manner of any one of the above aspects, and may implement the rate control method described above.
In another aspect, embodiments provide a BLE device including one or more processors and one or more memories. The one or more memories are coupled with the one or more processors, the one or more memories are for storing computer program code comprising computer instructions that, when executed by the one or more processors, cause the BLE device to perform the rate control method performed by the first BLE device or the second BLE device in any of the above aspects and any possible implementation.
In another aspect, embodiments of the present application provide a computer storage medium, which includes computer instructions, when the computer instructions are executed on a computer, cause the computer to perform a rate control method performed by a first BLE device or a second BLE device in any one of the above aspects and any one of the possible implementations.
In another aspect, embodiments of the present application provide a computer program product, which when run on a computer, causes the computer to execute the rate control method performed by the first BLE device or the second BLE device in any one of the possible implementations of the first aspect or the second aspect.
Drawings
Fig. 1 is a schematic structural diagram of a system according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a mobile phone according to an embodiment of the present application;
fig. 3A is a schematic structural diagram of an earplug according to an embodiment of the present application;
fig. 3B is a schematic diagram of a TWS headset and a headset case according to an embodiment of the present disclosure;
fig. 3C is a schematic view of an earplug according to an embodiment of the present application;
fig. 4 is a schematic diagram of a bluetooth system according to an embodiment of the present application;
fig. 5 is a flow chart of audio transmission according to an embodiment of the present application;
fig. 6 is a flowchart of a method for adjusting transmission parameters according to an embodiment of the present application;
fig. 7 is a schematic diagram illustrating an adjustment of transmission parameters according to an embodiment of the present application;
fig. 8 is a flowchart of a rate adjustment according to an embodiment of the present application;
fig. 9 is a schematic diagram of another exemplary adjustment of transmission parameters according to the present application;
fig. 10 is a schematic diagram of another exemplary embodiment of a transmission parameter adjustment;
fig. 11 is a schematic diagram of another transmission parameter adjustment provided in the embodiment of the present application;
FIG. 12 is a flow chart of another example of adjusting a rate according to the present application;
fig. 13 is a schematic diagram of another exemplary adjustment of transmission parameters according to the present application;
fig. 14 is a schematic diagram of another exemplary transmission parameter adjustment according to the present application;
FIG. 15 is a flow chart of another example of adjusting a rate according to the present application;
FIG. 16 is a flow chart of another example of adjusting a rate according to the present application;
figure 17 is a schematic structural diagram of a first BLE device according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a second BLE device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
As shown in fig. 1, the pairing connection method provided in the embodiment of the present application may be applied to a system composed of an electronic device 01 and at least one external device 02. In this system, the electronic device 01 and the external device 02 are wirelessly connected to each other. The wireless mode may be a connection such as Bluetooth (BT), wireless fidelity (Wi-Fi) network, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. For example, the electronic device 01 may be a mobile phone, a tablet computer (e.g., MP3, MP4, etc.), a notebook computer, an ultra-mobile personal computer (UMPC), a Personal Digital Assistant (PDA), a television, or the like. For example, the external device 02 may be a wireless headset, a wireless speaker, a wireless bracelet, a wireless vehicle, wireless smart glasses, an Augmented Reality (AR) \ Virtual Reality (VR) device, and the like, which is not limited in this embodiment. Wherein the wireless headset may be a headset, an earbud, or other portable listening device.
The external device 02 may include a main body, and may also include a first main body 021 and a second main body 022, which are used in a paired manner, and the first main body 021 and the second main body 022 cooperate with each other and cooperate with each other. For example, when the external device 02 is an ear TWS headset, the external device 02 may include paired left and right earplugs (generally identified as "L") for stereo playback and (generally identified as "R") for synchronized playback of the right and left channel signals of the audio data.
In the system shown in fig. 1, the electronic device 01 is a mobile phone, and the external device 02 is an ear TWS headset and a bracelet. It is understood that the electronic device 01 and the external device 02 in the system may also be other devices, and the embodiment of the present application does not limit this.
Illustratively, when the electronic device 01 is a mobile phone 100, fig. 2 shows a schematic structural diagram of the 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 key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. 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, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the mobile phone 100. In other embodiments of the present application, the handset 100 may include more or fewer components than shown, or some components may be combined, some components may be separated, or a different arrangement of components may be used. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (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. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be a neural center and a command center of the cell phone 100, among others. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (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.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets 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, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the mobile phone 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through the I2S interface, so as to receive phone calls through a bluetooth headset.
The PCM interface may 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 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the camera function of the handset 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the mobile phone 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may 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, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the mobile phone 100, or may be used to transmit data between the mobile phone 100 and an external device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other handsets, such as AR devices, etc.
It should be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is only an exemplary illustration, and does not constitute a limitation on the structure of the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured 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 via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the cell phone 100. The charging management module 140 may also supply power to the mobile phone through the power management module 141 while charging the battery 142.
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 charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the mobile phone 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the handset 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the mobile phone 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
For example, in the embodiment of the present application, the mobile phone 100 may utilize the wireless communication module 160 to establish a wireless connection with an external device through a wireless communication technology (e.g., bluetooth). Based on the established wireless connection, the mobile phone 100 can send audio data to the external device and also receive audio data from the external device. In this embodiment, the processor 110 may also adaptively adjust a transmission rate when the mobile phone sends the audio data to the external device according to factors such as channel quality of a link between the mobile phone 100 and the external device, and the amount of data to be transmitted.
In some embodiments, the antenna 1 of the handset 100 is coupled to the mobile communication module 150 and the antenna 2 is coupled to the wireless communication module 160 so that the handset 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, among others. GNSS may include Global Positioning System (GPS), global navigation satellite system (GLONASS), beidou satellite navigation system (BDS), quasi-zenith satellite system (QZSS), and/or Satellite Based Augmentation System (SBAS).
The mobile phone 100 implements the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an 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 alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the cell phone 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The mobile phone 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the handset 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the handset 100 is in frequency bin selection, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. Handset 100 may support one or more video codecs. Thus, the handset 100 can play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can realize applications such as intelligent recognition of the mobile phone 100, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability 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. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the cellular phone 100 and data processing by executing instructions stored in the internal memory 121. For example, in the embodiment of the present application, the processor 110 may respectively establish a wireless pairing connection with 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-distance data exchange with the external device, so as to implement functions of talking, playing music, and the like through the external device. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The data storage area may store data (e.g., audio data, a phonebook, etc.) created during use of the handset 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
In the embodiment of the present application, the mobile phone 100 may respectively establish a wireless connection with two main bodies of an external device by using a wireless communication technology (e.g. bluetooth). For example, the mobile phone 100 establishes a wireless connection with a first body by wire, and then establishes a wireless connection between the mobile phone 100 and a second body through the first body. After establishing the wireless connection, the handset 100 may store the bluetooth address of the external device in the internal memory 121. In some embodiments, when the external device is a two-body device, such as a TWS headset, and the left and right earpieces of the TWS headset have respective bluetooth addresses, the handset 100 may store the bluetooth address association of the left and right earpieces of the TWS headset in the internal memory 121 so that the left and right earpieces of the TWS headset may be used as a pair of devices.
The mobile phone 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may further include an encoder and a decoder for encoding and decoding an audio signal. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The cellular phone 100 can listen to music through the speaker 170A or listen to a hands-free call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the cellular phone 100 receives a call or voice information, it is possible to receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The handset 100 may be provided with at least one microphone 170C. In other embodiments, the handset 100 may be provided with two microphones 170C to achieve noise reduction functions in addition to collecting sound signals. In other embodiments, the mobile phone 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
The headphone interface 170D is used to connect a wired headphone. The earphone interface 170D may be the USB interface 130, or may be an open mobile platform (OMTP) standard interface of 3.5mm, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
In the 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 may be used as an audio input/output device of the mobile phone 100. For example, the audio module 170 may receive an audio electrical signal transmitted by the wireless communication module 160, and implement functions of answering a call, playing music, and the like through the TWS headset. For example, during a call made by the user, the TWS headset may collect a voice signal of the user, convert the voice signal into an audio electrical signal, and send the audio electrical signal to the wireless communication module 160 of the handset 100. The wireless communication module 160 transmits the audio electrical signal to the audio module 170. The audio module 170 may convert the received audio electrical signal into a digital audio signal, encode the digital audio signal, and transmit the encoded digital audio signal to the mobile communication module 150. And is transmitted to the opposite-end call device by the mobile communication module 150 to implement a call. For another example, when the user plays music using the media player of the mobile phone 100, the application processor may transmit an audio electrical signal corresponding to the music played by the media player to the audio module 170. The audio electrical signal is transmitted by the audio module 170 to the wireless communication module 160. The wireless communication module 160 may transmit the audio electrical signal to the TWS headset so that the TWS headset converts the audio electrical signal into a sound signal and plays the sound signal.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The handset 100 determines the intensity of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the mobile phone 100 detects the intensity of the touch operation according to the pressure sensor 180A. The cellular phone 100 can also calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the cellular phone 100. In some embodiments, the angular velocity of the handpiece 100 about three axes (i.e., the x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the mobile phone 100, calculates the distance to be compensated for the lens module according to the shake angle, and allows the lens to counteract the shake of the mobile phone 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the handset 100 calculates altitude, aiding in positioning and navigation, from the barometric pressure measured by the barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The handset 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the handset 100 is a flip phone, the handset 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E can detect the magnitude of acceleration of the cellular phone 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the handset 100 is stationary. The method can also be used for identifying the gesture of the mobile phone, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The handset 100 may measure distance by infrared or laser. In some embodiments, taking a picture of a scene, the cell phone 100 may utilize the range sensor 180F to range for fast focus.
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 cellular phone 100 emits infrared light to the outside through the light emitting diode. The handset 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 cell phone 100. When insufficient reflected light is detected, the cell phone 100 can determine that there are no objects near the cell phone 100. The mobile phone 100 can detect that the mobile phone 100 is held by the user and close to the ear for communication by using the proximity light sensor 180G, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. The handset 100 may adaptively adjust the brightness of the display 194 according to the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The mobile phone 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a photograph of the fingerprint, answer an incoming call with the fingerprint, and the like.
The temperature sensor 180J is used to detect temperature. In some embodiments, the handset 100 implements a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the mobile phone 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the cell phone 100 heats the battery 142 when the temperature is below another threshold to avoid an abnormal shutdown of the cell phone 100 due to low temperatures. In other embodiments, when the temperature is lower than a further threshold, the mobile phone 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the mobile phone 100, different from the position of the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signals acquired by the bone conduction sensor 180M, and the heart rate detection function is realized.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The cellular phone 100 may receive a key input, and generate a key signal input related to user setting and function control of the cellular phone 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the cellular phone 100 by being inserted into the SIM card interface 195 or being pulled out from the SIM card interface 195. The handset 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The mobile phone 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the handset 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.
For example, when the external device 02 is a TWS headset, fig. 3A shows a schematic structure of one of the main bodies of the TWS headset, namely, earplugs (left or right earplugs). As shown in fig. 3A, the earplugs 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.
The memory 302 may be used for storing, among other things, application code for establishing a wireless connection with another earpiece of a TWS headset, and for making a pairing connection of the earpiece with the above-mentioned electronic device 01.
The processor 301 may control execution of the above-mentioned application program code to implement the functionality of the earpieces of the TWS headset in the embodiments of the present application. For example, a function of adaptively adjusting the coding rate and the transmission rate of audio data sent from the TWS headset to the electronic device according to factors such as the channel quality of a link between the TWS headset and the electronic device, the amount of data to be transmitted, and the like is realized.
The memory 302 may also have stored therein a bluetooth address for uniquely identifying the earpiece and a bluetooth address of another earpiece of the TWS headset. In addition, the memory 302 may also store a pairing history of the electronic device 01 successfully paired with the earplug before. For example, the pairing history may include the bluetooth address of the electronic device 01 that was successfully paired with the earpiece. Based on the pairing history, the earplug can automatically revert to the paired giant electronic device 01. The bluetooth address may be a Media Access Control (MAC) address.
The sensor 303 may be a distance sensor or a proximity light sensor. The ear bud can determine whether it is being worn by the user via the sensor 303. For example, the earbud may utilize a proximity light sensor to detect whether an object is near the earbud to determine whether the earbud is being worn by a user. The earpiece may open the receiver 305 when it is determined that the earpiece is worn. In some embodiments, the earplug may further include a bone conduction sensor, incorporated into a bone conduction earpiece. By utilizing the bone conduction sensor, the earplug can acquire the vibration signal of the vibration bone block of the sound part, analyze the voice signal and realize the voice function. In other embodiments, the ear bud may further include a touch sensor for detecting a touch operation of a user. In other embodiments, the ear bud may further include a fingerprint sensor for detecting a user's fingerprint, identifying the user's identity, and the like. In other embodiments, the earplug may further comprise an ambient light sensor that adaptively adjusts parameters, such as volume, based on the perceived brightness of the ambient light.
A wireless communication module 304 for supporting wireless data exchange between the current earpiece and another earpiece of the TWS earpiece and with various electronic devices 01. In some embodiments, the wireless communication module 304 may be a bluetooth transceiver. The earplugs of the TWS headset can establish wireless connection with the electronic equipment 01 through the Bluetooth transceiver so as to realize short-distance data exchange between the two. For example, audio data is exchanged, control data is exchanged, etc.
The audio module 300 is used to convert digital audio information into an analog audio signal output and also used to convert an analog audio input into a digital audio signal. The audio module 300 may further include an encoder and a decoder for encoding and decoding an audio signal. In some embodiments, the audio module 300 may be disposed in the processor 301, or some functional modules of the audio module 300 may be disposed in the processor 301.
At least one receiver 305, also referred to as a "handset," may be used to convert the electrical audio signals into sound signals and play them. For example, when the earpieces of the TWS headset are used as the audio output device of the electronic device 01, the receiver 305 may convert the received audio electric signal into a sound signal and play the sound signal.
At least one microphone 306, which may also be referred to as a "microphone," is used to convert sound signals into electrical audio signals. For example, when the ear plugs of the TWS headset are used as the audio input device of the electronic device 01, the microphone 306 can collect the voice signal of the user and convert the voice signal into an audio electrical signal during the speaking (such as a call or a voice message) of the user. The audio electrical signal is the audio data in the embodiment of the present application.
A power supply 307 may be used to supply power to the various components contained in the earplugs of the TWS headset. In some embodiments, the power source 307 may be a battery, such as a rechargeable battery.
Typically, TWS headsets are equipped with a headset case (e.g., headset case 023 shown in fig. 3B). The headset case may be used to house the left and right earplugs of a TWS headset. As shown in fig. 3B in conjunction with fig. 3A, the headset case 023 may be used to stow the left ear plug 022 and the right ear plug 021 of the TWS headset. In some embodiments, the headset case 023 may be provided with at least one touch control 024 that may be used to trigger operations such as the TWS headset to be re-paired with the electronic device 01. This earphone box 023 can also be provided with a charging port 025 for the earphone box itself charges. It is understood that the earphone box 023 may further include other controls, which are not described herein. In addition, the earphone case 023 may also charge the left and right earplugs of the TWS earphone. Accordingly, in some embodiments, the above TWS headset earplugs may further comprise: an input/output interface 308.
The input/output interface 308 may be used to provide any wired connection between the earpieces of the TWS headset and a headset case, such as the headset case 023 described above. In some embodiments, the input/output interface 308 may be an electrical connector. When the earplugs of the TWS headset are placed in the headset case, the earplugs of the TWS headset may be electrically connected to the headset case (e.g., to an input/output interface included with the headset case) via the electrical connector. After this electrical connection is established, the headset case may charge the power supply 307 for the earplugs of the TWS headset. The earplugs of the TWS headset may also be in data communication with the headset case after the electrical connection is established. For example, the earplugs of the TWS headset may receive pairing instructions from the headset case through the electrical connection. The pairing command is used to instruct the earplugs of the TWS headset to turn on the wireless communication module 304 so that the earplugs of the TWS headset may pair with the electronic device 01 using a corresponding wireless communication protocol (e.g., bluetooth).
Of course, the earplugs of the TWS headset described above may also not include the input/output interface 308. In this case, the ear bud may implement a charging or data communication function based on the wireless connection established with the earphone box through the wireless communication module 304 described above.
Additionally, in some embodiments, an earphone box (such as earphone box 023 described above) may further include components such as a processor, memory, and the like. The memory may be used to store application program code and be controlled to be executed by the processor of the headset box to implement the functionality of the headset box. For example. When the user opens the lid of the earphone box, the processor of the earphone box may send a pairing command or the like to the earplugs of the TWS headset in response to the user opening the lid by executing application program code stored in the memory.
It is to be understood that the illustrated structure of the embodiments of the present application does not constitute a specific limitation of the earplug of the TWS headset. It may have more or fewer components than shown in fig. 3A, may combine two or more components, or may have a different configuration of components. For example, the earplug may further include an indicator light 309 (which may indicate the status of the earplug, such as its power level), a display screen 310 (which may prompt a user for relevant information), a dust screen (which may be used with the earpiece), a motor, and the like. The various components shown in fig. 3A may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
For example, fig. 3C provides a schematic structural diagram 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, a proximity light sensor 312, and the like. The touch key 311 is used in cooperation with a touch sensor, and is used for triggering operations such as pause, play, record, MIC on, MIC off, and the like.
It should be noted that the left and right earplugs of the TWS headset may be identical in structure. For example, the left and right earplugs of a TWS headset may both include the components shown in FIG. 3A. Alternatively, the structure of the left and right earplugs of the TWS headset may be different. For example, one earpiece (e.g., the right earpiece) of the TWS headset may include the components shown in FIG. 3A, while another earpiece (e.g., the left earpiece) may include other components in FIG. 3A besides the microphone 306.
It should be noted that the structures shown in fig. 3A, 3B, and 3C are only exemplary, and are not intended to limit the structures or functions of the TWS headset and the headset case.
In the embodiment of the application, a mobile phone is taken as the electronic device 01, a TWS headset is taken as the external device 02, and connection between the mobile phone and the TWS headset is established in a bluetooth manner.
The TWS headset may interact with audio (audio) data and control data (e.g., synchronization data, link configuration parameters, last, up volume, pause or listen to control commands, etc.) via a bluetooth connection with the handset. The audio data may include media (media) data, voice (voice) data, and the like. For example, a TWS headset may play media data for a user such as music, recordings, sounds in video files, etc.; under the scenes of telephone, audio call and video call, the method can play an incoming call prompt tone and voice data of a call opposite terminal, acquire the voice data of a user and send the voice data to the mobile phone; in a game scene, background music, game prompt tones, team-friend voice data and the like can be played, and voice data of a user is collected and sent to the mobile phone; under the WeChat voice message scene, the voice message can be played, and voice data recorded by a user is collected and sent to the mobile phone; under the scenes of a voice assistant and the like, the voice data of the user can be collected and sent to the mobile phone.
In order to enable various audio applications such as music, telephone, games, etc. to be implemented by bluetooth technology, certain bluetooth protocols need to be followed between bluetooth devices. Fig. 4 shows a schematic diagram of a bluetooth system, which may include an application, an application adaptation layer, a bluetooth host (host), a host controller interface protocol (HCI), and a bluetooth controller (controller). The application adaptation layer can be used for adapting the corresponding relation between different applications and underlying protocols of different manufacturers. The bluetooth host may include an application profile (profile), a protocol stack, a rate control unit, and the like. The protocol stack may include a Service Discovery Protocol (SDP), a basic General Access Profile (GAP) of the profile, and other protocols. The rate control unit can adaptively adjust the coding rate of the audio encoder of the bluetooth device and the transmission rate of the audio data sent to other devices according to parameters such as the channel quality of a link between the current bluetooth device and other devices, the data amount to be transmitted and the like. The controller may include a Link Layer (LL), a baseband (baseband), a radio frequency (bluetooth radio frequency) unit, and the like. The LL is responsible for managing communication between bluetooth devices, and implementing operations such as link establishment, authentication, link configuration, and the like. The baseband mainly carries out the interconversion of radio frequency signals and digital or voice signals, and realizes baseband protocols and other bottom layer connection procedures. The wireless radio frequency unit is used for transmitting and receiving Bluetooth signals. The controller may also be used to detect the channel quality of the link between the bluetooth device and the other device.
The bluetooth connection scheme between the TWS headset and the mobile phone may include a listening scheme, a forwarding scheme, a Near Field Magnetic Induction (NFMI) scheme, a dual-transmission scheme (or referred to as a dual-connection scheme), and the like.
In the monitoring scheme, the TWS headset may include a main earpiece and an auxiliary earpiece, the mobile phone and the main earpiece establish a bluetooth connection, complete sending of audio data to the main earpiece, and complete service actions triggered by the mobile phone and the TWS headset (e.g., playing, pausing, switching to the previous one, turning up the volume, etc.); bluetooth connection is established between the double earplugs to complete information synchronization between the double earplugs; the auxiliary earplug acquires audio data by monitoring a Bluetooth link between the main earplug and the mobile phone.
In the forwarding scheme, the TWS headset may include a main earpiece and an auxiliary earpiece, a bluetooth connection is established between the mobile phone and the main earpiece, the transmission of audio data to the main earpiece is completed, and the service action triggered by the mobile phone and the TWS headset is completed; bluetooth connection is established between the double earplugs to complete information synchronization between the double earplugs, and the main earplug forwards audio data to the auxiliary earplug through a Bluetooth link between the main earplug and the auxiliary earplug.
In the NFMI scheme, the TWS headset may include a main earpiece and a secondary earpiece, a bluetooth connection is established between the mobile phone and the main earpiece, the transmission of audio data to the main earpiece is completed, and the service action triggered by the mobile phone and the TWS headset is completed; NFMI connection is established between the double earplugs to complete information synchronization between the double earplugs, and the main earplug forwards audio data to the auxiliary earplug through the NFMI link between the main earplug and the auxiliary earplug.
In the monitoring scheme, the forwarding scheme and the NFMI scheme, the mobile phone only establishes Bluetooth connection with the main earphone and interacts audio data with the main earphone; these connection schemes may also be referred to as single-shot schemes because the handset does not establish a bluetooth connection with the sub-earplug and does not interact audio data with the sub-earplug.
In the dual-transmission scheme, the mobile phone is respectively connected with two earplugs of the TWS in a Bluetooth mode, so that audio data, service control data and the like are interacted with the two earplugs of the TWS through Bluetooth links respectively, and operations such as audio data playing, service action control and the like are achieved. The two earplugs of the TWS can be in wireless connection with each other and can also be disconnected from each other.
After the Bluetooth connection between the mobile phone and the TWS headset is established, audio data can be interacted between the mobile phone and the TWS headset.
For an exemplary audio transmission flow of audio data from a source (source) to a destination (sink) as shown in fig. 5. As can be seen from fig. 5, the source end decodes audio data in an Application (APP) through an audio management module (for example, an audio service audiomaker in an android system), obtains configuration information of a hardware device, sets audio parameters, and so on; the decoded data enters a buffer (buffer)1 for buffering; an audio encoder (audio encoder) acquires audio data from the buffer 1 and encodes the audio data; the encoded audio data enters a buffer 2 for buffering, and the buffer 2 may be referred to as a data buffer to be transmitted; the audio data in the buffer 2 is transmitted to the destination through a channel with the destination. The destination buffers the audio data received from the source in the buffer 3; an audio decoder (audio decoder) acquires and decodes audio data from the buffer 3; the decoded audio data is buffered in the buffer 4; the codec sends the data in the buffer 4 to the speaker for playback.
In an embodiment of the present application, a transmission channel between a source end and a destination end 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 embodiment) and a connection-based isochronous audio stream (CIS) connection link (also referred to as CIS link or CIS connection in the following embodiment). The LE ACL link may be used to transmit control data, and the CIS link may be used to transmit audio data and response information. CIS is a BLE-based point-to-multipoint Isochronous (ISO) transport mechanism.
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 simultaneously. Here, the simultaneous data transmission does not limit time synchronization of the LE ACL connection link and the CIS connection link when data is transmitted, but means that data transmission on the LE ACL connection link and data transmission on the CIS connection link can be performed concurrently.
In the transmission process of audio data from a source end to a destination end, the channel quality, the data amount to be transmitted and the like of transmission channels are different, and the coding rate and the transmission rate of the audio data are also different. The technical scheme provided by the embodiment of the application can automatically and adaptively adjust the coding rate and the transmission rate of the audio data according to the factors such as the channel quality of a transmission channel, the data volume to be transmitted and the like under the conditions of not interrupting data transmission and not disconnecting a CIS link, so that a user cannot sense the adjustment process of the coding rate and the transmission rate; and the CIS link between the source end and the destination end does not need to be disconnected when the coding rate and the transmission rate are adjusted, and the connection of the CIS link is restarted after the relevant parameters are reconfigured.
Wherein the coding rate can be understood as the coding rate of the audio encoder in fig. 5. The transmission rate of audio data can be understood as the data amount of audio data transmitted from a source terminal to a destination terminal per unit time. Increasing the transmission rate means increasing the data amount of audio data transmitted from the source terminal to the destination terminal per unit time; the reduction of the transmission rate means that the data amount of audio data transmitted from the source terminal to the destination terminal per unit time is reduced.
Specifically, when the channel quality is poor, the coding rate and the transmission rate can be reduced, and enough retransmission time slots are ensured to improve the transmission performance; when the channel quality is good, the coding rate and the transmission rate can be improved so as to improve the audio quality; therefore, the coding rate and the transmission rate can be matched with the channel quality condition, the transmission performance and the audio quality are considered, the self-adaptive balance of the transmission performance and the audio quality is achieved, and the continuous transmission and playing of the audio data are ensured.
In one embodiment, when the channel quality is poor, the coding rate may be reduced first, and then the transmission rate may be reduced; when the channel quality is good, the transmission rate can be increased first, and then the coding rate can be reduced; therefore, the coded audio data can be transmitted by enough transmission capacity before and after the coding rate and the transmission rate are adjusted.
In the following embodiments of the present application, a dual connection is established between a mobile phone and a TWS headset, where the mobile phone (i.e., a first BLE bluetooth device) is a source end of audio data, and a first ear plug of the TWS headset (i.e., a second BLE bluetooth device, which may be any ear plug of the TWS headset) is a destination end of the audio data, which is taken as an example to describe the rate control method provided in the embodiments of the present application.
In the method, when the first earpiece is used, the handset may be configured with encoding parameters (i.e. first encoding parameters), and an audio encoder of the handset performs encoding according to the configured encoding parameters to obtain encoded audio data. The mobile phone sends the encoding parameters to the first earplug through the audio data packet, so that the first earplug can decode according to the encoding parameters.
And, when the first ear plug is used, the mobile phone and the first ear plug can negotiate transmission parameters (i.e. first transmission parameters) of the CIS link through the LE ACL link, and establish the CIS link according to the transmission parameters. For an example, the negotiation process of the transmission parameters may be as shown in fig. 6. As shown in fig. 6, the handset may set CIS group (CIG) parameters and enable CIS with the first earpiece. The procedure may include 601, the bluetooth host in the handset sending CIG parameter setting information (e.g. LE Set CIG parameters message) to the link layer LL in the bluetooth controller in the handset, thereby passing the transmission parameters (i.e. the first transmission parameters) to the handset LL. 602. Handset LL replies to handset host with a first acknowledgement message (e.g., a command complete message). 603. The handset host sends Create CIS information (e.g., LE Create CIS message) to the handset LL. 604. The handset LL replies a second acknowledgement message (e.g. HCI Command status message) to the handset host. 605. The mobile phone LL sends CIS connection request information (e.g., LL _ CIS _ REQ message) carrying the transmission parameters to the link layer LL in the bluetooth controller in the first earpiece, so as to request to establish CIS connection according to the transmission parameters. 606. The first earpiece LL sends a CIS connection Request message (e.g. LE CIS Request message) to the bluetooth host in the first earpiece. 607. The first earpiece host replies with an Accept CIS connection message (e.g., LE Accept CIS message) to the first earpiece LL. 608. The first earpiece LL replies with a third acknowledgement message (e.g. a HCI Command status message) to the first earpiece host. 609. The first earpiece LL sends CIS connection response information (e.g., LL _ CIS _ RSP message) to the handset LL after the first earpiece host has confirmed. 610. The handset LL sends fourth acknowledgement information (e.g. a LL _ CIS _ IND message) to the first earpiece LL. 611. The mobile phone LL sends CIS connection Established information (such as LE CIS Established message) to the mobile phone host. To this end, a CIS connection link is established between the handset and the first earpiece.
After the CIS link is established, the handset may send audio data encoded by the audio encoder to the first earpiece over the CIS link according to the configured transmission parameters. The first earpiece may receive audio data sent by the handset over the CIS link and reply with an acknowledgement message (e.g., an acknowledgement ACK message, a negative acknowledgement NACK message, a MISSING miss message, etc.) according to the configured transmission parameters. Subsequently, the mobile phone may determine a new encoding parameter (i.e., a second encoding parameter) according to the reference parameter, where the new encoding parameter is different from the previous encoding parameter, and encode the audio data according to the new encoding parameter, thereby increasing or decreasing the encoding rate. And, while the mobile phone sends the audio data to the first ear plug through the CIS link, the mobile phone and the first ear plug may negotiate a new transmission parameter (i.e. a second transmission parameter) according to the reference parameter through the LE ACL link, where the new transmission parameter is different from the previous transmission parameter, so as to increase the transmission rate of the audio data or decrease the transmission rate of the audio data through the new transmission parameter. The mobile phone and the first earplug can automatically start new transmission parameters after negotiating the new transmission parameters; alternatively, the handset and the first earpiece may also negotiate an update time at which the handset and the first earpiece enable new transmission parameters of the CIS link. Subsequently, the mobile phone sends audio data to the first earplug through the CIS link according to the new transmission parameters, and the first earplug receives the audio data sent by the mobile phone through the CIS link according to the new transmission parameters. That is, the mobile phone and the first earpiece may update the CIS transmission parameters without disconnecting the CIS connection, so as to transmit the audio data using the updated transmission parameters.
The reference parameter may include a channel quality parameter, and the channel quality parameter is used to indicate the quality of the channel. For example, the channel quality parameters may include: one or more of Packet Loss Rate (PLR), Packet Error Rate (PER), signal to noise ratio (SNR), signal to interference ratio (SIR), Received Signal Strength Indicator (RSSI), Channel Quality Indicator (CQI), Cyclic Redundancy Check (CRC), quality of service (Qos) parameters, and the like. The Qos parameter may include one or more of retransmission rate, jitter, delay, throughput, availability, and the like.
Encoders for audio data may be various, such as a sub-band coding (SBC) device, an Advanced Audio Coding (AAC) device, an aptX encoder, an aptX LL (low-latency aptX) encoder, an aptX HD (high-quality aptX) encoder, an LDAC encoder, an HWA encoder, and an HWA LL (low-latency HWA) encoder. Where the encoders are different, the encoding parameters that affect the encoding rate are also different. For example, in an SBC encoder, the encoding parameters may include one or more of bitpool value, block length (block length), subband number (subbands), channel number, sampling rate, frame length (frame length), and allocation method (allocation method). As another example, in an AAC encoder, the encoding parameters may include parameters such as a sampling rate and a number of channels.
In addition, in SBC, AAC, etc. encoders, the encoding rate may also be related to the encoding bandwidth. The encoding rate may also be increased when the encoding bandwidth is reduced (e.g., from 80Hz-20kHz to 80Hz-10 kHz). For example, in an SBC encoder, the encoding rate may be increased when the number of subbands is reduced. The encoding rate may also be reduced when the encoding bandwidth is increased (e.g., the encoding bandwidth is extended from 80Hz-10kHz to 80Hz-20 kHz). For example, in an SBC encoder, the encoding rate may be reduced when the number of subbands is increased.
The following embodiments of the present application are mainly described by taking an SBC encoder as an example.
In SBC coding, one way to calculate the coding rate may be: the coding rate, i.e. the coding bit rate per unit time, 8 frame length, sample rate/number of subbands/block length; wherein, the frame length is 4+ (4 × subband number of channels)/8 + ceiling (block length × channel number of channels value/8), ceiling represents rounding up. In such an encoder, the encoding rate may be increased or decreased by adjusting one or more of the bitpool value, the block length, the number of subbands, the number of channels, the sampling rate, and the frame length. For example, when the coding rate needs to be increased, the mobile phone may increase one or more of the bitpool value, the sampling rate, or the number of channels; when the coding rate needs to be reduced, the mobile phone can reduce one or more of the bitpool value, the sampling rate or the channel number. Among them, the channel modes (for example, mono (mono), binaural, or joint stereo (joint stereo)) are different, the frame lengths are calculated in different manners, and the corresponding encoding rates are also different. Moreover, the encoding parameters corresponding to different sound qualities (for example, medium sound quality or high sound quality) are also different. For an exemplary correspondence between different sound qualities and coding parameters, see table 1.
TABLE 1
Figure PCTCN2018122959-APPB-000001
Figure PCTCN2018122959-APPB-000002
There are many transmission parameters that affect the transmission rate, and the transmission rate can be increased or decreased by adjusting the transmission parameters. For example, the transmission parameter may include one or more of a Burst Number (BN), a number of sub-events (NSE), a refresh timeout (FT), a sub-event duration (sub-event duration), a PHY type, and the like. In the time domain, audio data may be transmitted within an ISO interval (ISO intraval). Wherein NSE represents the number of sub-events within one ISO interval; BN denotes the number of bursts (bursts) carried at maximum in each ISO interval, the content of the burst being the payload; the sub-event duration indicates the time of each sub-event (sub) within which the burst is transmitted, the sub-event duration depending on the size of the payload (payload); FT takes ISO interval as a unit, and represents that one burst can be transmitted in several ISO intervals at most; the PHY type may include air interface parameters such as transmission bandwidth and modulation mode. During a sub-event duration, the handset may send a burst and receive a reply message from the first earpiece, the burst being a payload, the payload being audio data.
For example, when BN is 2, NSE is 4, and FT is 1, a data transmission diagram can be seen in fig. 7. Wherein NSE-4 indicates that 4 subevent durations are included in each ISO interval; BN 2 denotes a maximum of 2 bursts, i.e. 2 payloads, carried within each ISO interval; FT-1 means that one burst can be transmitted within 1 ISO interval at most. At the refresh point of the payload k, the transmission of the payload k is stopped and the transmission of the payload k +1 is started, regardless of whether the payload k is successfully received by the destination. 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 that BN is greater than 1, for the data packet corresponding to the first payload in an ISO interval, the refresh point is located after the start of the ISO interval and at the end of the nth sub-event; where N ═ FLOOR (NSE/BN) + MOD (NSE, BN). For a data packet corresponding to the ith payload in an ISO interval, the refreshing point of the data packet is located, and in the ISO interval, after the refreshing point of the data packet corresponding to the first payload, the terminal point of the Mth sub-event is located; wherein M ═ FLOOR (NSE/BN) × (i-1). FLOOR represents rounding down, FLOOR (NSE/BN) represents rounding down of the quotient of NSE divided by BN, and MOD (NSE, BN) represents the remainder of NSE to BN.
Specifically, if the channel quality is determined to be poor according to the channel quality parameter, the mobile phone may reduce the coding rate by adjusting the coding parameter, and the mobile phone and the first earplug may reduce the transmission rate by adjusting the transmission parameter, so as to improve the transmission performance; if the channel quality is determined to be better according to the channel quality parameter, the mobile phone and the first earplug can improve the transmission rate by adjusting the transmission parameter, and the mobile phone can improve the coding rate by adjusting the coding parameter.
That is, when adjusting the encoding parameters and the transmission parameters, and thus the encoding rate and the transmission rate, the new encoding parameters may be determined by the mobile phone, and the mobile phone may send the new encoding parameters to the first earpiece through the audio data packet, so that the first earpiece may decode according to the new encoding parameters; the new transmission parameters may be negotiated by the handset and the first earpiece.
The specific application scenarios are different, the sequence of adjusting the coding parameters and the transmission parameters is different, and the specific adjustment modes may also be different. The following description is made separately for different scenarios.
In scenario 1, when the channel quality is good, the transmission rate is increased first, and then the coding rate is increased.
In this scenario, the handset and the first earpiece may negotiate new transmission parameters first to increase the transmission rate; then, the mobile phone determines new coding parameters to increase the coding rate.
In one case, the handset can actively initiate an adjustment to the transmission rate.
For example, in one embodiment, the handset performs channel quality monitoring and initiates an adjustment of the transmission rate based on the channel quality parameter. If the mobile phone determines that the channel quality parameter meets the first preset condition through channel quality monitoring, the channel quality can be indicated to be good, so that the mobile phone can initiate negotiation between new transmission parameters and update time, and the transmission rate is improved. The handset and the first earpiece enable new transmission parameters at the update time and then exchange data (e.g., audio data and response information, etc.) over the CIS link according to the new transmission parameters.
In one implementation of this embodiment, the first predetermined condition is that the channel quality parameter is better than a predetermined 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., a first preset value).
In another implementation of this embodiment, the first predetermined 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 a signal-to-interference ratio, and the first preset condition is that the magnitude of the increase of the signal-to-interference ratio is greater than or equal to a preset value 4. For another example, the channel quality parameter includes CQI and jitter, the first preset condition is that the CQI increases by a magnitude greater than or equal to a preset value 5, and the jitter decreases by a magnitude greater than or equal to a preset value 6.
In one scheme, if the previous channel quality parameter and the current channel quality parameter are both better than a preset value, and the degree of optimization of the current channel quality parameter compared with the previous channel quality parameter (such as the difference between the two) exceeds an adjustment threshold, adjusting the coding parameter and the transmission parameter to improve the transmission rate and the coding rate; if the optimization degree of the current channel quality parameter to 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 current channel quality parameter is more than the previous channel quality parameter optimization degree (such as the difference between the two) by more than the adjustment threshold, the coding parameter and the transmission parameter are adjusted to improve the transmission rate and the coding parameter.
In another implementation of this embodiment, the channel quality parameters include a plurality of channel quality parameters, each channel quality parameter corresponds to a respective weight, and the first preset condition is that the total score of the channel quality parameters is greater than or equal to a preset value 0. For an exemplary score condition of the channel quality parameter, see table 2 below. If the preset value 0 is 0.6 and the current total score is 0.8, the first preset condition is met.
TABLE 2
Figure PCTCN2018122959-APPB-000003
Figure PCTCN2018122959-APPB-000004
When the mobile phone determines that transmission parameters and updating time need to be negotiated according to the channel quality parameters, the mobile phone can respectively initiate negotiation on new transmission parameters and updating time in different messages; or, the mobile phone may initiate negotiation for a new transmission parameter and an update time in the same message, which is not limited in the embodiment of the present application.
There are many methods for the handset to initiate negotiation for new transmission parameters and update times.
For example, in a technical solution of this embodiment, the mobile phone may determine new transmission parameters and update time, and send the new transmission parameters and update time to the first earpiece; the first ear plug sends confirmation information to the mobile phone; after receiving the confirmation information of the first earplug, the mobile phone realizes negotiation of new transmission parameters and updating time.
The updating time may be a certain time after a preset current time, or a time after the current time determined by the mobile phone according to the feedback capability of the bottom chip. For example, the update time may be a start time of a next ISO interval after the current ISO interval.
It is noted that new transmission parameters are negotiated between the handset and the first earpiece over the LE ACL link. Specifically, the handset and the first earpiece may include a host and a link layer LL, respectively, and the handset further includes an audio encoder. Referring to fig. 8, the monitoring of the channel quality by the mobile phone may be that the mobile phone host indicates the mobile phone LL to monitor the channel quality, and the mobile phone LL reports the channel quality 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 of the transmission rate and the updating time. During the negotiation process, the mobile phone LL and the first earplug LL exchange negotiation information through LL commands between the mobile phone and the first earplug; in the mobile phone, negotiation information is interacted between the mobile phone host and the mobile phone LL through an HCI command; inside the first earpiece, information is negotiated between the first earpiece host and the first earpiece LL by HCI commands. An audio encoder of the mobile phone encodes audio data output by an audio source, such as a Pulse Code Modulation (PCM) code stream, and a mobile phone host transmits an encoded data packet according to negotiated transmission parameters.
For example, after the CIS connection is established, the process of negotiating new transmission parameters and updating the time between the handset and the first earpiece may be seen in fig. 6. As shown in fig. 6, the process may include: 612. the handset host may determine new transmission parameters and an Update time, and send CIG parameter Update information (e.g., a LE Update CIG parameters message) to the handset link layer LL, thereby passing the new transmission parameters to the handset LL. 613. Handset LL replies a fifth acknowledgement message (e.g., command complete message) to handset host. 614. The handset LL sends a CIS update request message (e.g. an LL _ CIS _ update _ REQ message) carrying the new transmission parameters and the update time to the first earpiece LL requesting to update the established CIS connection according to the new transmission parameters. 615. The first earpiece LL sends a CIS update response message (e.g. LL _ CIS _ update _ RSP message) to the handset LL. 616. At the update time, the handset LL and the first earpiece LL enable new transmission parameters. 617. The first ear piece LL sends an update complete message (e.g. a CIS update complete message) to the first ear piece host to inform the first ear piece host that the first ear piece LL has received the new transmission parameters and the update time. 618. The first earpiece LL sends an update confirmation message (e.g. a CIS _ update _ complete or HCI Command status message) to the handset LL. Therefore, negotiation between new transmission parameters and update time of the CIS link and update of the new transmission parameters are completed between the mobile phone and the first earplug, and then audio data and response data of the audio data are interacted between the mobile phone and the first earplug according to the new transmission parameters.
In another scheme, the mobile phone LL may not negotiate the update time with the first earpiece, and after sending the CIS update request message to the first earpiece LL, the mobile phone LL may automatically start a new transmission parameter immediately, and send an update confirmation message to the mobile phone host; after receiving the CIS update request message sent by the mobile phone LL, the first earpiece LL may automatically enable new transmission parameters, and send an update completion message to the first earpiece host.
In another scheme, the mobile phone and the first earplug may not negotiate update time, and after the mobile phone LL sends the CIS update request message to the first earplug LL, if a response message sent by the first earplug and confirming that the CIS update request message is received, the mobile phone LL immediately starts new transmission parameters; after receiving the CIS update request message sent by the mobile phone LL, the first earpiece LL may automatically enable new transmission parameters, and send an update completion message to the first earpiece host.
In another scheme, the mobile phone and the first earplug may agree in advance at an update time, the mobile phone enables new transmission parameters at the mth time after sending the CIS update request message, and the first earplug enables new transmission parameters at the kth time after receiving the CIS update request message. M and K are natural numbers.
After the mobile phone and the first earphone enable the new transmission parameters, when there is audio data to be transmitted, the mobile phone and the first earphone can transmit the audio data by using the new transmission parameters. The moment when the mobile phone sends the audio data by adopting the new transmission parameters and the moment when the mobile phone starts the new transmission parameters can be the same or different. For example, the handset may enable the new transmission parameters after transmitting the CIS update request message, and transmit audio data using the new transmission parameters after receiving the update confirmation message transmitted by the first earpiece. The moment when the new transmission parameters are employed by the first earpiece to receive audio data may be the same or different from the moment when the new transmission parameters are enabled by the first earpiece. For example, the first earpiece may enable new transmission parameters upon receiving the CIS update request message and employ the new transmission parameters to receive audio data upon receiving the update complete message.
In an embodiment of the present application, the method for increasing the transmission rate by adjusting the transmission parameter may include increasing a duty cycle of the payload or reducing retransmission by adjusting the transmission parameter, thereby increasing the transmission rate.
There may be several specific ways to increase the transmission rate by adjusting the transmission parameters. For example, in the case where other transmission parameters are not changed, BN and NSE are increased to increase the number of bursts that can be transmitted within the ISO interval, thereby increasing the transmission rate. For example, the transmission diagram shown in fig. 7 corresponds to BN 2, NSE 4, and FT 1, and the mobile phone transmits 2 payloads (i.e., payloads 0 and 1) within an ISO interval 1. In addition to fig. 7, if the transmission rate needs to be increased, if other transmission parameters are not changed, the negotiated NSE is increased to 6, and the negotiated BN is increased to 3, that is, the number of bursts transmittable within the ISO interval is increased to 3. Fig. 9 is a transmission diagram based on the adjusted new transmission parameters, and the handset can transmit 3 payloads (i.e., payloads 2, 3, and 4) within ISO interval 2. Also, referring to fig. 9, the handset and the first earpiece may simultaneously enable new transmission parameters at the negotiated update time (i.e., time 1) and transmit audio data and response information according to the new transmission parameters.
For another example, in the case where other transmission parameters are not changed, the BN (where the BN is smaller than the NSE) is increased to increase the number of bursts that can be transmitted within the ISO interval, thereby increasing the transmission rate. For example, on the basis of fig. 7, when the BN is increased to 3, a transmission diagram based on new transmission parameters may be seen in fig. 10. In fig. 10, the handset can transmit 3 payloads (i.e., payloads 2, 3, and 4) within ISO interval 2.
For another example, under the condition that other transmission parameters are not changed, the ratio of the BN to the NSE is increased to transmit a larger number of bursts in the ISO interval, so as to improve the transmission rate.
As another example, the type of PHY is adjusted to increase the transmission bandwidth and thus the transmission rate.
For another example, in the case that other transmission parameters are not changed, FT is decreased (where FT is greater than or equal to 1) to decrease the time occupied by retransmission, so that more audio data can be transmitted.
For another example, under the condition that other transmission parameters are not changed, the duration of the sub-event is increased, and multiple payloads may be aggregated to be transmitted within one duration of the sub-event, or the size of the payload may be increased to increase the time length of the payload that can be transmitted within the duration of the sub-event, thereby increasing the number of payloads that can be transmitted within the duration of the sub-event and increasing the transmission rate. For example, on the basis of fig. 7, if the duration of the sub-event is increased by two times, two payloads may be aggregated in one duration of the sub-event, and a transmission diagram corresponding to the new transmission parameter may be as shown in fig. 11. In fig. 11, two payloads (e.g., payload 2 and payload 3) may be transmitted within one sub-event duration within ISO interval 2.
As another example, any combination of increasing BN, increasing BN and NSE, increasing the ratio of BN to NSE, increasing the sub-event duration, decreasing FT, and increasing the transmission bandwidth.
In addition, if the new transmission parameters sent by the first earplug to the mobile phone cannot be accepted, the transmission parameter updating request of the mobile phone can be refused; alternatively, the first earpiece may notify the handset of the unacceptable failure, and the handset may re-determine the new transmission parameters and send them to the first earpiece for confirmation.
In another technical solution of this embodiment, the handset may determine the candidate value and the update time of the new transmission parameter, and send the new value and the update time to the first earpiece. The first earplug determines a new target value of the transmission parameter from the candidate values and sends the new target value to the mobile phone, and the mobile phone sends a confirmation message to the first earplug after receiving the target value sent by the first earplug, so that negotiation between the new transmission parameter and the updating time is realized. For example, the candidate value of the new transmission parameter may be candidate value 1: BN ═ 3, NSE ═ 4, and FT ═ 1; the candidate value is 2: BN is 3, NSE is 6, and FT is 1. And default transmission parameters, such as PHY types, sub-event durations and the like, which are not related in the candidate values are not changed.
In another aspect of this embodiment, the handset may determine the maximum and minimum values of the new transmission parameters and the update time and send them to the first earpiece. The first earplug determines a target value according to the maximum value and the minimum value range of the new transmission parameter and sends the target value to the mobile phone. And the mobile phone sends a confirmation message to the first earplug after receiving the target value sent by the first earplug, thereby realizing negotiation of new transmission parameters and updating time.
In another solution of this embodiment, the handset may determine the reference value and the update time of the new transmission parameter and send them to the first earpiece. The first earpiece determines a target value (which may or may not be the same as the reference value) based on the reference value of the new transmission parameter and transmits it to the handset. After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug, thereby realizing negotiation of new transmission parameters and updating time.
In another technical solution of the embodiment, the handset notifies the first earpiece to start negotiating transmission parameters; the first earpiece sends the new transmission parameters and the update time to the handset. The handset replies a confirmation message to the first earpiece to implement negotiation of new transmission parameters and update time.
In another technical solution of the embodiment, the handset notifies the first earpiece to start negotiating new transmission parameters; the first earpiece sends a confirmation message to the handset. The handset determines the new transmission parameters and the update time and sends them to the first earpiece. And after receiving the confirmation message replied by the first earplug, the mobile phone realizes negotiation of new transmission parameters and updating time.
In another aspect of this embodiment, the handset may determine new transmission parameters and send them to the first earpiece; after receiving the acknowledgement message of the first earpiece, a negotiation of new transmission parameters is effected. Then, the mobile phone can also determine the updating time and send the updating time to the first earplug; the negotiation of the update moment is effected after receiving the acknowledgement message of the first earpiece.
It should be noted that the above description of the method for initiating negotiation between new transmission parameters and update time by a mobile phone is only an example, and other negotiation methods may also be used, which is not limited in the embodiment of the present application.
In another embodiment, the first earpiece performs channel quality monitoring and sends the channel quality parameters to the handset, and then the handset initiates adjustment of the transmission rate, i.e. initiates negotiation with the first earpiece of new transmission parameters and update time, to increase the transmission rate. For a specific negotiation process of the new transmission parameter and the update time, reference may be made to the description of the above embodiment, for example, a CIS transmission parameter update process in fig. 6, and details of the subsequent embodiments are not repeated.
In another embodiment, the mobile phone instructs the first ear plug to monitor the channel quality, the first ear plug monitors the channel quality according to the instruction of the mobile phone and sends the channel quality parameter to the mobile phone, and the mobile phone initiates the adjustment of the transmission rate according to the channel quality parameter to improve the transmission rate.
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 the first earplug can send first information to the mobile phone when determining that the channel quality parameter meets a first preset condition; the mobile phone initiates the adjustment of the transmission rate according to the first information, that is, initiates the negotiation with the first earplug for new transmission parameters and update time, so as to increase the transmission rate.
In another case, the first earpiece may actively initiate an adjustment of the transmission rate.
In an embodiment, the first ear plug performs channel quality monitoring, or performs channel quality monitoring after receiving the indication of the mobile phone, and initiates adjustment of the transmission rate according to the channel quality parameter. And if the first earplug determines that the channel quality parameter meets the first preset condition, initiating new transmission parameter and updating time negotiation so as to improve the transmission rate.
In another embodiment, the handset monitors the channel quality and sends the channel quality parameter to the first earpiece, and the first earpiece then initiates the adjustment of the transmission rate according to the channel quality parameter.
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 parameter to the first earplug, and then the first earplug initiates the adjustment of the transmission rate according to the channel quality parameter.
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 the mobile phone can send first information to the first earplug when determining that the channel quality parameter meets a first preset condition; the first earpiece initiates negotiation of new transmission parameters and update times in accordance with the first information to increase the transmission rate.
It should be noted that, consistent with the scheme shown in fig. 8, in other schemes, new negotiation between the mobile phone and the first earpiece for transmission parameters and update time may still be performed through host, LL, HCI command, and LL command, which is not described in detail herein.
It should be further noted that, in the negotiation process of the transmission parameters, the transmission parameters of the interaction between the handset and the first earpiece may only include changed transmission parameters, or may also include unchanged transmission parameters, which is not limited in the embodiment of the present application. For example, the changed transmission parameters are BN, NSE, FT, and the like; in one way, the LE Update CIG parameters message and LL _ CIS _ Update _ REQ message in fig. 6 include the changed BN, and do not include the non-changed other transmission parameters such as NSE and FT; alternatively, the LE Update CIG parameters message and the LL _ CIS _ Update _ REQ message in fig. 6 include the changed BN, and the unchanged NSE, FT, and other transmission parameters.
When the channel quality parameter meets the first preset condition, after the mobile phone and the first earplug negotiate a new transmission parameter, the mobile phone can also determine a new coding parameter to improve the coding rate. That is, if the channel quality parameter meets the first preset condition, it may indicate that the channel quality is better, so the mobile phone may determine a new coding parameter to increase the coding rate; and initiates negotiation of new transmission parameters and update time to improve transmission rate. In addition, the mobile phone can also carry the new coding parameters in the audio data packet and send the audio data packet to the first earplug, and the first earplug decodes the audio data packet according to the coding parameters. For example, referring to fig. 8, after the first preset condition is satisfied and the transmission parameters are adjusted, the mobile phone may determine new encoding parameters to increase the encoding rate. As described above, there are various ways to increase the coding rate by adjusting the coding parameters. For example, in the case of the monaural channel shown in Table 1, when parameters such as the sampling rate, the number of subbands, the number of channels, the block length, and the allocation method are not changed, the bitpool value can be increased from 18 to 29, thereby increasing the encoding rate from 132kb/s to 198 kb/s. For another example, in the case of joint stereo shown in table 1, when parameters such as the number of subbands, the number of channels, the block length, and the allocation are not changed, the sampling rate may be increased from 44.1kHz to 48kHz, and the bitpool value may be increased from 35 to 51, so as to increase the coding rate from 229kb/s to 345 kb/s.
In a specific example, for the SBC encoder, the mobile phone may determine a target coding rate that needs to be adopted according to a packet loss rate condition, so as to adjust a bitpool corresponding to the target coding rate to achieve that the coding rate of the mobile phone is the target coding rate. For example, referring to table 3, the mobile phone is provided with a corresponding relationship between the packet loss rate 1, the preset value 1, the target coding rate, and the 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 bipol value 53, so that the audio data is encoded at a high target encoding rate of 328 kb/s; 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 35, so that the audio data is encoded at a lower target encoding rate of 229 kb/s.
TABLE 3
First preset condition Target coding rate Bipool value
The packet loss rate is less than or equal to a preset value 1 328kb/s 53
The packet loss rate is more than a preset value 1 229kb/s 35
Other specific ways of increasing the coding rate by adjusting the coding parameters are not described in the embodiments of the present application again. Then, the audio encoder of the mobile phone encodes the audio data according to the new encoding parameters.
After determining the new encoding parameters, the handset may send the new encoding parameters to the first earpiece via an audio data packet so that the first earpiece may decode according to the new encoding parameters.
The above description mainly takes the same condition that the channel quality parameter needs to satisfy when the coding rate is increased and the transmission rate is increased 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 handset may monitor the channel quality, or the handset may instruct the first earpiece to perform channel quality monitoring. When the mobile phone determines that the channel quality parameter meets the first preset condition or determines that the channel quality parameter meets the first preset condition according to the information reported by the first earplug, the transmission rate may be increased, and the specific method for increasing the transmission rate may refer to the related description in the above embodiments, which is not described herein again. When the mobile phone determines that the channel quality parameter meets the third preset condition or determines that the channel quality parameter meets the third preset condition according to the information reported by the first earplug, the mobile phone can show that the channel quality is better, so that a new coding parameter can be determined, and the coding rate is improved. Wherein the third preset condition is different from the first preset condition. For example, the first preset condition may be that the packet loss rate is less than or equal to a preset value 1, and the third preset condition may be that the packet loss rate is less than or equal to a preset value 9, where the preset value 9 is not equal to the preset value 1. For a specific manner of adjusting the transmission parameters and a manner of encoding the parameters, reference may be made to the description in the above embodiments, which are not repeated herein.
In scenario 2, when the channel quality is poor, the coding rate is reduced first, and then the transmission rate is reduced.
In the scene, the mobile phone can determine new coding parameters to reduce the coding rate; the handset and the first earpiece then negotiate new transmission parameters to reduce the transmission rate.
Similar to scenario 1, where the mobile phone increases the transmission rate and the coding rate when determining that the first preset condition is met, in scenario 2, the mobile phone may monitor the channel quality, or the mobile phone may instruct the first earpiece to perform channel quality monitoring. When the mobile phone determines that the channel quality parameter meets the second preset condition or determines that the channel quality parameter meets the second preset condition according to the information reported by the first earplug, the mobile phone can show that the channel quality is poor, and therefore a new coding parameter can be determined to reduce the coding rate.
In one embodiment, the second predetermined condition is that the channel quality parameter is worse than a predetermined value, corresponding to the first predetermined condition. For example, the channel quality parameter includes a packet loss rate, the first preset condition is that the packet loss rate is greater than or equal to a preset value 11, and the preset value 11 is greater 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, the first preset condition is that the packet loss rate is greater than or equal to a preset value 11, the packet error rate is greater than or equal to a preset value 12, and the preset value 12 is greater than or equal to a preset value 2. For another example, the channel quality parameter includes a signal-to-noise ratio, the first preset condition is that the signal-to-noise ratio is less than or equal to a preset value 13 (i.e., a second preset value), and the preset value 13 is less than or equal to a preset value 3.
In another embodiment, the second predetermined condition is that the channel quality parameter becomes poor. For example, the channel quality parameter includes a COI, and the first preset condition is a CQI reduction. As another example, the channel quality parameter includes a signal-to-interference ratio, and the first preset condition is that the magnitude of the reduction of the signal-to-interference ratio is greater than or equal to the preset value 14. As another example, the channel quality parameter includes CQI and jitter, the first preset condition is that the magnitude of CQI decrease is greater than or equal to a preset value 15, and the magnitude of jitter increase is greater than or equal to a preset value 16.
In another embodiment, the channel quality parameter includes a plurality of channel quality parameters, each channel quality parameter corresponds to a respective weight, and the second preset condition is that the total score of the channel quality parameters is less than 10. For example, the score value of the channel quality parameter can be shown in table 1, and the preset value 10 can be 0.5.
For example, referring to fig. 12, the cell phone host indicates that the cell phone LL monitors the channel quality, the cell phone LL reports to the cell phone host after determining that the second preset condition is met, and the cell phone host determines a new coding parameter to reduce the coding rate. As described above, there are various ways to reduce the coding rate by adjusting the coding parameters, for example, in the case of a single channel, when the parameters such as the sampling rate, the number of subbands, the number of channels, the block length, and the allocation mode are not changed, the mobile phone may 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 the embodiments of the present application again.
If the mobile phone determines that the channel quality parameter meets the second preset condition through channel quality monitoring, the mobile phone can indicate that the channel quality is poor, so that the mobile phone can initiate new negotiation between the transmission parameter and the updating time to reduce the transmission rate. Illustratively, referring to fig. 12, the handset initiates negotiation of new transmission parameters and update times to reduce the transmission rate. The handset and the first earpiece enable new transmission parameters at the update time and then exchange data (e.g., audio data and response information, etc.) over the CIS link according to the new transmission parameters.
In an embodiment of the present application, the method for reducing the transmission rate by adjusting the transmission parameter may include reducing a duty cycle of the payload or increasing the retransmission by adjusting the transmission parameter, thereby reducing the transmission rate.
The specific method of reducing the transmission rate by adjusting the transmission parameters may be various. For example, in the case where other transmission parameters are unchanged, BN (where BN is smaller than NSE) is reduced to reduce the number of bursts that can be transmitted within the ISO interval, reducing the transmission rate. For example, on the basis of fig. 7, when the BN is reduced to 1, a transmission diagram based on new transmission parameters may be seen in fig. 13. In fig. 13, only one payload can be transmitted within ISO interval 2.
For another example, in the case that other transmission parameters are not changed, BN and NSE are reduced to reduce the number of bursts that can be transmitted within the ISO interval, and the transmission rate is reduced.
As another example, in the case where other transmission parameters are not changed, the ratio of BN to NSE is decreased to transmit a smaller number of bursts within the ISO interval, decreasing the transmission rate.
As another example, the type of PHY is adjusted to reduce the transmission bandwidth, thereby reducing the transmission rate.
For another example, in the case where other transmission parameters are not changed, FT is increased (where FT is greater than or equal to 1) to increase the time available for retransmission, thereby reducing the data amount of transmittable audio data and decreasing the transmission rate. For example, on the basis of fig. 7, when FT is increased to 2, a transmission diagram based on new transmission parameters may be seen in fig. 14. In fig. 14, the refresh point of payload 2 that starts transmission in ISO interval 2 is within ISO interval 3, so if payload 2 is not successfully received in ISO interval 2, retransmission can continue until the refresh point within ISO interval 3, thereby reducing the time to transmit other payloads.
For another example, in the case that other transmission parameters are not changed, the duration of the sub-event is reduced to reduce the time length of the transmittable payload and reduce the transmission rate.
As another example, any combination of decreasing BN, decreasing BN and NSE, decreasing the ratio of BN to NSE, decreasing the sub-event duration, increasing FT, and decreasing the transmission bandwidth.
In one specific example of adjusting the encoding rate and the transmission rate, referring to fig. 15, the mobile side (i.e., source) includes an audio application, an encoder, a rate adjustment module, a channel quality monitoring module, a protocol stack, and a controller. The first earpiece side (i.e., the destination) includes a controller, a protocol stack, a decoder, and an analog output module. The channel quality monitoring module can monitor the channel quality through the retransmission rate or other Qos indexes reported by the controller. When the channel quality is lower than the threshold, the channel quality is poor, and the rate adjustment module may first adjust the bluetooth encoder to decrease its encoding rate, for example, change the bitpool value of the SBC from 53 to 35, and decrease the encoding rate from 328kbps to 229 kbps. Then, the rate adjustment module controls the protocol stack to Update the transmission parameters of the CIS to adapt to the change of the coding rate, the protocol stack sends the HCI command (e.g., the LE Update CIG parameters message) to the controller, and then the controller sends a command (e.g., the LL _ CIS _ Update _ REQ message) to the opposite end through the LL command to adjust the transmission parameters of the CIS. For example, the transmission parameters of the original CIS may include: the new transmission parameters of the updated CIS may include: interval 20ms, NSE 8, BN 1. The purpose of updating CIS transmission parameters is to reduce the throughput of the over the air technology (OTA) and reduce the transmission rate when the channel quality deteriorates, so that each packet data has more retransmission opportunities, and the destination can correctly receive the packet, thereby improving the audio quality.
The above description mainly takes the case where the same conditions that the channel quality parameters need to satisfy when the coding rate is lowered and the transmission rate is lowered as an example. In other embodiments, the conditions that the channel quality parameters need to satisfy when lowering the coding rate and lowering the transmission rate may also be different. For example, when the channel quality parameter meets a second preset condition, the coding rate is reduced; and when the fourth preset condition is met, reducing the transmission rate.
In other embodiments, the mobile phone may adjust the encoding parameters and the transmission parameters according to different scenarios and adjustment orders.
Wherein, for the adjustment of the encoding parameters, the handset may monitor the channel quality, or the handset may instruct the first earpiece to perform the channel quality monitoring. And when the mobile phone determines that the channel quality parameter meets the second preset condition or the channel quality parameter meets the second preset condition according to the information reported by the first earplug, the coding parameter is adjusted to improve or reduce the coding rate.
For the adjustment of the transmission parameters, the mobile phone and the first earplug may adjust the transmission parameters in the manner described in scenario 1, thereby increasing the transmission rate; correspondingly, the handset and the first earpiece may also adjust the transmission parameters in a similar manner, thereby reducing the transmission rate. For example, the handset monitors the channel quality and initiates adjustment of the transmission rate according to the channel quality parameters. If the mobile phone determines that the channel quality parameter meets the first preset condition through channel quality monitoring, the channel quality can be indicated to be good, so that the mobile phone can determine new transmission parameters and update time and send the new transmission parameters and the update time to the first earplug; the first earplug sends confirmation information to the mobile phone; after receiving the confirmation information of the first earplug, the mobile phone realizes negotiation of new transmission parameters and updating time so as to improve the transmission rate. If the mobile phone determines that the channel quality parameter meets the second preset condition through channel quality monitoring, the channel quality can be indicated to be poor, so that the mobile phone can determine new transmission parameters and update time and send the new transmission parameters and the update time to the first earplug; the first earplug sends confirmation information to the mobile phone; after receiving the confirmation information of the first earplug, the mobile phone realizes negotiation of new transmission parameters and updating time so as to reduce the transmission rate.
As another example, the handset instructs the first earpiece to perform a monitoring of the channel quality. The first earplug monitors the channel quality according to the indication of the mobile phone. The first earplug can send first information to the mobile phone when the first earplug determines that the channel quality parameter meets a first preset condition; and the mobile phone initiates new transmission parameters and negotiation of the updating time according to the first information so as to improve the transmission rate. The first earplug can send second information to the mobile phone when the channel quality parameter is determined to meet a second preset condition; and the mobile phone initiates new transmission parameters and negotiation of the updating time according to the second information so as to reduce the transmission rate.
In addition, in other embodiments, different transmission parameters and coding parameters may be negotiated between the handset and the first earpiece depending on how good the channel quality is. For example, the better the channel quality is, the higher the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earplug is, and the higher the coding rate corresponding to the coding parameter determined by the mobile phone is; the worse the channel quality, the lower the transmission rate corresponding to the new transmission parameter negotiated between the handset and the first earpiece, and the lower the coding rate corresponding to the new coding parameter determined by the handset. For example, the channel quality parameter includes a packet loss rate, and if the packet loss rate is less than or equal to a preset value 1, the new transmission parameter negotiated between the mobile phone and the first earpiece 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 the preset value 17, the new transmission parameter negotiated between the mobile phone and the first earplug is transmission parameter 2, and the new encoding parameter determined by the mobile phone is encoding parameter 2. Wherein the preset value 17 is smaller than the preset value 1. The smaller the packet loss rate is, the better the channel quality is, and the transmission rate corresponding to the transmission parameter 2 is higher than the transmission rate corresponding to the 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 a plurality of steps, with higher steps indicating better channel quality; and the higher the gear is, the higher the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earplug is, and the higher the transmission rate corresponding to the new encoding parameter determined by the mobile phone is.
In other embodiments, different transmission and coding parameters may be negotiated between the handset and the first earpiece depending on the magnitude of the channel quality increase or decrease. For example, the larger the amplitude of the channel quality improvement is, the higher the transmission rate corresponding to the transmission parameter negotiated between the mobile phone and the first earplug is, and the higher the coding rate corresponding to the coding parameter determined by the mobile phone is; the larger the magnitude of the decrease in channel quality, the lower the transmission rate corresponding to the new transmission parameter negotiated between the handset and the first earpiece, and the lower the coding rate corresponding to the coding parameter determined by the handset. For example, the channel quality parameter includes a packet loss rate, and if the amplitude of the decrease of the packet loss rate is greater than or equal to the preset value 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 smaller amplitude of the packet loss rate is greater than or equal to the preset value 19, the new transmission parameter negotiated between the mobile phone and the first earplug is transmission parameter 4, and the new encoding parameter determined by the mobile phone is encoding parameter 4. Wherein, the preset value 19 is smaller than the preset value 18, the smaller the amplitude of the packet loss rate reduction is, the larger 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 magnitude of the channel quality improvement may include a plurality of steps, and the higher the step, the greater the magnitude of the channel quality improvement is; and the higher the gear is, the higher the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earplug is, and the higher the coding rate corresponding to the new coding parameter determined by the mobile phone is. The amplitude of the channel quality reduction can also comprise a plurality of gears, and the higher the gear is, the larger the amplitude of the channel quality reduction is; and the higher the gear is, the lower the transmission rate corresponding to the transmission parameter negotiated between the mobile phone and the first earplug is, and the lower the coding rate corresponding to the new coding parameter determined by the mobile phone is.
Moreover, the transmission parameters may also include a plurality of gears, and the transmission parameters of different gears correspond to different transmission rates respectively; 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 a transmission parameter corresponding to the gear i; when the transmission rate needs to be increased, the mobile phone can send the transmission parameter of the first gear on the gear i to the first earplug; when the transmission rate needs to be reduced, the mobile phone can send the transmission parameters of the next gear of the gear i to the first earplug. For example, the corresponding relationship between the gear, the transmission parameter, the coding parameter and the transmission rate can be seen in table 4 below.
TABLE 4
Figure PCTCN2018122959-APPB-000005
Furthermore, in other embodiments, the encoding parameters may also be determined by the handset and the first earpiece by negotiation. For example, the mobile phone notifies the first earplug, the first earplug sends the range of the coding parameter to the mobile phone, the mobile phone determines the target coding parameter according to the range of the coding parameter and sends the target coding parameter to the first earplug, and the mobile phone realizes negotiation of the coding parameter after receiving the confirmation message of the first earplug. Specifically, the negotiation process of the coding parameters between the mobile phone and the first earpiece may be similar to the negotiation process of the transmission parameters, and details are not described here.
In other embodiments, the reference parameter may include an amount of data to be transmitted. The data amount to be transmitted may be the data amount of the audio data that has been encoded in the buffer 2 in fig. 5 and has not been transmitted. In one scheme, when the amount of data to be transmitted is greater than or equal to the first preset threshold, it may indicate that the transmission rate is low or the coding rate is high, and the data to be transmitted is accumulated, so that the transmission rate may be increased and/or the coding rate may be reduced, and the buffer 2 is prevented from overflowing. In another scheme, when the amount of data to be transmitted is greater than or equal to a first preset threshold, the channel quality may be poor, so that the data to be transmitted is accumulated, and thus the encoding rate and the transmission rate can be reduced, so that the data packet has more retransmission opportunities, the destination can correctly receive the data packet, and the audio quality is improved. In another scheme, when the amount of data to be transmitted is less than or equal to the second preset threshold, it may indicate that the transmission rate is higher or the coding rate is lower, and the amount of data to be transmitted is smaller, so that the transmission rate may be decreased and/or the coding rate may be increased. In another scheme, when the amount of data to be transmitted is less than or equal to the second preset threshold, the amount of data to be transmitted is less, and the channel quality may be better, so that the coding rate and the transmission rate can be improved, and the transmission performance can be improved. The second preset threshold is smaller than the first preset threshold, for example, the first preset threshold may be 80%, and the second preset threshold may be 20%. The first preset threshold may be a waterline 1 in the buffer 2, and the second preset threshold may be a waterline 2 in the buffer 2; the second preset threshold may be less than or equal to the first preset threshold.
It should be noted that, as can be seen from the above description, when the amount of data to be transmitted is greater than or equal to the first preset threshold, the transmission rate may be reduced, or the transmission rate may also be increased.
In one specific example of adjusting the encoding rate, the handset is provided with an encoding rate of a plurality of gears (e.g., the gears shown in table 4). If the data volume 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 (for example, gear 1); then, the mobile phone can periodically detect the size of the quantity to be transmitted, and if the quantity of the data to be transmitted is still larger than or equal to a first preset threshold value, the mobile phone can continue to adopt the coding rate of the lowest gear; if the data volume to be transmitted is smaller than the first preset threshold, the mobile phone can increase the coding rate by one gear.
If the data volume to be transmitted is less than or equal to a second preset threshold value, and the coding rate needs to be increased, the mobile phone can increase the coding rate to the highest gear; then, the mobile phone can periodically detect the size of the quantity to be transmitted, and if the quantity of the data to be transmitted is still less than or equal to a second preset threshold, the mobile phone can continue to adopt the coding rate of the highest gear; if the data volume to be transmitted is larger than the second preset threshold value, the mobile phone can reduce the coding rate by one gear.
It can be understood that, similar to the encoding parameters of multiple gears, the mobile phone may also have transmission parameters of multiple gears, and the mobile phone may also adjust the transmission rate through the transmission parameters of multiple gears, which is not described herein again.
In one specific example of adjusting the encoding rate and the transmission rate, referring to fig. 16, the handset side includes an audio application, an encoder, a rate adjustment module, a transmission queue, a queue monitoring module, a protocol stack, and a controller. The first earpiece 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 a first preset threshold, and the channel quality may be poor, the rate adjusting module may first adjust the bluetooth encoder to decrease the encoding rate thereof, for example, the bitpool value of the SBC is changed from 53 to 35, and the encoding rate is decreased from 328kbps to 229 kbps. Then, the rate adjustment module controls the protocol stack to Update the transmission parameters of the CIS to adapt to the change of the coding rate, the protocol stack sends the HCI command (e.g., the LE Update CIG parameters message) to the controller, and then the controller sends a command (e.g., the LL _ CIS _ Update _ REQ message) to the opposite end through the LL command to adjust the transmission parameters of the CIS. For example, the transmission parameters of the original CIS may include: the new transmission parameters of the updated CIS may include: interval 20ms, NSE 8, BN 1. The purpose of updating CIS transmission parameters is to reduce the throughput of the over the air technology (OTA) and reduce the transmission rate when the channel quality deteriorates, so that each packet data has more retransmission opportunities, and the destination can correctly receive the packet, thereby improving the audio quality.
On the contrary, when the queue monitoring module determines that the sending queue is lower than the 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 better, the rate adjusting module may further adjust the transmission parameter to increase the transmission rate, and then adjust the coding parameter to increase the coding rate, so that the transmission rate and the coding rate are adapted, which is not described herein again.
In another scheme, a preset mapping relation between the data volume to be transmitted and the encoding parameters and the transmission parameters is stored in the mobile phone. If the data volume to be transmitted of the encoded audio data is greater than or equal to the preset threshold value 1, the mobile phone determines a new transmission parameter according to the mapping relationship between the data volume to be transmitted and the preset data volume to be transmitted and the encoding parameter and the transmission parameter, so that the rate of encoding the audio data by using the new encoding parameter is less than the rate of encoding the audio data by using the original encoding parameter, and the transmission rate of the audio data transmitted by using the new transmission parameter is less than the transmission rate of using the original transmission parameter. If the data volume to be transmitted of the encoded audio data is less than or equal to the preset threshold value 2, the mobile phone determines a new transmission parameter according to the mapping relationship between the data volume to be transmitted and the preset data volume to be transmitted and the encoding parameter and the transmission parameter, so that the rate of encoding the audio data by using the new encoding parameter is greater than the rate of encoding the audio data by using the original encoding parameter, and the transmission rate of the audio data transmitted by using the new transmission parameter is greater than the transmission rate of using the original transmission parameter.
In other embodiments, the reference parameters may include a channel quality parameter and an amount of data to be transmitted. In an 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 condition that the transmission rate and the coding rate need to be increased described in the above embodiment, the method described in the above embodiment may be adopted to adjust the transmission parameter and the coding parameter, so as to increase 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 condition that the coding rate and the transmission rate need to be reduced described in the above embodiment, the coding parameter and the transmission parameter may be adjusted by using the method described in the above embodiment, so as to reduce 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 condition that the transmission rate and the coding rate need to be increased described in the above embodiment, the transmission parameter and the coding parameter may not be adjusted, so that the transmission rate and the coding rate are not increased. 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 condition that the coding rate and the transmission rate need to be reduced described in the above embodiment, the transmission parameter may not be adjusted, so that the coding rate and the transmission rate are not reduced.
It should be noted that the above description is made by taking an example in which the mobile phone adjusts the encoding rate by adjusting the encoding parameters of the encoder used. In other embodiments, the encoder used by the mobile phone may further include different encoding modes, the different encoding modes may correspond to different encoding rates, and the mobile phone may further adjust the encoding rate by switching the different encoding modes. For example, in one partitioning, the HWA encoder may include a high-speed encoding mode, a medium-speed encoding mode, and a low-speed encoding mode. If the currently used coding mode is a medium-speed coding mode, switching to a high-speed coding mode when the coding rate needs to be increased according to the reference parameters; when it is determined that the coding rate needs to be lowered based on the above-mentioned reference parameters, it is possible to switch to the low-speed coding mode. And the mobile phone can also inform the current coding mode to the first earphone in an audio data packet so that the first earphone can decode by using a corresponding decoding mode.
In other embodiments, the mobile phone may further include a plurality of different encoders, different encoders may correspond to different encoding rates, and the mobile phone may further adjust the encoding rate by switching different encoders. For example, in one division, the encoders in the handset may include three types of encoders, high-quality, medium-quality, and low-latency. The high-quality encoder may include an LDAC encoder, an aptX HD encoder, an HWA encoder, etc.; the middle-quality class encoder can comprise an SBC encoder, an AAC encoder, an aptX encoder and the like; the low latency encoder may include an aptX LL encoder, a HWA LL encoder, and the like. If the currently used encoder is a medium-quality encoder, such as an SBC encoder, when it is determined that the encoding rate needs to be increased according to the reference parameters, the currently used encoder may be switched to a high-quality encoder, such as an aptX HD encoder; when it is determined that the coding rate needs to be reduced based on the above reference parameters, a switch may be made to a low latency encoder, such as the aptX LL encoder. After the encoder is switched, the mobile phone can also notify the first earplug of the new encoder after switching through control signaling on the LE ACL link, so that the first earplug can decode in a corresponding decoding mode.
It should be noted that, in the embodiment of the present application, there may be a plurality of strategies for adjusting the encoding rate and the transmission rate by the handset. For example, the handset may adjust the coding rate and the transmission rate by using a preset rate adjustment manner. For another example, multiple rate adjustment modes are preset on the mobile phone, and the mobile phone can randomly select one of the multiple rate adjustment modes to adjust the coding rate and the transmission rate. For another example, a corresponding relationship between a preset condition and a rate adjustment mode may be stored in the mobile phone, and the mobile phone may adjust the coding rate and the transmission rate by using the corresponding rate adjustment mode 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; in adjusting the transmission rate, the handset 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 may adjust fewer kinds of encoding parameters and transmission parameters to improve the encoding rate and the transmission rate; when the channel quality is very good, the mobile phone can adjust more kinds of coding parameters and transmission parameters to improve the coding rate and the transmission rate; correspondingly, when the channel quality is poor, the mobile phone can adjust less kinds of coding parameters and transmission parameters to reduce the coding rate and the transmission rate; when the channel quality is very poor, the mobile phone can adjust more kinds of coding parameters and transmission parameters to reduce the coding rate and the transmission rate. Or, the mobile phone may adjust one or more encoding parameters and transmission parameters in a preset sequence or randomly each time; the adjusting process can be dynamic adjustment, the parameters are adjusted according to the preset step length each time, the reference parameters are continuously detected after adjustment, and whether to continue adjustment and how to adjust are determined according to the detection result. Alternatively, the mobile phone may adjust the transmission rate by referring to a rate adjustment policy existing in the prior art, which is not limited in the embodiment of the present application. Alternatively, the handset may adjust the coding rate and the transmission rate by referring to a rate adjustment policy existing in the prior art, which is not limited in the embodiment of the present application.
It should be noted that the above embodiment is described by taking an example of adaptively adjusting the coding rate and the transmission rate of the audio data between the handset and the first earpiece of the TWS headset in the dual-transmission scheme. In the non-dual transmission scheme, the coding rate transmission rate of the audio data may also be adaptively adjusted between the mobile phone and the main earpiece of the TWS, and the specific process may refer to the description in the above embodiments, which is not described herein again. And the auxiliary earplug can also obtain the adjusted new coding parameters and transmission parameters from the main earplug, so that the audio data sent by the mobile phone can be received according to the new coding parameters and transmission parameters.
It should be noted that, in the above embodiment, the embodiment mainly takes the example that in the dual-transmission scheme, the mobile phone is the source end of the audio data, and the first earpiece of the TWS headset is the destination end of the audio data, and when the second earpiece of the TWS headset is the destination end, the adaptive adjustment process of the coding rate and the transmission rate is the same as the above process, and details are not repeated here.
In the dual transmission scheme, when the mobile phone is a source end of audio data and the two earplugs of the TWS headset are destination ends of the audio data, the coding rate and the transmission rate of the audio data respectively transmitted by the mobile phone to the two earplugs may be the same or different, and the embodiment of the present application is not limited. For audio data received from the handset, the two earpieces of the TWS headset may be enabled to play synchronously.
It should be noted that, in the above embodiment, the mobile phone is taken as a source end of audio data, and the TWS earpiece is taken as a destination end of audio data. In some other embodiments, when the TWS earpiece is a source of audio data (for example, the MIC of the TWS earpiece collects voice data), and the mobile phone is a destination of audio data, the TWS earpiece may still adaptively adjust the encoding rate and the transmission rate by using the method in the foregoing embodiments, which is not described herein.
It will be appreciated that to implement the above functionality, the first BLE device and the second BLE device include respective hardware and/or software modules that perform the respective functions. The present application is capable of being implemented in hardware or a combination of hardware and computer software in conjunction with the exemplary algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Each BLE device disclosed in the embodiments of the present application is configured to implement the above method embodiments, so that the functional modules of the first BLE device may be divided according to the above method examples, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware form. It should be noted that the division of the modules in this embodiment is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of dividing the functional modules by corresponding functions, fig. 17 shows a schematic diagram of a possible composition of the first BLE device 1700 involved in the above embodiments, and as shown in fig. 17, the first BLE device 1700 may include: connection unit 1701, encoding unit 1702, transmission unit 1703, acquisition unit 1704, determination unit 1705, and the like.
The connection unit 1701 may be configured to support the first BLE device 1700 to perform the aforementioned establishing of the low-power asynchronous connection link LE ACL connection with the second BLE device; establishing a CIS connection with a second BLE device based on a first transmission parameter of the CIS, and/or other processes for the techniques described herein.
The encoding unit 1702 may be configured to support the first BLE device 1700 to perform the encoding of the audio data based on the first encoding parameter as described above; encoding audio data based on the second encoding parameter, and/or other processes for the techniques described herein.
The transmission unit 1703 may be configured to support the first BLE device 1700 to perform the above-described transmitting encoded audio data to the second BLE device through the CIS connection based on the first transmission parameter; transmitting the second transmission parameters to the second BLE device over the LE ACL connection while transmitting the audio data to the second BLE device over the CIS connection, and/or other processes for the techniques described herein.
The acquisition unit 1704 may be used to enable the first BLE device 1700 to perform the steps of acquiring reference parameters, etc., described above, and/or other processes for the techniques described herein.
The determining unit 1705 may be configured to enable the first BLE device 1700 to perform the above steps of determining the second encoding parameter and the second transmission parameter from the reference parameter, and/or other processes for the techniques described herein.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The first BLE device 1700 provided in the present embodiment is configured to perform the rate control method, and therefore can achieve the same effect as the implementation method described above.
Where an integrated unit is employed, the first BLE device 1700 may include a processing module, a storage module, and a communication module. The processing module may be configured to control and manage actions of the first BLE device 1700, for example, may be configured to support the first BLE device 1700 to perform the steps performed by the connection unit 1701, the encoding unit 1702, the obtaining unit 1704, and the determination unit 1705. The memory module may be used to support the first BLE device 1700 to store program code and data, and the like. The communication module may be configured to support communication between the first BLE device 1700 and other devices, for example, may be configured to support the first BLE device 1700 to perform the steps performed by the transmission unit 1703.
The processing module may be a processor or a controller. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., a combination of one or more microprocessors, a Digital Signal Processing (DSP) and a microprocessor, or the like. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a Wi-Fi chip, or another device that interacts with the first BLE device.
In one embodiment, when the processing module is a processor and the storage module is a memory, the first BLE device according to the present embodiment may be the mobile phone 100 having the structure shown in fig. 2.
Embodiments of the present application further provide a computer storage medium having stored therein computer instructions, which, when run on a first BLE device, cause the first BLE device to perform the above-mentioned related method steps to implement the rate control method in the above-mentioned embodiments.
Embodiments of the present application also provide a computer program product, which when run on a computer, causes the computer to perform the above-mentioned related steps to implement the rate control method performed by the first BLE device in the above-mentioned embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is configured to store computer executable instructions, and when the apparatus is operated, the processor may execute the computer executable instructions stored in the memory, so as to enable the chip to perform the rate control method performed by the first BLE device in the above-mentioned embodiments of methods.
The first BLE device, the computer storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding method provided above, and therefore, the beneficial effects achieved by the first BLE device, the computer storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
In the case of dividing the functional modules by corresponding functions, fig. 18 shows a schematic diagram of a possible composition of the second BLE device 1800 involved in the above embodiments, and as shown in fig. 18, the second BLE device 1800 may include: a connection unit 1801, a decoding unit 1802, a transmission unit 1803, and an acquisition unit 1804, and so on.
The connection unit 1801 may be configured to support the second BLE device 1800 to perform the aforementioned establishing of the low-power asynchronous connection link LE ACL connection with the first BLE device; establishing a CIS connection with the first BLE device based on the first transmission parameters of the CIS, and/or other processes for the techniques described herein.
The decoding unit 1802 may be configured to enable the second BLE device 1800 to perform the above-described decoding of audio data received from the first BLE device based on the first encoding parameter; decoding audio data received from the first BLE device based on the second encoding parameter, and/or other processes for the techniques described herein.
The transmission unit 1803 may be configured to support the second BLE device 1800 to perform the above-described receiving, through the CIS connection, the audio data sent by the first BLE device based on the first transmission parameter; receiving second transmission parameters transmitted by the first BLE device over an LE ACL connection while receiving audio data transmitted by the first BLE device over a CIS connection, and/or other processes for the techniques described herein.
The obtaining unit 1804 may be used to support the second BLE device 1800 to perform the steps described above for learning the second encoding parameter from the first BLE device, and/or other processes for the techniques described herein.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The second BLE device 1800 provided in this embodiment is configured to perform the rate control method described above, and therefore may achieve the same effect as the implementation method described above.
Where an integrated unit is employed, the second BLE device 1800 may include a processing module, a memory module, and a communication module. The processing module may be configured to control and manage actions of the second BLE device 1800, for example, may be configured to support the second BLE device 1800 to perform the steps performed by the connection unit 1801, the decoding unit 1802, and the obtaining unit 1804. The memory module may be used to support the second BLE device 1800 in storing program code and data and the like. The communication module may be configured to support the second BLE device 1800 to communicate with other devices, for example, may be configured to support the second BLE device 1800 to perform the steps performed by the transmission unit 1803.
In one embodiment, the second BLE device according to this embodiment may be a TWS headset having the structure shown in fig. 3A.
Embodiments of the present application further provide a computer storage medium having stored therein computer instructions, which, when run on a second BLE device, cause the second BLE device to perform the above-mentioned related method steps to implement the rate control method in the above-mentioned embodiments.
Embodiments of the present application also provide a computer program product, which when run on a computer, causes the computer to perform the above-mentioned relevant steps to implement the rate control method performed by the second BLE device in the above-mentioned embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is configured to store computer executable instructions, and when the apparatus is operated, the processor may execute the computer executable instructions stored in the memory, so as to enable the chip to perform the rate control method performed by the second BLE device in the above-mentioned embodiments of methods.
The second BLE device, the computer storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding method provided above, and therefore, the beneficial effects achieved by the second BLE device may refer to the beneficial effects in the corresponding method provided above, which are not described herein again.
Another embodiment of the present application provides a system, which may include the first BLE device and the second BLE device described above, and may be configured to implement the rate control method described above.
Through the description of the above embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (45)

  1. A method of rate control, comprising:
    the method comprises the steps that a first low-power Bluetooth BLE device and a second BLE device establish a low-power asynchronous connection link LE ACL connection;
    the first BLE device establishes a CIS connection with a second BLE device according to first transmission parameters of a connection-based isochronous audio stream CIS; the first transmission parameter is used for determining the transmission rate of the audio data;
    the first BLE device encodes audio data with first encoding parameters; the first encoding parameter is used for determining the encoding rate of the audio data;
    the first BLE device transmits audio data encoded by the first encoding parameter to the second BLE device through the CIS connection by using the first transmission parameter;
    the first BLE device determining a second encoding parameter and a second transmission parameter, the second encoding parameter being used to determine an encoding rate for audio data, and the second encoding parameter being different from the first encoding parameter; the second transmission parameter is used for determining the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter;
    the first BLE device encodes audio data with the second encoding parameters;
    the first BLE device sends the second transmission parameters to the second BLE device through the LE ACL connection while sending audio data to the second BLE device through the CIS connection using the first transmission parameters;
    and the first BLE device transmits the audio data coded by the second coding parameter to the second BLE device through the CIS connection by adopting the second transmission parameter.
  2. The method according to claim 1, wherein prior to the first BLE device determining the second encoding parameter and the second transmission parameter, the method further comprises:
    the first BLE device acquiring a reference parameter;
    the first BLE device determining a second encoding parameter and a second transmission parameter, including:
    the first BLE device determines the second encoding parameter and the second transmission parameter according to the reference parameter when the reference parameter meets a preset condition.
  3. The method according to claim 2, wherein the reference parameters comprise channel quality parameters of the CIS connection; the determining, by the first BLE device, the second encoding parameter and the second transmission parameter according to the reference parameter when the reference parameter satisfies a preset condition includes:
    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 encoding parameter and the second transmission parameter according to the channel quality parameter of the CIS connection, so that the encoding rate determined by the second encoding parameter is greater than the encoding rate determined by the first encoding 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 smaller than a 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 smaller than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is smaller than the transmission rate determined by the first transmission parameter.
  4. The method according to claim 3, wherein if the channel quality parameter of the CIS connection is greater than or equal to a first preset value, the first BLE device transmits the audio data encoded with the second encoding parameter to the second BLE device through the CIS connection using the second transmission parameter after the first BLE device encodes the audio data with the second encoding parameter;
    if the channel quality parameter of the CIS connection is smaller than a second preset value, before the first BLE device encodes audio data by using the second encoding parameter, the first BLE device transmits the audio data encoded by using the second encoding parameter to the second BLE device through the CIS connection by using the second transmission parameter.
  5. The method according to any of claims 2-4, wherein the channel quality parameter comprises packet loss rate, and the second coding parameter comprises bitpool value; the first BLE device determining the second encoding parameter from the reference parameter, including:
    and the first BLE equipment determines a corresponding target coding rate and a target bitpool value according to the packet loss rate, wherein the second coding parameter comprises the target bitpool value.
  6. The method according to any one of claims 2-4, wherein the reference parameter comprises a data amount to be transmitted of the encoded audio data, and wherein the determining, by the first BLE device, the second transmission parameter according to the reference parameter when the reference parameter satisfies a preset condition comprises:
    if the data volume to be transmitted of the encoded audio data is greater than or equal to a preset threshold value, the first BLE device determines the second encoding parameter and the second transmission parameter according to a mapping relation between the data volume to be transmitted and the preset data volume 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-6, wherein prior to the first BLE device transmitting audio data to the second BLE device over the CIS connection using the second transmission parameters, the method further comprises:
    the first BLE device sends update time indication information to the second BLE device;
    the first BLE device transmitting audio data to the second BLE device through the CIS connection using the second transmission parameters, including:
    and the first BLE device transmits audio data to the second BLE device through the CIS connection by adopting the second transmission parameter at the time indicated by the updating time indication information.
  8. The method according to any one of claims 1-7, wherein after the first BLE device determines the second encoding parameter, the method further comprises:
    the first BLE device informs the second BLE device of the second encoding parameter.
  9. The method of claim 8, wherein the audio data encoded using the second encoding parameter comprises indication information of the second encoding parameter.
  10. The method according to any one of claims 1-9, wherein the first BLE device comprises a first host and a first link layer, and wherein the second BLE device comprises a second link layer; the first BLE device sending the second transmission parameters to the second BLE device over the LE ACL connection, including:
    the first host sends parameter updating information to the first link layer, wherein the parameter updating information comprises the second transmission parameter;
    the first link layer sends CIS update request information to the second link layer, wherein the CIS update request information comprises the second transmission parameters.
  11. The method of claim 10, wherein the first host and the first link layer exchange information via a host controller interface protocol (HCI) command; and information is interacted between the first link layer and the second link layer through a link layer LL command.
  12. The method according to any one of claims 1-11, wherein the reference parameter comprises a channel quality parameter of the CIS connection, and wherein the acquiring, by the first BLE device, the channel quality parameter of the CIS connection comprises:
    the first BLE device obtains channel quality parameters of the CIS connection from the first BLE device; or,
    the first BLE device obtains channel quality parameters of the CIS connection from the second BLE device.
  13. The method according to any of claims 1-12, wherein the second transmission parameters comprise one or more of: burst number BN, sub-event number NSE, refresh timeout FT, sub-event duration and PHY type; wherein the PHY type includes a bandwidth and a modulation scheme of transmission.
  14. A transmission rate control method, comprising:
    the second low-power Bluetooth low-energy (BLE) equipment and the first BLE equipment establish a low-power asynchronous connection link (LE ACL) connection;
    the second BLE device establishes a CIS connection with the first BLE device according to first transmission parameters of a connection-based isochronous audio stream CIS; the first transmission parameter is used for determining the transmission rate of the audio data;
    the second BLE device receives audio data sent by the first BLE device through the CIS connection by using the first transmission parameters;
    the second BLE device decoding audio data received from the first BLE device according to a first encoding parameter; the first encoding parameter is used for determining 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 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 audio data, and the second encoding parameter is different from the first encoding parameter;
    if the second BLE device adopts the first transmission parameters, receiving the audio data sent by the first BLE device through the CIS connection, and simultaneously receiving the second transmission parameters sent by the first BLE device through the LE ACL connection; the second transmission parameter is used for determining the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; the second BLE device receives audio data sent by the first BLE device through the CIS connection using the second transmission parameters.
  15. The method according to claim 14, wherein obtaining the second encoding parameters from the first BLE device by the second BLE device comprises:
    the second BLE device obtains the second encoding parameter from the audio data encoded with the second encoding parameter transmitted by the first BLE device.
  16. The method according to claim 14 or 15, wherein prior to the second BLE device receiving audio data transmitted by the first BLE device over the CIS connection using the second transmission parameters, the method further comprises:
    the second BLE device receives update time indication information sent by the first BLE device;
    the second BLE device receives audio data sent by the first BLE device through the CIS connection using the second transmission parameters, including:
    and the second BLE device receives audio data sent by the first BLE device through the CIS connection by adopting the second transmission parameter at the time indicated by the updating time indication information.
  17. The method according to any one of claims 14-16, wherein the first BLE device comprises a first link layer, wherein the second BLE device comprises a second host and a second link layer; the second BLE device receives, through the LE ACL connection, second transmission parameters sent by the first BLE device, including:
    and the second link layer receives CIS updating request information sent by the first link layer, wherein the updating request information comprises the second transmission parameters.
  18. The method of claim 17, wherein the second host interacts information with the second link layer via a host controller interface protocol (HCI) command; and information is interacted between the first link layer and the second link layer through a link layer LL command.
  19. The method according to any one of claims 14-18, wherein prior to the second BLE device receiving second transmission parameters transmitted by the first BLE device over the LE ACL connection and the second BLE device employing the second encoding parameters to decode audio data received from the first BLE device, the method further comprises:
    the second BLE device transmits channel quality parameters of the CIS connection to the first BLE device.
  20. The method according to any one of claims 14-19, wherein the second BLE device is a wireless headset.
  21. A Bluetooth Low Energy (BLE) device, comprising: one or more processors; one or more memories; wherein the one or more memories have stored therein computer program instructions that, when executed by the one or more processors, cause the BLE device to perform the steps of:
    establishing a low-power consumption asynchronous connection link LE ACL connection with another BLE device;
    establishing a CIS connection with another BLE device according to first transmission parameters of a connection-based isochronous audio stream CIS; the first transmission parameter is used for determining the transmission rate of the audio data;
    encoding the audio data using the first encoding parameter; the first encoding parameter is used for determining the encoding rate of the audio data;
    transmitting encoded audio data to the other BLE device over the CIS connection using the first transmission parameters;
    determining a second encoding parameter and a second transmission parameter, the second encoding parameter being used to determine an encoding rate of audio data, and the second encoding parameter being different from the first encoding parameter; the second transmission parameter is used for determining the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter;
    encoding the audio data by using the second encoding parameter;
    transmitting the second transmission parameters to the other BLE device over the LE ACL connection while transmitting audio data to the other BLE device over the CIS connection using the first transmission parameters;
    and transmitting, to the other BLE device through the CIS connection, audio data encoded using the second encoding parameters using the second transmission parameters.
  22. The device according to claim 21, wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    acquiring a reference parameter before determining a second encoding parameter and a second transmission parameter;
    and when the reference parameter meets a preset condition, determining the second coding parameter and the second transmission parameter according to the reference parameter.
  23. The device according to claim 22, wherein the reference parameters comprise channel quality parameters of the CIS connection; when executed by the one or more processors, cause the BLE device to perform the steps of:
    if the channel quality parameter of the CIS connection is greater than or equal to a first preset value, determining a second encoding parameter and a second transmission parameter according to the channel quality parameter of the CIS connection, so that the encoding rate determined by the second encoding parameter is greater than the encoding rate determined by the first encoding parameter, and the transmission rate determined by the second transmission parameter is greater than the transmission rate determined by the first transmission parameter;
    and if the channel quality parameter of the CIS connection is smaller than a second preset value, determining a 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 smaller than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is smaller than the transmission rate determined by the first transmission parameter.
  24. The device according to claim 23, wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    if the channel quality parameter of the CIS connection is greater than or equal to a first preset value, after the audio data are coded by adopting the second coding parameter, the audio data coded by adopting the second coding parameter are sent to the other BLE device through the CIS connection by adopting the second transmission parameter;
    and if the channel quality parameter of the CIS connection is smaller than a second preset value, transmitting the audio data coded by the second coding parameter to the other BLE device through the CIS connection by adopting the second transmission parameter before coding the audio data by adopting the second coding parameter.
  25. The apparatus according to any of claims 22-24, wherein the channel quality parameter comprises packet loss rate, and the second coding parameter comprises bitpool value; the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    and determining a corresponding target coding rate and a target bitpool value according to the packet loss rate, wherein the second coding parameter comprises the target bitpool value.
  26. The device according to any one of claims 22-24, wherein the reference parameters comprise an amount of data to be transmitted of the encoded audio data, and wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    if the data volume to be transmitted of the encoded audio data is greater than or equal to a preset threshold value, determining the second encoding parameter and the second transmission parameter according to the mapping relation between the data volume to be transmitted and the preset data volume 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-26, wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    transmitting update time indication information to the other BLE device prior to transmitting audio data to the other BLE device through the CIS connection using the second transmission parameters;
    and transmitting audio data to the other BLE device through the CIS connection by adopting the second transmission parameter at the time indicated by the updating time indication information.
  28. The device according to any one of claims 21-27, wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    notifying the other BLE device of the second encoding parameter after determining the second encoding parameter.
  29. The apparatus of claim 28, wherein the audio data encoded using the second encoding parameter comprises indication information of the second encoding parameter.
  30. The device according to any one of claims 21-29, wherein the BLE device comprises a first host and a first link layer, the other BLE device comprising a second link layer; the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    the first host sends parameter updating information to the first link layer, wherein the parameter updating information comprises the second transmission parameter;
    and the first link layer sends CIS updating request information to the second link layer, wherein the CIS updating request information comprises the second transmission parameters.
  31. The apparatus of claim 30, wherein the first host interacts information with the first link layer via a host controller interface protocol (HCI) command; and information is interacted between the first link layer and the second link layer through a link layer LL command.
  32. The device according to any one of claims 21-31, wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    acquiring a channel quality parameter of the CIS connection from the CIS; or,
    obtaining channel quality parameters for the CIS connection from the other BLE device.
  33. The apparatus of any of claims 21-32, wherein the second transmission parameters comprise one or more of: burst number BN, sub-event number NSE, refresh timeout FT, sub-event duration and PHY type; wherein the PHY type includes a bandwidth and a modulation scheme of transmission.
  34. The device according to any one of claims 21-33, wherein the BLE device is a chip.
  35. A Bluetooth Low Energy (BLE) device, comprising: one or more processors; one or more memories; wherein the one or more memories have stored therein computer program instructions that, when executed by the one or more processors, cause the BLE device to perform the steps of:
    establishing a low-power consumption asynchronous connection link LE ACL connection with another BLE device;
    establishing a CIS connection with the other BLE device according to first transmission parameters of a connection-based isochronous audio stream (CIS); the first transmission parameter is used for determining the transmission rate of the audio data;
    receiving audio data sent by the other BLE device through the CIS connection by using the first transmission parameters;
    decoding audio data received from the other BLE device according to a first encoding parameter; the first encoding parameter is used for determining the encoding rate of the audio data;
    decoding audio data received from the other BLE device according to the second encoding parameter if the second encoding parameter is obtained from the other BLE device; the second encoding parameter is used to determine an encoding rate of audio data, and the second encoding parameter is different from the first encoding parameter;
    if the first transmission parameter is adopted, receiving audio data sent by the other BLE device through the CIS connection, and simultaneously receiving a second transmission parameter sent by the other BLE device through the LE ACL connection; the second transmission parameter is used for determining the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; receiving audio data transmitted by the other BLE device through the CIS connection using the second transmission parameters.
  36. The device according to claim 35, wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    obtaining the second encoding parameter from audio data transmitted by the other BLE device encoded with the second encoding parameter.
  37. The device according to claim 35 or 36, wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    receiving update time indication information transmitted by the other BLE device before receiving audio data transmitted by the other BLE device through the CIS connection by using the second transmission parameter;
    and receiving audio data sent by the other BLE device through the CIS connection by adopting the second transmission parameter at the time indicated by the updating time indication information.
  38. The device according to any one of claims 35-37, wherein the other BLE device comprises a first link layer, the BLE device comprising a second host and a second link layer; the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    and the second link layer receives CIS updating request information sent by the first link layer, wherein the updating request information comprises the second transmission parameters.
  39. The apparatus of claim 38, wherein the second host interacts information with the second link layer via a host controller interface protocol (HCI) command; and information is interacted between the first link layer and the second link layer through a link layer LL command.
  40. The device according to any one of claims 35-39, wherein the instructions, when executed by the one or more processors, cause the BLE device to perform the steps of:
    transmitting the channel quality parameters of the CIS connection to the other BLE device prior to receiving second transmission parameters transmitted by the other BLE device over the LE ACL connection and decoding audio data received from the other BLE device using second encoding parameters.
  41. The device according to any one of claims 35-40, wherein the BLE device is a wireless headset.
  42. The device according to any one of claims 35-41, wherein the BLE device is a chip.
  43. A computer storage medium comprising computer instructions that, when run on a bluetooth low energy, BLE, device, cause the BLE device to perform the rate control method according to any one of claims 1-20.
  44. A computer program product, which, when run on a computer, causes the computer to perform the rate control method of any one of claims 1-20.
  45. A Bluetooth Low Energy (BLE) device comprising means for performing the method of any one of claims 1-20.
CN201880098321.6A 2018-12-22 2018-12-22 Rate control method, device and computer storage medium Active CN112789883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210890144.3A CN115426687A (en) 2018-12-22 2018-12-22 Rate control method, device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/122959 WO2020124611A1 (en) 2018-12-22 2018-12-22 Rate control method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210890144.3A Division CN115426687A (en) 2018-12-22 2018-12-22 Rate control method, device and computer storage medium

Publications (2)

Publication Number Publication Date
CN112789883A true CN112789883A (en) 2021-05-11
CN112789883B CN112789883B (en) 2022-08-09

Family

ID=71100127

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210890144.3A Pending CN115426687A (en) 2018-12-22 2018-12-22 Rate control method, device and computer storage medium
CN201880098321.6A Active CN112789883B (en) 2018-12-22 2018-12-22 Rate control method, device and computer storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202210890144.3A Pending CN115426687A (en) 2018-12-22 2018-12-22 Rate control method, device and computer storage medium

Country Status (2)

Country Link
CN (2) CN115426687A (en)
WO (1) WO2020124611A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114245168A (en) * 2021-12-16 2022-03-25 北京数码视讯技术有限公司 Transmission regulation and control device and method for multimedia stream
CN116634492A (en) * 2023-01-29 2023-08-22 上海物骐微电子有限公司 Data scheduling method, device and storage medium based on Bluetooth LE audio
WO2024152244A1 (en) * 2023-01-18 2024-07-25 Oppo 广东移动通信有限公司 Data transmission method and system, bluetooth device and chip

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112312369B (en) * 2020-09-29 2023-10-27 无锡中感微电子股份有限公司 Low-delay wireless audio sending and receiving method and equipment
CN112867080B (en) * 2020-12-31 2023-01-31 合肥中感微电子有限公司 Wireless communication method, device, communication equipment and readable storage medium
CN116762465A (en) * 2021-01-29 2023-09-15 华为技术有限公司 CIS link adjustment method and related equipment
CN114979772B (en) * 2021-02-24 2023-05-12 腾讯科技(深圳)有限公司 Decoder configuration method, decoder configuration device, medium and electronic equipment
CN115175149A (en) * 2021-04-01 2022-10-11 Oppo广东移动通信有限公司 Equipment adding method and device, bluetooth chip and equipment
CN113453114B (en) * 2021-06-30 2023-04-07 Oppo广东移动通信有限公司 Encoding control method, encoding control device, wireless headset and storage medium
US11870595B2 (en) 2021-08-24 2024-01-09 Rohde & Schwarz Gmbh & Co. Kg Method and test device for performing packet error rate measurement
CN113709619A (en) * 2021-08-31 2021-11-26 Oppo广东移动通信有限公司 Audio processing method and device, user terminal and computer readable medium
CN114157942B (en) * 2021-11-30 2024-03-26 广州番禺巨大汽车音响设备有限公司 Method and system for controlling sound system of real wireless stereo
WO2023200615A1 (en) * 2022-04-15 2023-10-19 Qualcomm Incorporated Increasing reliability of bluetooth low energy audio links
CN115276920A (en) * 2022-07-27 2022-11-01 上海物骐微电子有限公司 Audio data processing method and device, electronic equipment and storage medium
CN117692338B (en) * 2024-02-01 2024-06-04 长城数字能源(西安)科技有限公司 Energy Internet of things data visualization method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135741A (en) * 2014-07-08 2014-11-05 福建联迪商用设备有限公司 Method of Bluetooth low energy communication, Bluetooth devices and system
US20160073220A1 (en) * 2014-09-09 2016-03-10 Mediatek Inc. Rate Indication and Link Adaptation for Long Range Wireless Networks
CN108737997A (en) * 2017-04-21 2018-11-02 展讯通信(上海)有限公司 Adjust method, equipment and the system of data packet transmission rates

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3138223A4 (en) * 2014-05-27 2018-01-03 MediaTek Singapore Pte Ltd. Method for rate indication
CN104936215B (en) * 2015-06-17 2019-01-04 福建联迪商用设备有限公司 A kind of wireless Wi-Fi dynamic rate shaping method and system
CN108471630B (en) * 2018-06-12 2022-06-21 Oppo广东移动通信有限公司 Transmission rate adjusting method, device, mobile terminal and computer readable medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135741A (en) * 2014-07-08 2014-11-05 福建联迪商用设备有限公司 Method of Bluetooth low energy communication, Bluetooth devices and system
US20160073220A1 (en) * 2014-09-09 2016-03-10 Mediatek Inc. Rate Indication and Link Adaptation for Long Range Wireless Networks
CN108737997A (en) * 2017-04-21 2018-11-02 展讯通信(上海)有限公司 Adjust method, equipment and the system of data packet transmission rates

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114245168A (en) * 2021-12-16 2022-03-25 北京数码视讯技术有限公司 Transmission regulation and control device and method for multimedia stream
CN114245168B (en) * 2021-12-16 2023-12-08 北京数码视讯技术有限公司 Multimedia stream transmission regulation device and method
WO2024152244A1 (en) * 2023-01-18 2024-07-25 Oppo 广东移动通信有限公司 Data transmission method and system, bluetooth device and chip
CN116634492A (en) * 2023-01-29 2023-08-22 上海物骐微电子有限公司 Data scheduling method, device and storage medium based on Bluetooth LE audio
CN116634492B (en) * 2023-01-29 2024-04-12 上海物骐微电子有限公司 Data scheduling method, device and storage medium based on Bluetooth LE audio

Also Published As

Publication number Publication date
CN112789883B (en) 2022-08-09
CN115426687A (en) 2022-12-02
WO2020124611A1 (en) 2020-06-25

Similar Documents

Publication Publication Date Title
CN112640505B (en) Transmission rate control method and equipment
CN112789883B (en) Rate control method, device and computer storage medium
CN112313929B (en) Method for automatically switching Bluetooth audio coding modes and electronic equipment
CN112789867B (en) Bluetooth connection method and equipment
CN113228701B (en) Audio data synchronization method and device
CN113225693B (en) Bluetooth connection method, equipment and system
CN112042212B (en) Audio data transmission method and electronic equipment
CN112868244A (en) Point-to-multipoint data transmission method and device
US12047760B2 (en) Bluetooth communication method and apparatus
CN114710768B (en) Bluetooth connection method and related device
CN112740728B (en) Bluetooth communication method and electronic equipment
CN112806092B (en) Microphone MIC switching method and device
CN112771828B (en) Audio data communication method and electronic equipment
CN113129916A (en) Audio acquisition method, system and related device
CN115706755A (en) Echo cancellation method, electronic device, and storage medium
CN114915359A (en) Method, device, electronic equipment and readable storage medium for selecting channel
CN113542984B (en) Stereo sound implementation system, method, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant