WO2020124611A1 - Rate control method and device - Google Patents

Rate control method and device Download PDF

Info

Publication number
WO2020124611A1
WO2020124611A1 PCT/CN2018/122959 CN2018122959W WO2020124611A1 WO 2020124611 A1 WO2020124611 A1 WO 2020124611A1 CN 2018122959 W CN2018122959 W CN 2018122959W WO 2020124611 A1 WO2020124611 A1 WO 2020124611A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
ble device
transmission
encoding
audio data
Prior art date
Application number
PCT/CN2018/122959
Other languages
French (fr)
Chinese (zh)
Inventor
朱宇洪
王良
郑勇
张景云
倪观军
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/122959 priority Critical patent/WO2020124611A1/en
Priority to CN202210890144.3A priority patent/CN115426687A/en
Priority to CN201880098321.6A priority patent/CN112789883B/en
Publication of WO2020124611A1 publication Critical patent/WO2020124611A1/en

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

Definitions

  • the embodiments of the present application relate to the field of electronic technology, and in particular, to a rate control method and device.
  • Bluetooth is a wireless technology standard that enables short-range data exchange.
  • Bluetooth mainly includes Bluetooth low energy (BLE), and basic rate (BR)/enhanced data (EDR) Bluetooth.
  • BLE Bluetooth can reduce power consumption and cost
  • the transmission mechanism based on BLE is currently a hotspot of research and use.
  • the transmission mechanism may include a point-to-multipoint connection-based isochronous stream (CIS) transmission protocol and the like. Based on CIS connection, data can be exchanged between Bluetooth devices.
  • CIS point-to-multipoint connection-based isochronous stream
  • Embodiments of the present application provide a rate control method and device, which can adaptively adjust the coding rate and transmission rate without disconnecting the CIS connection.
  • an embodiment of the present application provides a rate control method, including: a first low-power Bluetooth BLE device and a second BLE device establish a low-power asynchronous connection link (low energy connection asynchronous/link/logical transportation, LE ACL) ) Connection, establishing a CIS connection with the second BLE device according to the first transmission parameter of the CIS, which is used to determine the transmission rate of the audio data.
  • the first BLE device encodes the audio data using the first encoding parameter; the first encoding parameter is used to determine the encoding rate of the audio data.
  • the first BLE device uses the first transmission parameter to send the encoded audio data to the second BLE device through the CIS connection.
  • the first BLE device determines a second encoding parameter and a second transmission parameter.
  • the second encoding parameter is used to determine the encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter; the second transmission parameter is used to determine the audio data The transmission rate, and the second transmission parameter is different from the first transmission parameter.
  • the first BLE device uses the second encoding parameter to encode the audio data.
  • the first BLE device uses the first transmission parameter to send audio data to the second BLE device through the CIS connection, and sends the second transmission parameter to the second BLE device through the LEACL connection.
  • the first BLE device uses the second transmission parameter to send audio data encoded with the second encoding parameter to the second BLE device through the CIS connection.
  • the first BLE device can automatically update the coding parameters and transmission parameters according to the reference parameters such as the channel quality of the CIS connection without disconnecting the CIS connection, thereby adaptively adjusting the coding rate and the transmission rate, so that the coding The rate and transmission rate match.
  • the method further includes: the first BLE device sends the update time indication information to the second BLE device.
  • the first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, including: the first BLE device uses the second transmission parameter at the time indicated by the update time indication information, and uses the second transmission parameter to connect to the second through the CIS connection
  • the BLE device sends audio data.
  • the first BLE device and the second BLE device can automatically start the second transmission parameter at the agreed update time at the same time, thereby simultaneously updating the transmission rate.
  • the method before the first BLE device determines the second encoding parameter and the second transmission parameter, the method further includes: the first BLE device obtains the reference parameter.
  • the first BLE device determining the second encoding parameter and the second transmission parameter includes: the first BLE device determining the second encoding parameter and the second transmission parameter according to the reference parameter when the reference parameter satisfies the preset condition.
  • the reference parameter includes the channel quality parameter of the CIS connection; when the reference parameter meets the preset condition, the first BLE device determines the second encoding parameter and the second transmission parameter according to the reference parameter, including: If the channel quality parameter of the CIS connection is greater than or equal to the 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 first The encoding rate determined by the encoding parameter, the transmission rate determined by the second transmission parameter is greater than the transmission rate determined by the first transmission parameter.
  • the first BLE device determines 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 less than the encoding rate determined by the first encoding parameter The transmission rate determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.
  • the first BLE device uses the first Two transmission parameters, sending audio data encoded with the second encoding parameter to the second BLE device through the CIS connection. If the channel quality parameter of the CIS connection is less than the second preset value, before the first BLE device uses the second encoding parameter to encode the audio data, the first BLE device uses the second transmission parameter to connect to the second BLE device through the CIS connection Send the audio data encoded with the second encoding parameter.
  • the reference parameter further includes the data volume of the encoded audio data to be transmitted. If the first BLE device determines that the channel quality parameter is worse than the preset value, or the channel quality parameter becomes worse, or the amount of data to be transmitted is greater than or equal to the first preset threshold, the first BLE device compares the audio data based on the second encoding parameter After encoding, the first BLE device sends audio data encoded based on the second encoding parameter to the second BLE device through the CIS connection based on the second transmission parameter; where the encoding rate corresponding to the second encoding parameter is lower than the first encoding parameter Corresponding coding rate.
  • the first BLE device may first reduce the coding rate and then reduce the transmission rate when determining that the coding rate and the transmission rate need to be reduced based on reference parameters such as channel quality parameters and the amount of data to be transmitted.
  • the first BLE device determines that the channel quality parameter is better than the preset value, or the channel quality parameter becomes better, or the amount of data to be transmitted is less than or equal to the second preset threshold, the first BLE device sends the audio data encoded based on the second encoding parameter to the second BLE device through the CIS connection based on the second transmission parameter; wherein, the second encoding parameter The corresponding coding rate is higher than the coding rate corresponding to the first coding parameter.
  • the first BLE device may first increase the transmission rate and then increase the encoding rate, so that Enough transmission capacity to transmit the encoded audio data.
  • the channel quality parameter includes a packet loss rate
  • the second encoding parameter includes a bitpool value.
  • the first BLE device determines the second encoding parameter according to the reference parameter, including: the first BLE device determines the corresponding target encoding rate and target bitpool value according to the packet loss rate, and the second encoding parameter includes the target bitpool value.
  • the first BLE device may adjust the bitpool value in the encoding parameters according to the packet loss rate, thereby adjusting the encoding rate.
  • the reference parameter includes the data volume of the encoded audio data to be transmitted
  • the first BLE device determines the second transmission parameter according to the reference parameter when the reference parameter meets the preset condition, including: The amount of data to be transmitted of the post-audio data is greater than or equal to a preset threshold, then the first BLE device determines the second encoding parameter and the mapping relationship between the amount of data to be transmitted and the preset amount of data to be transmitted and the encoding parameter and the transmission parameter
  • the second transmission parameter is such that the coding rate of the audio data determined by the second coding parameter is less than the coding rate determined by the first coding 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.
  • the reference parameter further includes the data volume of the encoded audio data to be transmitted, and the first BLE device is provided with encoding parameters of multiple gears.
  • the first BLE device determining the second encoding parameter according to the reference parameter includes: if the amount of data to be transmitted is greater than or equal to the first preset threshold, the first BLE device sets the second encoding parameter to the first gear with the lowest encoding rate.
  • the first BLE device periodically detects the amount of data to be transmitted; if the amount to be transmitted is less than the first preset threshold, the first BLE device sets the second encoding parameter to the encoding parameter of the second gear, the second gear The bit is the previous gear of the first gear, and the coding rate corresponding to the coding parameter of the second gear is higher than the coding rate corresponding to the coding parameter of the first gear.
  • the first BLE device can gradually increase the encoding rate bit by bit.
  • the reference parameter further includes the data volume of the encoded audio data to be transmitted
  • the first BLE device is provided with encoding parameters of multiple gears.
  • the first BLE device determining the second encoding parameter according to the reference parameter includes: if the amount of data to be transmitted is less than or equal to the second preset threshold, the first BLE device sets the second encoding parameter to the corresponding third gear with the highest encoding rate Encoding parameter; the first BLE device periodically detects the amount of data to be transmitted; if the amount to be transmitted is greater than the second preset threshold, the first BLE device sets the second encoding parameter to the encoding parameter of the fourth gear, the fourth gear The bit is the next gear of the third gear, and the encoding rate corresponding to the encoding parameter of the fourth gear is lower than the encoding rate corresponding to the encoding parameter of the third gear.
  • the first BLE device can gradually reduce the encoding rate bit by bit.
  • the reference parameter further includes the data volume of the encoded audio data to be transmitted.
  • the first BLE device determining the second encoding parameter and the second transmission parameter according to the reference parameter includes: if the amount of data to be transmitted is greater than or equal to the first preset threshold, the first BLE device determines the second encoding parameter and the second transmission parameter, and The second coding parameter is used to reduce the coding rate, and the second transmission parameter is used to reduce the transmission rate.
  • the channel quality of the CIS connection may be poor, and the coding rate and the transmission rate may be reduced by adjusting the coding parameter and the transmission parameter.
  • the first BLE device determines the second encoding parameter and the second transmission parameter, and the second encoding parameter is used to increase the encoding rate,
  • the second transmission parameter is used to increase the transmission rate.
  • the channel quality of the CIS connection may be better, and the coding rate and the transmission rate can be increased by adjusting the coding parameter and the transmission parameter.
  • the method further includes the first BLE device notifying the second BLE device of the second encoding parameter.
  • the second BLE device can decode the received encoded audio data according to the second encoding parameter.
  • the audio data encoded with the second encoding parameter includes indication information of the second encoding parameter.
  • the first BLE device may notify the second BLE device of the second encoding parameter through the encoded audio data packet.
  • the first BLE device includes a first host and a first link layer
  • the second BLE device includes a second link layer.
  • the first BLE device sends the second transmission parameter to the second BLE device through the LEACL connection, which includes: the first host sends parameter update information to the first link layer, and the parameter update information includes the second transmission parameter.
  • the first link layer sends CIS update request information to the second link layer, and the CIS update request information includes the second transmission parameter.
  • the BLE device may include a host and a link layer, and the process of negotiating and adjusting transmission parameters may be between the host of the first BLE device and the link layer, between the host of the second BLE device and the link layer, and the first The link layer between the BLE device and the second BLE device.
  • the first host and the first link layer exchange information through the host controller interface protocol HCI command; the first link layer of the first BLE device communicates with The second link layer of the second BLE device exchanges information through the link layer LL command.
  • 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 have agreed a preset time in advance, for example, the first BLE device
  • the second transmission parameter is enabled at the Mth time after sending the parameter update information; for another example, the second BLE device enables the second transmission parameter at the Kth time after receiving the CIS update request information.
  • the first BLE device may not send the update time indication information to the second BLE device, and the first BLE device automatically enables the second transmission parameter after sending the parameter update information; for example, the second BLE After receiving the CIS update request message, the device automatically enables the second transmission parameter.
  • the second transmission parameter includes one or more of the following: the number of bursts BN, the number of sub-events NSE, the refresh timeout FT, the duration of sub-events, and the PHY type; where the PHY type includes the transmitted Bandwidth and modulation method.
  • the first BLE device can 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 duration of the sub-events, and the PHY type.
  • the first BLE device determines the second transmission parameter according to the reference parameter, and the second transmission parameter is used to increase the transmission rate of the audio data, including: if the first BLE device determines that the channel quality parameter is better than the When the set value or the channel quality parameter becomes better, the first BLE device determines the second transmission parameter.
  • the second transmission parameter increases the number of bursts BN, increases the number of sub-events NSE, reduces the refresh timeout FT, increases the duration of sub-events, and increases the transmission The bandwidth or the transmission rate corresponding to the modulation method used is higher.
  • the first BLE device may increase the transmission rate by adjusting the transmission parameter.
  • the first BLE device determines the second transmission parameter according to the reference parameter, and the second transmission parameter is used to reduce the transmission rate of the audio data, including: if the first BLE device determines that the channel quality parameter is worse than the If the set value or the channel quality parameter becomes worse, the first BLE device determines the second transmission parameter.
  • the second transmission parameter reduces the number of bursts BN, reduces the number of sub-events NSE, increases the refresh timeout FT, reduces the duration of sub-events, and reduces the transmission The bandwidth, or the transmission rate corresponding to the modulation method used, is lower.
  • the first BLE device may reduce the transmission rate by adjusting the transmission parameter.
  • the first BLE device acquiring the reference parameter includes: the first BLE device acquiring the reference parameter from itself; or, the first BLE device acquiring the reference parameter from the second BLE device.
  • the first BLE device may obtain channel quality parameters from its own controller; it may also obtain channel quality parameters from the controller of the second BLE device.
  • an embodiment of the present application provides a rate control apparatus, which is included in a first BLE device, and the apparatus has a function to implement the behavior of the first BLE device in the above aspects and possible implementation manners.
  • This function can be realized by hardware, and can also be realized by hardware executing corresponding software.
  • the hardware or software includes one or more modules or units corresponding to the above functions. For example, a connection module or unit, an encoding module or unit, a transmission module or unit, an acquisition module or unit, a determination module or unit, etc.
  • an embodiment of the present application provides a transmission rate control method, including: a second low-power Bluetooth BLE device establishes a low-power asynchronous connection link LEACL with a first BLE device, based on the first transmission parameter of the CIS A CIS connection is established with the first BLE device, and the first transmission parameter is used to determine the transmission rate of the audio data.
  • the second BLE device uses the first transmission parameter to receive audio data sent by the first BLE device through the CIS connection.
  • the second BLE device decodes the audio data received from the first BLE device according to the first encoding parameter; the first encoding parameter is used to determine the encoding rate of the audio data.
  • the second BLE device If the second BLE device obtains the second encoding parameter from the first BLE device, the second BLE device decodes the audio data received from the first BLE device according to the second encoding parameter; the second encoding parameter is used to determine the audio The encoding rate of the data, and the second encoding parameter is different from the first encoding parameter.
  • the second BLE device adopts the first transmission parameter and receives the audio data sent by the first BLE device through the CIS connection, it receives the second transmission parameter sent by the first BLE device through the LEACL connection; the second transmission parameter is used to determine The transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; then the second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection.
  • the second BLE device can adaptively adjust the transmission rate according to the transmission parameters sent by the first BLE device without disconnecting the CIS connection, and receive the updated coding parameters notified by the first BLE device.
  • the received audio data is decoded so that the encoding rate and the transmission rate match.
  • the second BLE device acquires the second encoding parameter from the first BLE device, including: the second BLE device acquires from the audio data sent by the first BLE device and encoded with the second encoding parameter The second encoding parameter.
  • the second BLE device can learn the updated encoding parameters of the first BLE device through the encoded audio data.
  • the method further includes: the second BLE device receives the first BLE device to send The update time indication information.
  • the second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection, including: the second BLE device uses the second transmission parameter to receive the first data through the CIS connection at the time indicated by the update time indication information Audio data sent by a BLE device.
  • the first BLE device and the second BLE device can simultaneously start the second transmission parameter at the agreed update time.
  • the first BLE device includes a first link layer
  • the second BLE device includes a second host and a second link layer.
  • the second BLE device receives the second transmission parameter sent by the first BLE device through the LEACL connection, including: the second link layer receives the CIS update request information sent by the first link layer, and the update request information includes the second transmission parameter.
  • the second BLE device enables the second transmission parameter, including: the second link layer enables the second transmission parameter; the second link layer sends update completion information to the second host to indicate that the second transmission parameter is enabled.
  • the BLE device may include a host and a link layer, and the process of adjusting transmission parameters may be between the host of the first BLE device and the link layer, between the host of the second BLE device and the link layer, and the first BLE device With the link layer of the second BLE device.
  • the second host and the second link layer exchange information through the host controller interface protocol HCI command; the first link layer of the first BLE device communicates with The second link layer of the second BLE device exchanges information through the link layer LL command.
  • the second BLE device receives the second transmission parameter sent by the first BLE device through the LEACL connection, and the second BLE device receives the second transmission parameter from the first BLE device based on the second encoding parameter Before decoding the audio data, the method further includes: the second BLE device sends the channel quality parameter of the CIS connection to the first BLE device.
  • the first BLE device may determine the second encoding parameter and the second transmission parameter according to the channel quality parameter sent by the second BLE device.
  • the second BLE device may be a wireless headset.
  • an embodiment of the present application provides a rate control apparatus.
  • the apparatus is included in a second BLE device, and the apparatus has a function to implement the behavior of the second BLE device in any of the above aspects and possible implementation manners.
  • This function can be realized by hardware, and can also be realized by hardware executing corresponding software.
  • the hardware or software includes one or more modules or units corresponding to the above functions. For example, a connection module or unit, a decoding module or unit, a transmission module or unit, an acquisition module or unit, etc.
  • an embodiment of the present application provides a system, which may include the first BLE device and the second BLE device in any possible implementation manner of any of the above aspects, and may implement the rate control method described above .
  • an embodiment of the present application provides a BLE device, including one or more processors and one or more memories.
  • the one or more memories are coupled to one or more processors.
  • the one or more memories are used to store computer program code.
  • the computer program codes include computer instructions.
  • an embodiment of the present application provides a computer storage medium, including computer instructions, which when executed on a computer, causes the computer to perform any of the above aspects and any possible implementation of the first BLE device or the first Two rate control methods performed by BLE devices.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to perform any one of the possible implementations of the first aspect or the second aspect described above. Two rate control methods performed by BLE devices.
  • FIG. 1 is a schematic diagram of a system structure provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a mobile phone provided by an embodiment of the present application.
  • FIG. 3A is a schematic structural diagram of an earplug provided by an embodiment of the present application.
  • 3B is a schematic diagram of a TWS earphone and earphone box provided by an embodiment of the present application.
  • 3C is a schematic diagram of an earplug provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a Bluetooth system provided by an embodiment of this application.
  • FIG. 6 is a flowchart of a method for adjusting transmission parameters provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of a first BLE device provided by an embodiment of this application.
  • FIG. 18 is a schematic structural diagram of a second BLE device provided by an embodiment of the present application.
  • 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.
  • the electronic device 01 and the external device 02 are connected wirelessly.
  • the wireless method may be Bluetooth (bluetooth, BT), wireless fidelity (wireless fidelity, Wi-Fi) network, global navigation satellite system (global navigation satellite system (GNSS), frequency modulation (frequency modulation (FM), close range Wireless communication technology (near field communication, NFC), infrared technology (infrared, IR) and other connections.
  • the electronic device 01 may be a mobile phone, a media player (such as MP3, MP4, etc.) tablet computer, notebook computer, ultra-mobile personal computer (UMPC), personal digital assistant (personal digital assistant, PDA), TV and other equipment.
  • the external device 02 may be a wireless headset, a wireless speaker, a wireless bracelet, a wireless vehicle, a wireless smart glasses, an augmented reality (AR) ⁇ virtual reality (VR) device, etc. No restrictions.
  • the wireless earphone may be a headphone, earplugs or other portable listening devices.
  • the external device 02 may include one main body, or may include a paired first main body 021 and a second main body 022, and the first main body 021 and the second main body 022 cooperate and cooperate with each other.
  • the external device 02 when the external device 02 is an earplug TWS earphone, the external device 02 may include a paired left earplug (usually marked with "L") and right earplug (usually marked with "R”).
  • the left earplug and right earplug are used for stereo playback, the left earplug can be used to play the left channel signal of audio data, and the right earplug can be used to synchronously play the right channel signal of the audio data.
  • the electronic device 01 uses a mobile phone as an example, and the external device 02 uses an earplug-type TWS earphone and bracelet as an example for description. It can be understood that the electronic device 01 and the external device 02 in the system may also be other devices, which are not limited in this embodiment of the present application.
  • 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, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, key 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100.
  • the mobile phone 100 may include more or fewer components than shown, or combine some components, or split some components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), and an image signal processor. (image)signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • the different processing units may be independent devices or may be integrated in one or more processors.
  • the controller may be the nerve center and command center of the mobile phone 100.
  • the controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. The repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit, sound, I2S) interface, pulse code modulation (pulse code modulation (PCM) interface, universal asynchronous transceiver (universal) asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /Or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may respectively couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the mobile phone 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement functions such as answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering the phone call through the Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193.
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI) and so on.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the mobile phone 100.
  • the processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the mobile phone 100.
  • the GPIO interface can be configured via software.
  • the GPIO interface can be configured as a control signal or a data signal.
  • the GPIO interface may be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transfer data between the mobile phone 100 and an external device. It can also be used to connect headphones and play audio through the headphones.
  • the interface can also be used to connect other mobile phones, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic description, and does not constitute a limitation on the structure of the mobile phone 100.
  • the mobile phone 100 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the mobile phone 100. While the charging management module 140 charges the battery 142, it can also supply power to the mobile phone through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charging management module 140 may also be set 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 and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can 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 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the mobile phone 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive the electromagnetic wave from the antenna 1 and filter, amplify, etc. the received electromagnetic wave, and transmit it to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it to electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be transmitted into a high-frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110, and may be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area network (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellite system that are applied to the mobile phone 100 (global navigation system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives the electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it to electromagnetic waves through the antenna 2 to radiate it out.
  • the mobile phone 100 may use the wireless communication module 160 to establish a wireless connection with an external device through a wireless communication technology (such as Bluetooth). Based on the established wireless connection, the mobile phone 100 can send audio data to the external device and can also receive audio data from the external device.
  • the processor 110 may also adaptively adjust the transmission rate when the mobile phone sends audio data to the external device according to factors such as the channel quality of the link between the mobile phone 100 and the external device and the amount of data to be transmitted.
  • the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technology may include global mobile communication system (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long-term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM , And/or IR technology, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband code division Multiple access
  • WCDMA wideband code division multiple access
  • TD-SCDMA time division code division multiple access
  • long-term evolution long term evolution
  • LTE long term evolution
  • GNSS can include global positioning system (GPS), global navigation satellite system (global navigation system (GLONASS), Beidou satellite navigation system (beidou navigation, satellite system, BDS), quasi-zenith satellite system (quasi-zenith satellite system (QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou satellite navigation system beidou navigation, satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the mobile phone 100 realizes a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the mobile phone 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP processes the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, the 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, which is converted into a visible image.
  • ISP can also optimize the algorithm of image noise, brightness and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be set in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CCD charge coupled device
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the mobile phone 100 is selected at a frequency point, the digital signal processor is used to perform Fourier transform on the energy at the frequency point.
  • the video codec is used to compress or decompress digital video.
  • the mobile phone 100 may support one or more video codecs. In this way, the mobile phone 100 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • moving picture experts group moving picture experts, MPEG
  • MPEG2 moving picture experts, MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent recognition of the mobile phone 100, such as image recognition, face recognition, voice recognition, and text understanding.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, and the executable program code includes instructions.
  • the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the mobile phone 100. For example, in the embodiment of the present application, the processor 110 may establish a wireless pairing connection with the two main bodies of the external device through the wireless communication module 160 by executing instructions stored in the internal memory 121, as well as with the external device. Short distance data exchange to realize functions such as calling and playing music through external equipment.
  • the internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area may store an operating system, at least one function required application programs (such as sound playback function, image playback function, etc.).
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the mobile phone 100 and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
  • the mobile phone 100 may use wireless communication technology (such as Bluetooth) to establish a wireless connection between the two main bodies of the external device. For example, the mobile phone 100 establishes a wireless connection with the first body, and then establishes a wireless connection between the mobile phone 100 and the second body through the first body. After the wireless connection is established, the mobile phone 100 can store the Bluetooth address of the external device in the internal memory 121.
  • the external device is a device including two main bodies, such as a TWS headset
  • the left and right earbuds of the TWS headset have respective Bluetooth addresses
  • the mobile phone 100 may store the Bluetooth addresses of the left and right earbuds of the TWS headset in the internal storage.
  • the left and right earplugs of the TWS earphone are used as a pair of devices.
  • the mobile phone 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.
  • the audio module 170 may further include an encoder and a decoder for encoding and decoding audio signals.
  • 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 “speaker” is used to convert audio electrical signals into sound signals.
  • the mobile phone 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also known as "handset" is used to convert audio electrical signals into sound signals.
  • the voice can be received by holding the receiver 170B close to the ear.
  • the microphone 170C also known as “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a person's mouth, and input a sound signal to the microphone 170C.
  • the mobile phone 100 may be provided with at least one microphone 170C. In other embodiments, the mobile phone 100 may be provided with two microphones 170C. In addition to collecting sound signals, it may also achieve a noise reduction function. In other embodiments, the mobile phone 100 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the headset interface 170D is used to connect wired headsets.
  • the headphone jack 170D may be a USB jack 130, or a 3.5mm open mobile phone platform (OMTP) standard interface, and the American Telecommunications Industry Association (cellular telecommunication industry association of the USA, CTIA) standard interface.
  • OMTP open mobile phone platform
  • CTIA American Telecommunications Industry Association
  • the TWS headset when the mobile phone 100 establishes a wireless connection with an external device, such as a TWS headset, the TWS headset can be used as an audio input/output device of the mobile phone 100.
  • the audio module 170 may receive the audio electrical signal transmitted by the wireless communication module 160 to realize functions such as answering a phone call and playing music through a TWS headset.
  • the TWS headset can collect the user's voice signal, convert it into an audio electrical signal, and send it to the wireless communication module 160 of the mobile phone 100.
  • the wireless communication module 160 transmits the audio electrical signal to the audio module 170.
  • the audio module 170 can convert the received audio electrical signal into a digital audio signal, encode it, and pass it to the mobile communication module 150. It is transmitted by the mobile communication module 150 to the call peer device to realize the call.
  • the application processor may transmit the audio electrical signal corresponding to the music played by the media player to the audio module 170.
  • the audio electrical signal is transmitted to the wireless communication module 160 by the audio module 170.
  • the wireless communication module 160 may send the audio electrical signal to the TWS headset, so that the TWS headset converts the audio electrical signal into a sound signal and plays it.
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may be a parallel plate including at least two conductive materials. When force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The mobile phone 100 determines the strength of the pressure based on 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 mobile phone 100 may calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the movement posture of the mobile phone 100.
  • the angular velocity of the mobile phone 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the mobile phone 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shaking of the mobile phone 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the mobile phone 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the mobile phone 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the mobile phone 100 when the mobile phone 100 is a clamshell machine, the mobile phone 100 can detect the opening and closing of the clamshell according to the magnetic sensor 180D.
  • characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used for recognizing the posture of mobile phones, and used in applications such as horizontal and vertical screen switching and pedometers.
  • the distance sensor 180F is used to measure the distance.
  • the mobile phone 100 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the mobile phone 100 may use the distance sensor 180F to measure distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the mobile phone 100 emits infrared light outward through a light emitting diode.
  • the mobile phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100.
  • the mobile phone 100 can use the proximity light sensor 180G to detect that the user is holding the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense the brightness of ambient light.
  • the mobile phone 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the mobile phone 100 can use the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a picture of the fingerprint, and answer the call with the fingerprint.
  • the temperature sensor 180J is used to detect the temperature.
  • the mobile phone 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the mobile phone 100 performs to reduce the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • the mobile phone 100 when the temperature is lower than another threshold, the mobile phone 100 heats the battery 142 to avoid abnormal shutdown of the mobile phone 100 due to low temperature.
  • the mobile phone 100 when the temperature is below another threshold, the mobile phone 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
  • Touch sensor 180K also known as "touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the mobile phone 100, which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal.
  • the bone conduction sensor 180M may also be provided in the earphone and combined into a bone conduction earphone.
  • the audio module 170 can parse out the voice signal based on the vibration signal of the vibrating bone block of the voice part acquired by the bone conduction sensor 180M to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the key 190 includes a power-on key, a volume key, and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the mobile phone 100 can receive key input and generate key signal input related to user settings and function control of the mobile phone 100.
  • the motor 191 may generate a vibration prompt.
  • the motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminder, receiving information, alarm clock, game, etc.
  • Touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the amount of power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the mobile phone 100.
  • the mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 can also be compatible with external memory cards.
  • the mobile phone 100 interacts with the network through the SIM card to realize functions such as call and data communication.
  • the mobile phone 100 uses eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.
  • FIG. 3A shows a structural diagram of an earplug (left earplug or right earplug), one of the main bodies of a TWS earphone.
  • the earplug of the TWS earphone 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 to store application code, such as an application code for establishing a wireless connection with another earbud of the TWS earphone and pairing the earbud with the electronic device 01.
  • the processor 301 can control and execute the above application program code to implement the function of the earplug of the TWS earphone in the embodiment of the present application. For example, according to the channel quality of the link between the TWS headset and the electronic device, the amount of data to be transmitted, and other factors, the function of adaptively adjusting the encoding rate and transmission rate of the audio data sent by the TWS headset to the electronic device.
  • the memory 302 may also store a Bluetooth address for uniquely identifying the earbud, and a Bluetooth address of another earbud where the TWS earphone is stored.
  • the memory 302 may also store the pairing history of the electronic device 01 that has successfully paired with the earplug.
  • the pairing history may include the Bluetooth address of the electronic device 01 that has successfully paired with the earbud. Based on the pairing history, the earplug can be automatically connected back to the paired giant electronic device 01.
  • the aforementioned Bluetooth address may be a media access control (media access control, MAC) address.
  • the sensor 303 may be a distance sensor or a proximity light sensor.
  • the earplug can determine whether it is worn by the user through the sensor 303.
  • the earplug may use a proximity light sensor to detect whether there is an object near the earplug, thereby determining whether the earplug is worn by the user.
  • the earplug may open the receiver 305.
  • the earplug may also include a bone conduction sensor, combined with a bone conduction earphone. Using the bone conduction sensor, the earplug can obtain the vibration signal of the vibrating bone mass of the voice part, analyze the voice signal, and realize the voice function.
  • the earplug may further include a touch sensor for detecting the user's touch operation.
  • the earplug may further include a fingerprint sensor, which is used to detect a user's fingerprint and identify the user's identity.
  • the earplug may further include an ambient light sensor, which may adaptively adjust some parameters, such as volume, according to the perceived brightness of the ambient light.
  • the wireless communication module 304 is used to support wireless data exchange between the current earplug and another earplug of the TWS earphone and various electronic devices 01.
  • the wireless communication module 304 may be a Bluetooth transceiver.
  • the earplugs of the TWS headset can establish a wireless connection with the electronic device 01 through the Bluetooth transceiver to achieve short-range data exchange between the two. For example, exchange audio data, exchange control data, etc.
  • the audio module 300 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.
  • the audio module 300 may further include an encoder and a decoder for encoding and decoding audio signals.
  • the audio module 300 may be disposed in the processor 301, or a part of the functional modules of the audio module 300 may be disposed in the processor 301.
  • At least one receiver 305 which may also be referred to as an "earpiece,” may be used to convert audio electrical signals into sound signals and play them.
  • the receiver 305 can convert the received audio electrical signal into a sound signal and play it.
  • At least one microphone 306 which may also be referred to as a "microphone” or a “microphone,” is used to convert sound signals into audio electrical signals.
  • the microphone 306 can collect the user's voice signal and convert it into an audio electrical signal during the user's speech (such as talking or sending a voice message) .
  • the above audio electrical signal is the audio data in the embodiment of the present application.
  • the power supply 307 can be used to supply power to various components included in the earplugs of the TWS earphone.
  • the power source 307 may be a battery, such as a rechargeable battery.
  • TWS earphones will be equipped with a headphone box (eg, headphone box 023 shown in FIG. 3B).
  • the earphone box can be used to store the left and right earplugs of TWS earphones.
  • the earphone box 023 can be used to store the left earplug 022 and the right earplug 021 of the TWS earphone.
  • the headset box 023 may be provided with at least one touch control 024, which may be used to trigger operations such as re-pairing of the TWS headset and the electronic device 01.
  • the earphone box 023 may also be provided with a charging port 025 for charging the earphone box itself.
  • the earphone box 023 may further include other controls, which will not be described one by one here.
  • the earphone box 023 can also charge the left and right earplugs of the TWS earphone.
  • the earplugs of the TWS earphone may further include: an input/output interface 308.
  • the input/output interface 308 can be used to provide any wired connection between the earplug of the TWS earphone and the earphone box (such as the earphone box 023 described above).
  • the input/output interface 308 may be an electrical connector.
  • the earplugs of the TWS earphone When the earplugs of the TWS earphone are placed in the earphone box, the earplugs of the TWS earphone can be electrically connected to the earphone box (such as the input/output interface included in the earphone box) through the electrical connector. After the electrical connection is established, the earphone box can charge the power supply 307 of the earplug of the TWS earphone.
  • the earplugs of the TWS headset can also communicate with the headset box.
  • the earplugs of a TWS earphone can receive pairing instructions from the earphone box through this electrical connection.
  • the pairing command is used to instruct the earbuds of the TWS headset to turn on the wireless communication module 304, so that the earbuds of the TWS headset can use the corresponding wireless communication protocol (such as Bluetooth) to pair and connect with the electronic device 01.
  • the earplugs of the aforementioned TWS earphones may not include the input/output interface 308.
  • the earplug may implement charging or data communication functions based on the wireless connection established with the earphone box through the wireless communication module 304 described above.
  • the earphone box may further include a processor, a memory, and other components.
  • the memory can be used to store application program code, and is controlled and executed by the processor of the earphone box to realize the function of the earphone box.
  • the processor of the earphone box can send a pairing command to the earplug of the TWS headset in response to the user's operation of opening the lid by executing the application code stored in the memory.
  • the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the earplugs of the TWS earphone. It may have more or fewer components than shown in FIG. 3A, may combine two or more components, or may have different component configurations.
  • the earplug may also include an indicator light 309 (which can indicate the status of the earplug's power level, etc.), a display screen 310 (which can prompt the user about relevant information), a dust filter (which can be used with the earpiece), a motor, and other components.
  • 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.
  • 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, and a touch key 311 and a proximity light sensor 312.
  • the touch key 311 is used in conjunction with the touch sensor to trigger operations such as pause, play, record, turn on the MIC, and turn off the MIC.
  • the structure of the left and right earplugs of the TWS earphone can be the same.
  • the left and right earplugs of a TWS earphone may include the components shown in FIG. 3A.
  • the structure of the left and right earplugs of the TWS earphone may also be different.
  • one earplug (such as the right earplug) of the TWS earphone may include the components shown in FIG. 3A
  • the other earplug (such as the left earplug) may include other components other than the microphone 306 in FIG. 3A.
  • FIGS. 3A, 3B, and 3C are only exemplary descriptions, and are not intended to limit the structure or function of the TWS earphone and earphone box.
  • the mobile phone is the electronic device 01
  • the TWS headset is the external device 02
  • the connection between the mobile phone and the TWS headset is established by Bluetooth as an example.
  • the TWS headset can interact with audio data and control data (such as synchronization data, link configuration parameters, previous track, volume up, pause or answer control commands, etc.) through the Bluetooth connection with the mobile phone.
  • the audio data may include media data and voice data.
  • TWS headsets can play media data such as music, recordings, and sounds in video files for users; in telephone, audio call, and video call scenarios, they can play incoming call notification sounds, play voice data of the opposite end of the call, and collect user voices Data is sent to the mobile phone; in the game scene, you can play background music, game prompts, teammates' voice data, etc., and collect the user's voice data to send to the mobile phone; in the WeChat voice message scene, you can play voice messages and collect user recordings And send the voice data to the mobile phone; in scenarios such as voice assistants, you can collect the user's voice data and send it to the mobile phone.
  • 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 (host controller interface (HCI), and a Bluetooth controller).
  • the application adaptation layer can be used to adapt the correspondence between different applications and the underlying protocols of different manufacturers.
  • the Bluetooth host may include an application profile, protocol stack, rate control unit, and so on.
  • the protocol stack may include a service discovery protocol (service discovery protocol, SDP), a profile based general access profile (general access access profile, GAP) and other protocols.
  • SDP service discovery protocol
  • GAP general access access profile
  • the rate control unit can adaptively adjust the encoding rate of the audio encoder of the Bluetooth device and the transmission rate of audio data sent to other devices according to the parameters such as the channel quality of the current link between the Bluetooth device and other devices, the amount of data to be transmitted, etc. .
  • the controller may include a link layer (LL), a baseband, and a radio frequency (Bluetooth radio frequency) unit.
  • LL is responsible for managing the communication between Bluetooth devices, to achieve link establishment, verification, link configuration and other operations.
  • the baseband mainly performs mutual conversion between radio frequency signals and digital or voice signals to implement baseband protocols and other low-level connection procedures.
  • the radio frequency unit is used to transmit and receive Bluetooth signals.
  • the controller can also be used to detect the channel quality of the link between the Bluetooth device and other devices.
  • the Bluetooth connection scheme between the TWS headset and the mobile phone may include a monitoring scheme, a forwarding scheme, a near field magnetic induction (NFMI) scheme, and a dual-transmission scheme (or dual-connection scheme).
  • NFMI near field magnetic induction
  • the TWS headset may include a main earbud and a secondary earbud
  • the mobile phone establishes a Bluetooth connection with the main earbud, completes the transmission of audio data to the main earbud, and completes the business actions triggered by the mobile phone and the TWS headset (such as play, pause , Switch to the previous track, increase the volume, etc.);
  • a Bluetooth connection is established between the two earbuds to complete the information synchronization between the two earbuds; the secondary earbuds obtain audio data by monitoring the Bluetooth link between the main earbuds and the mobile phone.
  • the TWS headset can include a main earbud and a secondary earbud, establish a Bluetooth connection between the mobile phone and the main earbud, complete the transmission of audio data to the main earbud, and complete the business action triggered by the mobile phone and the TWS headset; establish between the two earbuds There is a Bluetooth connection to complete the information synchronization between the dual earbuds, and the main earbuds forward the audio data to the secondary earbuds through the Bluetooth link with the secondary earbuds.
  • the TWS headset can include a main earbud and a secondary earbud, a Bluetooth connection is established between the mobile phone and the main earbud, the audio data is sent to the main earbud, and the business action triggered by the mobile phone and the TWS headset is completed; the establishment between the double earbud There is NFMI connection to complete the information synchronization between the two earplugs.
  • the main earplug forwards audio data to the secondary earplug through the NFMI link with the secondary earplug.
  • the mobile phone establishes a Bluetooth connection with the two earplugs of TWS respectively, so as to exchange audio data and business control data through the Bluetooth link between the two earplugs of TWS, respectively, to achieve audio data playback and business action control And other operations.
  • the wireless connection between the two earplugs of TWS can be maintained or disconnected.
  • the audio transmission process of audio data from the source to the sink can be seen in FIG. 5.
  • the source decodes the audio data in the application (application, APP) through the audio management module (such as the audio service AudioFlinger in the Android system) to obtain the configuration information of the hardware device, set the audio parameters, etc.; after decoding
  • the data enters buffer 1 for buffering; the audio encoder obtains audio data from buffer 1 and encodes it; the encoded audio data enters buffer 2 for buffering, which can be called Transmission data buffer; audio data in buffer 2 is sent to the destination through the channel with the destination.
  • the destination end buffers the audio data received from the source end in the buffer 3; the audio decoder (audio decoder) takes the audio data from the buffer 3 and decodes it; the decoded audio data is buffered in the buffer 4; The decoder codec sends the data in the buffer 4 to the speaker for playback.
  • the audio decoder audio decoder
  • the transmission channel between the source end and the destination end may include a low-power asynchronous connection link LEACL (also referred to as LE ACL connection, LE ACL connection, or LE ACL connection link in the following embodiments) ) And a connection-based isochronous audio stream (connected isochronous stream, CIS) connection link (also referred to as CIS link or CIS connection in the following embodiments).
  • LEACL also referred to as LE ACL connection, LE ACL connection, or LE ACL connection link in the following embodiments
  • CIS connection-based isochronous audio stream
  • the LEACL link can be used to transmit control data
  • the CIS link can be used to transmit audio data and response information.
  • CIS is a point-to-multipoint isochronous (ISO) synchronous transmission mechanism based on BLE.
  • the LEACL connection link and the CIS connection link exist independently and send data independently. Data can be sent simultaneously on the LEACL connection link and the CIS connection link. Sending data at the same time here does not limit the time synchronization of the LEACL connection link and the CIS connection link when sending data, but means that sending data on the LEACL connection link and sending data on the CIS connection link can be performed concurrently .
  • the channel quality of the transmission channel and the amount of data to be transmitted are different, and the encoding rate and transmission rate of the audio data are also different.
  • the technical solution provided by the embodiments of the present application can automatically and adaptively adjust the audio data encoding rate and the audio data according to factors such as the channel quality of the transmission channel and the amount of data to be transmitted without interrupting the data transmission and disconnecting the CIS link.
  • the transmission rate so that users can be unaware of the adjustment process of the encoding rate and the transmission rate; there is no need to disconnect the CIS link between the source end and the destination end when adjusting the encoding rate and the transmission rate, and reconfigure the relevant parameters , And then re-initiate the CIS link connection.
  • 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 amount of audio data sent from the source end to the destination end per unit time. Increasing the transmission rate refers to increasing the amount of audio data sent from the source to the destination in a unit time; decreasing the transmission rate refers to reducing the amount of audio data sent from the source to the destination in a unit time.
  • the coding rate and transmission rate can be reduced to ensure that there are enough retransmission time slots to improve transmission performance; when the channel quality is good, the coding rate and transmission rate can be increased to improve Audio quality; thus, the coding rate and transmission rate can be matched with the channel quality status, taking into account the transmission performance and audio quality, to achieve an adaptive balance between transmission performance and audio quality, and to ensure continuous transmission and playback of audio data.
  • the coding rate when the channel quality is poor, the coding rate can be reduced first, and then the transmission rate can be reduced; when the channel quality is good, the transmission rate can be increased first, and then the coding rate is reduced; this can make the coding rate and Before and after the transmission rate adjustment, there is sufficient transmission capacity to transmit the encoded audio data.
  • a dual connection is established between a mobile phone and a TWS headset
  • the mobile phone ie, the first BLE Bluetooth device
  • the first earbud of the TWS headset ie, the second BLE Bluetooth device may be TWS
  • Any earplug of the earphone is an example of the destination end of the audio data, and the rate control method provided in the embodiment of the present application will be described.
  • the mobile phone when the first earplug is used, the mobile phone may be configured with encoding parameters (ie, the first encoding parameter), and the audio encoder of the mobile phone encodes according to the configured encoding parameters to obtain encoded audio data.
  • the mobile phone sends the encoding parameter to the first earplug through an audio data packet, so that the first earplug can decode according to the encoding parameter.
  • the mobile phone and the first earplug can negotiate the transmission parameter of the CIS link (ie, the first transmission parameter) through the LEACL link, and establish the CIS link according to the transmission parameter.
  • the negotiation process of the transmission parameter can be referred to FIG. 6.
  • the mobile phone can set CIS group (CIS) parameters and enable CIS between the first earplug.
  • the process may include 601.
  • the Bluetooth host host in the mobile phone sends CIG parameter setting information (such as LE Set CIG parameters messages) to the link layer LL in the Bluetooth controller in the mobile phone, thereby transmitting the transmission parameters to the mobile phone LL (that is, the first A transmission parameter). 602.
  • the mobile phone LL replies to the mobile phone host with the first confirmation information (for example, the command complete message). 603.
  • the mobile phone host sends CIS creation information (such as LE Create CIS message) to the mobile phone LL. 604.
  • the mobile phone LL replies to the mobile phone host with the second confirmation information (for example, HCI Command status message). 605.
  • the mobile phone LL sends CIS connection request information (for example, LL_CIS_REQ message) carrying the transmission parameter to the link layer LL in the Bluetooth controller in the first earbud to request to establish a CIS connection according to the transmission parameter. 606.
  • the first earplug LL sends CIS connection request information (for example, LECIS request message) to the Bluetooth host host in the first earplug. 607.
  • the first earplug host replies to the first earplug LL to accept the CIS connection information (for example, LE Accept CIS message). 608.
  • the first earplug LL replies to the first earplug host with third confirmation information (for example, HCI Command status message). 609.
  • the first earplug host confirms, the first earplug LL sends CIS connection response information (for example, LL_CIS_RSP message) to the mobile phone LL. 610.
  • the mobile phone LL sends fourth confirmation information (eg, LL_CIS_IND message) to the first earplug LL. 611.
  • the mobile phone LL sends the CIS connection established information to the mobile phone host (for example, LE CIS Established message). So far, the CIS connection link has been established between the mobile phone and the first earbud.
  • the mobile phone can send the audio data encoded by the audio encoder to the first earbud through the CIS link according to the configured transmission parameters.
  • the first earplug can receive the audio data sent by the mobile phone through the CIS link according to the configured transmission parameters and reply to the response information (for example, a positive response ACK message, a negative response NACK message, a missing MISSING message, etc.).
  • the mobile phone can also determine a new encoding parameter (ie, the second encoding parameter) according to the reference parameter.
  • the new encoding parameter is different from the previous encoding parameter, and the audio data is encoded according to the new encoding parameter, thereby increasing or decreasing the encoding rate.
  • the mobile phone and the first earbud can also negotiate a new transmission parameter (ie, the second transmission parameter) according to the reference parameter through the LE ACL link, and the new transmission
  • the parameters are different from the previous transmission parameters in order to increase the transmission rate of audio data or reduce the transmission rate of audio data through the new transmission parameters.
  • the mobile phone and the first earplug can automatically start new transmission parameters after negotiating new transmission parameters; or, the mobile phone and the first earplug can also negotiate the update time, and the mobile phone and the first earplug enable the new CIS link at the update time Transmission parameters.
  • the mobile phone sends audio data to the first earplug through the CIS link according to the new transmission parameter, and the first earplug receives audio data sent from the mobile phone through the CIS link according to the new transmission parameter.
  • the mobile phone and the first earplug can update the CIS transmission parameters without disconnecting the CIS, so that the updated transmission parameters are used to transmit audio data.
  • the reference parameter may include a channel quality parameter, and the channel quality parameter is used to indicate whether the channel quality is good or bad.
  • the channel quality parameters may include: packet loss rate (PLR), packet error rate (PER), signal-to-noise ratio (SNR), signal-to-interference ratio (signal to interference), SIR), received signal strength indication (RSSI), channel quality indication (channel quality indicator (CQI), cyclic redundancy check (cyclic redundancy check, CRC), and service quality (quality of service, Qos) One or more of the parameters, etc.
  • the Qos parameters may include one or more of parameters such as retransmission rate, jitter, delay, throughput, and availability.
  • audio data encoders such as sub-band coding (SBC), advanced audio coding (AAC), aptX encoder, aptX LL (low latency aptX) encoder , AptX HD (high sound quality aptX) encoder, LDAC encoder, HWA encoder and HWA LL (low latency HWA) encoder, etc.
  • SBC sub-band coding
  • AAC advanced audio coding
  • aptX encoder aptX LL (low latency aptX) encoder
  • AptX HD high sound quality aptX
  • LDAC encoder LDAC encoder
  • HWA encoder high latency aptX HD encoder
  • HWA encoder low latency HWA
  • different encoders have different encoding parameters that affect the encoding rate.
  • the encoding parameters may include bitpool value, block length (length), subbands (subbands), number of channels, sampling rate, frame length (frame length) and allocation method (allocation method) One or more of them.
  • the encoding rate can also be related to the encoding bandwidth.
  • the encoding bandwidth is reduced (for example, the encoding bandwidth is reduced from 80 Hz to 20 kHz to 80 Hz to 10 kHz)
  • the encoding rate can also be increased.
  • the encoding bandwidth is increased (for example, the encoding bandwidth is extended from 80 Hz to 10 kHz to 80 Hz to 20 kHz)
  • the encoding rate can also be reduced.
  • the coding rate when the number of subbands is increased, the coding rate can be reduced.
  • bitpool value, block length, number of subbands, number of channels, sampling rate, and frame length can be adjusted to increase or decrease the encoding rate.
  • the mobile phone when the encoding rate needs to be increased, the mobile phone can increase one or more of the bitpool value, sampling rate, or channel number; when the encoding rate needs to be reduced, the mobile phone can reduce one of the bitpool value, sampling rate, or channel number or Multiple.
  • the channel mode for example, mono, two-channel or joint stereo
  • the calculation method of the frame length is different
  • the corresponding coding rate is also different.
  • the encoding parameters corresponding to different sound qualities for example, middle sound qualities or high sound qualities
  • a correspondence between different sound quality and encoding parameters can be referred to Table 1.
  • the transmission parameters may include burst number (BN), number of subevents (number of subevents, NSE), flush timeout (flush timeout, FT), subevent duration (subevent duration), PHY type, etc.
  • BN burst number
  • NSE number of subevents
  • flush timeout flush timeout
  • subevent duration subevent duration
  • PHY type etc.
  • audio data can be transmitted within the ISO interval (iso).
  • NSE represents the number of sub-events in an ISO interval
  • BN represents the maximum number of bursts carried in each ISO interval, the content of the burst is the payload
  • the duration of the sub-event represents the time of each sub-event (subevent)
  • the burst is transmitted within the duration of the sub-event, the duration of the sub-event depends on the size of the payload (payload);
  • FT takes the ISO interval as a unit, indicating that a burst can be transmitted within a few ISO intervals at most;
  • the PHY type can Including air interface parameters such as transmission bandwidth and modulation method.
  • the mobile phone can send a burst and receive response information from the first earplug, the burst is a payload, and the payload is audio data.
  • the transmission of the payload k is stopped and the transmission of the payload k+1 is started.
  • the refresh point of the payload is at the end of the ISO interval.
  • N FLOOR(NSE/ BN)+MOD(NSE, BN).
  • M FLOOR(NSE/BN)*(i-1).
  • FLOOR indicates rounding down
  • FLOOR(NSE/BN) indicates the value of the quotient of NSE divided by BN rounding down
  • MOD(NSE, BN) indicates that NSE takes the balance of BN.
  • the mobile phone can reduce the coding rate by adjusting the encoding parameter, and the mobile phone and the first earbud can reduce the transmission rate by adjusting the transmission parameter to improve the transmission performance; if according to the channel quality If the parameter determines that the channel quality is good, the mobile phone and the first earplug can adjust the transmission parameters to increase the transmission rate, and the mobile phone can adjust the coding parameters to increase the coding 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 earplug through the audio data packet, so that The first earplug can be decoded according to the new encoding parameter; the new transmission parameter can be negotiated between the mobile phone and the first earplug.
  • Scenario 1 When the channel quality is good, first increase the transmission rate and then increase the coding rate.
  • the mobile phone and the first earbud can first negotiate new transmission parameters to increase the transmission rate; then, the mobile phone determines new coding parameters to increase the coding rate.
  • the mobile phone can actively initiate the adjustment of the transmission rate.
  • the mobile phone performs channel quality monitoring and initiates adjustment of the transmission rate according to the channel quality parameters. If the mobile phone determines that the channel quality parameter satisfies the first preset condition through channel quality monitoring, it can indicate that the channel quality is good, so the mobile phone can initiate negotiation of new transmission parameters and update time to increase the transmission rate.
  • the mobile phone and the first earbud enable new transmission parameters at the moment of update, and then exchange data (such as audio data and response information, etc.) on the CIS link according to the new transmission parameters.
  • the first preset condition is that the channel quality parameter is better than a preset value.
  • 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 of 1.
  • the channel quality parameters include a packet loss rate and a packet error rate.
  • the first preset condition is that the packet loss rate is less than or equal to the preset value 1, and the packet error rate is less than or equal to the preset value 2.
  • 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 (that is, a first preset value).
  • the first preset condition is that the channel quality parameter is optimized.
  • the channel quality parameter includes CQI
  • the first preset condition is that CQI increases.
  • the channel quality parameter includes a signal-to-interference ratio
  • the first preset condition is that the amplitude of the increase in the signal-to-interference ratio is greater than or equal to the preset value 4.
  • the channel quality parameters include CQI and jitter. The first preset condition is that the magnitude of the increase in CQI is greater than or equal to the preset value 5, and the magnitude of the decrease in jitter is greater than or equal to the preset value 6.
  • the coding parameters and transmission parameters are adjusted to increase the transmission rate and the coding rate; if the current channel quality parameter is not more optimized than the previous channel quality parameter, the transmission rate and 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 optimized than the previous channel quality parameter (such as the difference between the two) exceeds the adjustment threshold, then adjust the coding parameters and transmission parameters to improve transmission Rate and encoding parameters.
  • the channel quality parameters include multiple, each channel quality parameter corresponds to its own weight, and the first preset condition is that the total score of the channel quality parameter is greater than or equal to the preset value 0 .
  • the scores of the channel quality parameters can be seen in Table 2 below. If the preset value 0 is 0.6 and the current total score is 0.8, the first preset condition is satisfied.
  • the mobile phone can separately initiate negotiation on the new transmission parameters and update time in different messages; or, the mobile phone can also initiate a new transmission parameter and update time in the same message.
  • the negotiation of the transmission parameters and the update time is not limited in the embodiments of the present application.
  • the mobile phone may determine new transmission parameters and update time and send to the first earplug; the first earplug sends confirmation information to the mobile phone; the mobile phone receives the confirmation of the first earplug After the information, the new transmission parameters and the update time are negotiated.
  • the update time may be a time after the preset current time, or may be a time after the current time determined by the mobile phone according to the feedback capability of the underlying chip.
  • the update time may be the start time of the next ISO interval after the current ISO interval.
  • the new transmission parameters are negotiated between the mobile phone and the first earbud via the LEACL link.
  • the mobile phone and the first earplug may respectively include a host host and a link layer LL, and the mobile phone further includes an audio encoder.
  • the mobile phone monitoring channel quality may be that the mobile phone host instructs the mobile phone LL to monitor the channel quality, and the mobile phone LL reports to the mobile phone host after determining that the first preset condition is met; or the mobile phone LL periodically detects the channel quality parameter and the channel quality The parameters are reported to the mobile phone host; the mobile phone host determines to increase the transmission rate and initiates negotiations on the transmission rate and the update time.
  • the mobile phone LL and the first earplug LL exchange the negotiation information through the LL command; inside the mobile phone, the mobile phone host and the mobile phone LL exchange the negotiation information through the HCI command; Inside an earplug, the first earplug host and the first earplug LL exchange information through HCI commands.
  • the audio encoder of the mobile phone encodes the audio data output from the audio source such as pulse code modulation (pulse code modulation (PCM) code stream), and the mobile phone host transmits the encoded data packet according to the negotiated transmission parameters.
  • PCM pulse code modulation
  • the process of negotiating the new transmission parameter and the update time between the mobile phone and the first earbud can be seen in FIG. 6.
  • the process may include: 612, the mobile phone host may determine new transmission parameters and update time, and send CIG parameter update information (such as LEUpdateCIGparameters message) to the mobile phone link layer LL, to the mobile phone LL transfers new transmission parameters. 613.
  • the mobile phone LL replies to the mobile phone host with the fifth confirmation information (for example, the command complete message). 614.
  • the mobile phone LL sends the first earplug LL CIS update request information (for example, LL_CIS_update_REQ message) carrying the new transmission parameters and the update time to request to update the established CIS connection according to the new transmission parameters. 615.
  • the first earplug LL sends CIS update response information (for example, LL_CIS_update_RSP message) to the mobile phone LL. 616.
  • CIS update response information for example, LL_CIS_update_RSP message
  • the first earplug LL sends update completion information (such as a CIS_update_complete message) to the first earplug host to notify the first earplug host that the first earplug LL has received the new transmission parameter and the update time. 618.
  • the first earbud LL sends update confirmation information (such as CIS_update_complete or HCI Command status message) to the mobile phone LL. So far, the mobile phone and the first earplug have completed the negotiation of the new transmission parameters and update time of the CIS link and the update of the new transmission parameters, and the subsequent mobile phone and the first earplug exchange audio data and audio data according to the new transmission parameters Response data.
  • the update time may not be negotiated between the mobile phone and the first earbud.
  • the new transmission parameter can be automatically enabled immediately and sent to the mobile phone host Update confirmation information; after receiving the CIS update request information sent by the mobile phone LL, the first earplug LL can automatically enable new transmission parameters and send the update completion information to the first earplug host.
  • the update time may not be negotiated between the mobile phone and the first earbud.
  • the mobile phone LL sends the CIS update request message to the first earbud LL, if it receives the confirmation from the first earbud that the CIS update request is received In response to the message, the new transmission parameter is immediately enabled; after receiving the CIS update request message sent by the mobile phone LL, the first earplug LL can automatically enable the new transmission parameter and send the update completion information to the first earplug host.
  • the mobile phone and the first earbud may pre-arrange the update time.
  • the mobile phone enables the new transmission parameter at the Mth time after sending the CIS update request message.
  • the first earbud receives the CIS update request message K times to enable new transmission parameters.
  • M and K are natural numbers.
  • the mobile phone and the first earplug may use the new transmission parameter to transmit the audio data.
  • the moment when the mobile phone uses the new transmission parameter to send audio data and the moment when the mobile phone enables the new transmission parameter may be the same or different.
  • the mobile phone may enable new transmission parameters after sending the CIS update request information, and use the new transmission parameters to send audio data after receiving the update confirmation information sent by the first earplug.
  • the moment when the first earplug adopts the new transmission parameter to receive the audio data may be the same as or different from the moment when the first earplug enables the new transmission parameter.
  • the first earplug may enable new transmission parameters after receiving the CIS update request information, and adopt the new transmission parameters to receive audio data after receiving the update completion information.
  • the method for increasing the transmission rate by adjusting the transmission parameters may include adjusting the transmission parameters to increase the duty cycle of the payload or reduce the retransmission, thereby increasing the transmission rate.
  • the NSE after negotiation will increase to 6 and the BN after negotiation will increase to 3, which means that the transmission interval within the ISO interval The number of hair increases to 3.
  • FIG. 9 is a transmission schematic diagram based on the adjusted new transmission parameters.
  • the mobile phone can transmit 3 payloads (that is, payloads 2, 3, and 4) within the ISO interval 2. Furthermore, referring to FIG. 9, the mobile phone and the first earplug can simultaneously enable new transmission parameters at the negotiated update time (that is, time 1), and transmit audio data and response information according to the new transmission parameters.
  • the transmission schematic diagram based on the new transmission parameter may refer to FIG. 10.
  • the mobile phone can transmit 3 payloads (ie, payloads 2, 3, and 4) within the ISO interval 2.
  • the ratio of BN to NSE is increased to transmit a larger number of bursts within the ISO interval and increase the transmission rate.
  • FT is reduced (where FT is greater than or equal to 1) to reduce the time taken for retransmission, so that more audio data can be transmitted.
  • multiple payloads can be aggregated and transmitted within a sub-event duration, or the size of the payload can be increased to increase the transmittable within the sub-event duration
  • the length of the payload thereby increasing the number of payloads that can be transmitted within the duration of the sub-event and increasing the transmission rate.
  • the duration of a sub-event increases to twice, then two payloads can be aggregated within a sub-event duration.
  • two payloads for example, payload 2 and payload 3 can be sent within one sub-event duration within the ISO interval 2.
  • increase BN increase BN and NSE, increase the ratio of BN to NSE, increase the duration of sub-events, reduce FT, and increase any combination of transmission bandwidth.
  • the request for updating the transmission parameter of the mobile phone can be rejected; or, the first earplug can notify the mobile phone that it cannot accept it, and the mobile phone can re-determine the new transmission parameter and send Confirm the first earbud.
  • the mobile phone may determine the candidate value and update time of the new transmission parameter and send it to the first earplug.
  • the first earplug determines the target value of the new transmission parameter from the values to be selected and sends it to the mobile phone.
  • the mobile phone After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug to realize the new transmission parameter and update time Negotiate.
  • the transmission parameters not involved in the value to be selected such as PHY type, sub-event duration, etc., do not change by default.
  • the mobile phone may determine the maximum and minimum values of the new transmission parameter and the update time, and send it to the first earplug.
  • the first earplug determines the target value according to the maximum and minimum value range of the new transmission parameter and sends it to the mobile phone.
  • the mobile phone After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug, so as to implement negotiation of new transmission parameters and update time.
  • the mobile phone may determine the reference value of the new transmission parameter and the update time, and send it to the first earplug.
  • the first earplug determines a target value according to the reference value of the new transmission parameter (the target value may be the same as or different from the reference value) and sends it to the mobile phone.
  • the mobile phone After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug, so as to implement negotiation of new transmission parameters and update time.
  • the mobile phone notifies the first earplug to start negotiating transmission parameters; the first earplug sends the new transmission parameter and update time to the mobile phone.
  • the mobile phone replies with a confirmation message to the first earbud to implement negotiation of new transmission parameters and update time.
  • the mobile phone notifies the first earplug to start negotiating new transmission parameters; the first earplug sends a determination message to the mobile phone.
  • the mobile phone determines the new transmission parameter and update time and sends it to the first earplug.
  • the mobile phone implements negotiation of new transmission parameters and update time.
  • the mobile phone can determine the new transmission parameter and send it to the first earplug; after receiving the confirmation message of the first earplug, implement the negotiation of the new transmission parameter. Then, the mobile phone can also determine the update time and send it to the first earplug; after receiving the confirmation message of the first earplug, the negotiation of the update time is realized.
  • the first earplug monitors the channel quality and sends the channel quality parameter to the mobile phone, and then the mobile phone initiates the adjustment of the transmission rate, that is, initiates a negotiation with the first earplug on the new transmission parameters and update time to Increase the transmission rate.
  • the specific negotiation process of the new transmission parameter and the update time can be referred to the description of the above embodiment, for example, it can be the CIS transmission parameter update process in FIG. 6, which will not be repeated in subsequent embodiments.
  • the mobile phone instructs the first earbud to monitor the channel quality.
  • the first earbud monitors the channel quality according to the instructions of the mobile phone and sends the channel quality parameter to the mobile phone.
  • the mobile phone initiates the adjustment of the transmission rate according to the channel quality parameter. To increase the transmission rate.
  • the mobile phone instructs the first earplug to monitor the channel quality
  • the first earplug monitors the channel quality according to the instruction of the mobile phone.
  • the first earplug may send the mobile phone to the mobile phone when it is determined that the channel quality parameter meets the first preset condition
  • the first information the mobile phone initiates the adjustment of the transmission rate according to the first information, that is, initiates a negotiation with the first earplug for new transmission parameters and update time to increase the transmission rate.
  • the first earplug may actively initiate adjustment of the transmission rate.
  • the first earbud performs channel quality monitoring, or the first earbud performs channel quality monitoring after receiving the indication from the mobile phone, and initiates transmission rate adjustment according to the channel quality parameter. If the first earplug determines that the channel quality parameter meets the first preset condition, it initiates negotiation of a new transmission parameter and update time to increase the transmission rate.
  • the mobile phone performs channel quality monitoring and sends the channel quality parameter to the first earplug, and then the first earplug initiates adjustment of the transmission rate according to the channel quality parameter.
  • the first earplug instructs the mobile phone to monitor the channel quality
  • the mobile phone performs channel quality monitoring according to the instruction of the first earplug, and sends the channel quality parameter to the first earplug, and then the first earplug initiates according to the channel quality parameter Transmission rate adjustment.
  • the first earplug instructs the mobile phone to monitor channel quality, and the mobile phone performs channel quality monitoring according to the indication of the first earplug.
  • the mobile phone may send the first earplug to the first earplug when it is determined that the channel quality parameter meets the first preset condition.
  • the first information; the first earplug initiates negotiation of new transmission parameters and update moments based on the first information to increase the transmission rate.
  • the mobile phone and the first earbud can still negotiate new transmission parameters and update times through the host, LL, HCI commands, and LL commands.
  • the application examples will not repeat them here.
  • the transmission parameters interacted by the mobile phone and the first earbud may include only the transmission parameters that have changed, or may include the transmission parameters that have not changed.
  • the changed transmission parameters are BN, and the transmission parameters such as NSE and FT have not changed; then in one way, the LE Update Update CIG parameters and LL_CIS_update_REQ messages in Figure 6 include the changed BN, excluding NSE and FT, etc. Other transmission parameters that have not changed; in another way, the LE Update CIG parameters message and the LL_CIS_update_REQ message in FIG. 6 include the changed BN, and other transmission parameters such as NSE and FT that have not changed.
  • the mobile phone may also determine new coding parameters to increase the coding rate. That is to say, if the channel quality parameter meets the first preset condition, it can indicate that the channel quality is good, so the mobile phone can determine the new encoding parameter to increase the encoding rate; and initiate the negotiation of the new transmission parameter and update time to improve Transmission rate.
  • the mobile phone can also carry the new encoding parameter in the audio data packet and send it to the first earplug. After receiving the audio data packet, the first earplug decodes according to the encoding parameter. Exemplarily, referring to FIG.
  • the mobile phone may determine new encoding parameters to increase the encoding rate.
  • the bitpool value can be increased from 18 to 29 when the sampling rate, number of subbands, number of channels, block length, allocation method and other parameters remain unchanged, thereby encoding
  • the rate is increased from 132kb/s to 198kb/s.
  • the sampling rate can be increased from 44.1kHz to 48kHz, and the bitpool value can be increased from 35. It is 51, which increases the encoding rate from 229kb/s to 345kb/s.
  • the mobile phone can determine the target coding rate to be adopted according to the packet loss rate, so as to adjust the bitpool corresponding to the target coding rate to achieve the mobile phone's coding rate as the target coding rate. For example, referring to Table 3, the correspondence between the packet loss rate 1, the preset value 1, the target encoding rate, and the target bitpool value is set on the mobile phone.
  • the mobile phone can adjust the bitpool value to the corresponding target bipool value of 53, thereby encoding the audio data with a higher target coding rate of 328kb/s;
  • the packet loss rate is greater than the preset value 1, the channel quality is poor, and the mobile phone can adjust the Bitpool value to the corresponding target bitpool value of 35, thereby encoding the audio data with a lower target encoding rate of 229 kb/s.
  • the audio encoder of the mobile phone encodes the audio data according to the new encoding parameters.
  • the mobile phone After determining the new encoding parameter, the mobile phone can send the new encoding parameter to the first earplug through the audio data packet, so that the first earplug can decode according to the new encoding parameter.
  • the conditions that the channel quality parameters need to meet when increasing the coding rate and increasing the transmission rate may also be different.
  • the mobile phone may monitor channel quality, or the mobile phone may instruct the first earbud to perform channel quality monitoring.
  • the transmission rate may be increased.
  • the mobile phone itself determines or determines that the channel quality parameter satisfies the third preset condition according to the information reported by the first earbud, it may indicate that the channel quality is good, so that a new coding parameter may be determined to increase the coding rate.
  • the third preset condition is different from the first preset condition.
  • the first preset condition may be that the packet loss rate is less than or equal to the preset value 1
  • the third preset condition may be that the packet loss rate is less than or equal to the preset value 9, and the preset value 9 is not equal to the preset value 1.
  • Scenario 2 When the channel quality is poor, first reduce the coding rate, and then reduce the transmission rate.
  • the mobile phone can first determine new encoding parameters to reduce the encoding rate; then, the mobile phone and the first earbud can negotiate new transmission parameters to reduce the transmission rate.
  • the mobile phone can monitor the channel quality, or the mobile phone can instruct the first earbud to perform channel quality monitoring.
  • the mobile phone itself determines or determines that the channel quality parameter satisfies the second preset condition according to the information reported by the first earplug, it may indicate that the channel quality is poor, and thus a new coding parameter may be determined to reduce the coding rate.
  • the second preset condition is that the channel quality parameter is worse than the preset value.
  • 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 the preset value 11, and the preset value 11 is greater than or equal to the preset value 1.
  • the channel quality parameters include 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 the preset value 11, and the packet error rate is greater than or equal to the preset value 12, and the preset value 12 is greater than or Equal to the preset value 2.
  • 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 (that is, a second preset value), and the preset value 13 is less than or equal to the preset value 3.
  • the second preset condition is that the channel quality parameter becomes worse.
  • the channel quality parameter includes COI
  • the first preset condition is that the CQI decreases.
  • the channel quality parameter includes a signal-to-interference ratio
  • the first preset condition is that the decrease of the signal-to-interference ratio is greater than or equal to the preset value 14.
  • the channel quality parameters include CQI and jitter. The first preset condition is that the magnitude of the decrease in CQI is greater than or equal to the preset value 15, and the magnitude of the increase in jitter is greater than or equal to the preset value 16.
  • each channel quality parameter corresponds to its own weight
  • the second preset condition is that the total score of the channel quality parameter is less than the preset value of 10.
  • the score of the channel quality parameter may refer to Table 1, and the preset value 10 may be 0.5.
  • the mobile phone host instructs the mobile phone LL to monitor the channel quality. After determining that the second preset condition is met, the mobile phone LL reports to the mobile phone host, and the mobile phone host determines new encoding parameters to reduce the encoding rate.
  • the mobile phone host determines new encoding parameters to reduce the encoding rate.
  • the mobile phone may initiate negotiation of new transmission parameters and update time to reduce the transmission rate.
  • the mobile phone initiates negotiation of new transmission parameters and update time to reduce the transmission rate.
  • the mobile phone and the first earbud enable new transmission parameters at the moment of update, and then exchange data (such as audio data and response information, etc.) on the CIS link according to the new transmission parameters.
  • the method of reducing the transmission rate by adjusting the transmission parameters may include adjusting the transmission parameters to reduce the duty cycle of the payload or increase the retransmission, thereby reducing the transmission rate.
  • the ratio of BN to NSE is reduced to transmit a smaller number of bursts within the ISO interval, reducing the transmission rate.
  • FT where FT is greater than or equal to 1
  • FIG. 14 the transmission schematic diagram based on the new transmission parameter can be seen in FIG. 14.
  • the refresh point of the payload 2 started to be transmitted in the ISO interval 2 is within the ISO interval 3, so if the payload 2 is not successfully received within the ISO interval 2, the retransmission can continue until the ISO interval 3 Within the refresh point, thereby reducing the time to transmit other payloads.
  • the duration of the sub-event is reduced to reduce the length of time that the payload can be transmitted and the transmission rate.
  • the mobile phone side (that is, the source end) includes an audio application, an encoder, a rate adjustment module, a channel quality monitoring module, a protocol stack, and a controller.
  • the first earbud side (that is, the destination end) includes a controller, a protocol stack, a decoder, and an analog output module.
  • the channel quality monitoring module can be implemented through the retransmission rate or other Qos indicators reported by the controller. When the channel quality is lower than the threshold, the channel quality is poor.
  • the rate adjustment module can first adjust the Bluetooth encoder to reduce its encoding rate.
  • the SBC's bitpool value is changed from 53 to 35, and the encoding rate is reduced from 328kbps to 229kbps.
  • the rate adjustment module controls the protocol stack to update the transmission parameters of the CIS to adapt to the change in the encoding rate.
  • the protocol stack sends the above HCI command (such as LE Update CIG parameters message) to the controller, and then the controller sends the command (such as The above LL_CIS_update_REQ message) adjusts the transmission parameters of the CIS to the opposite end.
  • the purpose of updating the CIS transmission parameters is to reduce the throughput of the actual air interface download technology (OTA) and reduce the transmission rate when the channel quality deteriorates, so that each packet of data has more opportunities for retransmission, making The destination can correctly receive the data packet, thereby improving the audio quality.
  • OTA air interface download technology
  • the above is mainly explained by taking the same condition that the channel quality parameter needs to be met when reducing the coding rate and the transmission rate as examples.
  • the conditions that the channel quality parameters need to meet when reducing the coding rate and the transmission rate may also be different. For example, when the channel quality parameter satisfies the second preset condition, the coding rate is reduced; when the fourth preset condition is met, the transmission rate is reduced.
  • the mobile phone may adjust the encoding parameters and the transmission parameters separately according to different scenarios and adjustment orders.
  • the mobile phone may monitor the channel quality, or the mobile phone may instruct the first earbud to perform channel quality monitoring.
  • the encoding parameter is adjusted to increase or decrease the encoding rate.
  • the mobile phone and the first earplug can adjust the transmission parameters in the manner described in scenario 1, so as to increase the transmission rate; correspondingly, the mobile phone and the first earplug can also adjust the transmission parameters in a similar manner, thereby Reduce the transmission rate.
  • the mobile phone monitors the channel quality and initiates the adjustment of the transmission rate according to the channel quality parameters. If the mobile phone determines that the channel quality parameters meet the first preset condition through channel quality monitoring, it can indicate that the channel quality is good, so the mobile phone can determine the new transmission parameters and update time, and send it to the first earbud; Send confirmation information; after receiving the confirmation information of the first earplug, the mobile phone implements negotiation of new transmission parameters and update time to improve the transmission rate.
  • the mobile phone determines that the channel quality parameter meets the second preset condition through channel quality monitoring, it can indicate that the channel quality is poor, so the mobile phone can determine the new transmission parameters and update time, and send it to the first earbud; Send confirmation information; after receiving the confirmation information of the first earplug, the mobile phone implements the negotiation of new transmission parameters and update time to reduce the transmission rate.
  • the mobile phone instructs the first earplug to monitor channel quality.
  • the first earplug monitors the channel quality according to the instructions of the mobile phone.
  • the first earplug may send the first information to the mobile phone when it is determined that the channel quality parameter meets the first preset condition; the mobile phone initiates negotiation of new transmission parameters and update time according to the first information to increase the transmission rate.
  • the first earplug may send second information to the mobile phone when it is determined that the channel quality parameter meets the second preset condition; the mobile phone initiates negotiation of new transmission parameters and update time according to the second information to reduce the transmission rate.
  • different transmission parameters and coding parameters can be negotiated between the mobile phone and the first earbud according to the quality of the channel quality. For example, the better the channel quality, the higher the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earbud, and the higher the encoding rate corresponding to the encoding parameter determined by the mobile phone; the worse the channel quality, the mobile phone and the first earbud The lower the transmission rate corresponding to the new transmission parameter negotiated between, the lower the coding rate corresponding to the new coding parameter determined by the mobile phone.
  • the channel quality parameter includes the packet loss rate.
  • the new transmission parameter negotiated between the mobile phone and the first earbud is transmission parameter 1, and the new encoding parameter determined by the mobile phone Is encoding parameter 1.
  • the packet loss rate is less than or equal to the preset value of 17
  • the new transmission parameter negotiated between the mobile phone and the first earbud is transmission parameter 2
  • the new encoding parameter determined by the mobile phone is encoding parameter 2.
  • the preset value 17 is smaller than the preset value 1. The smaller the packet loss rate, the better the channel quality.
  • the transmission rate corresponding to transmission parameter 2 is higher than the transmission rate corresponding to transmission parameter 1; the coding rate corresponding to coding parameter 2 is higher than the coding rate corresponding to coding parameter 1.
  • the channel quality may include multiple gears, the higher the gear, the better the channel quality; and the higher the gear, the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earbud The higher the transmission rate corresponding to the new encoding parameter determined by the mobile phone.
  • different transmission parameters and coding parameters can be negotiated between the mobile phone and the first earbud according to the amplitude of channel quality increase or decrease.
  • the greater the improvement in channel quality the higher the transmission rate corresponding to the transmission parameter negotiated between the mobile phone and the first earbud, and the higher the encoding rate corresponding to the encoding parameter determined by the mobile phone; the greater the reduction in channel quality, the mobile phone
  • the channel quality parameter includes the packet loss rate.
  • the new transmission parameter negotiated between the mobile phone and the first earbud is transmission parameter 3, which is determined by the mobile phone
  • the new encoding parameter is encoding parameter 3; if the smaller 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 earbud is transmission parameter 4, the new encoding determined by the mobile phone
  • the parameter is encoding parameter 4.
  • the preset value 19 is less than the preset value 18, the smaller the reduction of the packet loss rate indicates the greater the improvement of the channel quality, the transmission rate corresponding to the transmission parameter 4 is higher than the transmission rate corresponding to the transmission parameter 3, and the encoding parameter 4
  • the corresponding encoding rate is higher than the encoding rate corresponding to encoding parameter 3.
  • the amplitude of channel quality improvement may include multiple gears, the higher the gear, the greater the amplitude of channel quality improvement; and the higher the gear, the new negotiated between the mobile phone and the first earbud The higher the transmission rate corresponding to the transmission parameter, the higher the coding rate corresponding to the new coding parameter determined by the mobile phone.
  • the channel quality reduction can also include multiple gears.
  • the transmission parameters may also include multiple gears.
  • the transmission parameters of different gears respectively correspond to different transmission rates; and the higher the gear of the transmission parameter, the higher the corresponding transmission rate.
  • the transmission parameter corresponding to the current CIS link is the 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 gear on the gear i to the first earbud; when the transmission rate needs to be reduced , The mobile phone can send the transmission parameter of the next gear of gear i to the first earplug.
  • the correspondence between the gear, the transmission parameter, the coding parameter and the transmission rate can be referred to in Table 4 below.
  • the encoding parameter may also be determined through negotiation between the mobile phone and the first earplug.
  • the mobile phone notifies the first earplug, the first earplug sends the range of coding parameters 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.
  • the negotiation of encoding parameters is realized.
  • the negotiation process of the encoding parameter between the mobile phone and the first earplug can be analogized to the negotiation process of the transmission parameter, which will not be repeated here.
  • the above reference parameter may include the amount of data to be transmitted.
  • the amount of data to be transmitted may be the amount of audio data that has been encoded in the buffer 2 in FIG. 5 and has not been transmitted.
  • the amount of data to be transmitted 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 has accumulated, so the transmission rate may be increased and/or the coding may be reduced Rate to prevent buffer 2 from overflowing.
  • the channel quality when the amount of data to be transmitted is greater than or equal to the first preset threshold, the channel quality may be poor, so that the data to be transmitted has accumulated, so the coding rate and transmission rate may be reduced, so that the data packet has More retransmission opportunities enable the destination to receive data packets correctly, thereby improving audio quality.
  • the amount of data to be transmitted 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 high or the coding rate is low, and the amount of data to be transmitted is small, so the transmission rate may be reduced and/or increased Encoding rate.
  • the amount of data to be transmitted when the amount of data to be transmitted is less than or equal to the second preset threshold, there is less data to be transmitted, and the channel quality may be better.
  • the second preset threshold is less 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 the waterline 1 in the buffer 2 and the second preset threshold may be the waterline 2 in the buffer 2; the second preset threshold may be less than or equal to the first preset threshold.
  • the transmission rate when the amount of data to be transmitted is greater than or equal to the first preset threshold, the transmission rate can be reduced or the transmission rate can be increased, but subject to the existing technology, it is more feasible to reduce the transmission rate.
  • the encoding rate of multiple gears (such as the gears shown in Table 4) is set on the mobile phone. If the amount of data to be transmitted is greater than or equal to the first preset threshold, and the encoding rate needs to be reduced, the mobile phone can reduce the encoding rate to the lowest gear (eg, gear 1); then, the mobile phone can periodically detect the size of the quantity to be transmitted If the amount of data to be transmitted is still greater than or equal to the first preset threshold, the mobile phone can continue to use the encoding rate of the lowest gear; if the amount of data to be transmitted is less than the first preset threshold, the mobile phone can increase the encoding rate by one file Bit.
  • the first preset threshold e.g, gear 1
  • the mobile phone can reduce the encoding rate to the lowest gear (eg, gear 1); then, the mobile phone can periodically detect the size of the quantity to be transmitted. If the amount of data to be transmitted is still greater than or equal to the first preset threshold, the mobile phone can continue to use the encoding rate of
  • the mobile phone can increase the encoding rate to the highest gear; then, the mobile phone can periodically detect the size of the amount to be transmitted, if the amount of data to be transmitted If it is still less than or equal to the second preset threshold, the mobile phone can continue to use the highest encoding rate; if the amount of data to be transmitted is greater than the second preset threshold, the mobile phone can reduce the encoding rate by one gear.
  • the mobile phone side includes an audio application, an encoder, a rate adjustment module, a sending queue, a queue monitoring module, a protocol stack, and a controller.
  • the first earbud side includes a controller, a protocol stack, a decoder and an analog output module.
  • the rate adjustment module may first adjust the Bluetooth encoder to reduce its encoding rate, for example, modify The bitpool value of SBC is changed from 53 to 35, and the encoding rate is reduced from 328kbps to 229kbps.
  • the rate adjustment module controls the protocol stack to update the transmission parameters of the CIS to adapt to the change in the encoding rate.
  • the protocol stack sends the above HCI command (such as LE Update CIG parameters message) to the controller, and then the controller sends the command (such as The above LL_CIS_update_REQ message) adjusts the transmission parameters of the CIS to the peer.
  • the purpose of updating the CIS transmission parameters is to reduce the throughput of the actual air interface download technology (OTA) and reduce the transmission rate when the channel quality deteriorates, so that each packet of data has more opportunities for retransmission, making The destination can correctly receive the data packet, thereby improving the audio quality.
  • OTA air interface download technology
  • the rate adjustment module may first adjust the transmission parameters to increase the transmission rate. Then adjust the encoding parameters to increase the encoding rate, so that the transmission rate and the encoding rate are adapted, which will not be repeated here.
  • a preset mapping relationship between the amount of data to be transmitted and encoding parameters and transmission parameters is stored on the mobile phone. If the data volume of the encoded audio data to be transmitted is greater than or equal to the preset threshold value 1, the mobile phone determines the 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, Therefore, the rate of audio data encoding using the new encoding parameters is lower than the rate of audio data encoding using the original encoding parameters, and the transmission rate of audio data transmitted using the new transmission parameters is lower than the transmission rate using the original transmission parameters.
  • the mobile phone determines new transmission parameters 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,
  • the rate of audio data encoding using the new encoding parameters is greater than the rate of audio data encoding using the original encoding parameters
  • the transmission rate of audio data transmitted using the new transmission parameters is greater than the transmission rate using the original transmission parameters.
  • the above reference parameters may include channel quality parameters and the amount of data to be transmitted.
  • the method described in the foregoing embodiment may be used Adjust the transmission parameters and encoding parameters to increase the transmission rate and encoding rate.
  • the method described in the above embodiment may be used to adjust Coding parameters and transmission parameters, thereby reducing the coding rate and transmission rate.
  • the transmission parameter and coding parameter may not be adjusted, Never increase the transmission rate and coding rate.
  • the transmission parameter may not be adjusted, thereby Does not reduce the coding rate and transmission rate.
  • the mobile phone adjusts the encoding rate by adjusting the encoding parameters of the encoder used.
  • the encoder used by the mobile phone may also include different encoding modes, and different encoding modes may correspond to different encoding rates.
  • the mobile phone may also adjust the encoding rate by switching between different encoding modes.
  • the HWA encoder may include a high-speed encoding mode, a medium-speed encoding mode, and a low-speed encoding mode.
  • the mobile phone can also notify the first earplug of the current encoding mode in the audio data packet, so that the first earplug uses the corresponding decoding method to decode.
  • the mobile phone may further include a plurality of different encoders. Different encoders may correspond to different encoding rates, and the mobile phone may also adjust the encoding rate by switching different encoders.
  • the encoders in the mobile phone may include three types of encoders with high sound quality, medium sound quality, and low delay.
  • High-quality encoders can include LDAC encoders, aptX HD encoders, HWA encoders, etc.
  • mid-quality encoders can include SBC encoders, AAC encoders, aptX encoders, etc.
  • low-latency encoders can include aptX LL encoding Encoder, HWA LL encoder, etc.
  • the current encoder is a mid-sound quality encoder, such as an SBC encoder
  • a high-sound quality encoder such as aptX HD encoder
  • you can switch to a low-latency encoder such as the aptX LL encoder.
  • the mobile phone can also notify the first earplug of the new encoder after the switch via the control signaling on the LEACL link, so that the first earplug uses the corresponding decoding method to decode.
  • the mobile phone can adjust the encoding rate and transmission rate using a preset rate adjustment method.
  • there are multiple rate adjustment methods preset on the mobile phone and the mobile phone can randomly select one of them to adjust the encoding rate and the transmission rate.
  • the correspondence between the preset conditions and the rate adjustment mode can be stored on the mobile phone, and the mobile phone can adjust the encoding rate and the transmission rate by using the corresponding rate adjustment mode when a certain preset condition is met.
  • the mobile phone when adjusting the encoding rate, can adjust a different encoding parameter to increase or decrease the encoding rate each time; when adjusting the transmission rate, the mobile phone can adjust a different transmission rate to increase or decrease the transmission rate each time .
  • the mobile phone when the channel quality is good, can adjust fewer coding parameters and transmission parameters to improve the coding rate and transmission rate; when the channel quality is very good, the mobile phone can adjust more coding parameters and transmission parameters to Increase the coding rate and transmission rate; correspondingly, when the channel quality is poor, the mobile phone can adjust fewer types of coding parameters and transmission parameters to reduce the coding rate and transmission rate; when the channel quality is very poor, the mobile phone can adjust more types Encoding parameters and transmission parameters to reduce the encoding rate and transmission rate.
  • the mobile phone can adjust one or more encoding parameters and transmission parameters in a preset order or randomly at a time; the adjustment process can be dynamic adjustment, each time the parameters are adjusted according to a preset step size, and the test is continued after the adjustment Parameters, and decide whether to continue to adjust and how to adjust according to the test results.
  • the mobile phone may refer to the existing rate adjustment strategy in the prior art to adjust the transmission rate, which is not limited in the embodiments of the present application.
  • the mobile phone may refer to the existing rate adjustment strategy in the prior art to adjust the coding rate and the transmission rate, which is not limited in the embodiments of the present application.
  • the above embodiment is described by taking the example of adaptively adjusting the encoding rate and transmission rate of audio data between the mobile phone and the first earplug of the TWS headset in the dual-shot scheme.
  • the encoding rate and transmission rate of audio data can also be adaptively adjusted between the mobile phone and the main earplug of the TWS.
  • the secondary earplug can also obtain the adjusted new coding parameter and transmission parameter from the main earplug, so as to receive audio data sent by the mobile phone according to the new coding parameter and transmission parameter.
  • the mobile phone is the source of audio data
  • the first earplug of the TWS earphone is the destination of audio data.
  • the adaptive adjustment process of the coding rate and the transmission rate is the same as the above process and will not be repeated here.
  • the coding rate and transmission rate of the audio data sent by the mobile phone to the two earplugs can be the same, or It may be different, and the embodiments of the present application are not limited.
  • the two earplugs of the TWS headset can be synchronized to play.
  • the above embodiment takes the mobile phone as the source end of audio data and the TWS earplug as the destination end of audio data for example.
  • the TWS earplug when the TWS earplug is the source end of the audio data (for example, the MIC of the TWS earplug has collected voice data), and the mobile phone is the destination end of the audio data, the TWS earplug can still adopt the method in the above embodiment to adapt Adjust the coding rate and transmission rate, which will not be repeated here.
  • the first BLE device and the second BLE device include hardware and/or software modules corresponding to performing each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driven hardware depends on the specific application of the technical solution and design constraints. A person skilled in the art may use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered beyond the scope of the present application.
  • the first BLE device may be divided into function modules according to the above method examples.
  • each function module may be divided corresponding to each function, or the Two or more functions are integrated in one processing module.
  • the above integrated module can be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a division of logical functions. In actual implementation, there may be another division manner.
  • FIG. 17 shows a schematic diagram of a possible composition of the first BLE device 1700 involved in the above embodiment.
  • the first BLE device 1700 may Including: connection unit 1701, encoding unit 1702, transmission unit 1703, acquisition unit 1704, determination unit 1705, etc.
  • the connection unit 1701 may be used to support the first BLE device 1700 to perform the foregoing steps of establishing a low-power asynchronous connection link LEACL connection with the second BLE device; establishing a CIS connection with the second BLE device according to the first transmission parameters of the CIS, etc. , And/or other processes used in the techniques described herein.
  • the encoding unit 1702 may be used to support the first BLE device 1700 to perform the steps of encoding audio data based on the first encoding parameter described above; encoding audio data based on the second encoding parameter, and/or other techniques used in the technology described herein process.
  • the transmission unit 1703 may be used to support the first BLE device 1700 to perform the above-described transmission based on the first transmission parameters, and send the encoded audio data to the second BLE device through the CIS connection; while sending the audio data to the second BLE device through the CIS connection, The steps of sending the second transmission parameter to the second BLE device through the LEACL connection, and/or other processes used in the technology described herein.
  • the obtaining unit 1704 may be used to support the first BLE device 1700 to perform the above steps of obtaining reference parameters and/or other processes used in the technology described herein.
  • the determining unit 1705 may be used to support the first BLE device 1700 to perform the above steps of determining the second encoding parameter and the second transmission parameter according to the reference parameter, and/or other processes used in the technology described herein.
  • the first BLE device 1700 provided in this embodiment is used to perform the above rate control method, and therefore can achieve the same effect as the above implementation method.
  • the first BLE device 1700 may include a processing module, a storage module, and a communication module.
  • the processing module may be used to control and manage the actions of the first BLE device 1700, for example, may be used to support the first BLE device 1700 to perform the steps performed by the connection unit 1701, the encoding unit 1702, the acquisition unit 1704, and the determination unit 1705 .
  • the storage module may be used to support the first BLE device 1700 to store program codes and data.
  • the communication module may be used to support communication between the first BLE device 1700 and other devices, for example, may be used 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. It can implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of the present application.
  • the processor may also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other first BLE devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.
  • the first BLE device involved in this embodiment may be a mobile phone 100 having the structure shown in FIG. 2.
  • An embodiment of the present application further provides a computer storage medium that stores computer instructions, and when the computer instructions run on the first BLE device, the first BLE device executes the above-mentioned related method steps to implement the above embodiment
  • An embodiment of the present application also provides a computer program product, which, when the computer program product runs 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 foregoing embodiment.
  • the embodiments of the present application also provide an apparatus.
  • the apparatus may specifically be a chip, a component, or a module.
  • the apparatus may include a connected processor and a memory; wherein the memory is used to store computer-executed instructions.
  • the processor may execute computer execution instructions stored in the memory, so that the chip executes the rate control method executed by the first BLE device in the foregoing method embodiments.
  • the first BLE device, computer storage medium, computer program product, or chip provided in this embodiment are used to perform the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, refer to the above provided The beneficial effects in the corresponding method will not be repeated here.
  • FIG. 18 shows a schematic diagram of a possible composition of the second BLE device 1800 involved in the above embodiment.
  • the second BLE device 1800 may Including: connection unit 1801, decoding unit 1802, transmission unit 1803, acquisition unit 1804, etc.
  • connection unit 1801 may be used to support the second BLE device 1800 to perform the foregoing steps of establishing a low-power asynchronous connection link LE ACL connection with the first BLE device; establishing a CIS connection with the first BLE device according to the first transmission parameters of the CIS, etc. , And/or other processes used in the techniques described herein.
  • the decoding unit 1802 may be used to support the second BLE device 1800 to perform the decoding of the audio data received from the first BLE device based on the first encoding parameter; based on the second encoding parameter, the audio received from the first BLE device Steps such as decoding the data, and/or other processes used in the techniques described herein.
  • the transmission unit 1803 may be used to support the second BLE device 1800 to perform the above-described first transmission parameters based on receiving the audio data sent by the first BLE device through the CIS connection; while receiving the audio data sent by the first BLE device through the CIS connection, through The LEACL connection receives steps such as the second transmission parameter sent by the first BLE device, and/or other processes used in the technology described herein.
  • the obtaining unit 1804 may be used to support the second BLE device 1800 to perform the above steps of learning the second encoding parameter from the first BLE device, and/or other processes used in the technology described herein.
  • the second BLE device 1800 provided in this embodiment is used to execute the above rate control method, and therefore can achieve the same effect as the above implementation method.
  • the second BLE device 1800 may include a processing module, a storage module, and a communication module.
  • the processing module may be used to control and manage the actions of the second BLE device 1800. For example, it may be used to support the second BLE device 1800 to perform the steps performed by the connection unit 1801, the decoding unit 1802, and the acquisition unit 1804.
  • the storage module may be used to support the second BLE device 1800 to store program codes and data.
  • the communication module may be used to support communication between the second BLE device 1800 and other devices, for example, may be used to support the second BLE device 1800 to perform the steps performed by the transmission unit 1803.
  • the second BLE device involved in this embodiment may be a TWS earphone with the structure shown in FIG. 3A.
  • An embodiment of the present application further provides a computer storage medium that stores computer instructions, and when the computer instructions run on the second BLE device, the second BLE device executes the above-mentioned related method steps to implement the above embodiment
  • An embodiment of the present application also provides a computer program product, which, when the computer program product runs on a computer, causes the computer to perform the above-mentioned related steps to implement the rate control method performed by the second BLE device in the foregoing embodiment.
  • the embodiments of the present application also provide an apparatus.
  • the apparatus may specifically be a chip, a component, or a module.
  • the apparatus may include a connected processor and a memory; wherein the memory is used to store computer-executed instructions.
  • the processor may execute computer execution instructions stored in the memory, so that the chip executes the rate control method performed by the second BLE device in the foregoing method embodiments.
  • the second BLE device, computer storage medium, computer program product or chip provided in this embodiment are used to perform the corresponding methods provided above, therefore, for the beneficial effects that can be achieved, refer to the above provided The beneficial effects in the corresponding method will not be repeated here.
  • Another embodiment of the present application provides a system, which may include the foregoing first BLE device and second BLE device, and may be used to implement the foregoing rate control method.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the modules or units is only a division of logical functions.
  • there may be other divisions for example, multiple units or components may be The combination can either be integrated into another device, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical, or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or software function unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application may essentially be part of or contribute to the prior art or all or part of the technical solutions may be embodied in the form of software products, which are stored in a storage medium
  • several instructions are included to enable a device (which may be a single-chip microcomputer, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of the present application.
  • the foregoing storage media include: U disk, mobile hard disk, read-only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Abstract

The embodiments of the present application provide a rate control method and device, which relate to the field of electronic technology and can adaptively adjust a coding rate and a transmission rate without disabling a CIS connection. The specific solution is: establishing an LE ACL connection between a first BLE device and a second BLE device and establishing a CIS connection by using first transmission parameters; coding audio data by using first coding parameters; sending the coded audio data to the second BLE device by means of the CIS connection by using the first transmission parameters; determining second coding parameters and second transmission parameters, the second coding parameters and the second transmission parameters being respectively used for determining a coding rate and a transmission rate; coding the audio data by using the second coding parameters; while sending the audio data to the second BLE device by means of the CIS connection by using the first coding parameters, sending the second transmission parameters to the second BLE device by means of the LE ACL connection; and sending the coded audio data to the second BLE device on the basis of the second transmission parameters. The embodiments of the present application are used for rate control.

Description

一种速率控制方法及设备Rate control method and equipment 技术领域Technical field
本申请实施例涉及电子技术领域,尤其涉及一种速率控制方法及设备。The embodiments of the present application relate to the field of electronic technology, and in particular, to a rate control method and device.
背景技术Background technique
蓝牙是一种无线技术标准,可实现短距离数据交换。蓝牙主要包括低功耗蓝牙(bluetooth low energy,BLE),和基础速率(basic rate,BR)/增强速率(enhanced data rate,EDR)蓝牙两种。其中,由于BLE蓝牙能够降低功耗和成本,因而基于BLE的传输机制是目前研究和使用的热点。例如,该传输机制可以包括点对多点的基于连接的等时音频流(connected isochronous stream,CIS)传输协议等。基于CIS连接,蓝牙设备之间可以交互数据。Bluetooth is a wireless technology standard that enables short-range data exchange. Bluetooth mainly includes Bluetooth low energy (BLE), and basic rate (BR)/enhanced data (EDR) Bluetooth. Among them, because BLE Bluetooth can reduce power consumption and cost, the transmission mechanism based on BLE is currently a hotspot of research and use. For example, the transmission mechanism may include a point-to-multipoint connection-based isochronous stream (CIS) transmission protocol and the like. Based on CIS connection, data can be exchanged between Bluetooth devices.
发明内容Summary of the invention
本申请实施例提供一种速率控制方法及设备,能够在不断开CIS连接的情况下,自适应地调整编码速率和传输速率。Embodiments of the present application provide a rate control method and device, which can adaptively adjust the coding rate and transmission rate without disconnecting the CIS connection.
为达到上述目的,本申请实施例采用如下技术方案:To achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
一方面,本申请实施例提供了一种速率控制方法,包括:第一低功耗蓝牙BLE设备与第二BLE设备建立低功耗异步连接链路(low energy asynchronous connection link/logical transport,LE ACL)连接,根据CIS的第一传输参数与第二BLE设备建立CIS连接,该第一传输参数用于确定音频数据的传输速率。第一BLE设备采用第一编码参数对音频数据进行编码;第一编码参数用于确定音频数据的编码速率。第一BLE设备采用第一传输参数,通过CIS连接向第二BLE设备发送编码后的音频数据。第一BLE设备确定第二编码参数和第二传输参数,第二编码参数用于确定音频数据的编码速率,且第二编码参数不同于第一编码参数;第二传输参数用于确定音频数据的传输速率,且第二传输参数不同于第一传输参数。第一BLE设备采用第二编码参数对音频数据进行编码。第一BLE设备在采用第一传输参数,通过CIS连接向第二BLE设备发送音频数据的同时,通过LE ACL连接将第二传输参数发送给第二BLE设备。第一BLE设备采用第二传输参数,通过CIS连接向第二BLE设备发送采用第二编码参数编码后的音频数据。On the one hand, an embodiment of the present application provides a rate control method, including: a first low-power Bluetooth BLE device and a second BLE device establish a low-power asynchronous connection link (low energy connection asynchronous/link/logical transportation, LE ACL) ) Connection, establishing a CIS connection with the second BLE device according to the first transmission parameter of the CIS, which is used to determine the transmission rate of the audio data. The first BLE device encodes the audio data using the first encoding parameter; the first encoding parameter is used to determine the encoding rate of the audio data. The first BLE device uses the first transmission parameter to send the encoded audio data to the second BLE device through the CIS connection. The first BLE device determines a second encoding parameter and a second transmission parameter. The second encoding parameter is used to determine the encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter; the second transmission parameter is used to determine the audio data The transmission rate, and the second transmission parameter is different from the first transmission parameter. The first BLE device uses the second encoding parameter to encode the audio data. The first BLE device uses the first transmission parameter to send audio data to the second BLE device through the CIS connection, and sends the second transmission parameter to the second BLE device through the LEACL connection. The first BLE device uses the second transmission parameter to send audio data encoded with the second encoding parameter to the second BLE device through the CIS connection.
在该方案中,第一BLE设备可以在不断开CIS连接的基础上,根据CIS连接的信道质量等参考参数自动更新编码参数和传输参数,从而自适应地调整编码速率和传输速率,以使得编码速率和传输速率相匹配。In this solution, the first BLE device can automatically update the coding parameters and transmission parameters according to the reference parameters such as the channel quality of the CIS connection without disconnecting the CIS connection, thereby adaptively adjusting the coding rate and the transmission rate, so that the coding The rate and transmission rate match.
在一种可能的实现方式中,在第一BLE设备采用第二传输参数,通过CIS连接向第二BLE设备发送音频数据之前,方法还包括:第一BLE设备将更新时刻指示信息发送给第二BLE设备。第一BLE设备采用第二传输参数,通过CIS连接向第二BLE设备发送音频数据,包括:第一BLE设备在更新时刻指示信息所指示的时刻,采用第二传输参数,通过CIS连接向第二BLE设备发送音频数据。In a possible implementation manner, before the first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, the method further includes: the first BLE device sends the update time indication information to the second BLE device. The first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, including: the first BLE device uses the second transmission parameter at the time indicated by the update time indication information, and uses the second transmission parameter to connect to the second through the CIS connection The BLE device sends audio data.
也就是说,第一BLE设备和第二BLE设备可以在约定的更新时刻,同时自动启动第二传输参数,从而同时更新传输速率。That is to say, the first BLE device and the second BLE device can automatically start the second transmission parameter at the agreed update time at the same time, thereby simultaneously updating the transmission rate.
在另一种可能的实现方式中,在第一BLE设备确定第二编码参数和第二传输参数之前,该方法还包括:第一BLE设备获取参考参数。第一BLE设备确定第二编码参数和第二传输参数,包括:第一BLE设备在参考参数满足预设条件时,根据参考参数确定第二编码参数和第二传输参数。In another possible implementation manner, before the first BLE device determines the second encoding parameter and the second transmission parameter, the method further includes: the first BLE device obtains the reference parameter. The first BLE device determining the second encoding parameter and the second transmission parameter includes: the first BLE device determining the second encoding parameter and the second transmission parameter according to the reference parameter when the reference parameter satisfies the preset condition.
在另一种可能的实现方式中,参考参数包括CIS连接的信道质量参数;第一BLE设备在参考参数满足预设条件时,根据参考参数确定第二编码参数和第二传输参数,包括:若CIS连接的信道质量参数大于或者等于第一预设值,则第一BLE设备根据CIS连接的信道质量参数确定第二编码参数和第二传输参数,使得第二编码参数确定的编码速率大于第一编码参数确定的编码速率,第二传输参数确定的传输速率大于第一传输参数确定的传输速率。若CIS连接的信道质量参数小于第二预设值,则第一BLE设备根据CIS连接的信道质量参数确定第二传输参数,使得第二编码参数确定的编码速率小于第一编码参数确定的编码速率,第二传输参数确定的传输速率小于第一传输参数确定的传输速率。In another possible implementation, the reference parameter includes the channel quality parameter of the CIS connection; when the reference parameter meets the preset condition, the first BLE device determines the second encoding parameter and the second transmission parameter according to the reference parameter, including: If the channel quality parameter of the CIS connection is greater than or equal to the 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 first The encoding rate determined by the encoding parameter, the transmission rate determined by the second transmission parameter is greater than the transmission rate determined by the first transmission parameter. If the channel quality parameter of the CIS connection is less than the second preset value, the first BLE device determines the second transmission parameter according to the channel quality parameter of the CIS connection, so that the encoding rate determined by the second encoding parameter is less than the encoding rate determined by the first encoding parameter The transmission rate determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.
在另一种可能的实现方式中,若CIS连接的信道质量参数大于或者等于第一预设值,则在第一BLE设备采用第二编码参数对音频数据进行编码之后,第一BLE设备采用第二传输参数,通过CIS连接向第二BLE设备发送采用第二编码参数编码后的音频数据。若CIS连接的信道质量参数小于第二预设值,则在第一BLE设备采用第二编码参数对音频数据进行编码之前,第一BLE设备采用第二传输参数,通过CIS连接向第二BLE设备发送采用第二编码参数编码后的音频数据。In another possible implementation, if the channel quality parameter of the CIS connection is greater than or equal to the first preset value, after the first BLE device uses the second encoding parameter to encode the audio data, the first BLE device uses the first Two transmission parameters, sending audio data encoded with the second encoding parameter to the second BLE device through the CIS connection. If the channel quality parameter of the CIS connection is less than the second preset value, before the first BLE device uses the second encoding parameter to encode the audio data, the first BLE device uses the second transmission parameter to connect to the second BLE device through the CIS connection Send the audio data encoded with the second encoding parameter.
在另一种可能的实现方式中,参考参数还包括编码后的音频数据的待传输数据量。若第一BLE设备确定信道质量参数差于预设值,或者信道质量参数变差,或者待传输数据量大于或者等于第一预设阈值,则在第一BLE设备基于第二编码参数对音频数据进行编码之后,第一BLE设备基于第二传输参数,通过CIS连接向第二BLE设备发送基于第二编码参数编码后的音频数据;其中,第二编码参数对应的编码速率低于第一编码参数对应的编码速率。In another possible implementation manner, the reference parameter further includes the data volume of the encoded audio data to be transmitted. If the first BLE device determines that the channel quality parameter is worse than the preset value, or the channel quality parameter becomes worse, or the amount of data to be transmitted is greater than or equal to the first preset threshold, the first BLE device compares the audio data based on the second encoding parameter After encoding, the first BLE device sends audio data encoded based on the second encoding parameter to the second BLE device through the CIS connection based on the second transmission parameter; where the encoding rate corresponding to the second encoding parameter is lower than the first encoding parameter Corresponding coding rate.
也就是说,第一BLE设备在根据信道质量参数、待传输数据量等参考参数,确定需要降低编码速率和传输速率时,可以先降低编码速率,再降低传输速率。In other words, the first BLE device may first reduce the coding rate and then reduce the transmission rate when determining that the coding rate and the transmission rate need to be reduced based on reference parameters such as channel quality parameters and the amount of data to be transmitted.
在另一种可能的实现方式中,若第一BLE设备确定信道质量参数优于预设值,或者信道质量参数变优,或者待传输数据量小于或者等于第二预设阈值,则在第一BLE设备基于第二编码参数对音频数据进行编码之前,第一BLE设备基于第二传输参数,通过CIS连接向第二BLE设备发送基于第二编码参数编码后的音频数据;其中,第二编码参数对应的编码速率高于第一编码参数对应的编码速率。In another possible implementation manner, if the first BLE device determines that the channel quality parameter is better than the preset value, or the channel quality parameter becomes better, or the amount of data to be transmitted is less than or equal to the second preset threshold, the first Before the BLE device encodes the audio data based on the second encoding parameter, the first BLE device sends the audio data encoded based on the second encoding parameter to the second BLE device through the CIS connection based on the second transmission parameter; wherein, the second encoding parameter The corresponding coding rate is higher than the coding rate corresponding to the first coding parameter.
也就是说,第一BLE设备在根据信道质量参数、待传输数据量等参考参数,确定需要提高编码速率和传输速率时,可以先提高传输速率,再提高编码速率,以使得第一BLE设备有足够的传输能力传输编码后的音频数据。In other words, when the first BLE device determines that the encoding rate and the transmission rate need to be increased according to reference parameters such as the channel quality parameter and the amount of data to be transmitted, the first BLE device may first increase the transmission rate and then increase the encoding rate, so that Enough transmission capacity to transmit the encoded audio data.
在另一种可能的实现方式中,信道质量参数包括丢包率,第二编码参数包括bitpool值。第一BLE设备根据参考参数确定第二编码参数,包括:第一BLE设备根据丢包 率确定对应的目标编码速率和目标bitpool值,第二编码参数包括目标bitpool值。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 the second encoding parameter according to the reference parameter, including: the first BLE device determines the corresponding target encoding rate and target bitpool value according to the packet loss rate, and the second encoding parameter includes the target bitpool value.
在该方案中,第一BLE设备可以根据丢包率情况调整编码参数中的bitpool值,从而调整编码速率。In this solution, the first BLE device may adjust the bitpool value in the encoding parameters according to the packet loss rate, thereby adjusting the encoding rate.
在另一种可能的实现方式中,参考参数包括编码后的音频数据的待传输数据量,第一BLE设备在参考参数满足预设条件时,根据参考参数确定第二传输参数,包括:若编码后的音频数据的待传输数据量大于或者等于预设阈值,则第一BLE设备根据待传输数据量与预设的待传输数据量与编码参数和传输参数的映射关系,确定第二编码参数和第二传输参数,使得第二编码参数确定的音频数据的编码速率小于第一编码参数确定的编码速率,第二传输参数确定的音频数据的传输速率小于第一传输参数确定的传输速率。In another possible implementation manner, the reference parameter includes the data volume of the encoded audio data to be transmitted, and the first BLE device determines the second transmission parameter according to the reference parameter when the reference parameter meets the preset condition, including: The amount of data to be transmitted of the post-audio data is greater than or equal to a preset threshold, then the first BLE device determines the second encoding parameter and the mapping relationship between the amount of data to be transmitted and the preset amount of data to be transmitted and the encoding parameter and the transmission parameter The second transmission parameter is such that the coding rate of the audio data determined by the second coding parameter is less than the coding rate determined by the first coding 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.
在另一种可能的实现方式中,参考参数还包括编码后的音频数据的待传输数据量,第一BLE设备上设置有多个档位的编码参数。第一BLE设备根据参考参数确定第二编码参数包括:若待传输数据量大于或者等于第一预设阈值,则第一BLE设备将第二编码参数设置为编码速率最低的第一档位对应的编码参数;第一BLE设备周期性地检测待传输数据量;若待传输数量小于第一预设阈值,则第一BLE设备将第二编码参数设置为第二档位的编码参数,第二档位为第一档位的上一个档位,第二档位的编码参数对应的编码速率比第一档位的编码参数对应的编码速率高。In another possible implementation manner, the reference parameter further includes the data volume of the encoded audio data to be transmitted, and the first BLE device is provided with encoding parameters of multiple gears. The first BLE device determining the second encoding parameter according to the reference parameter includes: if the amount of data to be transmitted is greater than or equal to the first preset threshold, the first BLE device sets the second encoding parameter to the first gear with the lowest encoding rate. Encoding parameters; the first BLE device periodically detects the amount of data to be transmitted; if the amount to be transmitted is less than the first preset threshold, the first BLE device sets the second encoding parameter to the encoding parameter of the second gear, the second gear The bit is the previous gear of the first gear, and the coding rate corresponding to the coding parameter of the second gear is higher than the coding rate corresponding to the coding parameter of the first gear.
在该方案中,第一BLE设备可以逐档位地、慢慢地提升编码速率。In this solution, the first BLE device can gradually increase the encoding rate bit by bit.
在另一种可能的实现方式中,参考参数还包括编码后的音频数据的待传输数据量,第一BLE设备上设置有多个档位的编码参数。第一BLE设备根据参考参数确定第二编码参数包括:若待传输数据量小于或者等于第二预设阈值,则第一BLE设备将第二编码参数设置为编码速率最高的第三档位对应的编码参数;第一BLE设备周期性地检测待传输数据量;若待传输数量大于第二预设阈值,则第一BLE设备将第二编码参数设置为第四档位的编码参数,第四档位为第三档位的下一个档位,第四档位的编码参数对应的编码速率比第三档位的编码参数对应的编码速率低。In another possible implementation manner, the reference parameter further includes the data volume of the encoded audio data to be transmitted, and the first BLE device is provided with encoding parameters of multiple gears. The first BLE device determining the second encoding parameter according to the reference parameter includes: if the amount of data to be transmitted is less than or equal to the second preset threshold, the first BLE device sets the second encoding parameter to the corresponding third gear with the highest encoding rate Encoding parameter; the first BLE device periodically detects the amount of data to be transmitted; if the amount to be transmitted is greater than the second preset threshold, the first BLE device sets the second encoding parameter to the encoding parameter of the fourth gear, the fourth gear The bit is the next gear of the third gear, and the encoding rate corresponding to the encoding parameter of the fourth gear is lower than the encoding rate corresponding to the encoding parameter of the third gear.
在该方案中,第一BLE设备可以逐档位地、慢慢降低编码速率。In this solution, the first BLE device can gradually reduce the encoding rate bit by bit.
在另一种可能的实现方式中,参考参数还包括编码后的音频数据的待传输数据量。第一BLE设备根据参考参数确定第二编码参数和第二传输参数包括:若待传输数据量大于或者等于第一预设阈值,则第一BLE设备确定第二编码参数和第二传输参数,第二编码参数用于降低编码速率,第二传输参数用于降低传输速率。In another possible implementation manner, the reference parameter further includes the data volume of the encoded audio data to be transmitted. The first BLE device determining the second encoding parameter and the second transmission parameter according to the reference parameter includes: if the amount of data to be transmitted is greater than or equal to the first preset threshold, the first BLE device determines the second encoding parameter and the second transmission parameter, and The second coding parameter is used to reduce the coding rate, and the second transmission parameter is used to reduce the transmission rate.
这样,在待传输数据量大于或者等于第一预设阈值的情况下,CIS连接的信道质量可能较差,则可以通过调整编码参数和传输参数来降低编码速率和传输速率。In this way, when the amount of data to be transmitted is greater than or equal to the first preset threshold, the channel quality of the CIS connection may be poor, and the coding rate and the transmission rate may be reduced by adjusting the coding parameter and the transmission parameter.
在另一种可能的实现方式中,若待传输数据量小于或者等于第二预设阈值,则第一BLE设备确定第二编码参数和第二传输参数,第二编码参数用于提高编码速率,第二传输参数用于提高传输速率。In another possible implementation manner, if the amount of data to be transmitted is less than or equal to the second preset threshold, the first BLE device determines the second encoding parameter and the second transmission parameter, and the second encoding parameter is used to increase the encoding rate, The second transmission parameter is used to increase the transmission rate.
这样,在待传输数据量小于或者等于第二预设阈值的情况下,CIS连接的信道质量可能较好,则可以通过调整编码参数和传输参数来提高编码速率和传输速率。In this way, when the amount of data to be transmitted is less than or equal to the second preset threshold, the channel quality of the CIS connection may be better, and the coding rate and the transmission rate can be increased by adjusting the coding parameter and the transmission parameter.
在另一种可能的实现方式中,在第一BLE设备根据参考参数确定第二编码参数之后,该方法还包括:第一BLE设备将第二编码参数通知给第二BLE设备。In another possible implementation manner, after the first BLE device determines the second encoding parameter according to the reference parameter, the method further includes the first BLE device notifying the second BLE device of the second encoding parameter.
这样,第二BLE设备才可以根据第二编码参数对接收到的编码后的音频数据进行解码。In this way, the second BLE device can decode the received encoded audio data according to the second encoding parameter.
在另一种可能的实现方式中,采用第二编码参数编码后的音频数据中包括第二编码参数的指示信息。In another possible implementation manner, the audio data encoded with the second encoding parameter includes indication information of the second encoding parameter.
也就是说,第一BLE设备可以通过编码后的音频数据包,将第二编码参数通知给第二BLE设备。That is, the first BLE device may notify the second BLE device of the second encoding parameter through the encoded audio data packet.
在另一种可能的实现方式中,第一BLE设备包括第一主机和第一链路层,第二BLE设备包括第二链路层。第一BLE设备通过LE ACL连接将第二传输参数发送给第二BLE设备,包括:第一主机向第一链路层发送参数更新信息,参数更新信息包括第二传输参数。第一链路层向第二链路层发送CIS更新请求信息,CIS更新请求信息中包括第二传输参数。In another possible implementation manner, the first BLE device includes a first host and a first link layer, and the second BLE device includes a second link layer. The first BLE device sends the second transmission parameter to the second BLE device through the LEACL connection, which includes: the first host sends parameter update information to the first link layer, and the parameter update information includes the second transmission parameter. The first link layer sends CIS update request information to the second link layer, and the CIS update request information includes the second transmission parameter.
其中,BLE设备可以包括主机和链路层,协商和调整传输参数的过程可以在第一BLE设备的主机与链路层之间,第二BLE设备的主机与链路层之间,以及第一BLE设备与第二BLE设备的链路层之间进行。The BLE device may include a host and a link layer, and the process of negotiating and adjusting transmission parameters may be between the host of the first BLE device and the link layer, between the host of the second BLE device and the link layer, and the first The link layer between the BLE device and the second BLE device.
在另一种可能的实现方式中,在第一BLE设备内部,第一主机与第一链路层之间通过主机控制器接口协议HCI命令交互信息;第一BLE设备的第一链路层与第二BLE设备的第二链路层之间通过链路层LL命令交互信息。In another possible implementation manner, within the first BLE device, the first host and the first link layer exchange information through the host controller interface protocol HCI command; the first link layer of the first BLE device communicates with The second link layer of the second BLE device exchanges information through the link layer LL command.
在另一种可能的实现方式中,第一BLE设备可以不向第二BLE设备发送更新时刻指示信息,第一BLE设备和第二BLE设备预先约定好了预设的时刻,例如第一BLE设备在发送参数更新信息后的第M个时刻启用第二传输参数;再例如第二BLE设备在接收到CIS更新请求信息后的第K个时刻启用第二传输参数。In another possible implementation manner, 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 have agreed a preset time in advance, for example, the first BLE device The second transmission parameter is enabled at the Mth time after sending the parameter update information; for another example, the second BLE device enables the second transmission parameter at the Kth time after receiving the CIS update request information.
在另一种可能的实现方式中,第一BLE设备可以不向第二BLE设备发送更新时刻指示信息,第一BLE设备在发送参数更新信息后的自动启用第二传输参数;再例如第二BLE设备在接收到CIS更新请求信息后自动启用第二传输参数。In another possible implementation manner, the first BLE device may not send the update time indication information to the second BLE device, and the first BLE device automatically enables the second transmission parameter after sending the parameter update information; for example, the second BLE After receiving the CIS update request message, the device automatically enables the second transmission parameter.
在另一种可能的实现方式中,第二传输参数包括以下一种或多种:突发数量BN、子事件数量NSE、刷新超时FT、子事件时长和PHY类型;其中,PHY类型包括传输的带宽和调制方式。In another possible implementation, the second transmission parameter includes one or more of the following: the number of bursts BN, the number of sub-events NSE, the refresh timeout FT, the duration of sub-events, and the PHY type; where the PHY type includes the transmitted Bandwidth and modulation method.
这样,第一BLE设备可以通过调整突发数量BN、子事件数量NSE、刷新超时FT、子事件时长和PHY类型中的至少一种,来调整传输速率。In this way, the first BLE device can 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 duration of the sub-events, and the PHY type.
在另一种可能的实现方式中,第一BLE设备根据参考参数确定第二传输参数,第二传输参数用于提高音频数据的传输速率,包括:若第一BLE设备确定信道质量参数优于预设值或信道质量参数变优,则第一BLE设备确定第二传输参数。其中,与第一传输参数相比,第二传输参数中增大了突发数量BN,增大了子事件数量NSE,减小了刷新超时FT,增大了子事件时长,增大了传输的带宽,或所采用的调制方式对应的传输速率更高。In another possible implementation manner, the first BLE device determines the second transmission parameter according to the reference parameter, and the second transmission parameter is used to increase the transmission rate of the audio data, including: if the first BLE device determines that the channel quality parameter is better than the When the set value or the channel quality parameter becomes better, the first BLE device determines the second transmission parameter. Compared with the first transmission parameter, the second transmission parameter increases the number of bursts BN, increases the number of sub-events NSE, reduces the refresh timeout FT, increases the duration of sub-events, and increases the transmission The bandwidth or the transmission rate corresponding to the modulation method used is higher.
这样,在根据信道质量参数、待传输数据量等参考参数,确定需要提高传输速率时,第一BLE设备可以通过调整传输参数来提高传输速率。In this way, when it is determined that the transmission rate needs to be increased according to the reference parameters such as the channel quality parameter and the amount of data to be transmitted, the first BLE device may increase the transmission rate by adjusting the transmission parameter.
在另一种可能的实现方式中,第一BLE设备根据参考参数确定第二传输参数,第二传输参数用于降低音频数据的传输速率,包括:若第一BLE设备确定信道质量参数 差于预设值或信道质量参数变差,则第一BLE设备确定第二传输参数。其中,与第一传输参数相比,第二传输参数中减小了突发数量BN,减小了子事件数量NSE,增大了刷新超时FT,减小了子事件时长,减小了传输的带宽,或所采用的调制方式对应的传输速率更低。In another possible implementation manner, the first BLE device determines the second transmission parameter according to the reference parameter, and the second transmission parameter is used to reduce the transmission rate of the audio data, including: if the first BLE device determines that the channel quality parameter is worse than the If the set value or the channel quality parameter becomes worse, the first BLE device determines the second transmission parameter. Compared with the first transmission parameter, the second transmission parameter reduces the number of bursts BN, reduces the number of sub-events NSE, increases the refresh timeout FT, reduces the duration of sub-events, and reduces the transmission The bandwidth, or the transmission rate corresponding to the modulation method used, is lower.
这样,在根据信道质量参数、待传输数据量等参考参数,确定需要降低传输速率时,第一BLE设备可以通过调整传输参数来降低传输速率。In this way, 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 amount of data to be transmitted, the first BLE device may reduce the transmission rate by adjusting the transmission parameter.
在另一种可能的实现方式中,第一BLE设备获取参考参数包括:第一BLE设备从自身获取参考参数;或者,第一BLE设备从第二BLE设备获取参考参数。In another possible implementation manner, the first BLE device acquiring the reference parameter includes: the first BLE device acquiring the reference parameter from itself; or, the first BLE device acquiring the reference parameter from the second BLE device.
例如,第一BLE设备可以从自身的控制器获取信道质量参数;也可以从第二BLE设备的控制器获取信道质量参数。For example, the first BLE device may obtain channel quality parameters from its own controller; it may also obtain channel quality parameters from the controller of the second BLE device.
另一方面,本申请实施例提供了一种速率控制装置,该装置包含在第一BLE设备中,该装置具有实现上述方面及可能实现方式中第一BLE设备行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,连接模块或单元、编码模块或单元、传输模块或单元、获取模块或单元、确定模块或单元等。On the other hand, an embodiment of the present application provides a rate control apparatus, which is included in a first BLE device, and the apparatus has a function to implement the behavior of the first BLE device in the above aspects and possible implementation manners. This function can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a connection module or unit, an encoding module or unit, a transmission module or unit, an acquisition module or unit, a determination module or unit, etc.
另一方面,本申请实施例提供了一种传输速率控制方法,包括:第二低功耗蓝牙BLE设备与第一BLE设备建立低功耗异步连接链路LE ACL,根据CIS的第一传输参数与第一BLE设备建立CIS连接,该第一传输参数用于确定音频数据的传输速率。第二BLE设备采用第一传输参数,通过CIS连接接收第一BLE设备发送的音频数据。第二BLE设备根据第一编码参数,对从第一BLE设备接收到的音频数据进行解码;第一编码参数用于确定音频数据的编码速率。若第二BLE设备从第一BLE设备获取到第二编码参数,则第二BLE设备根据第二编码参数,对从第一BLE设备接收到的音频数据进行解码;第二编码参数用于确定音频数据的编码速率,且第二编码参数不同于第一编码参数。若第二BLE设备在采用第一传输参数,通过CIS连接接收第一BLE设备发送的音频数据的同时,通过LE ACL连接接收第一BLE设备发送的第二传输参数;第二传输参数用于确定音频数据的传输速率,且第二传输参数不同于第一传输参数;则第二BLE设备采用第二传输参数,通过CIS连接接收第一BLE设备发送的音频数据。On the other hand, an embodiment of the present application provides a transmission rate control method, including: a second low-power Bluetooth BLE device establishes a low-power asynchronous connection link LEACL with a first BLE device, based on the first transmission parameter of the CIS A CIS connection is established with the first BLE device, and the first transmission parameter is used to determine the transmission rate of the audio data. The second BLE device uses the first transmission parameter to receive audio data sent by the first BLE device through the CIS connection. The second BLE device decodes the audio data received from the first BLE device according to the first encoding parameter; the first encoding parameter is used to determine the encoding rate of the audio data. If the second BLE device obtains the second encoding parameter from the first BLE device, the second BLE device decodes the audio data received from the first BLE device according to the second encoding parameter; the second encoding parameter is used to determine the audio The encoding rate of the data, and the second encoding parameter is different from the first encoding parameter. If the second BLE device adopts the first transmission parameter and receives the audio data sent by the first BLE device through the CIS connection, it receives the second transmission parameter sent by the first BLE device through the LEACL connection; the second transmission parameter is used to determine The transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter; then the second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection.
在该方案中,第二BLE设备可以在不断开CIS连接的基础上,根据第一BLE设备发送的传输参数自适应地调整传输速率,并根据第一BLE设备通知的更新后的编码参数对接收到的音频数据进行解码,使得编码速率和传输速率相匹配。In this solution, the second BLE device can adaptively adjust the transmission rate according to the transmission parameters sent by the first BLE device without disconnecting the CIS connection, and receive the updated coding parameters notified by the first BLE device. The received audio data is decoded so that the encoding rate and the transmission rate match.
在一种可能的实现方式中,第二BLE设备从第一BLE设备获取到第二编码参数,包括:第二BLE设备从第一BLE设备发送的采用第二编码参数编码后的音频数据中获取第二编码参数。In a possible implementation manner, the second BLE device acquires the second encoding parameter from the first BLE device, including: the second BLE device acquires from the audio data sent by the first BLE device and encoded with the second encoding parameter The second encoding parameter.
也就是说,第二BLE设备可以通过编码后的音频数据获知第一BLE设备更新后的编码参数。That is, the second BLE device can learn the updated encoding parameters of the first BLE device through the encoded audio data.
在另一种可能的实现方式中,在第二BLE设备采用第二传输参数,通过CIS连接接收第一BLE设备发送的音频数据之前,该方法还包括:第二BLE设备接收第一BLE设备发送的更新时刻指示信息。第二BLE设备采用第二传输参数,通过CIS连接接收 第一BLE设备发送的音频数据,包括:第二BLE设备在更新时刻指示信息所指示的时刻,采用第二传输参数,通过CIS连接接收第一BLE设备发送的音频数据。In another possible implementation manner, before the second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection, the method further includes: the second BLE device receives the first BLE device to send The update time indication information. The second BLE device uses the second transmission parameter to receive the audio data sent by the first BLE device through the CIS connection, including: the second BLE device uses the second transmission parameter to receive the first data through the CIS connection at the time indicated by the update time indication information Audio data sent by a BLE device.
也就是说,第一BLE设备和第二BLE设备可以在约定的更新时刻,同时启动第二传输参数。That is to say, the first BLE device and the second BLE device can simultaneously start the second transmission parameter at the agreed update time.
在另一种可能的实现方式中,第一BLE设备包括第一链路层,第二BLE设备包括第二主机和第二链路层。第二BLE设备通过LE ACL连接接收第一BLE设备发送的第二传输参数,包括:第二链路层接收第一链路层发送的CIS更新请求信息,更新请求信息中包括第二传输参数。第二BLE设备启用第二传输参数,包括:第二链路层启用第二传输参数;第二链路层向第二主机发送更新完成信息,以表明已启用第二传输参数。In another possible implementation manner, the first BLE device includes a first link layer, and the second BLE device includes a second host and a second link layer. The second BLE device receives the second transmission parameter sent by the first BLE device through the LEACL connection, including: the second link layer receives the CIS update request information sent by the first link layer, and the update request information includes the second transmission parameter. The second BLE device enables the second transmission parameter, including: the second link layer enables the second transmission parameter; the second link layer sends update completion information to the second host to indicate that the second transmission parameter is enabled.
其中,BLE设备可以包括主机和链路层,调整传输参数的过程可以在第一BLE设备的主机与链路层之间,第二BLE设备的主机与链路层之间,以及第一BLE设备与第二BLE设备的链路层之间进行。The BLE device may include a host and a link layer, and the process of adjusting transmission parameters may be between the host of the first BLE device and the link layer, between the host of the second BLE device and the link layer, and the first BLE device With the link layer of the second BLE device.
在另一种可能的实现方式中,在第二BLE设备内部,第二主机与第二链路层之间通过主机控制器接口协议HCI命令交互信息;第一BLE设备的第一链路层与第二BLE设备的第二链路层之间通过链路层LL命令交互信息。In another possible implementation manner, within the second BLE device, the second host and the second link layer exchange information through the host controller interface protocol HCI command; the first link layer of the first BLE device communicates with The second link layer of the second BLE device exchanges information through the link layer LL command.
在另一种可能的实现方式中,在第二BLE设备通过LE ACL连接接收第一BLE设备发送的第二传输参数,以及第二BLE设备基于第二编码参数,对从第一BLE设备接收到的音频数据进行解码之前,该方法还包括:第二BLE设备向第一BLE设备发送CIS连接的信道质量参数。In another possible implementation manner, the second BLE device receives the second transmission parameter sent by the first BLE device through the LEACL connection, and the second BLE device receives the second transmission parameter from the first BLE device based on the second encoding parameter Before decoding the audio data, the method further includes: the second BLE device sends the channel quality parameter of the CIS connection to the first BLE device.
这样,第一BLE设备可以根据第二BLE设备发送的信道质量参数,确定第二编码参数和第二传输参数。In this way, the first BLE device may determine the second encoding parameter and the second transmission parameter according to the channel quality parameter sent by the second BLE device.
在另一种可能的实现方式中,第二BLE设备可以为无线耳机。In another possible implementation manner, the second BLE device may be a wireless headset.
另一方面,本申请实施例提供了一种速率控制装置,该装置包含在第二BLE设备中,该装置具有实现上述任一方面及可能实现方式中第二BLE设备行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,连接模块或单元、解码模块或单元、传输模块或单元、获取模块或单元等。On the other hand, an embodiment of the present application provides a rate control apparatus. The apparatus is included in a second BLE device, and the apparatus has a function to implement the behavior of the second BLE device in any of the above aspects and possible implementation manners. This function can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a connection module or unit, a decoding module or unit, a transmission module or unit, an acquisition module or unit, etc.
另一方面,本申请实施例提供了一种系统,该系统可以包括以上任一方面的任一项可能的实现方式中的第一BLE设备和第二BLE设备,可以实现以上描述的速率控制方法。On the other hand, an embodiment of the present application provides a system, which may include the first BLE device and the second BLE device in any possible implementation manner of any of the above aspects, and may implement the rate control method described above .
另一方面,本申请实施例提供了一种BLE设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得该BLE设备执行上述任一方面及任一项可能的实现中第一BLE设备或第二BLE设备执行的速率控制方法。On the other hand, an embodiment of the present application provides a BLE device, including one or more processors and one or more memories. The one or more memories are coupled to one or more processors. The one or more memories are used to store computer program code. The computer program codes include computer instructions. When the one or more processors execute the computer instructions, the BLE device 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.
另一方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在计算机上运行时,使得计算机执行上述任一方面及任一项可能的实现中第一BLE设备或第二BLE设备执行的速率控制方法。On the other hand, an embodiment of the present application provides a computer storage medium, including computer instructions, which when executed on a computer, causes the computer to perform any of the above aspects and any possible implementation of the first BLE device or the first Two rate control methods performed by BLE devices.
另一方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述第一方面或第二方面任一项可能的实现中第一BLE设备或第二BLE设备执行的速率控制方法。On the other hand, an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to perform any one of the possible implementations of the first aspect or the second aspect described above. Two rate control methods performed by BLE devices.
附图说明BRIEF DESCRIPTION
图1为本申请实施例提供的一种系统结构示意图;FIG. 1 is a schematic diagram of a system structure provided by an embodiment of the present application;
图2为本申请实施例提供的一种手机的结构示意图;2 is a schematic structural diagram of a mobile phone provided by an embodiment of the present application;
图3A为本申请实施例提供的一种耳塞的结构示意图;3A is a schematic structural diagram of an earplug provided by an embodiment of the present application;
图3B为本申请实施例提供的一种TWS耳机与耳机盒的示意图;3B is a schematic diagram of a TWS earphone and earphone box provided by an embodiment of the present application;
图3C为本申请实施例提供的一种耳塞的示意图;3C is a schematic diagram of an earplug provided by an embodiment of the present application;
图4为本申请实施例提供的一种蓝牙系统示意图;4 is a schematic diagram of a Bluetooth system provided by an embodiment of this application;
图5为本申请实施例提供的一种音频传输流程图;5 is a flow chart of audio transmission provided by an embodiment of the present application;
图6为本申请实施例提供的一种调整传输参数的方法流程图;6 is a flowchart of a method for adjusting transmission parameters provided by an embodiment of the present application;
图7为本申请实施例提供的一种传输参数调整示意图;7 is a schematic diagram of transmission parameter adjustment according to an embodiment of the present application;
图8为本申请实施例提供的一种调整速率的流程图;8 is a flowchart of adjusting a rate provided by an embodiment of the present application;
图9为本申请实施例提供的另一种传输参数调整示意图;9 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application;
图10为本申请实施例提供的另一种传输参数调整示意图;10 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application;
图11为本申请实施例提供的另一种传输参数调整示意图;11 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application;
图12为本申请实施例提供的另一种调整速率的流程图;12 is a flowchart of another rate adjustment provided by an embodiment of this application;
图13为本申请实施例提供的另一种传输参数调整示意图;13 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application;
图14为本申请实施例提供的另一种传输参数调整示意图;14 is a schematic diagram of another transmission parameter adjustment provided by an embodiment of the present application;
图15为本申请实施例提供的另一种调整速率的流程图;15 is a flowchart of another rate adjustment provided by an embodiment of this application;
图16为本申请实施例提供的另一种调整速率的流程图;16 is a flowchart of another rate adjustment provided by an embodiment of this application;
图17为本申请实施例提供的一种第一BLE设备的结构示意图;17 is a schematic structural diagram of a first BLE device provided by an embodiment of this application;
图18为本申请实施例提供的一种第二BLE设备的结构示意图。FIG. 18 is a schematic structural diagram of a second BLE device provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。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 of the present application, unless otherwise stated, "/" means "or", for example, A/B may mean A or B; "and/or" in this text is merely a description of related objects The association relationship indicates that there may be three relationships, for example, A and/or B, which may indicate that there are three cases in which A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, “plurality” refers to two or more than two.
如图1所示,本申请实施例提供的配对连接方法可以应用于电子设备01和至少一个外接设备02所组成的系统。在该系统中,电子设备01与外接设备02之间以无线方式连接。其中,该无线方式可以是蓝牙(bluetooth,BT),无线保真(wireless fidelity,Wi-Fi)网络,全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等连接。例如,电子设备01可以是手机、媒体播放器(例如MP3、MP4等)平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、个人数字助理(personal digital assistant,PDA)、电视等设备。例如,外接设备02可以是无线耳机,无线音箱,无线手环,无线车载,无线智能眼镜, 增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等,本申请实施例对此不做任何限制。其中,无线耳机可以是头戴式耳机、耳塞式或其他便携式收听设备。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 connected wirelessly. Among them, the wireless method may be Bluetooth (bluetooth, BT), wireless fidelity (wireless fidelity, Wi-Fi) network, global navigation satellite system (global navigation satellite system (GNSS), frequency modulation (frequency modulation (FM), close range Wireless communication technology (near field communication, NFC), infrared technology (infrared, IR) and other connections. For example, the electronic device 01 may be a mobile phone, a media player (such as MP3, MP4, etc.) tablet computer, notebook computer, ultra-mobile personal computer (UMPC), personal digital assistant (personal digital assistant, PDA), TV and other equipment. For example, the external device 02 may be a wireless headset, a wireless speaker, a wireless bracelet, a wireless vehicle, a wireless smart glasses, an augmented reality (AR)\virtual reality (VR) device, etc. No restrictions. Wherein, the wireless earphone may be a headphone, earplugs or other portable listening devices.
其中,外接设备02可以包括一个主体,也可以包括配对使用的第一主体021和第二主体022,第一主体021和第二主体022之间相互配合、协同工作。例如,当外接设备02为耳塞式TWS耳机时,外接设备02可以包括配对使用的左耳塞(通常标识有“L”)和右耳塞(通常标识有“R”),左耳塞和右耳塞用于立体声播放,左耳塞可以用于播放音频数据的左声道信号,右耳塞可以用于同步播放该音频数据的右声道信号。The external device 02 may include one main body, or may include a paired first main body 021 and a second main body 022, and the first main body 021 and the second main body 022 cooperate and cooperate with each other. For example, when the external device 02 is an earplug TWS earphone, the external device 02 may include a paired left earplug (usually marked with "L") and right earplug (usually marked with "R"). The left earplug and right earplug are used for For stereo playback, the left earplug can be used to play the left channel signal of audio data, and the right earplug can be used to synchronously play the right channel signal of the audio data.
在图1所示的系统中,电子设备01是以手机为例,外接设备02是以耳塞式TWS耳机和手环为例进行说明的。可以理解的是,该系统中的电子设备01和外接设备02,还可以是其他设备,本申请实施例对此不做任何限制。In the system shown in FIG. 1, the electronic device 01 uses a mobile phone as an example, and the external device 02 uses an earplug-type TWS earphone and bracelet as an example for description. It can be understood that the electronic device 01 and the external device 02 in the system may also be other devices, which are not limited in this embodiment of the present application.
示例性的,当电子设备01为手机100时,图2示出了手机100的结构示意图。手机100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, 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, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, key 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对手机100的具体限定。在本申请另一些实施例中,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown, or combine some components, or split some components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), and an image signal processor. (image)signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Among them, the different processing units may be independent devices or may be integrated in one or more processors.
其中,控制器可以是手机100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the mobile phone 100. The controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. The repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S) 接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit, sound, I2S) interface, pulse code modulation (pulse code modulation (PCM) interface, universal asynchronous transceiver (universal) asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /Or universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现手机100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may respectively couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the mobile phone 100.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话等功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement functions such as answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering the phone call through the Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现手机100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现手机100的显示功能。The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI) and so on. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the mobile phone 100. The processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the mobile phone 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为手机100充电,也可以用于手机100与外接设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他手机,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transfer data between the mobile phone 100 and an external device. It can also be used to connect headphones and play audio through the headphones. The interface can also be used to connect other mobile phones, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明, 并不构成对手机100的结构限定。在本申请另一些实施例中,手机100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic description, 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 use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过手机100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为手机供电。The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the mobile phone 100. While the charging management module 140 charges the battery 142, it can also supply power to the mobile phone through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, and the like. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. 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 also be set in the same device.
手机100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。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 and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。手机100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can 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.
移动通信模块150可以提供应用在手机100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the mobile phone 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. The mobile communication module 150 can receive the electromagnetic wave from the antenna 1 and filter, amplify, etc. the received electromagnetic wave, and transmit it to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it to electromagnetic wave radiation through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110, and may be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在手机100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个 或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area network (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellite system that are applied to the mobile phone 100 (global navigation system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives the electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it to electromagnetic waves through the antenna 2 to radiate it out.
例如,在本申请实施例中,手机100可以利用无线通信模块160,通过无线通信技术(如蓝牙),建立与外接设备建立无线连接。基于建立的无线连接,手机100可以向外接设备发送音频数据,还可以接收来自外接设备的音频数据。在本申请实施例中,处理器110还可以根据手机100与外接设备之间的链路的信道质量、待传输数据量等因素,自适应调整手机向外接设备发送音频数据时的传输的速率。For example, in the embodiment of the present application, the mobile phone 100 may use the wireless communication module 160 to establish a wireless connection with an external device through a wireless communication technology (such as Bluetooth). Based on the established wireless connection, the mobile phone 100 can send audio data to the external device and can also receive audio data from the external device. In the embodiment of the present application, the processor 110 may also adaptively adjust the transmission rate when the mobile phone sends audio data to the external device according to factors such as the channel quality of the link between the mobile phone 100 and the external device and the amount of data to be transmitted.
在一些实施例中,手机100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology. Wireless communication technology may include global mobile communication system (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long-term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM , And/or IR technology, etc. GNSS can include global positioning system (GPS), global navigation satellite system (global navigation system (GLONASS), Beidou satellite navigation system (beidou navigation, satellite system, BDS), quasi-zenith satellite system (quasi-zenith satellite system (QZSS) and/or satellite-based augmentation systems (SBAS).
手机100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The mobile phone 100 realizes a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can use a liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
手机100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The mobile phone 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP processes the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, the 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, which is converted into a visible image. ISP can also optimize the algorithm of image noise, brightness and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be set in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半 导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,手机100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In some embodiments, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当手机100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the mobile phone 100 is selected at a frequency point, the digital signal processor is used to perform Fourier transform on the energy at the frequency point.
视频编解码器用于对数字视频压缩或解压缩。手机100可以支持一种或多种视频编解码器。这样,手机100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。The video codec is used to compress or decompress digital video. The mobile phone 100 may support one or more video codecs. In this way, the mobile phone 100 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现手机100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information and can continue to self-learn. The NPU can realize applications such as intelligent recognition of the mobile phone 100, such as image recognition, face recognition, voice recognition, and text understanding.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机100的各种功能应用以及数据处理。例如,在本申请实施例中,处理器110可以通过执行存储在内部存储器121中的指令,通过无线通信模块160分别建立与外接设备的两个主体之间的无线配对连接,以及与外接设备进行短距离数据交换,以通过外接设备实现通话、播放音乐等功能。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer executable program code, and the executable program code includes instructions. The processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the mobile phone 100. For example, in the embodiment of the present application, the processor 110 may establish a wireless pairing connection with the two main bodies of the external device through the wireless communication module 160 by executing instructions stored in the internal memory 121, as well as with the external device. Short distance data exchange to realize functions such as calling and playing music through external equipment. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area may store an operating system, at least one function required application programs (such as sound playback function, image playback function, etc.). The storage data area may store data (such as audio data, phone book, etc.) created during the use of the mobile phone 100 and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
在本申请实施例中,手机100可以采用无线通信技术(如蓝牙)分别建立与外接设备两个主体之间的无线连接。例如,手机100线建立与第一主体之间的无线连接,而后通过第一主体建立手机100与第二主体之间的无线连接。在建立无线连接后,手机100可以将外接设备的蓝牙地址存储在内部存储器121中。在一些实施例中,当外接设备为包含两个主体的设备,如TWS耳机时,TWS耳机的左右耳塞分别有各自的蓝牙地址,手机100可以将TWS耳机的左右耳塞的蓝牙地址关联存储在内部存储器121中,以便将TWS耳机的左右耳塞作为一对设备使用。In the embodiment of the present application, the mobile phone 100 may use wireless communication technology (such as Bluetooth) to establish a wireless connection between the two main bodies of the external device. For example, the mobile phone 100 establishes a wireless connection with the first body, and then establishes a wireless connection between the mobile phone 100 and the second body through the first body. After the wireless connection is established, the mobile phone 100 can store the Bluetooth address of the external device in the internal memory 121. In some embodiments, when the external device is a device including two main bodies, such as a TWS headset, the left and right earbuds of the TWS headset have respective Bluetooth addresses, and the mobile phone 100 may store the Bluetooth addresses of the left and right earbuds of the TWS headset in the internal storage. In the memory 121, the left and right earplugs of the TWS earphone are used as a pair of devices.
手机100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The mobile phone 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频 输入转换为数字音频信号。音频模块170还可以包括编码器和解码器,用于对音频信号进行编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 170 may further include an encoder and a decoder for encoding and decoding audio signals. 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.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。手机100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The mobile phone 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当手机100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also known as "handset", is used to convert audio electrical signals into sound signals. When the mobile phone 100 answers a call or a voice message, the voice can be received by holding the receiver 170B close to the ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。手机100可以设置至少一个麦克风170C。在另一些实施例中,手机100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,手机100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also known as "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a person's mouth, and input a sound signal to the microphone 170C. The mobile phone 100 may be provided with at least one microphone 170C. In other embodiments, the mobile phone 100 may be provided with two microphones 170C. In addition to collecting sound signals, it may also achieve a noise reduction function. In other embodiments, the mobile phone 100 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动手机平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The headset interface 170D is used to connect wired headsets. The headphone jack 170D may be a USB jack 130, or a 3.5mm open mobile phone platform (OMTP) standard interface, and the American Telecommunications Industry Association (cellular telecommunication industry association of the USA, CTIA) standard interface.
在本申请实施例中,当手机100与外接设备,如TWS耳机建立了无线连接时,TWS耳机可以作为手机100的音频输入/输出设备使用。示例性的,音频模块170可以接收无线通信模块160传递的音频电信号,实现通过TWS耳机接听电话、播放音乐等功能。例如,在用户打电话的过程中,TWS耳机可以采集用户的声音信号,并转换为音频电信号后发送给手机100的无线通信模块160。无线通信模块160将该音频电信号传输给音频模块170。音频模块170可以将接收到的音频电信号转换为数字音频信号,并进行编码后传递至移动通信模块150。由移动通信模块150传输至通话对端设备,以实现通话。又例如,用户在使用手机100的媒体播放器播放音乐时,应用处理器可以将媒体播放器播放的音乐对应的音频电信号传输至音频模块170。由音频模块170将该音频电信号传输至无线通信模块160。无线通信模块160可以将音频电信号发送给TWS耳机,以便TWS耳机将该音频电信号转换为声音信号后播放。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 can be used as an audio input/output device of the mobile phone 100. Exemplarily, the audio module 170 may receive the audio electrical signal transmitted by the wireless communication module 160 to realize functions such as answering a phone call and playing music through a TWS headset. For example, during a user's phone call, the TWS headset can collect the user's voice signal, convert it into an audio electrical signal, and send it to the wireless communication module 160 of the mobile phone 100. The wireless communication module 160 transmits the audio electrical signal to the audio module 170. The audio module 170 can convert the received audio electrical signal into a digital audio signal, encode it, and pass it to the mobile communication module 150. It is transmitted by the mobile communication module 150 to the call peer device to realize the call. For another example, when the user uses the media player of the mobile phone 100 to play music, the application processor may transmit the audio electrical signal corresponding to the music played by the media player to the audio module 170. The audio electrical signal is transmitted to the wireless communication module 160 by the audio module 170. The wireless communication module 160 may send the audio electrical signal to the TWS headset, so that the TWS headset converts the audio electrical signal into a sound signal and plays it.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。手机100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,手机100根据压力传感器180A检测触摸操作强度。手机100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. The capacitive pressure sensor may be a parallel plate including at least two conductive materials. When force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The mobile phone 100 determines the strength of the pressure based on 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 mobile phone 100 may calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定手机100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定手机100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测手机100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消手机100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the movement posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the mobile phone 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shaking of the mobile phone 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,手机100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the mobile phone 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。手机100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当手机100是翻盖机时,手机100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The mobile phone 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the mobile phone 100 is a clamshell machine, the mobile phone 100 can detect the opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the holster or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测手机100在各个方向上(一般为三轴)加速度的大小。当手机100静止时可检测出重力的大小及方向。还可以用于识别手机姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used for recognizing the posture of mobile phones, and used in applications such as horizontal and vertical screen switching and pedometers.
距离传感器180F,用于测量距离。手机100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,手机100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The mobile phone 100 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the mobile phone 100 may use the distance sensor 180F to measure distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。手机100通过发光二极管向外发射红外光。手机100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定手机100附近有物体。当检测到不充分的反射光时,手机100可以确定手机100附近没有物体。手机100可以利用接近光传感器180G检测用户手持手机100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The mobile phone 100 emits infrared light outward through a light emitting diode. The mobile phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100. The mobile phone 100 can use the proximity light sensor 180G to detect that the user is holding the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。手机100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测手机100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the brightness of ambient light. The mobile phone 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in a pocket to prevent accidental touch.
指纹传感器180H用于采集指纹。手机100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The mobile phone 100 can use the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a picture of the fingerprint, and answer the call with the fingerprint.
温度传感器180J用于检测温度。在一些实施例中,手机100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,手机100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,手机100对电池142加热,以避免低温导致手机100异常关机。在其他一些实施例中,当温度低于又一阈值时,手机100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the mobile phone 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the mobile phone 100 performs to reduce the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the mobile phone 100 heats the battery 142 to avoid abnormal shutdown of the mobile phone 100 due to low temperature. In some other embodiments, when the temperature is below another threshold, the mobile phone 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用 处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the mobile phone 100, which is different from the location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal. In some embodiments, the bone conduction sensor 180M may also be provided in the earphone and combined into a bone conduction earphone. The audio module 170 can parse out the voice signal based on the vibration signal of the vibrating bone block of the voice part acquired by the bone conduction sensor 180M to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, and realize the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机100可以接收按键输入,产生与手机100的用户设置以及功能控制有关的键信号输入。The key 190 includes a power-on key, a volume key, and the like. The key 190 may be a mechanical key. It can also be a touch button. The mobile phone 100 can receive key input and generate key signal input related to user settings and function control of the mobile phone 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 may generate a vibration prompt. The motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, audio playback, etc.) may correspond to different vibration feedback effects. For the touch operation of different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminder, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. Touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the amount of power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机100的接触和分离。手机100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。手机100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,手机100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在手机100中,不能和手机100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the mobile phone 100. The mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 195 can insert multiple cards at the same time. The types of multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The mobile phone 100 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the mobile phone 100 uses eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.
示例性的,当外接设备02为TWS耳机时,图3A示出了一种TWS耳机的其中一个主体,即耳塞(左耳塞或右耳塞)的结构示意图。如图3A所示,TWS耳机的耳塞可以包括:处理器301、存储器302、传感器303、无线通信模块304、受话器305、麦克风306以及电源307。Exemplarily, when the external device 02 is a TWS earphone, FIG. 3A shows a structural diagram of an earplug (left earplug or right earplug), one of the main bodies of a TWS earphone. As shown in FIG. 3A, the earplug of the TWS earphone 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.
其中,存储器302可以用于存储应用程序代码,如用于与TWS耳机的另一只耳塞建立无线连接,以及使得耳塞与上述电子设备01进行配对连接的应用程序代码。The memory 302 may be used to store application code, such as an application code for establishing a wireless connection with another earbud of the TWS earphone and pairing the earbud with the electronic device 01.
处理器301可以控制执行上述应用程序代码,以实现本申请实施例中TWS耳机的耳塞的功能。例如,实现根据TWS耳机与电子设备之间的链路的信道质量、待传输数据量等因素,自适应调整TWS耳机向电子设备发送的音频数据的编码速率和传输速率的功能。The processor 301 can control and execute the above application program code to implement the function of the earplug of the TWS earphone in the embodiment of the present application. For example, according to the channel quality of the link between the TWS headset and the electronic device, the amount of data to be transmitted, and other factors, the function of adaptively adjusting the encoding rate and transmission rate of the audio data sent by the TWS headset to the electronic device.
存储器302中还可以存储有用于唯一标识该耳塞的蓝牙地址,以及存储有TWS耳机的另一只耳塞的蓝牙地址。另外,该存储器302中还可以存储有与该耳塞之前成 功配对过的电子设备01的配对历史。例如,该配对历史可以包括与该耳塞成功配对过的电子设备01的蓝牙地址。基于该配对历史,该耳塞能够自动回连至已配对的giant电子设备01。上述蓝牙地址可以为媒体访问控制(media access control,MAC)地址。The memory 302 may also store a Bluetooth address for uniquely identifying the earbud, and a Bluetooth address of another earbud where the TWS earphone is stored. In addition, the memory 302 may also store the pairing history of the electronic device 01 that has successfully paired with the earplug. For example, the pairing history may include the Bluetooth address of the electronic device 01 that has successfully paired with the earbud. Based on the pairing history, the earplug can be automatically connected back to the paired giant electronic device 01. The aforementioned Bluetooth address may be a media access control (media access control, MAC) address.
传感器303可以为距离传感器或接近光传感器。耳塞可以通过该传感器303确定是否被用户佩戴。例如,耳塞可以利用接近光传感器来检测耳塞附近是否有物体,从而确定耳塞是否被用户佩戴。在确定耳塞被佩戴时,耳塞可以打开受话器305。在一些实施例中,该耳塞还可以包括骨传导传感器,结合成骨传导耳机。利用该骨传导传感器,耳塞可以获取声部振动骨块的振动信号,解析出语音信号,实现语音功能。在另一些实施例中,该耳塞还可以包括触摸传感器,用于检测用户的触摸操作。在另一些实施例中,该耳塞还可以包括指纹传感器,用于检测用户指纹,识别用户身份等。在另一些实施例中,该耳塞还可以包括环境光传感器,可以根据感知的环境光的亮度,自适应调节一些参数,如音量大小。The sensor 303 may be a distance sensor or a proximity light sensor. The earplug can determine whether it is worn by the user through the sensor 303. For example, the earplug may use a proximity light sensor to detect whether there is an object near the earplug, thereby determining whether the earplug is worn by the user. When it is determined that the earplug is worn, the earplug may open the receiver 305. In some embodiments, the earplug may also include a bone conduction sensor, combined with a bone conduction earphone. Using the bone conduction sensor, the earplug can obtain the vibration signal of the vibrating bone mass of the voice part, analyze the voice signal, and realize the voice function. In some other embodiments, the earplug may further include a touch sensor for detecting the user's touch operation. In other embodiments, the earplug may further include a fingerprint sensor, which is used to detect a user's fingerprint and identify the user's identity. In other embodiments, the earplug may further include an ambient light sensor, which may adaptively adjust some parameters, such as volume, according to the perceived brightness of the ambient light.
无线通信模块304,用于支持当前耳塞与TWS耳机的另一只耳塞以及与各种电子设备01之间的无线数据交换。在一些实施例中,该无线通信模块304可以为蓝牙收发器。TWS耳机的耳塞可以通过该蓝牙收发器与上述电子设备01之间建立无线连接,以实现两者之间的短距离数据交换。例如,交换音频数据、交换控制数据等。The wireless communication module 304 is used to support wireless data exchange between the current earplug and another earplug of the TWS earphone and 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 a wireless connection with the electronic device 01 through the Bluetooth transceiver to achieve short-range data exchange between the two. For example, exchange audio data, exchange control data, etc.
音频模块300用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块300还可以包括编码器和解码器,用于对音频信号进行编码和解码。在一些实施例中,音频模块300可以设置于处理器301中,或将音频模块300的部分功能模块设置于处理器301中。The audio module 300 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 300 may further include an encoder and a decoder for encoding and decoding audio signals. In some embodiments, the audio module 300 may be disposed in the processor 301, or a part of the functional modules of the audio module 300 may be disposed in the processor 301.
至少一个受话器305,也可以称为“听筒”,可以用于将音频电信号转换成声音信号并播放。例如,当TWS耳机的耳塞作为上述电子设备01的音频输出设备时,受话器305可以将接收到的音频电信号转换为声音信号并播放。At least one receiver 305, which may also be referred to as an "earpiece," may be used to convert audio electrical signals into sound signals and play them. For example, when the earplug of the TWS earphone is used as the audio output device of the electronic device 01, the receiver 305 can convert the received audio electrical signal into a sound signal and play it.
至少一个麦克风306,也可以称为“话筒”,“传声器”,用于将声音信号转换为音频电信号。例如,当TWS耳机的耳塞作为上述电子设备01的音频输入设备时,在用户说话(如通话或发语音消息)的过程中,麦克风306可以采集用户的声音信号,并将其转换为音频电信号。上述音频电信号即为本申请实施例中的音频数据。At least one microphone 306, which may also be referred to as a "microphone" or a "microphone," is used to convert sound signals into audio electrical signals. For example, when the earplug of the TWS earphone is used as the audio input device of the electronic device 01, the microphone 306 can collect the user's voice signal and convert it into an audio electrical signal during the user's speech (such as talking or sending a voice message) . The above audio electrical signal is the audio data in the embodiment of the present application.
电源307,可以用于向TWS耳机的耳塞包含的各个部件供电。在一些实施例中,该电源307可以是电池,如可充电电池。The power supply 307 can be used to supply power to various components included in the earplugs of the TWS earphone. In some embodiments, the power source 307 may be a battery, such as a rechargeable battery.
通常,TWS耳机会配有一耳机盒(如,图3B中所示的耳机盒023)。该耳机盒可以用于收纳TWS耳机的左右耳塞。如结合图3A,如图3B所示,该耳机盒023可以用于收纳TWS耳机的左耳塞022和右耳塞021。在一些实施例中,该耳机盒023上可以设置有至少一个触摸控件024,可以用于触发TWS耳机与电子设备01重新配对等操作。该耳机盒023上还可以设置有充电口025,用于耳机盒自身进行充电。可以理解的是,该耳机盒023上还可以包括其他控件,此处不再一一说明。另外,该耳机盒023还可以为TWS耳机的左右耳塞充电。相应的,在一些实施例中,上述TWS耳机的耳塞还可以包括:输入/输出接口308。Generally, TWS earphones will be equipped with a headphone box (eg, headphone box 023 shown in FIG. 3B). The earphone box can be used to store the left and right earplugs of TWS earphones. As shown in FIG. 3B in combination with FIG. 3A, the earphone box 023 can be used to store the left earplug 022 and the right earplug 021 of the TWS earphone. In some embodiments, the headset box 023 may be provided with at least one touch control 024, which may be used to trigger operations such as re-pairing of the TWS headset and the electronic device 01. The earphone box 023 may also be provided with a charging port 025 for charging the earphone box itself. It can be understood that the earphone box 023 may further include other controls, which will not be described one by one here. In addition, the earphone box 023 can also charge the left and right earplugs of the TWS earphone. Correspondingly, in some embodiments, the earplugs of the TWS earphone may further include: an input/output interface 308.
输入/输出接口308可以用于提供TWS耳机的耳塞与耳机盒(如上述耳机盒023)之间的任何有线连接。在一些实施例中,输入/输出接口308可以为电连接器。当TWS 耳机的耳塞置于耳机盒中时,TWS耳机的耳塞可以通过该电连接器与耳机盒(如与耳机盒包括的输入/输出接口)电连接。在该电连接建立后,耳机盒可以为TWS耳机的耳塞的电源307充电。在该电连接建立后,TWS耳机的耳塞还可以与耳机盒进行数据通信。例如,TWS耳机的耳塞可以通过该电连接接收来自耳机盒的配对指令。该配对命令用于指示TWS耳机的耳塞打开无线通信模块304,从而使得TWS耳机的耳塞可以采用对应的无线通信协议(如蓝牙)与电子设备01进行配对连接。The input/output interface 308 can be used to provide any wired connection between the earplug of the TWS earphone and the earphone box (such as the earphone box 023 described above). In some embodiments, the input/output interface 308 may be an electrical connector. When the earplugs of the TWS earphone are placed in the earphone box, the earplugs of the TWS earphone can be electrically connected to the earphone box (such as the input/output interface included in the earphone box) through the electrical connector. After the electrical connection is established, the earphone box can charge the power supply 307 of the earplug of the TWS earphone. After the electrical connection is established, the earplugs of the TWS headset can also communicate with the headset box. For example, the earplugs of a TWS earphone can receive pairing instructions from the earphone box through this electrical connection. The pairing command is used to instruct the earbuds of the TWS headset to turn on the wireless communication module 304, so that the earbuds of the TWS headset can use the corresponding wireless communication protocol (such as Bluetooth) to pair and connect with the electronic device 01.
当然,上述TWS耳机的耳塞还可以不包括输入/输出接口308。在这种情况下,耳塞可以基于通过上述无线通信模块304与耳机盒建立的无线连接,实现充电或者数据通信功能。Of course, the earplugs of the aforementioned TWS earphones may not include the input/output interface 308. In this case, the earplug may implement charging or data communication functions based on the wireless connection established with the earphone box through the wireless communication module 304 described above.
另外,在一些实施例中,耳机盒(如上述耳机盒023)还可以包括处理器,存储器等部件。该存储器可以用于存储应用程序代码,并由耳机盒的处理器来控制执行,以实现耳机盒的功能。例如。当用户打开耳机盒的盒盖时,耳机盒的处理器通过执行存储在存储器中的应用程序代码,可以响应于用户打开盒盖的操作向TWS耳机的耳塞发送配对命令等。In addition, in some embodiments, the earphone box (such as the aforementioned earphone box 023) may further include a processor, a memory, and other components. The memory can be used to store application program code, and is controlled and executed by the processor of the earphone box to realize the function of the earphone box. E.g. When the user opens the lid of the earphone box, the processor of the earphone box can send a pairing command to the earplug of the TWS headset in response to the user's operation of opening the lid by executing the application code stored in the memory.
可以理解的是,本申请实施例示意的结构并不构成对TWS耳机的耳塞的具体限定。其可以具有比图3A中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。例如,该耳塞还可以包括指示灯309(可以指示耳塞的电量等状态)、显示屏310(可以提示用户相关信息)、防尘网(可以配合听筒使用)、马达等部件。图3A中所示出的各种部件可以在包括一个或多个信号处理或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the earplugs of the TWS earphone. It may have more or fewer components than shown in FIG. 3A, may combine two or more components, or may have different component configurations. For example, the earplug may also include an indicator light 309 (which can indicate the status of the earplug's power level, etc.), a display screen 310 (which can prompt the user about relevant information), a dust filter (which can be used with the earpiece), a motor, and other components. 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.
示例性的,图3C提供了一种耳塞的结构示意图,可以包括受话器305,麦克风306,输入/输出接口308,指示灯309、显示屏310,以及触摸键311和接近光传感器312等。该触摸键311与触摸传感器配合使用,用于触发暂停、播放、录音、开启MIC、关闭MIC等操作。Exemplarily, 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, and a touch key 311 and a proximity light sensor 312. The touch key 311 is used in conjunction with the touch sensor to trigger operations such as pause, play, record, turn on the MIC, and turn off the MIC.
需要说明的是,TWS耳机的左右耳塞的结构可以相同。例如,TWS耳机的左右耳塞可以都包括图3A中所示的部件。或者,TWS耳机的左右耳塞的结构也可以不同。例如,TWS耳机的一只耳塞(如右耳塞)可以包括图3A中所示的部件,而另一只耳塞(如左耳塞)可以包括图3A中除麦克风306之外的其他的部件。It should be noted that the structure of the left and right earplugs of the TWS earphone can be the same. For example, the left and right earplugs of a TWS earphone may include the components shown in FIG. 3A. Alternatively, the structure of the left and right earplugs of the TWS earphone may also be different. For example, one earplug (such as the right earplug) of the TWS earphone may include the components shown in FIG. 3A, and the other earplug (such as the left earplug) may include other components other than the microphone 306 in FIG. 3A.
还需要说明的是,图3A、图3B、图3C所示的结构仅为示例性说明,并不作为对TWS耳机和耳机盒结构或功能的限定。It should also be noted that the structures shown in FIGS. 3A, 3B, and 3C are only exemplary descriptions, and are not intended to limit the structure or function of the TWS earphone and earphone box.
本申请实施例将以手机为电子设备01,TWS耳机为外接设备02,手机和TWS耳机之间以蓝牙方式建立连接为例进行阐述。In this embodiment of the present application, the mobile phone is the electronic device 01, the TWS headset is the external device 02, and the connection between the mobile phone and the TWS headset is established by Bluetooth as an example.
TWS耳机可以通过与手机之间的蓝牙连接交互音频(audio)数据和控制数据(例如同步数据,链路配置参数,上一首、调高音量、暂停或接听控制指令等)。其中,该音频数据可以包括媒体(media)数据和语音(voice)数据等。例如,TWS耳机可以为用户播放音乐、录音、视频文件中的声音等媒体数据;在电话、音频通话、视频通话场景下,可以播放来电提示音、播放通话对端的语音数据,并采集用户的语音数据发送给手机;在游戏场景下,可以播放背景音乐、游戏提示音、队友的语音数据等,并采集用户的语音数据发送给手机;在微信语音消息场景下,可以播放语音消息,采 集用户录制的语音数据并发送给手机;在语音助手等场景下,可以采集用户的语音数据发送给手机。The TWS headset can interact with audio data and control data (such as synchronization data, link configuration parameters, previous track, volume up, pause or answer control commands, etc.) through the Bluetooth connection with the mobile phone. Wherein, the audio data may include media data and voice data. For example, TWS headsets can play media data such as music, recordings, and sounds in video files for users; in telephone, audio call, and video call scenarios, they can play incoming call notification sounds, play voice data of the opposite end of the call, and collect user voices Data is sent to the mobile phone; in the game scene, you can play background music, game prompts, teammates' voice data, etc., and collect the user's voice data to send to the mobile phone; in the WeChat voice message scene, you can play voice messages and collect user recordings And send the voice data to the mobile phone; in scenarios such as voice assistants, you can collect the user's voice data and send it to the mobile phone.
为了使音乐、电话、游戏等各种音频应用能够通过蓝牙技术实现,蓝牙设备之间需要遵循一定的蓝牙协议。图4示出了一种蓝牙系统示意图,可以包括应用、应用适配层、蓝牙主机(host)、主机控制器接口协议(host controller interface protocol,HCI)以及蓝牙控制器(controller)。其中,应用适配层可以用于适配不同应用和不同厂商的底层协议之间的对应关系。蓝牙主机可以包括应用规范(profile)、协议栈和速率控制单元等。其中,协议栈中可以包括服务发现协议(service discover protocol,SDP),profile的基础通用访问配置文件(general access profile,GAP)等协议。速率控制单元可以根据当前蓝牙设备与其他设备之间的链路的信道质量、待传输数据量等参数,自适应调整该蓝牙设备音频编码器的编码速率以及向其他设备发送的音频数据的传输速率。控制器可以包括链路层(link layer,LL),基带(baseband),以及无线射频(蓝牙射频)单元等。其中,LL负责管理蓝牙设备之间的通信,实现链路的建立、验证、链路配置等操作。基带主要进行射频信号与数字或语音信号的相互转化,实现基带协议和其它的底层连接规程。无线射频单元用于发射和接收蓝牙信号。控制器还可以用于检测蓝牙设备与其他设备之间的链路的信道质量。In order to enable various audio applications such as music, phone, games, etc. to be realized through Bluetooth technology, Bluetooth devices need to follow certain Bluetooth protocols. 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 (host controller interface (HCI), and a Bluetooth controller). Among them, the application adaptation layer can be used to adapt the correspondence between different applications and the underlying protocols of different manufacturers. The Bluetooth host may include an application profile, protocol stack, rate control unit, and so on. Among them, the protocol stack may include a service discovery protocol (service discovery protocol, SDP), a profile based general access profile (general access access profile, GAP) and other protocols. The rate control unit can adaptively adjust the encoding rate of the audio encoder of the Bluetooth device and the transmission rate of audio data sent to other devices according to the parameters such as the channel quality of the current link between the Bluetooth device and other devices, the amount of data to be transmitted, etc. . The controller may include a link layer (LL), a baseband, and a radio frequency (Bluetooth radio frequency) unit. Among them, LL is responsible for managing the communication between Bluetooth devices, to achieve link establishment, verification, link configuration and other operations. The baseband mainly performs mutual conversion between radio frequency signals and digital or voice signals to implement baseband protocols and other low-level connection procedures. The radio frequency unit is used to transmit and receive Bluetooth signals. The controller can also be used to detect the channel quality of the link between the Bluetooth device and other devices.
TWS耳机与手机之间的蓝牙连接方案可以包括监听方案、转发方案、近场磁感应(near field magnetic induction,NFMI)方案和双发方案(或称双连接方案)等。The Bluetooth connection scheme between the TWS headset and the mobile phone may include a monitoring scheme, a forwarding scheme, a near field magnetic induction (NFMI) scheme, and a dual-transmission scheme (or dual-connection scheme).
其中,在监听方案中,TWS耳机可以包括主耳塞和副耳塞,手机和主耳塞建立蓝牙连接,完成音频数据到主耳塞的发送,并完成手机和TWS耳机触发的业务动作(比如,播放、暂停、切换到上一首、调高音量等);双耳塞之间建立有蓝牙连接,完成双耳塞之间的信息同步;副耳塞通过监听主耳塞和手机之间的蓝牙链路获取音频数据。Among them, in the monitoring solution, the TWS headset may include a main earbud and a secondary earbud, the mobile phone establishes a Bluetooth connection with the main earbud, completes the transmission of audio data to the main earbud, and completes the business actions triggered by the mobile phone and the TWS headset (such as play, pause , Switch to the previous track, increase the volume, etc.); a Bluetooth connection is established between the two earbuds to complete the information synchronization between the two earbuds; the secondary earbuds obtain audio data by monitoring the Bluetooth link between the main earbuds and the mobile phone.
在转发方案中,TWS耳机可以包括主耳塞和副耳塞,手机和主耳塞之间建立蓝牙连接,完成音频数据到主耳塞的发送,并完成手机和TWS耳机触发的业务动作;双耳塞之间建立有蓝牙连接,完成双耳塞之间的信息同步,主耳塞通过与副耳塞之间的蓝牙链路向副耳塞转发音频数据。In the forwarding scheme, the TWS headset can include a main earbud and a secondary earbud, establish a Bluetooth connection between the mobile phone and the main earbud, complete the transmission of audio data to the main earbud, and complete the business action triggered by the mobile phone and the TWS headset; establish between the two earbuds There is a Bluetooth connection to complete the information synchronization between the dual earbuds, and the main earbuds forward the audio data to the secondary earbuds through the Bluetooth link with the secondary earbuds.
在NFMI方案中,TWS耳机可以包括主耳塞和副耳塞,手机和主耳塞之间建立蓝牙连接,完成音频数据到主耳塞的发送,并完成手机和TWS耳机触发的业务动作;双耳塞之间建立有NFMI连接,完成双耳塞之间的信息同步,主耳塞通过与副耳塞之间的NFMI链路向副耳塞转发音频数据。In the NFMI solution, the TWS headset can include a main earbud and a secondary earbud, a Bluetooth connection is established between the mobile phone and the main earbud, the audio data is sent to the main earbud, and the business action triggered by the mobile phone and the TWS headset is completed; the establishment between the double earbud There is NFMI connection to complete the information synchronization between the two earplugs. The main earplug forwards audio data to the secondary earplug through the NFMI link with the secondary earplug.
其中,在监听方案、转发方案和NFMI方案中,由于手机只与主耳塞之间建立了蓝牙连接,并与主耳塞之间交互音频数据;而手机并未与副耳塞之间建立蓝牙连接,且并不与副耳塞之间交互音频数据,因而这些连接方案也可以称为单发方案。Among them, in the monitoring scheme, forwarding scheme and NFMI scheme, because the mobile phone only establishes a Bluetooth connection with the main earbud and exchanges audio data with the main earbud; and the mobile phone does not establish a Bluetooth connection with the secondary earbud, and Audio data is not exchanged with the secondary earbuds, so these connection schemes can also be called single shot schemes.
在双发方案中,手机分别与TWS的两只耳塞建立蓝牙连接,从而分别通过与TWS的两只耳塞之间的蓝牙链路交互音频数据、业务控制数据等,实现音频数据播放和业务动作控制等操作。TWS的两只耳塞之间可以保持无线连接,也可以断开无线连接。In the dual-send solution, the mobile phone establishes a Bluetooth connection with the two earplugs of TWS respectively, so as to exchange audio data and business control data through the Bluetooth link between the two earplugs of TWS, respectively, to achieve audio data playback and business action control And other operations. The wireless connection between the two earplugs of TWS can be maintained or disconnected.
在建立手机与TWS耳机之间的蓝牙连接后,手机和TWS耳机之间可以交互音频数据。After the Bluetooth connection between the mobile phone and the TWS headset is established, audio data can be exchanged between the mobile phone and the TWS headset.
示例性的,音频数据从源端(source)到目的端(sink)的音频传输流程可以参见 图5。由图5可知,源端将应用(application,APP)中的音频数据通过音频管理模块(例如安卓系统中的音频服务AudioFlinger)进行解码,获取硬件设备的配置信息、设置音频参数等;解码后的数据进入缓冲区(buffer)1进行缓冲;音频编码器(audio encoder)从缓冲区1中获取音频数据并进行编码;编码后的音频数据进入缓冲区2进行缓冲,该缓冲区2可以称为待传输数据缓冲区;缓冲区2中的音频数据通过与目的端之间的信道发送给目的端。目的端将从源端接收到的音频数据缓冲于缓冲区3中;音频解码器(audio decoder)从缓冲区3中获取音频数据并进行解码;解码后的音频数据在缓冲区4中缓冲;编解码器codec将缓冲区4中的数据送到扬声器进行播放。Exemplarily, the audio transmission process of audio data from the source to the sink can be seen in FIG. 5. It can be seen from FIG. 5 that the source decodes the audio data in the application (application, APP) through the audio management module (such as the audio service AudioFlinger in the Android system) to obtain the configuration information of the hardware device, set the audio parameters, etc.; after decoding The data enters buffer 1 for buffering; the audio encoder obtains audio data from buffer 1 and encodes it; the encoded audio data enters buffer 2 for buffering, which can be called Transmission data buffer; audio data in buffer 2 is sent to the destination through the channel with the destination. The destination end buffers the audio data received from the source end in the buffer 3; the audio decoder (audio decoder) takes the audio data from the buffer 3 and decodes it; the decoded audio data is buffered in the buffer 4; The decoder codec sends the data in the buffer 4 to the speaker for playback.
在本申请的实施例中,源端和目的端之间的传输通道可以包括低功耗异步连接链路LE ACL(以下实施例中也称LE ACL连接、LE ACL链路或LE ACL连接链路)和基于连接的等时音频流(connected isochronous stream,CIS)连接链路(以下实施例中也称CIS链路或CIS连接)。其中,LE ACL链路可以用于传输控制数据,CIS链路可以用于传输音频数据和应答信息。CIS是基于BLE的点对多点的等时(isochronous,ISO)同步传输机制。In the embodiments of the present application, the transmission channel between the source end and the destination end may include a low-power asynchronous connection link LEACL (also referred to as LE ACL connection, LE ACL connection, or LE ACL connection link in the following embodiments) ) And a connection-based isochronous audio stream (connected isochronous stream, CIS) connection link (also referred to as CIS link or CIS connection in the following embodiments). Among them, the LEACL link can be used to transmit control data, and the CIS link can be used to transmit audio data and response information. CIS is a point-to-multipoint isochronous (ISO) synchronous transmission mechanism based on BLE.
在建立LE ACL连接链路和CIS连接链路后,LE ACL连接链路和CIS连接链路是独立存在,独立发送数据。LE ACL连接链路上和CIS连接链路上可以同时发送数据。这里的同时发送数据并不是限定LE ACL连接链路和CIS连接链路在发送数据时的时间同步,而是指在LE ACL连接链路上发送数据和在CIS连接链路上发送数据可以并发进行。After establishing the LEACL connection link and the CIS connection link, the LEACL connection link and the CIS connection link exist independently and send data independently. Data can be sent simultaneously on the LEACL connection link and the CIS connection link. Sending data at the same time here does not limit the time synchronization of the LEACL connection link and the CIS connection link when sending data, but means that sending data on the LEACL connection link and sending data on the CIS connection link can be performed concurrently .
在音频数据从源端到目的端的传输过程中,传输通道的信道质量、待传输数据量等不同,音频数据的编码速率和传输速率也不同。本申请实施例提供的技术方案可以在不中断数据传输,不断开CIS链路的情况下,自动根据传输通道的信道质量、待传输数据量等因素动态地、自适应调整音频数据的编码速率和传输速率,因而可以使得用户对编码速率和传输速率的调整过程无感知;而不需要在调整编码速率和传输速率时,断开源端和目的端之间的CIS链路,重新配置好相关参数后,再重新发起CIS链路的连接。During the transmission of audio data from the source to the destination, the channel quality of the transmission channel and the amount of data to be transmitted are different, and the encoding rate and transmission rate of the audio data are also different. The technical solution provided by the embodiments of the present application can automatically and adaptively adjust the audio data encoding rate and the audio data according to factors such as the channel quality of the transmission channel and the amount of data to be transmitted without interrupting the data transmission and disconnecting the CIS link. The transmission rate, so that users can be unaware of the adjustment process of the encoding rate and the transmission rate; there is no need to disconnect the CIS link between the source end and the destination end when adjusting the encoding rate and the transmission rate, and reconfigure the relevant parameters , And then re-initiate the CIS link connection.
其中,编码速率可以理解为图5中的音频编码器的编码速率。音频数据的传输速率可以理解为单位时间内从源端发送到目的端的音频数据的数据量。提高传输速率是指,提高单位时间内从源端发送到目的端的音频数据的数据量;降低传输速率是指,减小单位时间内从源端发送到目的端的音频数据的数据量。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 amount of audio data sent from the source end to the destination end per unit time. Increasing the transmission rate refers to increasing the amount of audio data sent from the source to the destination in a unit time; decreasing the transmission rate refers to reducing the amount of audio data sent from the source to the destination in a unit time.
具体的,在信道质量较差时,可以降低编码速率和传输速率,确保有足够多的重传时隙,以提高传输性能;在信道质量较好时,可以提高编码速率和传输速率,以提升音频质量;从而可以使得编码速率和传输速率与信道质量状况相匹配,兼顾传输性能和音频质量,达到传输性能和音频质量的自适应平衡,保证音频数据连续传输和播放。Specifically, when the channel quality is poor, the coding rate and transmission rate can be reduced to ensure that there are enough retransmission time slots to improve transmission performance; when the channel quality is good, the coding rate and transmission rate can be increased to improve Audio quality; thus, the coding rate and transmission rate can be matched with the channel quality status, taking into account the transmission performance and audio quality, to achieve an adaptive balance between transmission performance and audio quality, and to ensure continuous transmission and playback of audio data.
在一种实施方案中,在信道质量较差时,可以先降低编码速率,再降低传输速率;在信道质量较好时,可以先提高传输速率,再降低编码速率;这样可以使得在编码速率和传输速率调整前后,均有足够的传输能力来传输编码后的音频数据。In one embodiment, when the channel quality is poor, the coding rate can be reduced first, and then the transmission rate can be reduced; when the channel quality is good, the transmission rate can be increased first, and then the coding rate is reduced; this can make the coding rate and Before and after the transmission rate adjustment, there is sufficient transmission capacity to transmit the encoded audio data.
本申请以下实施例以手机和TWS耳机之间建立有双连接,手机(即第一BLE蓝 牙设备)为音频数据的源端,TWS耳机的第一耳塞(即第二BLE蓝牙设备,可以是TWS耳机的任意一只耳塞)为音频数据的目的端为例,对本申请实施例提供的速率控制方法进行说明。In the following embodiments of the present application, a dual connection is established between a mobile phone and a TWS headset, the mobile phone (ie, the first BLE Bluetooth device) is the source end of audio data, and the first earbud of the TWS headset (ie, the second BLE Bluetooth device may be TWS Any earplug of the earphone is an example of the destination end of the audio data, and the rate control method provided in the embodiment of the present application will be described.
在该方法中,在使用第一耳塞时,手机可以配置有编码参数(即第一编码参数),手机的音频编码器根据已配置的编码参数进行编码,获得编码后的音频数据。手机将编码参数通过音频数据包发送给第一耳塞,以使得第一耳塞可以根据编码参数进行解码。In this method, when the first earplug is used, the mobile phone may be configured with encoding parameters (ie, the first encoding parameter), and the audio encoder of the mobile phone encodes according to the configured encoding parameters to obtain encoded audio data. The mobile phone sends the encoding parameter to the first earplug through an audio data packet, so that the first earplug can decode according to the encoding parameter.
并且,在使用第一耳塞时,手机和第一耳塞可以通过LE ACL链路协商CIS链路的传输参数(即第一传输参数),根据该传输参数建立CIS链路。示例性的,该传输参数的协商过程可以参见图6。如图6所示,手机可以设置CIS组(CIS group,CIG)参数并启用与第一耳塞之间的CIS。该过程可以包括,601、手机中的蓝牙主机host向手机中的蓝牙控制器中的链路层LL发送CIG参数设置信息(例如LE Set CIG parameters消息),从而向手机LL传递传输参数(即第一传输参数)。602、手机LL向手机host回复第一确认信息(例如command complete消息)。603、手机host向手机LL发送创建CIS信息(例如LE Create CIS消息)。604、手机LL向手机host回复第二确认信息(例如HCI Command status消息)。605、手机LL向第一耳塞中的蓝牙控制器中的链路层LL发送携带有该传输参数的CIS连接请求信息(例如LL_CIS_REQ消息),以请求根据该传输参数建立CIS连接。606、第一耳塞LL向第一耳塞中的蓝牙主机host发送CIS连接请求信息(例如LE CIS Request消息)。607、第一耳塞host向第一耳塞LL回复接受CIS连接信息(例如LE Accept CIS消息)。608、第一耳塞LL向第一耳塞host回复第三确认信息(例如HCI Command status消息)。609、第一耳塞LL在第一耳塞host确认后,向手机LL发送CIS连接响应信息(例如LL_CIS_RSP消息)。610、手机LL向第一耳塞LL发送第四确认信息(例如LL_CIS_IND消息)。611、手机LL向手机host发送CIS连接已建立信息(例如LE CIS Established消息)。至此,手机和第一耳塞之间建立了CIS连接链路。Moreover, when the first earplug is used, the mobile phone and the first earplug can negotiate the transmission parameter of the CIS link (ie, the first transmission parameter) through the LEACL link, and establish the CIS link according to the transmission parameter. Exemplarily, the negotiation process of the transmission parameter can be referred to FIG. 6. As shown in FIG. 6, the mobile phone can set CIS group (CIS) parameters and enable CIS between the first earplug. The process may include 601. The Bluetooth host host in the mobile phone sends CIG parameter setting information (such as LE Set CIG parameters messages) to the link layer LL in the Bluetooth controller in the mobile phone, thereby transmitting the transmission parameters to the mobile phone LL (that is, the first A transmission parameter). 602. The mobile phone LL replies to the mobile phone host with the first confirmation information (for example, the command complete message). 603. The mobile phone host sends CIS creation information (such as LE Create CIS message) to the mobile phone LL. 604. The mobile phone LL replies to the mobile phone host with the second confirmation information (for example, HCI Command status message). 605. The mobile phone LL sends CIS connection request information (for example, LL_CIS_REQ message) carrying the transmission parameter to the link layer LL in the Bluetooth controller in the first earbud to request to establish a CIS connection according to the transmission parameter. 606. The first earplug LL sends CIS connection request information (for example, LECIS request message) to the Bluetooth host host in the first earplug. 607. The first earplug host replies to the first earplug LL to accept the CIS connection information (for example, LE Accept CIS message). 608. The first earplug LL replies to the first earplug host with third confirmation information (for example, HCI Command status message). 609. After the first earplug host confirms, the first earplug LL sends CIS connection response information (for example, LL_CIS_RSP message) to the mobile phone LL. 610. The mobile phone LL sends fourth confirmation information (eg, LL_CIS_IND message) to the first earplug LL. 611. The mobile phone LL sends the CIS connection established information to the mobile phone host (for example, LE CIS Established message). So far, the CIS connection link has been established between the mobile phone and the first earbud.
在CIS链路建立后,手机可以根据已配置的传输参数,通过CIS链路向第一耳塞发送音频编码器编码后的音频数据。第一耳塞可以根据已配置的传输参数,通过CIS链路接收手机发送的音频数据并回复应答信息(例如,肯定应答ACK消息、否定应答NACK消息、丢失MISSING消息等)。后续,手机还可以根据参考参数确定新的编码参数(即第二编码参数),新的编码参数与之前的编码参数不同,根据新的编码参数对音频数据进行编码,从而提高或降低编码速率。并且,在手机通过CIS链路向第一耳塞发送音频数据的同时,手机和第一耳塞还可以通过LE ACL链路,根据参考参数协商新的传输参数(即第二传输参数),新的传输参数与之前的传输参数不同,以通过新的传输参数提高音频数据的传输速率或降低音频数据的传输速率。手机和第一耳塞可以在协商好新的传输参数后,可以自动启动新的传输参数;或者,手机和第一耳塞还可以协商更新时刻,手机和第一耳塞在更新时刻启用CIS链路的新的传输参数。后续,手机根据新的传输参数,通过CIS链路向第一耳塞发送音频数据,第一耳塞根据新的传输参数,通过CIS链路接收手机发送的音频数据。也就是说,手机和第一耳塞可以在不断开CIS连接的情况下更新CIS传输参数,从而采用更新后的传输参数传 输音频数据。After the CIS link is established, the mobile phone can send the audio data encoded by the audio encoder to the first earbud through the CIS link according to the configured transmission parameters. The first earplug can receive the audio data sent by the mobile phone through the CIS link according to the configured transmission parameters and reply to the response information (for example, a positive response ACK message, a negative response NACK message, a missing MISSING message, etc.). Subsequently, the mobile phone can also determine a new encoding parameter (ie, the second encoding parameter) according to the reference parameter. The new encoding parameter is different from the previous encoding parameter, and the audio data is encoded according to the new encoding parameter, thereby increasing or decreasing the encoding rate. And, while the mobile phone sends audio data to the first earbud through the CIS link, the mobile phone and the first earbud can also negotiate a new transmission parameter (ie, the second transmission parameter) according to the reference parameter through the LE ACL link, and the new transmission The parameters are different from the previous transmission parameters in order to increase the transmission rate of audio data or reduce the transmission rate of audio data through the new transmission parameters. The mobile phone and the first earplug can automatically start new transmission parameters after negotiating new transmission parameters; or, the mobile phone and the first earplug can also negotiate the update time, and the mobile phone and the first earplug enable the new CIS link at the update time Transmission parameters. Subsequently, the mobile phone sends audio data to the first earplug through the CIS link according to the new transmission parameter, and the first earplug receives audio data sent from the mobile phone through the CIS link according to the new transmission parameter. In other words, the mobile phone and the first earplug can update the CIS transmission parameters without disconnecting the CIS, so that the updated transmission parameters are used to transmit audio data.
其中,该参考参数可以包括信道质量参数,信道质量参数用于表示信道质量的好坏。例如,信道质量参数可以包括:丢包率(packet loss rate,PLR)、误包率(packet error rate,PER)、信噪比(signal noise ratio,SNR)、信号干扰比(signal to interference ratio,SIR)、接收的信号强度指示(received signal strength indication,RSSI)、信道质量指示(channel quality indicator,CQI)、循环冗余校验(cyclic redundancy check,CRC)以及服务质量(quality of service,Qos)参数等中的一种或多种。其中,Qos参数可以包括重传率、抖动、时延、吞吐量、可用性等参数中的一种或多种。The reference parameter may include a channel quality parameter, and the channel quality parameter is used to indicate whether the channel quality is good or bad. For example, the channel quality parameters may include: packet loss rate (PLR), packet error rate (PER), signal-to-noise ratio (SNR), signal-to-interference ratio (signal to interference), SIR), received signal strength indication (RSSI), channel quality indication (channel quality indicator (CQI), cyclic redundancy check (cyclic redundancy check, CRC), and service quality (quality of service, Qos) One or more of the parameters, etc. The Qos parameters may include one or more of parameters such as retransmission rate, jitter, delay, throughput, and availability.
音频数据的编码器可以有多种,例如子带编码(sub-band coding,SBC)器、高级音频编码(advanced audio coding,AAC)器、aptX编码器、aptX LL(低时延aptX)编码器、aptX HD(高音质aptX)编码器、LDAC编码器、HWA编码器以及HWA LL(低时延HWA)编码器等。其中,编码器不同,影响编码速率的编码参数也不同。例如,在一种SBC编码器中,编码参数可以包括bitpool值、块长度(block length)、子带数(subbands)、通道数、采样率、帧长度(frame length)和分配方式(allocation method)中的一个或多个。再例如,在一种AAC编码器中,编码参数可以包括采样率,通道数等参数。There can be a variety of audio data encoders, such as sub-band coding (SBC), advanced audio coding (AAC), aptX encoder, aptX LL (low latency aptX) encoder , AptX HD (high sound quality aptX) encoder, LDAC encoder, HWA encoder and HWA LL (low latency HWA) encoder, etc. Among them, different encoders have different encoding parameters that affect the encoding rate. For example, in an SBC encoder, the encoding parameters may include bitpool value, block length (length), subbands (subbands), number of channels, sampling rate, frame length (frame length) and allocation method (allocation method) One or more of them. For another example, in an AAC encoder, the encoding parameters may include parameters such as sampling rate and number of channels.
另外,在SBC、AAC等编码器中,编码速率还可以与编码带宽有关。当减小编码带宽(例如编码带宽从80Hz-20kHz减小为80Hz-10kHz)时,也可以提高编码速率。例如,在SBC编码器中,当减少子带数时,可以提高编码速率。当增大编码带宽(例如编码带宽从80Hz-10kHz扩展为80Hz-20kHz)时,也可以降低编码速率。例如,在SBC编码器中,当增加子带数时,可以降低编码速率。In addition, in encoders such as SBC and AAC, the encoding rate can also be related to the encoding bandwidth. When the encoding bandwidth is reduced (for example, the encoding bandwidth is reduced from 80 Hz to 20 kHz to 80 Hz to 10 kHz), the encoding rate can also be increased. For example, in an SBC encoder, when the number of subbands is reduced, the encoding rate can be increased. When the encoding bandwidth is increased (for example, the encoding bandwidth is extended from 80 Hz to 10 kHz to 80 Hz to 20 kHz), the encoding rate can also be reduced. For example, in an SBC encoder, when the number of subbands is increased, the coding rate can be reduced.
本申请以下实施例主要以SBC编码器为例进行说明。The following embodiments of the present application mainly use the SBC encoder as an example for description.
在SBC编码中,一种编码速率的计算方式可以为:编码速率即单位时间内的编码比特率=8*帧长度*采样率/子带数目/块长度;其中,帧长度=4+(4*子带数*通道数)/8+ceiling(块长度*通道数*bitpool值/8),ceiling表示向上取整。在该种编码器中,可以通过调整bitpool值、块长度、子带数、通道数、采样率、帧长度中的一种或多种,来提高或降低编码速率。例如,当需要提高编码速率时,手机可以增大bitpool值、采样率或通道数中的一个或多个;当需要降低编码速率时,手机可以降低bitpool值、采样率或通道数中的一个或多个。其中,通道模式(例如单声道(mono)、双声道或联合立体声(joint stereo))不同,帧长度的计算方式不同,对应的编码速率也不同。并且,不同音质(例如中音质或高音质)对应的编码参数也不同。示例性的,不同音质与编码参数的一种对应关系可以参见表1。In SBC coding, a calculation method of the coding rate may be: the coding rate is the coding bit rate per unit time = 8 * frame length * sampling rate / number of subbands / block length; where, frame length = 4 + (4 *Number of subbands*Number of channels)/8+ceiling(Block length*Number of channels*bitpool value/8), ceiling means rounding up. In this type of encoder, one or more of bitpool value, block length, number of subbands, number of channels, sampling rate, and frame length can be adjusted to increase or decrease the encoding rate. For example, when the encoding rate needs to be increased, the mobile phone can increase one or more of the bitpool value, sampling rate, or channel number; when the encoding rate needs to be reduced, the mobile phone can reduce one of the bitpool value, sampling rate, or channel number or Multiple. Among them, the channel mode (for example, mono, two-channel or joint stereo) is different, the calculation method of the frame length is different, and the corresponding coding rate is also different. Moreover, the encoding parameters corresponding to different sound qualities (for example, middle sound qualities or high sound qualities) are also different. Exemplarily, a correspondence between different sound quality and encoding parameters can be referred to Table 1.
表1Table 1
Figure PCTCN2018122959-appb-000001
Figure PCTCN2018122959-appb-000001
Figure PCTCN2018122959-appb-000002
Figure PCTCN2018122959-appb-000002
影响传输速率的传输参数可以有多种,通过调整传输参数可以提高或者降低传输速率。例如,该传输参数可以包括突发数量(burst number,BN)、子事件数量(number of subevent,NSE)、刷新超时(flush timeout,FT)、子事件时长(subevent duration)以及PHY类型等中的一种或多种。在时域上,音频数据可以在ISO间隔(iso inteval)内进行传输。其中,NSE表示一个ISO间隔内子事件的数量;BN表示每个ISO间隔内最大承载的突发(burst)的数量,突发的内容为有效载荷;子事件时长表示每个子事件(subevent)的时间,突发在子事件时长内传输,子事件时长取决于有效载荷(payload)的大小(size);FT以ISO间隔为单位,表示一个突发最多可以在几个ISO间隔内传输;PHY类型可以包括传输的带宽、调制方式等空口参数。在一个子事件时长内,手机可以发送一个突发并接收来自第一耳塞的应答信息,该突发为有效载荷,该有效载荷为音频数据。There may be 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 parameters may include burst number (BN), number of subevents (number of subevents, NSE), flush timeout (flush timeout, FT), subevent duration (subevent duration), PHY type, etc. One or more. In the time domain, audio data can be transmitted within the ISO interval (iso). Among them, NSE represents the number of sub-events in an ISO interval; BN represents the maximum number of bursts carried in each ISO interval, the content of the burst is the payload; the duration of the sub-event represents the time of each sub-event (subevent) , The burst is transmitted within the duration of the sub-event, the duration of the sub-event depends on the size of the payload (payload); FT takes the ISO interval as a unit, indicating that a burst can be transmitted within a few ISO intervals at most; the PHY type can Including air interface parameters such as transmission bandwidth and modulation method. Within the duration of a sub-event, the mobile phone can send a burst and receive response information from the first earplug, the burst is a payload, and the payload is audio data.
示例性的,当BN=2,NSE=4,FT=1时,一种数据传输示意图可以参见图7。其中,NSE=4表示每个ISO间隔内包括4个子事件时长;BN=2表示每个ISO间隔内最大承载2个突发,即2个有效载荷;FT=1表示一个突发最多可以在1个ISO间隔内传输。在有效载荷k的刷新点,不论该有效载荷k是否被目的端成功接收到,均停止传输该有效载荷k,并开始传输有效载荷k+1。对于BN等于1的情况,有效载荷的刷新点在ISO间隔的终点。对于BN大于1的情况,对于一个ISO间隔中的第一个有效载荷对应的数据包,其刷新点位于,该ISO间隔的起点之后,第N个子事件的终点;其中,N=FLOOR(NSE/BN)+MOD(NSE,BN)。对于一个ISO间隔中的第i个有效载荷对应的数据包,其刷新点位于,该ISO间隔内,第一个有效载荷对应的数据包的刷新点之后,第M个子事件的终点;其中,M=FLOOR(NSE/BN)*(i–1)。FLOOR表示向下取整,FLOOR(NSE/BN)表示NSE除以BN的商向下取整的值,MOD(NSE,BN)表示NSE对BN取余。Exemplarily, when BN=2, NSE=4, and FT=1, a schematic diagram of data transmission may refer to FIG. 7. Among them, NSE = 4 means that each ISO interval includes 4 sub-event durations; BN = 2 means that each ISO interval carries a maximum of 2 bursts, that is, 2 payloads; FT = 1 means that a burst can be up to 1 Transmit within an ISO interval. At the refresh point of the payload k, regardless of whether the payload k is successfully received by the destination, the transmission of the payload k is stopped and the transmission of the payload k+1 is started. For the case where BN is equal to 1, the refresh point of the payload is at the end of the ISO interval. For the case where BN is greater than 1, the refresh point of the data packet corresponding to the first payload in an ISO interval is located at the end of the Nth sub-event after the start of the ISO interval; where N=FLOOR(NSE/ BN)+MOD(NSE, BN). For the data packet corresponding to the i-th payload in an ISO interval, the refresh point is located within the ISO interval, after the refresh point of the data packet corresponding to the first payload, the end point of the Mth sub-event; where, M =FLOOR(NSE/BN)*(i-1). FLOOR indicates rounding down, FLOOR(NSE/BN) indicates the value of the quotient of NSE divided by BN rounding down, and MOD(NSE, BN) indicates that NSE takes the balance of BN.
具体的,如果根据信道质量参数确定信道质量较差,则手机可以通过调整编码参数来降低编码速率,手机和第一耳塞可以通过调整传输参数来降低传输速率,以提高传输性能;如果根据信道质量参数确定信道质量较好,则手机和第一耳塞可以通过调整传输参数来提高传输速率,手机可以通过调整编码参数来提高编码速率。Specifically, if it is determined that the channel quality is poor according to the channel quality parameter, the mobile phone can reduce the coding rate by adjusting the encoding parameter, and the mobile phone and the first earbud can reduce the transmission rate by adjusting the transmission parameter to improve the transmission performance; if according to the channel quality If the parameter determines that the channel quality is good, the mobile phone and the first earplug can adjust the transmission parameters to increase the transmission rate, and the mobile phone can adjust the coding parameters to increase the coding rate.
也就是说,在调整编码参数和传输参数从而调整编码速率和传输速率时,新的编码参数可以是由手机确定的,手机可以将新的编码参数通过音频数据包发送给第一耳塞,以使得第一耳塞可以根据新的编码参数进行解码;新的传输参数可以是由手机和第一耳塞协商的。That is to say, when adjusting the encoding parameters and transmission parameters to adjust the encoding rate and 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 earplug through the audio data packet, so that The first earplug can be decoded according to the new encoding parameter; the new transmission parameter can be negotiated between the mobile phone and the first earplug.
其中,具体应用场景不同,调整编码参数和传输参数的先后顺序不同,具体的调 整方式也可以不同。以下针对不同场景分别进行说明。Among them, the specific application scenarios are different, the order of adjusting the coding parameters and the transmission parameters is different, and the specific adjustment methods may also be different. The following describes each scenario separately.
场景1、信道质量较好时,先提高传输速率,再提高编码速率。 Scenario 1. When the channel quality is good, first increase the transmission rate and then increase the coding rate.
在该场景中,手机和第一耳塞可以先协商新的传输参数,以提高传输速率;而后,手机再确定新的编码参数,以提高编码速率。In this scenario, the mobile phone and the first earbud can first negotiate new transmission parameters to increase the transmission rate; then, the mobile phone determines new coding parameters to increase the coding rate.
在一种情况下,手机可以主动发起对传输速率的调整。In one case, the mobile phone can actively initiate the adjustment of the transmission rate.
例如,在一实施例中,手机进行信道质量监测,并根据信道质量参数发起对传输速率的调整。若手机通过信道质量监测,确定信道质量参数满足第一预设条件,则可以表明信道质量较好,因而手机可以发起新的传输参数和更新时刻的协商,以提高传输速率。手机和第一耳塞在更新时刻启用新的传输参数,而后根据新的传输参数在CIS链路上交互数据(例如音频数据和应答信息等)。For example, in an embodiment, the mobile phone performs channel quality monitoring and initiates adjustment of the transmission rate according to the channel quality parameters. If the mobile phone determines that the channel quality parameter satisfies the first preset condition through channel quality monitoring, it can indicate that the channel quality is good, so the mobile phone can initiate negotiation of new transmission parameters and update time to increase the transmission rate. The mobile phone and the first earbud enable new transmission parameters at the moment of update, and then exchange data (such as audio data and response information, etc.) on the CIS link according to the new transmission parameters.
在该实施例的一种实施方案中,第一预设条件为信道质量参数优于预设值。例如,信道质量参数包括丢包率,第一预设条件为丢包率小于或者等于预设值1。再例如,信道质量参数包括丢包率和误包率,第一预设条件为丢包率小于或者等于预设值1,且误包率小于或者等于预设值2。再例如,信道质量参数包括信噪比,第一预设条件为信噪比大于或者等于预设值3(即第一预设值)。In an implementation of this embodiment, the first preset condition is that the channel quality parameter is better than a preset value. For example, the channel quality parameter includes a packet loss rate, and the first preset condition is that the packet loss rate is less than or equal to a preset value of 1. For another example, the channel quality parameters include a packet loss rate and a packet error rate. The first preset condition is that the packet loss rate is less than or equal to the preset value 1, and the packet error rate is less than or equal to the 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 (that is, a first preset value).
在该实施例的另一种实施方案中,第一预设条件为信道质量参数变优。例如,信道质量参数包括CQI,第一预设条件为CQI增大。再例如,信道质量参数包括信号干扰比,第一预设条件为信号干扰比增大的幅度大于或者等于预设值4。再例如,信道质量参数包括CQI和抖动,第一预设条件为CQI增大的幅度大于或者等于预设值5,抖动减小的幅度大于或者等于预设值6。In another implementation of this embodiment, the first preset condition is that the channel quality parameter is optimized. For example, the channel quality parameter includes CQI, and the first preset condition is that CQI increases. For another example, the channel quality parameter includes a signal-to-interference ratio, and the first preset condition is that the amplitude of the increase in the signal-to-interference ratio is greater than or equal to the preset value 4. For another example, the channel quality parameters include CQI and jitter. The first preset condition is that the magnitude of the increase in CQI is greater than or equal to the preset value 5, and the magnitude of the decrease in jitter is greater than or equal to the preset value 6.
在一种方案中,若之前的信道质量参数和当前的信道质量参数都优于预设值,且当前的信道质量参数比之前的信道质量参数优化的程度(比如两者的差值)超过了调整阈值,则调整编码参数和传输参数以提高传输速率和编码速率;若当前的信道质量参数比之前的信道质量参数优化的程度没有超过调整阈值,则不提高传输速率和编码速率。若当前的信道质量参数差于预设值,但当前的信道质量参数比之前的信道质量参数优化的程度(比如两者的差值)超过了调整阈值,则调整编码参数和传输参数以提高传输速率和编码参数。In a solution, if the previous channel quality parameter and the current channel quality parameter are both better than the preset value, and the current channel quality parameter is more optimized than the previous channel quality parameter (such as the difference between the two) exceeds To adjust the threshold, the coding parameters and transmission parameters are adjusted to increase the transmission rate and the coding rate; if the current channel quality parameter is not more optimized than the previous channel quality parameter, the transmission rate and 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 optimized than the previous channel quality parameter (such as the difference between the two) exceeds the adjustment threshold, then adjust the coding parameters and transmission parameters to improve transmission Rate and encoding parameters.
在该实施例的又一种实施方案中,信道质量参数包括多个,每个信道质量参数对应有各自的权重,第一预设条件为,信道质量参数的总分大于或者等于预设值0。示例性的,信道质量参数的分值情况可以参见如下表2。若预设值0为0.6,当前总分为0.8,则满足第一预设条件。In yet another implementation of this embodiment, the channel quality parameters include multiple, each channel quality parameter corresponds to its own weight, and the first preset condition is that the total score of the channel quality parameter is greater than or equal to the preset value 0 . Exemplarily, the scores of the channel quality parameters can be seen in Table 2 below. If the preset value 0 is 0.6 and the current total score is 0.8, the first preset condition is satisfied.
表2Table 2
Figure PCTCN2018122959-appb-000003
Figure PCTCN2018122959-appb-000003
Figure PCTCN2018122959-appb-000004
Figure PCTCN2018122959-appb-000004
在手机根据信道质量参数确定需要协商传输参数和更新时刻时,手机可以在不同的消息中分别发起对新的传输参数和更新时刻的协商;或者,手机也可以在相同的消息中发起对新的传输参数和更新时刻的协商,本申请实施例不予限定。When the mobile phone determines that the transmission parameters and the update time need to be negotiated according to the channel quality parameters, the mobile phone can separately initiate negotiation on the new transmission parameters and update time in different messages; or, the mobile phone can also initiate a new transmission parameter and update time in the same message. The negotiation of the transmission parameters and the update time is not limited in the embodiments of the present application.
手机发起对新的传输参数和更新时刻的协商的方法可以有多种。There are various methods for the mobile phone to initiate negotiation on new transmission parameters and update time.
例如,在该实施例的一种技术方案中,手机可以确定新的传输参数和更新时刻,并发送给第一耳塞;第一耳塞子向手机发送确认信息;手机在接收到第一耳塞的确认信息后,实现新的传输参数和更新时刻的协商。For example, in a technical solution of this embodiment, the mobile phone may determine new transmission parameters and update time and send to the first earplug; the first earplug sends confirmation information to the mobile phone; the mobile phone receives the confirmation of the first earplug After the information, the new transmission parameters and the update time are negotiated.
其中,更新时刻可以是预设的当前时刻之后的某一个时刻,也可以是手机根据底层芯片的反馈能力确定的当前时刻之后的时刻。例如,更新时刻可以是当前ISO间隔之后的下一个ISO间隔的起始时刻。The update time may be a time after the preset current time, or may be a time after the current time determined by the mobile phone according to the feedback capability of the underlying chip. For example, the update time may be the start time of the next ISO interval after the current ISO interval.
需要注意的是,手机与第一耳塞之间通过LE ACL链路协商新的传输参数。具体的,手机和第一耳塞分别可以包括主机host和链路层LL,手机还包括音频编码器。参见图8,手机监测信道质量可以是手机host指示手机LL监测信道质量,手机LL在确定满足第一预设条件后上报给手机host;或者手机LL周期性地检测信道质量参数,并将信道质量参数上报给手机host;手机host确定提高传输速率,并发起对传输速率和更新时刻的协商。在协商过程中,在手机与第一耳塞之间,手机LL与第一耳塞LL之间通过LL命令交互协商信息;在手机内部,手机host和手机LL之间通过HCI命令交互协商信息;在第一耳塞内部,第一耳塞host和第一耳塞LL之间通过HCI命令交互协商信息。手机的音频编码器对音频源输出的音频数据例如脉冲编码调制(pulse code modulation,PCM)码流进行编码,手机host根据协商后的传输参数对编码后的数据包进行传输。It should be noted that the new transmission parameters are negotiated between the mobile phone and the first earbud via the LEACL link. Specifically, the mobile phone and the first earplug may respectively include a host host and a link layer LL, and the mobile phone further includes an audio encoder. Referring to FIG. 8, the mobile phone monitoring channel quality may be that the mobile phone host instructs the mobile phone LL to monitor the channel quality, and the mobile phone LL reports to the mobile phone host after determining that the first preset condition is met; or the mobile phone LL periodically detects the channel quality parameter and the channel quality The parameters are reported to the mobile phone host; the mobile phone host determines to increase the transmission rate and initiates negotiations on the transmission rate and the update time. In the negotiation process, between the mobile phone and the first earplug, the mobile phone LL and the first earplug LL exchange the negotiation information through the LL command; inside the mobile phone, the mobile phone host and the mobile phone LL exchange the negotiation information through the HCI command; Inside an earplug, the first earplug host and the first earplug LL exchange information through HCI commands. The audio encoder of the mobile phone encodes the audio data output from the audio source such as pulse code modulation (pulse code modulation (PCM) code stream), and the mobile phone host transmits the encoded data packet according to the negotiated transmission parameters.
示例性的,在CIS连接建立后,手机与第一耳塞之间协商新的传输参数和更新时刻的过程可以参见图6。如图6所示,该过程可以包括:612、手机主机host可以确定新的传输参数和更新时刻,并向手机链路层LL发送CIG参数更新信息(例如LE Update CIG parameters消息),从而向手机LL传递新的传输参数。613、手机LL向手机host回复第五确认信息(例如command complete消息)。614、手机LL向第一耳塞LL发送携带有新的传输参数和更新时刻的CIS更新请求信息(例如LL_CIS_update_REQ消息),以请求根据新的传输参数更新已建立的CIS连接。615、第一耳塞LL向手机LL发送CIS更新响应信息(例如LL_CIS_update_RSP消息)。616、在更新时刻,手机LL和第一耳塞LL启用新的传输参数。617、第一耳塞LL向第一耳塞host发送更新完成信息(例如CIS_update_complete消息),以通知第一耳塞host第一耳塞LL已接收到新的传输参数以及更新时刻。618、第一耳塞LL向手机LL发送更新确认信息(例如CIS_update_complete或HCI Command status消息)。至此,手机和第一耳塞之间完成了CIS链路新的传输参数和更新时刻的协商以及新的传输参数的更新,后续手机和 第一耳塞之间根据新的传输参数交互音频数据和音频数据的应答数据。Exemplarily, after the CIS connection is established, the process of negotiating the new transmission parameter and the update time between the mobile phone and the first earbud can be seen in FIG. 6. As shown in FIG. 6, the process may include: 612, the mobile phone host may determine new transmission parameters and update time, and send CIG parameter update information (such as LEUpdateCIGparameters message) to the mobile phone link layer LL, to the mobile phone LL transfers new transmission parameters. 613. The mobile phone LL replies to the mobile phone host with the fifth confirmation information (for example, the command complete message). 614. The mobile phone LL sends the first earplug LL CIS update request information (for example, LL_CIS_update_REQ message) carrying the new transmission parameters and the update time to request to update the established CIS connection according to the new transmission parameters. 615. The first earplug LL sends CIS update response information (for example, LL_CIS_update_RSP message) to the mobile phone LL. 616. At the update time, the mobile phone LL and the first earplug LL enable new transmission parameters. 617. The first earplug LL sends update completion information (such as a CIS_update_complete message) to the first earplug host to notify the first earplug host that the first earplug LL has received the new transmission parameter and the update time. 618. The first earbud LL sends update confirmation information (such as CIS_update_complete or HCI Command status message) to the mobile phone LL. So far, the mobile phone and the first earplug have completed the negotiation of the new transmission parameters and update time of the CIS link and the update of the new transmission parameters, and the subsequent mobile phone and the first earplug exchange audio data and audio data according to the new transmission parameters Response data.
在另一种方案中,手机和第一耳塞之间也可以不协商更新时刻,手机LL在向第一耳塞LL发送CIS更新请求信息后,可以立即自动启用新的传输参数,并向手机host发送更新确认信息;第一耳塞LL接收到手机LL发送的CIS更新请求信息后,可以自动启用新的传输参数,并向第一耳塞host发送更新完成信息。In another solution, the update time may not be negotiated between the mobile phone and the first earbud. After the mobile phone LL sends the CIS update request message to the first earbud LL, the new transmission parameter can be automatically enabled immediately and sent to the mobile phone host Update confirmation information; after receiving the CIS update request information sent by the mobile phone LL, the first earplug LL can automatically enable new transmission parameters and send the update completion information to the first earplug host.
在另一种方案中,手机和第一耳塞之间也可以不协商更新时刻,手机LL在向第一耳塞LL发送CIS更新请求信息后,若接收到第一耳塞发送的确认接收到CIS更新请求信息的应答消息,则立即启用新的传输参数;第一耳塞LL接收到手机LL发送的CIS更新请求信息后,可以自动启用新的传输参数,并向第一耳塞host发送更新完成信息。In another solution, the update time may not be negotiated between the mobile phone and the first earbud. After the mobile phone LL sends the CIS update request message to the first earbud LL, if it receives the confirmation from the first earbud that the CIS update request is received In response to the message, the new transmission parameter is immediately enabled; after receiving the CIS update request message sent by the mobile phone LL, the first earplug LL can automatically enable the new transmission parameter and send the update completion information to the first earplug host.
在另一种方案中,手机和第一耳塞可以预先约定更新时刻,手机在发送CIS更新请求信息后的第M个时刻启用新的传输参数,第一耳塞在接收到CIS更新请求信息后的第K个时刻启用新的传输参数。M和K是自然数。In another solution, the mobile phone and the first earbud may pre-arrange the update time. The mobile phone enables the new transmission parameter at the Mth time after sending the CIS update request message. The first earbud receives the CIS update request message K times to enable new transmission parameters. M and K are natural numbers.
在手机和第一耳塞启用新的传输参数后,在有需要传输的音频数据时,手机和第一耳塞可以采用新的传输参数来传输该音频数据。其中,手机采用新的传输参数来发送音频数据的时刻与手机启用新的传输参数的时刻可以相同也可以不同。比如,手机可以在发送CIS更新请求信息后启用新的传输参数,在接收到第一耳塞发送的更新确认信息后采用新的传输参数来发送音频数据。第一耳塞采用新的传输参数来接收音频数据的时刻与第一耳塞启用新的传输参数的时刻可以相同也可以不同。比如,第一耳塞可以在接收到CIS更新请求信息后启用新的传输参数,在接收到更新完成信息后采用采用新的传输参数来接收音频数据。After the mobile phone and the first earplug enable new transmission parameters, when there is audio data to be transmitted, the mobile phone and the first earplug may use the new transmission parameter to transmit the audio data. The moment when the mobile phone uses the new transmission parameter to send audio data and the moment when the mobile phone enables the new transmission parameter may be the same or different. For example, the mobile phone may enable new transmission parameters after sending the CIS update request information, and use the new transmission parameters to send audio data after receiving the update confirmation information sent by the first earplug. The moment when the first earplug adopts the new transmission parameter to receive the audio data may be the same as or different from the moment when the first earplug enables the new transmission parameter. For example, the first earplug may enable new transmission parameters after receiving the CIS update request information, and adopt the new transmission parameters to receive audio data after receiving the update completion information.
在本申请的实施例中,通过调整传输参数来提高传输速率的方法可以包括,通过调整传输参数来提高有效载荷的占空比或减少重传,从而提高传输速率。In the embodiments of the present application, the method for increasing the transmission rate by adjusting the transmission parameters may include adjusting the transmission parameters to increase the duty cycle of the payload or reduce the retransmission, thereby increasing the transmission rate.
通过调整传输参数来提高传输速率的具体方法可以有多种。例如,在其他传输参数不变的情况下,增大BN和NSE,以增大ISO间隔内可传输的突发数量,提高传输速率。示例性的,图7所示的传输示意图对应的BN=2,NSE=4,FT=1,手机在ISO间隔1内传输了2个有效载荷(即有效载荷0和1)。在图7的基础上,若需要提高传输速率,则在其他传输参数不变的情况下,协商后的NSE增大为6,协商后的BN增大为3,即ISO间隔内可传输的突发数量增大为3。图9为基于调整后的新的传输参数的传输示意图,手机在ISO间隔2内可以传输3个有效载荷(即有效载荷2、3和4)。并且,参见图9,手机和第一耳塞可以在协商的更新时刻(即时刻1)同时启用新的传输参数,并根据新的传输参数传输音频数据和应答信息。There are many specific ways to increase the transmission rate by adjusting the transmission parameters. For example, when other transmission parameters are unchanged, increase BN and NSE to increase the number of bursts that can be transmitted within the ISO interval and increase the transmission rate. Exemplarily, the transmission diagram shown in FIG. 7 corresponds to BN=2, NSE=4, and FT=1, and the mobile phone transmits 2 payloads (that is, payloads 0 and 1) within the ISO interval 1. On the basis of Figure 7, if the transmission rate needs to be increased, the NSE after negotiation will increase to 6 and the BN after negotiation will increase to 3, which means that the transmission interval within the ISO interval The number of hair increases to 3. FIG. 9 is a transmission schematic diagram based on the adjusted new transmission parameters. The mobile phone can transmit 3 payloads (that is, payloads 2, 3, and 4) within the ISO interval 2. Furthermore, referring to FIG. 9, the mobile phone and the first earplug can simultaneously enable new transmission parameters at the negotiated update time (that is, time 1), and transmit audio data and response information according to the new transmission parameters.
再例如,在其他传输参数不变的情况下,增大BN(其中,BN小于NSE),以增大ISO间隔内可传输的突发数量,提高传输速率。示例性的,在图7的基础上,当BN增大为3时,基于新的传输参数的传输示意图可以参见图10。在图10中,手机在ISO间隔2内可以传输3个有效载荷(即有效载荷2、3和4)。For another example, when other transmission parameters are unchanged, increase BN (where BN is less than NSE) to increase the number of bursts that can be transmitted within the ISO interval and increase the transmission rate. Exemplarily, on the basis of FIG. 7, when the BN increases to 3, the transmission schematic diagram based on the new transmission parameter may refer to FIG. 10. In Figure 10, the mobile phone can transmit 3 payloads (ie, payloads 2, 3, and 4) within the ISO interval 2.
再例如,在其他传输参数不变的情况下,增大BN与NSE的比值,以在ISO间隔内传输更多数量的突发,提高传输速率。As another example, when other transmission parameters are unchanged, the ratio of BN to NSE is increased to transmit a larger number of bursts within the ISO interval and increase the transmission rate.
再例如,调整PHY的类型,以提高传输带宽,从而提高传输速率。As another example, adjust the type of PHY to increase the transmission bandwidth, thereby increasing the transmission rate.
再例如,在其他传输参数不变的情况下,减小FT(其中,FT大于或者等于1),以减小重传占用的时间,从而可以传输更多的音频数据。For another example, when other transmission parameters are unchanged, FT is reduced (where FT is greater than or equal to 1) to reduce the time taken for retransmission, so that more audio data can be transmitted.
再例如,在其他传输参数不变的情况下,增大子事件时长,多个有效载荷可以聚合在一个子事件时长内传输,或者可以增大有效载荷的大小,以提高子事件时长内可传输有效载荷的时间长度,从而提高子事件时长内可以传输的有效载荷的数量,提高传输速率。示例性的,在图7的基础上,若子事件时长增大为两倍,则一个子事件时长内可以聚合两个有效载荷,新的传输参数对应的传输示意图可以参见图11。在图11中,ISO间隔2内的一个子事件时长内可以发送两个有效载荷(例如有效载荷2和有效载荷3)。As another example, when other transmission parameters remain unchanged, increasing the duration of a sub-event, multiple payloads can be aggregated and transmitted within a sub-event duration, or the size of the payload can be increased to increase the transmittable within the sub-event duration The length of the payload, thereby increasing the number of payloads that can be transmitted within the duration of the sub-event and increasing the transmission rate. Exemplarily, on the basis of FIG. 7, if the duration of a sub-event increases to twice, then two payloads can be aggregated within a sub-event duration. For a transmission schematic diagram corresponding to the new transmission parameter, see FIG. 11. In FIG. 11, two payloads (for example, payload 2 and payload 3) can be sent within one sub-event duration within the ISO interval 2.
再例如,增大BN,增大BN和NSE,增大BN与NSE的比值,增大子事件时长,减小FT,以及提高传输带宽中的任意组合。As another example, increase BN, increase BN and NSE, increase the ratio of BN to NSE, increase the duration of sub-events, reduce FT, and increase any combination of transmission bandwidth.
此外,若第一耳塞对手机发送的新的传输参数不能接受,则可以拒绝手机的传输参数更新请求;或者,第一耳塞可以通知手机不能接受,手机还可以重新确定新的传输参数,并发送给第一耳塞进行确认。In addition, if the first earplug cannot accept the new transmission parameter sent by the mobile phone, the request for updating the transmission parameter of the mobile phone can be rejected; or, the first earplug can notify the mobile phone that it cannot accept it, and the mobile phone can re-determine the new transmission parameter and send Confirm the first earbud.
在该实施例的另一种技术方案中,手机可以确定新的传输参数的待选值和更新时刻,并发送给第一耳塞。第一耳塞从待选值中确定新的传输参数的目标值并发送给手机,手机接收到第一耳塞发送的目标值后向第一耳塞发送确认消息,从而实现新的传输参数和更新时刻的协商。示例性的,新的传输参数的待选值可以为待选值1:BN=3,NSE=4,FT=1;待选值2:BN=3,NSE=6,FT=1。其中,待选值中未涉及的传输参数,例如PHY类型、子事件时长等默认不发生变化。In another technical solution of this embodiment, the mobile phone may determine the candidate value and update time of the new transmission parameter and send it to the first earplug. The first earplug determines the target value of the new transmission parameter from the values to be selected and sends it to the mobile phone. After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug to realize the new transmission parameter and update time Negotiate. Exemplarily, the candidate value of the new transmission parameter may be candidate value 1: BN=3, NSE=4, FT=1; candidate value 2: BN=3, NSE=6, FT=1. Among them, the transmission parameters not involved in the value to be selected, such as PHY type, sub-event duration, etc., do not change by default.
在该实施例的又一种技术方案中,手机可以确定新的传输参数的最大值和最小值以及更新时刻,并发送给第一耳塞。第一耳塞根据新的传输参数的最大值和最小值范围确定目标值并发送给手机。手机接收到第一耳塞发送的目标值后向第一耳塞发送确认消息,从而实现新的传输参数和更新时刻的协商。In yet another technical solution of this embodiment, the mobile phone may determine the maximum and minimum values of the new transmission parameter and the update time, and send it to the first earplug. The first earplug determines the target value according to the maximum and minimum value range of the new transmission parameter and sends it to the mobile phone. After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug, so as to implement negotiation of new transmission parameters and update time.
在该实施例的另一种技术方案中,手机可以确定新的传输参数的参考值以及更新时刻,并发送给第一耳塞。第一耳塞根据新的传输参数的参考值确定目标值(该目标值可以与参考值相同也可以不同)并发送给手机。手机接收到第一耳塞发送的目标值后,向第一耳塞发送确认消息,从而实现新的传输参数和更新时刻的协商。In another technical solution of this embodiment, the mobile phone may determine the reference value of the new transmission parameter and the update time, and send it to the first earplug. The first earplug determines a target value according to the reference value of the new transmission parameter (the target value may be the same as or different from the reference value) and sends it to the mobile phone. After receiving the target value sent by the first earplug, the mobile phone sends a confirmation message to the first earplug, so as to implement negotiation of new transmission parameters and update time.
在该实施例的又一种技术方案中,手机通知第一耳塞开始协商传输参数;第一耳塞向手机发送新的传输参数和更新时刻。手机向第一耳塞回复确认消息,实现新的传输参数和更新时刻的协商。In yet another technical solution of this embodiment, the mobile phone notifies the first earplug to start negotiating transmission parameters; the first earplug sends the new transmission parameter and update time to the mobile phone. The mobile phone replies with a confirmation message to the first earbud to implement negotiation of new transmission parameters and update time.
在该实施例的另一种技术方案中,手机通知第一耳塞开始协商新的传输参数;第一耳塞向手机发送确定消息。手机确定新的传输参数和更新时刻并发送给第一耳塞。手机接收到第一耳塞回复的确认消息后,实现新的传输参数和更新时刻的协商。In another technical solution of this embodiment, the mobile phone notifies the first earplug to start negotiating new transmission parameters; the first earplug sends a determination message to the mobile phone. The mobile phone determines the new transmission parameter and update time and sends it to the first earplug. After receiving the confirmation message returned by the first earplug, the mobile phone implements negotiation of new transmission parameters and update time.
在该实施例的又一种技术方案中,手机可以确定新的传输参数,并发送给第一耳塞;在接收到第一耳塞的确认消息后,实现新的传输参数的协商。而后,手机还可以确定更新时刻并发送给第一耳塞;在接收到第一耳塞的确认消息后,实现更新时刻的协商。In yet another technical solution of this embodiment, the mobile phone can determine the new transmission parameter and send it to the first earplug; after receiving the confirmation message of the first earplug, implement the negotiation of the new transmission parameter. Then, the mobile phone can also determine the update time and send it to the first earplug; after receiving the confirmation message of the first earplug, the negotiation of the update time is realized.
需要说明的是,以上对手机发起新的传输参数和更新时刻的协商的方法所进行的 描述仅是举例说明,还可以有其他的协商方法,本申请实施例不予限定。It should be noted that the above description of the method for the mobile phone to initiate negotiation of new transmission parameters and update time is only an example, and there may be other negotiation methods, which are not limited in the embodiments of the present application.
在另一实施例中,第一耳塞进行信道质量监测,并将信道质量参数发送给手机,而后手机发起传输速率的调整,即发起与第一耳塞的新的传输参数和更新时刻的协商,以提高传输速率。新的传输参数和更新时刻的具体协商过程可以参见以上实施例的描述,例如可以为图6中的CIS传输参数更新过程,后续实施例不予赘述。In another embodiment, the first earplug monitors the channel quality and sends the channel quality parameter to the mobile phone, and then the mobile phone initiates the adjustment of the transmission rate, that is, initiates a negotiation with the first earplug on the new transmission parameters and update time to Increase the transmission rate. The specific negotiation process of the new transmission parameter and the update time can be referred to the description of the above embodiment, for example, it can be the CIS transmission parameter update process in FIG. 6, which will not be repeated in subsequent embodiments.
在另一实施例中,手机指示第一耳塞进行信道质量的监测,第一耳塞根据手机的指示进行信道质量监测,并将信道质量参数发送给手机,手机根据信道质量参数发起传输速率的调整,以提高传输速率。In another embodiment, the mobile phone instructs the first earbud to monitor the channel quality. The first earbud monitors the channel quality according to the instructions of the mobile phone and sends the channel quality parameter to the mobile phone. The mobile phone initiates the adjustment of the transmission rate according to the channel quality parameter. To increase the transmission rate.
在另一实施例中,手机指示第一耳塞进行信道质量的监测,第一耳塞根据手机的指示进行信道质量监测,第一耳塞可以在确定信道质量参数满足第一预设条件时,向手机发送第一信息;手机根据第一信息发起传输速率的调整,即发起与第一耳塞的新的传输参数和更新时刻的协商,以提高传输速率。In another embodiment, the mobile phone instructs the first earplug to monitor the channel quality, and the first earplug monitors the channel quality according to the instruction of the mobile phone. The first earplug may send the mobile phone to the mobile phone when it is determined that the channel quality parameter meets the first preset condition The first information; the mobile phone initiates the adjustment of the transmission rate according to the first information, that is, initiates a negotiation with the first earplug for new transmission parameters and update time to increase the transmission rate.
在另一种情况下,第一耳塞可以主动发起对传输速率的调整。In another case, the first earplug may actively initiate adjustment of the transmission rate.
在一实施例中,第一耳塞进行信道质量监测,或者第一耳塞在接收到手机的指示后进行信道质量监测,并根据信道质量参数发起传输速率的调整。若第一耳塞确定信道质量参数满足第一预设条件时,则发起新的传输参数和更新时刻的协商,以提高传输速率。In an embodiment, the first earbud performs channel quality monitoring, or the first earbud performs channel quality monitoring after receiving the indication from the mobile phone, and initiates transmission rate adjustment according to the channel quality parameter. If the first earplug determines that the channel quality parameter meets the first preset condition, it initiates negotiation of a new transmission parameter and update time to increase the transmission rate.
在另一实施例中,手机进行信道质量监测,并将信道质量参数发送给第一耳塞,而后第一耳塞根据信道质量参数发起传输速率的调整。In another embodiment, the mobile phone performs channel quality monitoring and sends the channel quality parameter to the first earplug, and then the first earplug initiates 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 performs channel quality monitoring according to the instruction of the first earplug, and sends the channel quality parameter to the first earplug, and then the first earplug initiates according to the channel quality parameter Transmission rate adjustment.
在另一实施例中,第一耳塞指示手机进行信道质量的监测,手机根据第一耳塞的指示进行信道质量监测,手机可以在确定信道质量参数满足第一预设条件时,向第一耳塞发送第一信息;第一耳塞根据第一信息发起新的传输参数和更新时刻的协商,以提高传输速率。In another embodiment, the first earplug instructs the mobile phone to monitor channel quality, and the mobile phone performs channel quality monitoring according to the indication of the first earplug. The mobile phone may send the first earplug to the first earplug when it is determined that the channel quality parameter meets the first preset condition The first information; the first earplug initiates negotiation of new transmission parameters and update moments based on the first information to increase the transmission rate.
需要说明的是,与图8所示的方案一致,在其他方案中,手机和第一耳塞之间仍然可以通过host、LL、HCI命令以及LL命令进行新的传输参数和更新时刻的协商,本申请实施例对此不再赘述。It should be noted that, in accordance with the solution shown in FIG. 8, in other solutions, the mobile phone and the first earbud can still negotiate new transmission parameters and update times through the host, LL, HCI commands, and LL commands. The application examples will not repeat them here.
还需要说明的是,在上述传输参数的协商过程中,手机和第一耳塞交互的传输参数,可以仅包括发生变化的传输参数,也可以包括未发生变化的传输参数,本申请实施例不予限定。例如,发生变化的传输参数为BN,NSE和FT等传输参数未发生变化;则一种方式中,图6中的LE Update CIG parameters消息和LL_CIS_update_REQ消息包括发生变化的BN,不包括NSE和FT等未发生变化的其他传输参数;另一种方式中,图6中LE Update CIG parameters消息和LL_CIS_update_REQ消息包括发生变化的BN,以及未发生变化的NSE、FT等其他传输参数。It should also be noted that, during the negotiation of the above transmission parameters, the transmission parameters interacted by the mobile phone and the first earbud may include only the transmission parameters that have changed, or may include the transmission parameters that have not changed. limited. For example, the changed transmission parameters are BN, and the transmission parameters such as NSE and FT have not changed; then in one way, the LE Update Update CIG parameters and LL_CIS_update_REQ messages in Figure 6 include the changed BN, excluding NSE and FT, etc. Other transmission parameters that have not changed; in another way, the LE Update CIG parameters message and the LL_CIS_update_REQ message in FIG. 6 include the changed BN, and other transmission parameters such as NSE and FT that have not changed.
在信道质量参数满足上述第一预设条件时,在手机和第一耳塞协商新的传输参数后,手机还可以确定新的编码参数,以提高编码速率。也就是说,若信道质量参数满足第一预设条件,则可以表明信道质量较好,因而手机可以确定新的编码参数以提高 编码速率;并发起新的传输参数和更新时刻的协商,以提高传输速率。并且,手机还可以将新的编码参数携带于音频数据包中发送给第一耳塞,第一耳塞接收到音频数据包后根据编码参数进行解码。示例性的,参见图8,在满足第一预设条件,调整传输参数后,手机可以确定新的编码参数以提高编码速率。如上所述,通过调整编码参数来提高编码速率的方式可以有多种。例如,在表1所示的单声道情况下,在采样率、子带数、通道数、块长度、分配方式等参数不变时,可以将bitpool值从18增大为29,从而将编码速率从132kb/s提高到198kb/s。再例如,在表1所示的联合立体声情况下,在子带数、通道数、块长度、分配方式等参数不变时,可以将采样率有44.1kHz提高到48kHz,将bitpool值从35增大为51,从而将编码速率从229kb/s提高到345kb/s。When the channel quality parameter satisfies the above-mentioned first preset condition, after the mobile phone and the first earbud negotiate new transmission parameters, the mobile phone may also determine new coding parameters to increase the coding rate. That is to say, if the channel quality parameter meets the first preset condition, it can indicate that the channel quality is good, so the mobile phone can determine the new encoding parameter to increase the encoding rate; and initiate the negotiation of the new transmission parameter and update time to improve Transmission rate. In addition, the mobile phone can also carry the new encoding parameter in the audio data packet and send it to the first earplug. After receiving the audio data packet, the first earplug decodes according to the encoding parameter. Exemplarily, referring to FIG. 8, after satisfying the first preset condition and adjusting the transmission parameters, the mobile phone may determine new encoding parameters to increase the encoding rate. As mentioned above, there are many ways to increase the encoding rate by adjusting the encoding parameters. For example, in the case of mono shown in Table 1, the bitpool value can be increased from 18 to 29 when the sampling rate, number of subbands, number of channels, block length, allocation method and other parameters remain unchanged, thereby encoding The rate is increased from 132kb/s to 198kb/s. For another example, in the case of the joint stereo shown in Table 1, when the parameters such as the number of subbands, the number of channels, the block length, and the allocation method remain unchanged, the sampling rate can be increased from 44.1kHz to 48kHz, and the bitpool value can be increased from 35. It is 51, which increases the encoding rate from 229kb/s to 345kb/s.
在一具体示例中,对于SBC编码器来说,手机可以根据丢包率情况确定需要采用的目标编码速率,从而通过调整目标编码速率对应的bitpool来实现手机的编码速率为目标编码速率。例如,参见表3,手机上设置有丢包率1、预设值1、目标编码速率以及目标bitpool值之间的对应关系。当丢包率小于或者等于预设值1时,信道质量较好,手机可以将bitpool值调整为对应的目标bipool值53,从而采用较高的目标编码速率328kb/s对音频数据进行编码;当丢包率大于预设值1时,信道质量较差,手机可以将Bitpool值调整为对应的目标bitpool值35,从而采用较低的目标编码速率229kb/s对音频数据进行编码。In a specific example, for the SBC encoder, the mobile phone can determine the target coding rate to be adopted according to the packet loss rate, so as to adjust the bitpool corresponding to the target coding rate to achieve the mobile phone's coding rate as the target coding rate. For example, referring to Table 3, the correspondence between the packet loss rate 1, the preset value 1, the target encoding rate, and the target bitpool value is set on the mobile phone. When the packet loss rate is less than or equal to the preset value 1, the channel quality is better, and the mobile phone can adjust the bitpool value to the corresponding target bipool value of 53, thereby encoding the audio data with a higher target coding rate of 328kb/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 of 35, thereby encoding the audio data with a lower target encoding rate of 229 kb/s.
表3table 3
第一预设条件First preset condition 目标编码速率Target coding rate Bipool值Bipool value
丢包率小于或者等于预设值1Packet loss rate is less than or equal to the preset value 1 328kb/s328kb/s 5353
丢包率大于预设值1Packet loss rate is greater than the preset value 1 229kb/s229kb/s 3535
本申请实施例对通过调整编码参数来提高编码速率的其他具体方式不再赘述。而后,手机的音频编码器根据新的编码参数对音频数据进行编码。In this embodiment of the present application, other specific methods for increasing the encoding rate by adjusting encoding parameters are not described in detail. Then, the audio encoder of the mobile phone encodes the audio data according to the new encoding parameters.
在确定新的编码参数后,手机可以将新的编码参数通过音频数据包发送给第一耳塞,以便第一耳塞可以根据新的编码参数进行解码。After determining the new encoding parameter, the mobile phone can send the new encoding parameter to the first earplug through the audio data packet, so that the first earplug can decode according to the new encoding parameter.
以上主要是以提高编码速率和提高传输速率时信道质量参数需要满足的条件相同为例进行说明的。在其他实施例中,提高编码速率和提高传输速率时信道质量参数需要满足的条件也可以不同。例如,手机可以监测信道质量,或者手机可以指示第一耳塞进行信道质量监测。手机自身确定或者根据第一耳塞上报的信息确定信道质量参数满足第一预设条件时,可以提高传输速率,具体提高传输速率的方法可以参照以上实施例中的相关描述,此处不予赘述。手机自身确定或者根据第一耳塞上报的信息确定信道质量参数满足第三预设条件时,可以表明信道质量较好,从而可以确定新的编码参数,以提高编码速率。其中,第三预设条件与第一预设条件不同。例如,第一预设条件可以为丢包率小于或者等于预设值1,第三预设条件可以为丢包率小于或者等于预设值9,预设值9不等于预设值1。具体调整传输参数的方式和编码参数的方式可以参照以上实施例中的描述,此处不予赘述。The above is mainly explained by taking the same condition that the channel quality parameter needs to be met when increasing the coding rate and increasing the transmission rate as examples. In other embodiments, the conditions that the channel quality parameters need to meet when increasing the coding rate and increasing the transmission rate may also be different. For example, the mobile phone may monitor channel quality, or the mobile phone may instruct the first earbud to perform channel quality monitoring. When the mobile phone itself determines or determines that the channel quality parameter satisfies the first preset condition according to the information reported by the first earplug, the transmission rate may be increased. For a specific method for increasing the transmission rate, reference may be made to the related description in the above embodiments, and details are not described here. When the mobile phone itself determines or determines that the channel quality parameter satisfies the third preset condition according to the information reported by the first earbud, it may indicate that the channel quality is good, so that a new coding parameter may be determined to increase the coding rate. 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 the preset value 1, and the third preset condition may be that the packet loss rate is less than or equal to the preset value 9, and the preset value 9 is not equal to the preset value 1. For the specific way of adjusting the transmission parameters and the way of encoding the parameters, reference may be made to the descriptions in the above embodiments, which will not be repeated here.
场景2、信道质量较差时,先降低编码速率,再降低传输速率。 Scenario 2. When the channel quality is poor, first reduce the coding rate, and then reduce the transmission rate.
该场景中,手机可以先确定新的编码参数,以降低编码速率;而后,手机和第一 耳塞再协商新的传输参数,以降低传输速率。In this scenario, the mobile phone can first determine new encoding parameters to reduce the encoding rate; then, the mobile phone and the first earbud can negotiate new transmission parameters to reduce the transmission rate.
与场景1中手机在确定满足第一预设条件时提高传输速率和编码速率类似,在场景2中,手机可以监测信道质量,或者手机可以指示第一耳塞进行信道质量监测。手机自身确定或者根据第一耳塞上报的信息确定信道质量参数满足第二预设条件时,可以表明信道质量较差,因而可以确定新的编码参数,以降低编码速率。Similar to the scenario 1 where the mobile phone increases the transmission rate and the encoding rate when it determines that the first preset condition is met, in scenario 2 the mobile phone can monitor the channel quality, or the mobile phone can instruct the first earbud to perform channel quality monitoring. When the mobile phone itself determines or determines that the channel quality parameter satisfies the second preset condition according to the information reported by the first earplug, it may indicate that the channel quality is poor, and thus a new coding parameter may be determined to reduce the coding rate.
与第一预设条件相对应,在一种实施方案中,第二预设条件为信道质量参数差于预设值。例如,信道质量参数包括丢包率,第一预设条件为丢包率大于或者等于预设值11,预设值11大于或者等于预设值1。再例如,信道质量参数包括丢包率和误包率,第一预设条件为丢包率大于或者等于预设值11,且误包率大于或者等于预设值12,预设值12大于或者等于预设值2。再例如,信道质量参数包括信噪比,第一预设条件为信噪比小于或者等于预设值13(即第二预设值),预设值13小于或者等于预设值3。Corresponding to the first preset condition, in one embodiment, the second preset condition is that the channel quality parameter is worse than the preset value. For example, the channel quality parameter includes a packet loss rate, and the first preset condition is that the packet loss rate is greater than or equal to the preset value 11, and the preset value 11 is greater than or equal to the preset value 1. For another example, the channel quality parameters include 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 the preset value 11, and the packet error rate is greater than or equal to the preset value 12, and the preset value 12 is greater than or Equal to the preset value 2. For another example, the channel quality parameter includes 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 (that is, a second preset value), and the preset value 13 is less than or equal to the preset value 3.
在另一种实施方案中,第二预设条件为信道质量参数变差。例如,信道质量参数包括COI,第一预设条件为CQI减小。再例如,信道质量参数包括信号干扰比,第一预设条件为信号干扰比减小的幅度大于或者等于预设值14。再例如,信道质量参数包括CQI和抖动,第一预设条件为CQI减小的幅度大于或者等于预设值15,抖动增大的幅度大于或者等于预设值16。In another embodiment, the second preset condition is that the channel quality parameter becomes worse. For example, the channel quality parameter includes COI, and the first preset condition is that the CQI decreases. For another example, the channel quality parameter includes a signal-to-interference ratio, and the first preset condition is that the decrease of the signal-to-interference ratio is greater than or equal to the preset value 14. For another example, the channel quality parameters include CQI and jitter. The first preset condition is that the magnitude of the decrease in CQI is greater than or equal to the preset value 15, and the magnitude of the increase in jitter is greater than or equal to the preset value 16.
在另一种实施方案中,信道质量参数包括多个,每个信道质量参数对应有各自的权重,第二预设条件为信道质量参数的总分小于预设值10。示例性的,信道质量参数的分值情况可以参见表1,预设值10可以为0.5。In another embodiment, there are multiple channel quality parameters, each channel quality parameter corresponds to its own weight, and the second preset condition is that the total score of the channel quality parameter is less than the preset value of 10. Exemplarily, the score of the channel quality parameter may refer to Table 1, and the preset value 10 may be 0.5.
示例性的,参见图12,手机host指示手机LL监测信道质量,手机LL在确定满足第二预设条件后上报给手机host,手机host确定新的编码参数,以降低编码速率。如上所述,通过调整编码参数来降低编码速率的方式可以有多种,例如,在单声道情况下,在采样率、子带数、通道数、块长度、分配方式等参数不变时,手机可以将bitpool值从18减小为16,以降低编码速率。本申请实施例对通过调整编码参数来降低编码速率的其他具体方式不再赘述。Exemplarily, referring to FIG. 12, the mobile phone host instructs the mobile phone LL to monitor the channel quality. After determining that the second preset condition is met, the mobile phone LL reports to the mobile phone host, and the mobile phone host determines new encoding parameters to reduce the encoding rate. As mentioned above, there are many ways to reduce the encoding rate by adjusting the encoding parameters. For example, in the case of mono, when the parameters such as the sampling rate, the number of subbands, the number of channels, the block length, and the allocation method remain unchanged, Mobile phones can reduce the bitpool value from 18 to 16 to reduce the encoding rate. In this embodiment of the present application, other specific methods for reducing the encoding rate by adjusting encoding parameters are not described in detail.
若手机通过信道质量监测,确定信道质量参数满足第二预设条件,则可以表明信道质量较差,因而手机可以发起新的传输参数和更新时刻的协商,以降低传输速率。示例性的,参见图12,手机发起新的传输参数和更新时刻的协商,以降低传输速率。手机和第一耳塞在更新时刻启用新的传输参数,而后根据新的传输参数在CIS链路上交互数据(例如音频数据和应答信息等)。If the mobile phone determines that the channel quality parameter meets the second preset condition through channel quality monitoring, it may indicate that the channel quality is poor, so the mobile phone may initiate negotiation of new transmission parameters and update time to reduce the transmission rate. Exemplarily, referring to FIG. 12, the mobile phone initiates negotiation of new transmission parameters and update time to reduce the transmission rate. The mobile phone and the first earbud enable new transmission parameters at the moment of update, and then exchange data (such as audio data and response information, etc.) on the CIS link according to the new transmission parameters.
在本申请实施例中,通过调整传输参数来降低传输速率的方法可以包括,通过调整传输参数来降低有效载荷的占空比或增加重传,从而降低传输速率。In the embodiments of the present application, the method of reducing the transmission rate by adjusting the transmission parameters may include adjusting the transmission parameters to reduce the duty cycle of the payload or increase the retransmission, thereby reducing the transmission rate.
通过调整传输参数来降低传输速率的具体方法可以有多种。例如,在其他传输参数不变的情况下,减小BN(其中,BN小于NSE),以减小ISO间隔内可传输的突发数量,降低传输速率。示例性的,在图7的基础上,当BN减小为1时,基于新的传输参数的传输示意图可以参见图13。在图13中,ISO间隔2内只能传输一个有效子载荷。There are many specific methods for reducing the transmission rate by adjusting transmission parameters. For example, when other transmission parameters are unchanged, reduce BN (where BN is less than NSE) to reduce the number of bursts that can be transmitted within the ISO interval and the transmission rate. Exemplarily, on the basis of FIG. 7, when the BN is reduced to 1, the transmission schematic diagram based on the new transmission parameter can be seen in FIG. 13. In Fig. 13, only one payload can be transmitted within ISO interval 2.
再例如,在其他传输参数不变的情况下,减小BN和NSE,以减少ISO间隔内可传输的突发数量,降低传输速率。For another example, under the condition that other transmission parameters remain unchanged, reduce BN and NSE to reduce the number of bursts that can be transmitted within the ISO interval and reduce the transmission rate.
再例如,在其他传输参数不变的情况下,减小BN与NSE的比值,以在ISO间隔内传输更少数量的突发,降低传输速率。As another example, under the condition that other transmission parameters remain unchanged, the ratio of BN to NSE is reduced to transmit a smaller number of bursts within the ISO interval, reducing the transmission rate.
再例如,调整PHY的类型,以减小传输带宽,从而降低传输速率。As another example, adjust the type of PHY to reduce the transmission bandwidth, thereby reducing the transmission rate.
再例如,在其他传输参数不变的情况下,增大FT(其中,FT大于或者等于1),以增大重传可用的时间,从而减少可传输的音频数据的数据量,降低传输速率。示例性的,在图7的基础上,当FT增大为2时,基于新的传输参数的传输示意图可以参见图14。在图14中,在ISO间隔2中开始传输的有效载荷2的刷新点在ISO间隔3内,因而若有效载荷2在ISO间隔2内未被成功接收到,则可以持续重传直到ISO间隔3内的刷新点,从而减少了传输其他有效载荷的时间。For another example, when other transmission parameters are unchanged, increase FT (where FT is greater than or equal to 1) to increase the time available for retransmission, thereby reducing the amount of audio data that can be transmitted and reducing the transmission rate. Exemplarily, on the basis of FIG. 7, when the FT increases to 2, the transmission schematic diagram based on the new transmission parameter can be seen in FIG. 14. In FIG. 14, the refresh point of the payload 2 started to be transmitted in the ISO interval 2 is within the ISO interval 3, so if the payload 2 is not successfully received within the ISO interval 2, the retransmission can continue until the ISO interval 3 Within the refresh point, thereby reducing the time to transmit other payloads.
再例如,在其他传输参数不变的情况下,减小子事件时长,以减小可传输有效载荷的时间长度,降低传输速率。As another example, under the condition that other transmission parameters remain unchanged, the duration of the sub-event is reduced to reduce the length of time that the payload can be transmitted and the transmission rate.
再例如,减小BN,减小BN和NSE,减小BN与NSE的比值,减小子事件时长,增大FT,以及减小传输带宽中的任意组合。As another example, reduce BN, decrease BN and NSE, decrease the ratio of BN to NSE, decrease the duration of sub-events, increase FT, and reduce any combination of transmission bandwidths.
在调整编码速率和传输速率的一个具体示例中,参见图15,手机侧(即源端)包括音频应用,编码器,速率调节模块,信道质量监控模块,协议栈和控制器。第一耳塞侧(即目的端)包括控制器,协议栈,解码器和模拟输出模块。信道质量监控模块可以通过控制器上报的重传率或者其他Qos指标来进行。当信道质量低于门限时,信道质量较差,速率调节模块可以先调节蓝牙编码器,使其编码速率降低,例如修改SBC的bitpool值由53变为35,编码速率由328kbps降至229kbps。然后,速率调节模块控制协议栈更新CIS的传输参数以适配编码速率的变化,协议栈发送上述HCI命令(例如LE Update CIG parameters消息)给控制器,然后控制器通过上述LL命令发送命令(例如上述LL_CIS_update_REQ消息)给对端调整CIS的传输参数。例如,原CIS的传输参数可以包括:Interval=20ms、NSE=8、BN=2,更新后的CIS的新的传输参数可以包括:Interval=20ms、NSE=8、BN=1。更新CIS传输参数的目的是在信道质量变差时,减小实际空口下载技术(over the air technology,OTA)的吞吐量,降低传输速率,以使得每包数据有更多的重传机会,使得目的端能够正确地接收到数据包,从而提高音频质量。In a specific example of adjusting the encoding rate and the transmission rate, referring to FIG. 15, the mobile phone side (that is, the source end) includes an audio application, an encoder, a rate adjustment module, a channel quality monitoring module, a protocol stack, and a controller. The first earbud side (that is, the destination end) includes a controller, a protocol stack, a decoder, and an analog output module. The channel quality monitoring module can be implemented through the retransmission rate or other Qos indicators reported by the controller. When the channel quality is lower than the threshold, the channel quality is poor. The rate adjustment module can first adjust the Bluetooth encoder to reduce its encoding rate. For example, the SBC's bitpool value is changed from 53 to 35, and the encoding rate is reduced from 328kbps to 229kbps. Then, the rate adjustment module controls the protocol stack to update the transmission parameters of the CIS to adapt to the change in the encoding rate. The protocol stack sends the above HCI command (such as LE Update CIG parameters message) to the controller, and then the controller sends the command (such as The above LL_CIS_update_REQ message) adjusts the transmission parameters of the CIS to the opposite end. For example, the transmission parameters of the original CIS may include: Interval=20ms, NSE=8, BN=2, and the new transmission parameters of the updated CIS may include: Interval=20ms, NSE=8, BN=1. The purpose of updating the CIS transmission parameters is to reduce the throughput of the actual air interface download technology (OTA) and reduce the transmission rate when the channel quality deteriorates, so that each packet of data has more opportunities for retransmission, making The destination can correctly receive the data packet, thereby improving the audio quality.
以上主要是以降低编码速率和降低传输速率时信道质量参数需要满足的条件相同为例进行说明的。在其他实施例中,降低编码速率和降低传输速率时信道质量参数需要满足的条件也可以不同。例如,在信道质量参数满足第二预设条件时,降低编码速率;在满足第四预设条件时,降低传输速率。The above is mainly explained by taking the same condition that the channel quality parameter needs to be met when reducing the coding rate and the transmission rate as examples. In other embodiments, the conditions that the channel quality parameters need to meet when reducing the coding rate and the transmission rate may also be different. For example, when the channel quality parameter satisfies the second preset condition, the coding rate is reduced; when the fourth preset condition is met, the transmission rate is reduced.
在其他一些实施例中,手机可以根据不同的场景和调整顺序,分别对编码参数和传输参数进行调整。In some other embodiments, the mobile phone may adjust the encoding parameters and the transmission parameters separately according to different scenarios and adjustment orders.
其中,对于编码参数的调整,手机可以监测信道质量,或者手机可以指示第一耳塞进行信道质量监测。手机自身确定或者根据第一耳塞上报的信息确定信道质量参数满足第二预设条件时,调整编码参数,以提高或降低编码速率。Among them, for the adjustment of the encoding parameters, the mobile phone may monitor the channel quality, or the mobile phone may instruct the first earbud to perform channel quality monitoring. When the mobile phone itself determines or determines that the channel quality parameter meets the second preset condition according to the information reported by the first earplug, the encoding parameter is adjusted to increase or decrease the encoding rate.
对于传输参数的调整,手机和第一耳塞可以采用场景1中描述的方式来调整传输参数,从而提高传输速率;相对应的,手机和第一耳塞还可以采用类似的方式来调整传输参数,从而降低传输速率。例如,手机进行信道质量监测,并根据信道质量参数 发起对传输速率的调整。若手机通过信道质量监测,确定信道质量参数满足第一预设条件,则可以表明信道质量较好,因而手机可以确定新的传输参数和更新时刻,并发送给第一耳塞;第一耳塞向手机发送确认信息;手机在接收到第一耳塞的确认信息后,实现新的传输参数和更新时刻的协商,以提高传输速率。若手机通过信道质量监测,确定信道质量参数满足第二预设条件,则可以表明信道质量较差,因而手机可以确定新的传输参数和更新时刻,并发送给第一耳塞;第一耳塞向手机发送确认信息;手机在接收到第一耳塞的确认信息后,实现新的传输参数和更新时刻的协商,以降低传输速率。For the adjustment of the transmission parameters, the mobile phone and the first earplug can adjust the transmission parameters in the manner described in scenario 1, so as to increase the transmission rate; correspondingly, the mobile phone and the first earplug can also adjust the transmission parameters in a similar manner, thereby Reduce the transmission rate. For example, the mobile phone monitors the channel quality and initiates the adjustment of the transmission rate according to the channel quality parameters. If the mobile phone determines that the channel quality parameters meet the first preset condition through channel quality monitoring, it can indicate that the channel quality is good, so the mobile phone can determine the new transmission parameters and update time, and send it to the first earbud; Send confirmation information; after receiving the confirmation information of the first earplug, the mobile phone implements negotiation of new transmission parameters and update time to improve the transmission rate. If the mobile phone determines that the channel quality parameter meets the second preset condition through channel quality monitoring, it can indicate that the channel quality is poor, so the mobile phone can determine the new transmission parameters and update time, and send it to the first earbud; Send confirmation information; after receiving the confirmation information of the first earplug, the mobile phone implements the negotiation of new transmission parameters and update time to reduce the transmission rate.
再例如,手机指示第一耳塞进行信道质量的监测。第一耳塞根据手机的指示进行信道质量监测。第一耳塞可以在确定信道质量参数满足第一预设条件时,向手机发送第一信息;手机根据第一信息发起新的传输参数和更新时刻的协商,以提高传输速率。第一耳塞可以在确定信道质量参数满足第二预设条件时,向手机发送第二信息;手机根据第二信息发起新的传输参数和更新时刻的协商,以降低传输速率。For another example, the mobile phone instructs the first earplug to monitor channel quality. The first earplug monitors the channel quality according to the instructions of the mobile phone. The first earplug may send the first information to the mobile phone when it is determined that the channel quality parameter meets the first preset condition; the mobile phone initiates negotiation of new transmission parameters and update time according to the first information to increase the transmission rate. The first earplug may send second information to the mobile phone when it is determined that the channel quality parameter meets the second preset condition; the mobile phone initiates negotiation of new transmission parameters and update time according to the second information to reduce the transmission rate.
此外,在其他实施例中,手机和第一耳塞之间可以根据信道质量的好坏程度,协商不同的传输参数和编码参数。例如,信道质量越好,手机和第一耳塞之间协商的新的传输参数对应的传输速率越高,手机确定的编码参数对应的编码速率也越高;信道质量越差,手机和第一耳塞之间协商的新的传输参数对应的传输速率越低,手机确定的新的编码参数对应的编码速率也越低。举例来说,信道质量参数包括丢包率,若丢包率小于或者等于预设值1,则手机和第一耳塞之间协商的新的传输参数为传输参数1,手机确定的新的编码参数为编码参数1。若丢包率小于或者等于预设值17,则手机和第一耳塞之间协商的新的传输参数为传输参数2,手机确定的新的编码参数为编码参数2。其中,预设值17小于预设值1。丢包率越小表明信道质量越好,传输参数2对应的传输速率高于传输参数1对应的传输速率;编码参数2对应的编码速率高于编码参数1对应的编码速率。在一种实施方案中,信道质量可以包括多个档位,档位越高,表示信道质量越好;且档位越高,手机和第一耳塞之间协商的新的传输参数对应的传输速率越高,手机确定的新的编码参数对应的传输速率也越高。In addition, in other embodiments, different transmission parameters and coding parameters can be negotiated between the mobile phone and the first earbud according to the quality of the channel quality. For example, the better the channel quality, the higher the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earbud, and the higher the encoding rate corresponding to the encoding parameter determined by the mobile phone; the worse the channel quality, the mobile phone and the first earbud The lower the transmission rate corresponding to the new transmission parameter negotiated between, the lower the coding rate corresponding to the new coding parameter determined by the mobile phone. For example, the channel quality parameter includes the packet loss rate. If the packet loss rate is less than or equal to the preset value 1, the new transmission parameter negotiated between the mobile phone and the first earbud is transmission parameter 1, and the new encoding parameter determined by the mobile phone Is encoding parameter 1. If the packet loss rate is less than or equal to the preset value of 17, the new transmission parameter negotiated between the mobile phone and the first earbud is transmission parameter 2, and the new encoding parameter determined by the mobile phone is encoding parameter 2. The preset value 17 is smaller than the preset value 1. The smaller the packet loss rate, the better the channel quality. The transmission rate corresponding to transmission parameter 2 is higher than the transmission rate corresponding to transmission parameter 1; the coding rate corresponding to coding parameter 2 is higher than the coding rate corresponding to coding parameter 1. In one embodiment, the channel quality may include multiple gears, the higher the gear, the better the channel quality; and the higher the gear, the transmission rate corresponding to the new transmission parameter negotiated between the mobile phone and the first earbud The higher the transmission rate corresponding to the new encoding parameter determined by the mobile phone.
在其他实施例中,手机和第一耳塞之间可以根据信道质量提升的幅度或降低的幅度,协商不同的传输参数和编码参数。例如,信道质量提升的幅度越大,手机和第一耳塞之间协商的传输参数对应的传输速率越高,手机确定的编码参数对应的编码速率也越高;信道质量降低的幅度越大,手机和第一耳塞之间协商的新的传输参数对应的传输速率越低,手机确定的编码参数对应的编码速率也越低。举例来说,信道质量参数包括丢包率,若丢包率减小的幅度大于或者等于预设值18,则手机和第一耳塞之间协商的新的传输参数为传输参数3,手机确定的新的编码参数为编码参数3;若丢包率较小的幅度大于或者等于预设值19,则手机和第一耳塞之间协商的新的传输参数为传输参数4,手机确定的新的编码参数为编码参数4。其中,预设值19小于预设值18,丢包率减小的幅度越小表明信道质量提升的幅度越大,传输参数4对应的传输速率高于传输参数3对应的传输速率,编码参数4对应的编码速率高于编码参数3对应的编码速率。在一种实施方案中,信道质量提升的幅度可以包括多个档位,档位越高,表示信道质量提升的幅度越大;且档位越高,手机和第一耳塞之间协商的新的传输参数 对应的传输速率越高,手机确定的新的编码参数对应的编码速率越高。信道质量降低的幅度也可以包括多个档位,档位越高,表示信道质量降低的幅度越大;且档位越高,手机和第一耳塞之间协商的传输参数对应的传输速率越低,手机确定的新的编码参数对应的编码速率越低。In other embodiments, different transmission parameters and coding parameters can be negotiated between the mobile phone and the first earbud according to the amplitude of channel quality increase or decrease. For example, the greater the improvement in channel quality, the higher the transmission rate corresponding to the transmission parameter negotiated between the mobile phone and the first earbud, and the higher the encoding rate corresponding to the encoding parameter determined by the mobile phone; the greater the reduction in channel quality, the mobile phone The lower the transmission rate corresponding to the new transmission parameter negotiated with the first earbud, the lower the encoding rate corresponding to the encoding parameter determined by the mobile phone. For example, the channel quality parameter includes the packet loss rate. If the decrease rate 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 earbud is transmission parameter 3, which is determined by the mobile phone The new encoding parameter is encoding parameter 3; if the smaller 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 earbud is transmission parameter 4, the new encoding determined by the mobile phone The parameter is encoding parameter 4. Among them, the preset value 19 is less than the preset value 18, the smaller the reduction of the packet loss rate indicates the greater the improvement of the channel quality, the transmission rate corresponding to the transmission parameter 4 is higher than the transmission rate corresponding to the transmission parameter 3, and the encoding parameter 4 The corresponding encoding rate is higher than the encoding rate corresponding to encoding parameter 3. In one embodiment, the amplitude of channel quality improvement may include multiple gears, the higher the gear, the greater the amplitude of channel quality improvement; and the higher the gear, the new negotiated between the mobile phone and the first earbud The higher the transmission rate corresponding to the transmission parameter, the higher the coding rate corresponding to the new coding parameter determined by the mobile phone. The channel quality reduction can also include multiple gears. The higher the gear, the greater the reduction in channel quality; and the higher the gear, the lower the transmission rate corresponding to the transmission parameters negotiated between the mobile phone and the first earbud. , The lower the encoding rate corresponding to the new encoding parameter determined by the mobile phone.
并且,传输参数也可以包括多个档位,不同档位的传输参数分别对应不同的传输速率;且传输参数的档位越高,对应的传输速率越高。例如,当前CIS链路对应的传输参数为档位i对应的传输参数;当需要提高传输速率时,手机可以将档位i上一档的传输参数发送给第一耳塞;当需要降低传输速率时,手机可以将档位i下一档的传输参数发送给第一耳塞。示例性的,档位、传输参数、编码参数和传输速率的对应关系可以参见如下表4。In addition, the transmission parameters may also include multiple gears. The transmission parameters of different gears respectively correspond to different transmission rates; and the higher the gear of the transmission parameter, the higher the corresponding transmission rate. For example, the transmission parameter corresponding to the current CIS link is the transmission parameter corresponding to the gear i; when the transmission rate needs to be increased, the mobile phone can send the transmission parameter of the gear on the gear i to the first earbud; when the transmission rate needs to be reduced , The mobile phone can send the transmission parameter of the next gear of gear i to the first earplug. Exemplarily, the correspondence between the gear, the transmission parameter, the coding parameter and the transmission rate can be referred to in Table 4 below.
表4Table 4
Figure PCTCN2018122959-appb-000005
Figure PCTCN2018122959-appb-000005
此外,在其他实施例中,编码参数也可以是手机和第一耳塞协商确定的。例如,手机通知第一耳塞,第一耳塞将编码参数的范围发送给手机,手机根据编码参数的范围确定目标编码参数,并将目标编码参数发送给第一耳塞,手机在接收到第一耳塞的确认消息后,实现编码参数的协商。具体的,手机和第一耳塞对编码参数的协商过程可以类比传输参数的协商过程,此处不再赘述。In addition, in other embodiments, the encoding parameter may also be determined through negotiation between the mobile phone and the first earplug. For example, the mobile phone notifies the first earplug, the first earplug sends the range of coding parameters 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. After confirming the message, the negotiation of encoding parameters is realized. Specifically, the negotiation process of the encoding parameter between the mobile phone and the first earplug can be analogized to the negotiation process of the transmission parameter, which will not be repeated here.
在其他实施例中,上述参考参数可以包括待传输数据量。该待传输数据量可以为上述图5中的缓冲区2中已进行编码且尚未传输的音频数据的数据量。在一种方案中,当待传输数据量大于或者等于第一预设阈值时,可以表明传输速率较低或编码速率较高,待传输数据发生了堆积,因而可以提高传输速率和/或降低编码速率,防止缓冲区2溢出。在另一种方案中,当待传输数据量大于或者等于第一预设阈值时,信道质量可能较差,使得待传输数据发生了堆积,因而可以降低编码速率和传输速率,以使得数据包有更多的重传机会,使得目的端能够正确地接收到数据包,从而提高音频质量。在又一种方案中,当待传输数据量小于或者等于第二预设阈值时,可以表明传输速率较高或编码速率较低,待传输数据量较小,因而可以降低传输速率和/或提高编码速率。在另一种方案中,当待传输数据量小于或者等于第二预设阈值时,待传输数据较少,信道质量可能较好,因而可以提高编码速率和传输速率,提高传输性能。其中,第二预设阈值小于第一预设阈值,例如第一预设阈值可以为80%,第二预设阈值可以为20%。第一预设阈值可以为缓冲区2中的水线1,第二预设阈值可以为缓冲区2中的水线2;第二预设阈值可以小于或者等于第一预设阈值。In other embodiments, the above reference parameter may include the amount of data to be transmitted. The amount of data to be transmitted may be the amount of audio data that has been encoded in the buffer 2 in FIG. 5 and has not been transmitted. In one solution, 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 has accumulated, so the transmission rate may be increased and/or the coding may be reduced Rate to prevent buffer 2 from overflowing. In another solution, when the amount of data to be transmitted is greater than or equal to the first preset threshold, the channel quality may be poor, so that the data to be transmitted has accumulated, so the coding rate and transmission rate may be reduced, so that the data packet has More retransmission opportunities enable the destination to receive data packets correctly, thereby improving audio quality. In yet another solution, 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 high or the coding rate is low, and the amount of data to be transmitted is small, so the transmission rate may be reduced and/or increased Encoding rate. In another solution, when the amount of data to be transmitted is less than or equal to the second preset threshold, there is less data to be transmitted, and the channel quality may be better. Therefore, the coding rate and the transmission rate may be increased, and the transmission performance may be improved. The second preset threshold is less 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 the waterline 1 in the buffer 2 and the second preset threshold may be the 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, according to the above description, when the amount of data to be transmitted is greater than or equal to the first preset threshold, the transmission rate can be reduced or the transmission rate can be increased, but subject to the existing technology, it is more feasible to reduce the transmission rate.
在调整编码速率的一个具体示例中,手机上设置有多个档位(例如表4中所示的档位)的编码速率。若待传输数据量大于或者等于第一预设阈值,需要降低编码速率,则手机可以将编码速率降至最低档位(例如档位1);而后,手机可以周期性地检测待传输数量的大小,若待传输数据量仍大于或者等于第一预设阈值,则手机可以继续采用该最低档位的编码速率;若待传输数据量小于第一预设阈值,则手机可以将编码速率提升一个档位。In a specific example of adjusting the encoding rate, the encoding rate of multiple gears (such as the gears shown in Table 4) is set on the mobile phone. If the amount of data to be transmitted is greater than or equal to the first preset threshold, and the encoding rate needs to be reduced, the mobile phone can reduce the encoding rate to the lowest gear (eg, gear 1); then, the mobile phone can periodically detect the size of the quantity to be transmitted If the amount of data to be transmitted is still greater than or equal to the first preset threshold, the mobile phone can continue to use the encoding rate of the lowest gear; if the amount of data to be transmitted is less than the first preset threshold, the mobile phone can increase the encoding rate by one file Bit.
若待传输数据量小于或者等于第二预设阈值,需要提高编码速率,则手机可以将编码速率升至最高档位;而后,手机可以周期性地检测待传输数量的大小,若待传输数据量仍小于或者等于第二预设阈值,则手机可以继续采用该最高档位的编码速率;若待传输数据量大于第二预设阈值,则手机可以将编码速率降低一个档位。If the amount of data to be transmitted is less than or equal to the second preset threshold, and the encoding rate needs to be increased, the mobile phone can increase the encoding rate to the highest gear; then, the mobile phone can periodically detect the size of the amount to be transmitted, if the amount of data to be transmitted If it is still less than or equal to the second preset threshold, the mobile phone can continue to use the highest encoding rate; if the amount of data to be transmitted is greater than the second preset threshold, the mobile phone can reduce the encoding rate by one gear.
可以理解的是,与多个档位的编码参数类似,手机上也可以有多个档位的传输参数,手机也可以通过多个档位的传输参数来调整传输速率,此处不予赘述。It can be understood that, similar to the coding parameters of multiple gears, there may be transmission parameters of multiple gears on the mobile phone, and the mobile phone may also adjust the transmission rate through the transmission parameters of multiple gears, which will not be repeated here.
在调整编码速率和传输速率的一个具体示例中,参见图16,手机侧包括音频应用,编码器,速率调节模块,发送队列,队列监控模块,协议栈和控制器。第一耳塞侧包括控制器,协议栈,解码器和模拟输出模块。当队列监控模块确定发送队列超过水线1时,待传输数据量大于或者等于第一预设阈值,信道质量可能较差,速率调节模块可以先调节蓝牙编码器,使其编码速率降低,例如修改SBC的bitpool值由53变为35,编码速率由328kbps降至229kbps。然后,速率调节模块控制协议栈更新CIS的传输参数以适配编码速率的变化,协议栈发送上述HCI命令(例如LE Update CIG parameters消息)给控制器,然后控制器通过上述LL命令发送命令(例如上述LL_CIS_update_REQ消息)给对端调整CIS的传输参数。例如,原CIS的传输参数可以包括:Interval=20ms、NSE=8、BN=2,更新后的CIS的新的传输参数可以包括:Interval=20ms、NSE=8、BN=1。更新CIS传输参数的目的是在信道质量变差时,减小实际空口下载技术(over the air technology,OTA)的吞吐量,降低传输速率,以使得每包数据有更多的重传机会,使得目的端能够正确地接收到数据包,从而提高音频质量。In a specific example of adjusting the encoding rate and the transmission rate, referring to FIG. 16, the mobile phone side includes an audio application, an encoder, a rate adjustment module, a sending queue, a queue monitoring module, a protocol stack, and a controller. The first earbud 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 waterline 1, the amount of data to be transmitted is greater than or equal to the first preset threshold, and the channel quality may be poor. The rate adjustment module may first adjust the Bluetooth encoder to reduce its encoding rate, for example, modify The bitpool value of SBC is changed from 53 to 35, and the encoding rate is reduced from 328kbps to 229kbps. Then, the rate adjustment module controls the protocol stack to update the transmission parameters of the CIS to adapt to the change in the encoding rate. The protocol stack sends the above HCI command (such as LE Update CIG parameters message) to the controller, and then the controller sends the command (such as The above LL_CIS_update_REQ message) adjusts the transmission parameters of the CIS to the peer. For example, the transmission parameters of the original CIS may include: Interval=20ms, NSE=8, BN=2, and the new transmission parameters of the updated CIS may include: Interval=20ms, NSE=8, BN=1. The purpose of updating the CIS transmission parameters is to reduce the throughput of the actual air interface download technology (OTA) and reduce the transmission rate when the channel quality deteriorates, so that each packet of data has more opportunities for retransmission, making The destination can correctly receive the data packet, thereby improving the audio quality.
相反的,当队列监控模块确定发送队列低于水线2时,待传输数据量小于或者等于第二预设阈值,信道质量可能较好,速率调节模块还可以先调整传输参数以提高传输速率,再调整编码参数以提高编码速率,使得传输速率和编码速率相适配,此处不予赘述。Conversely, when the queue monitoring module determines that the sending queue is below the waterline 2, the amount of data to be transmitted is less than or equal to the second preset threshold, the channel quality may be better, and the rate adjustment module may first adjust the transmission parameters to increase the transmission rate. Then adjust the encoding parameters to increase the encoding rate, so that the transmission rate and the encoding rate are adapted, which will not be repeated here.
在另一种方案中,手机上保存有预设的待传输数据量与编码参数和传输参数的映射关系。若编码后的音频数据的待传输数据量大于或者等于预设阈值1,则手机根据待传输数据量与预设的待传输数据量与编码参数和传输参数的映射关系,确定新的传输参数,使得采用新的编码参数进行音频数据编码的速率小于采用的原编码参数进行音频数据编码的速率,且采用新的传输参数传送的音频数据的传输速率小于采用原传输参数的传输速率。若编码后的音频数据的待传输数据量小于或者等于预设阈值2,则手机根据待传输数据量与预设的待传输数据量与编码参数和传输参数的映射关系, 确定新的传输参数,使得采用新的编码参数进行音频数据编码的速率大于采用的原编码参数进行音频数据编码的速率,且采用新的传输参数传送的音频数据的传输速率大于采用原传输参数的传输速率。In another solution, a preset mapping relationship between the amount of data to be transmitted and encoding parameters and transmission parameters is stored on the mobile phone. If the data volume of the encoded audio data to be transmitted is greater than or equal to the preset threshold value 1, the mobile phone determines the 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, Therefore, the rate of audio data encoding using the new encoding parameters is lower than the rate of audio data encoding using the original encoding parameters, and the transmission rate of audio data transmitted using the new transmission parameters is lower than the transmission rate using the original transmission parameters. If the data volume of the encoded audio data to be transmitted is less than or equal to the preset threshold 2, the mobile phone determines new transmission parameters 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, The rate of audio data encoding using the new encoding parameters is greater than the rate of audio data encoding using the original encoding parameters, and the transmission rate of audio data transmitted using the new transmission parameters is greater than the transmission rate using the original transmission parameters.
在其他实施例中,上述参考参数可以包括信道质量参数和待传输数据量。在一实施例中,当待传输数据量大于或者等于第三预设阈值,且信道质量参数满足上述实施例中描述的需要提高传输速率和编码速率的情况时,可以采用上述实施例描述的方法调整传输参数和编码参数,从而提高传输速率和编码速率。在另一实施例中,当待传输数据量小于第三预设阈值,且信道质量参数满足上述实施例中描述的需要降低编码速率和传输速率的情况时,可以采用上述实施例描述的方法调整编码参数和传输参数,从而降低编码速率和传输速率。在另一实施例中,当待传输数据量小于第三预设阈值,且信道质量参数满足上述实施例中描述的需要提高传输速率和编码速率的情况时,可以不调整传输参数和编码参数,从而不提高传输速率和编码速率。在另一实施例中,当待传输数据量大于或者等于第三预设阈值,且信道质量参数满足上述实施例中描述的需要降低编码速率和传输速率的情况时,可以不调整传输参数,从而不降低编码速率和传输速率。In other embodiments, the above reference parameters may include channel quality parameters and the 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 situation described in the foregoing embodiment where the transmission rate and coding rate need to be increased, the method described in the foregoing embodiment may be used Adjust the transmission parameters and encoding parameters to increase the transmission rate and encoding rate. In another embodiment, when the amount of data to be transmitted is less than the third preset threshold, and the channel quality parameter satisfies the situation described in the above embodiment where the coding rate and transmission rate need to be reduced, the method described in the above embodiment may be used to adjust Coding parameters and transmission parameters, thereby reducing the coding rate and 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 satisfies the situation described in the above embodiment where the transmission rate and coding rate need to be increased, the transmission parameter and coding parameter may not be adjusted, Never increase the transmission rate and coding rate. In another embodiment, when the amount of data to be transmitted is greater than or equal to the third preset threshold, and the channel quality parameter satisfies the situation described in the foregoing embodiment where the coding rate and transmission rate need to be reduced, the transmission parameter may not be adjusted, thereby Does not reduce the coding rate and transmission rate.
还需要说明的是,以上是以手机通过调整所使用的编码器的编码参数来调整编码速率为例进行说明的。在其他实施例中,手机所使用的编码器还可以包括不同的编码模式,不同的编码模式可以对应不同的编码速率,手机还可以通过切换不同的编码模式来调整编码速率。例如,在一种划分方式中,HWA编码器可以包括高速编码模式、中速编码模式和低速编码模式。若当前使用的编码模式为中速编码模式,则当根据上述参考参数确定需要提高编码速率时,可以切换到高速编码模式;当根据上述参考参数确定需要降低编码速率时,可以切换到低速编码模式。并且,手机还可以在音频数据包中,将当前的编码模式通知给第一耳塞,以便第一耳塞使用相应的解码方式进行解码。It should also be noted that the above description is based on the example that 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 also include different encoding modes, and different encoding modes may correspond to different encoding rates. The mobile phone may also adjust the encoding rate by switching between different encoding modes. For example, in a division manner, the HWA encoder may include a high-speed encoding mode, a medium-speed encoding mode, and a low-speed encoding mode. If the current coding mode is medium speed coding mode, when it is determined that the coding rate needs to be increased according to the above reference parameters, it can be switched to the high speed coding mode; when it is determined that the coding rate needs to be reduced according to the above reference parameters, it can be switched to the low speed coding mode . In addition, the mobile phone can also notify the first earplug of the current encoding mode in the audio data packet, so that the first earplug uses the corresponding decoding method to decode.
在其他实施例中,手机中还可以包括多个不同的编码器,不同的编码器可以对应不同的编码速率,手机还可以通过切换不同的编码器来调整编码速率。例如,在一种划分方式中,手机中的编码器可以包括高音质、中音质和低时延三类编码器。高音质编码器可以包括LDAC编码器、aptX HD编码器、HWA编码器等;中音质类编码器可以包括SBC编码器、AAC编码器、aptX编码器等;低时延编码器可以包括aptX LL编码器、HWA LL编码器等。若当前使用的编码器为中音质编码器,例如,SBC编码器,则当根据上述参考参数确定需要提高编码速率时,可以切换到高音质编码器,例如aptX HD编码器;当根据上述参考参数确定需要降低编码速率时,可以切换到低时延编码器,例如aptX LL编码器。在切换编码器后,手机还可以通过LE ACL链路上的控制信令,将切换后的新的编码器通知给第一耳塞,以便第一耳塞使用相应的解码方式进行解码。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 also adjust the encoding rate by switching different encoders. For example, in a division manner, the encoders in the mobile phone may include three types of encoders with high sound quality, medium sound quality, and low delay. High-quality encoders can include LDAC encoders, aptX HD encoders, HWA encoders, etc.; mid-quality encoders can include SBC encoders, AAC encoders, aptX encoders, etc.; low-latency encoders can include aptX LL encoding Encoder, HWA LL encoder, etc. If the current encoder is a mid-sound quality encoder, such as an SBC encoder, when it is determined that the encoding rate needs to be increased according to the above reference parameters, you can switch to a high-sound quality encoder, such as aptX HD encoder; when based on the above reference parameters When it is determined that the encoding rate needs to be reduced, you can switch to a low-latency encoder, such as the aptX LL encoder. After switching the encoder, the mobile phone can also notify the first earplug of the new encoder after the switch via the control signaling on the LEACL link, so that the first earplug uses the corresponding decoding method to decode.
需要说明的是,在本申请的实施例中,手机调整编码速率和传输速率的策略可以有多种。例如,手机可以采用预设的速率调整方式来调整编码速率和传输速率。再例如,手机上预设有多种速率调整方式,手机可以随机选择其中一种来调整编码速率和传输速率。又例如,手机上可以保存有预设条件与速率调整方式的对应关系,手机可 以在满足某个预设条件时,采用相应的速率调整方式调整编码速率和传输速率。再例如,在调整编码速率时,手机可以每次调整一种不同的编码参数来提高或降低编码速率;在调整传输速率时,手机可以每次调整一种不同的传输速率来提高或降低传输速率。又例如,在信道质量较好时,手机可以调整较少种类的编码参数和传输参数来提高编码速率和传输速率;在信道质量非常好时,手机可以调整较多种类的编码参数和传输参数来提高编码速率和传输速率;对应的,在信道质量较差时,手机可以调整较少种类的编码参数和传输参数来降低编码速率和传输速率;在信道质量非常差时,手机可以调整较多种类的编码参数和传输参数来降低编码速率和传输速率。或者,手机可以每次按照预设顺序或者随机调整一个或多个编码参数和传输参数;调整的过程可以为动态调整,每次按预设步长对参数进行调整,并在调整后继续检测参考参数,并根据检测结果决定是否继续调整以及如何调整。或者,手机可以参考现有技术中已有的速率调整策略来调整传输速率,本申请实施例不予限定。或者,手机可以参考现有技术中已有的速率调整策略来调整编码速率和传输速率,本申请实施例不予限定。It should be noted that, in the embodiments of the present application, there may be multiple strategies for the mobile phone to adjust the coding rate and the transmission rate. For example, the mobile phone can adjust the encoding rate and transmission rate using a preset rate adjustment method. As another example, there are multiple rate adjustment methods preset on the mobile phone, and the mobile phone can randomly select one of them to adjust the encoding rate and the transmission rate. For another example, the correspondence between the preset conditions and the rate adjustment mode can be stored on the mobile phone, and the mobile phone can adjust the encoding rate and the transmission rate by using the corresponding rate adjustment mode when a certain preset condition is met. As another example, when adjusting the encoding rate, the mobile phone can adjust a different encoding parameter to increase or decrease the encoding rate each time; when adjusting the transmission rate, the mobile phone can adjust a different transmission rate to increase or decrease the transmission rate each time . For another example, when the channel quality is good, the mobile phone can adjust fewer coding parameters and transmission parameters to improve the coding rate and transmission rate; when the channel quality is very good, the mobile phone can adjust more coding parameters and transmission parameters to Increase the coding rate and transmission rate; correspondingly, when the channel quality is poor, the mobile phone can adjust fewer types of coding parameters and transmission parameters to reduce the coding rate and transmission rate; when the channel quality is very poor, the mobile phone can adjust more types Encoding parameters and transmission parameters to reduce the encoding rate and transmission rate. Alternatively, the mobile phone can adjust one or more encoding parameters and transmission parameters in a preset order or randomly at a time; the adjustment process can be dynamic adjustment, each time the parameters are adjusted according to a preset step size, and the test is continued after the adjustment Parameters, and decide whether to continue to adjust and how to adjust according to the test results. Alternatively, the mobile phone may refer to the existing rate adjustment strategy in the prior art to adjust the transmission rate, which is not limited in the embodiments of the present application. Or, the mobile phone may refer to the existing rate adjustment strategy in the prior art to adjust the coding rate and the transmission rate, which is not limited in the embodiments of the present application.
还需要说明的是,以上实施例是以双发方案中,手机和TWS耳机的第一耳塞之间自适应调整音频数据的编码速率和传输速率为例进行说明的。在非双发方案中,手机和TWS的主耳塞之间也可以自适应调整音频数据的编码速率传输速率,具体过程可以参见以上实施例中的描述,此处不予赘述。并且,副耳塞还可以从主耳塞获得调整后的新的编码参数和传输参数,从而根据新的编码参数和传输参数接收手机发出的音频数据。It should also be noted that the above embodiment is described by taking the example of adaptively adjusting the encoding rate and transmission rate of audio data between the mobile phone and the first earplug of the TWS headset in the dual-shot scheme. In the non-dual-transmission scheme, the encoding rate and transmission rate of audio data can also be adaptively adjusted between the mobile phone and the main earplug of the TWS. For the specific process, refer to the description in the above embodiment, and details are not described here. In addition, the secondary earplug can also obtain the adjusted new coding parameter and transmission parameter from the main earplug, so as to receive audio data sent by the mobile phone according to the new coding parameter and transmission parameter.
需要注意的是,以上实施例主要是以双发方案中,手机为音频数据的源端,TWS耳机的第一耳塞为音频数据的目的端为例进行说明的,当TWS耳机的第二耳塞为目的端时,编码速率和传输速率的自适应调整过程与上述过程相同,此处不予赘述。It should be noted that in the above embodiment, the mobile phone is the source of audio data, and the first earplug of the TWS earphone is the destination of audio data. For example, when the second earplug of the TWS earphone is At the destination end, the adaptive adjustment process of the coding rate and the transmission rate is the same as the above process and will not be repeated here.
在双发方案中,当手机为音频数据的源端,TWS耳机的两只耳塞分别为音频数据的目的端时,手机向两只耳塞分别发送的音频数据的编码速率和传输速率可以相同,也可以不同,本申请实施例不予限定。对于从手机接收到的音频数据,TWS耳机的两只耳塞可以实现同步播放。In the dual-transmission scheme, when the mobile phone is the source end of audio data and the two earplugs of the TWS earphone are the destination ends of the audio data, the coding rate and transmission rate of the audio data sent by the mobile phone to the two earplugs can be the same, or It may be different, and the embodiments of the present application are not limited. For the audio data received from the mobile phone, the two earplugs of the TWS headset can be synchronized to play.
还需要说明的是,以上实施例是以手机为音频数据的源端,TWS耳塞为音频数据的目的端为例进行说明。在其他一些实施例中,当TWS耳塞为音频数据的源端(例如TWS耳塞的MIC采集到了语音数据),手机为音频数据的目的端时,TWS耳塞仍可以采用上述实施例中的方法自适应调整编码速率和传输速率,此处不予赘述。It should also be noted that the above embodiment takes the mobile phone as the source end of audio data and the TWS earplug as the destination end of audio data for example. In some other embodiments, when the TWS earplug is the source end of the audio data (for example, the MIC of the TWS earplug has collected voice data), and the mobile phone is the destination end of the audio data, the TWS earplug can still adopt the method in the above embodiment to adapt Adjust the coding rate and transmission rate, which will not be repeated here.
可以理解的是,为了实现上述功能,第一BLE设备和第二BLE设备包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above-mentioned functions, the first BLE device and the second BLE device include hardware and/or software modules corresponding to performing each function. With reference to the example algorithm steps described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driven hardware depends on the specific application of the technical solution and design constraints. A person skilled in the art may use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered beyond the scope of the present application.
本申请实施例公开的各个BLE设备都用以实现以上各方法实施例,因此可以根据上述方法示例对第一BLE设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模 块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The BLE devices disclosed in the embodiments of the present application are used to implement the above method embodiments. Therefore, the first BLE device may be divided into function modules according to the above method examples. For example, each function module may be divided corresponding to each function, or the Two or more functions are integrated in one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a division of logical functions. In actual implementation, there may be another division manner.
在采用对应各个功能划分各个功能模块的情况下,图17示出了上述实施例中涉及的第一BLE设备1700的一种可能的组成示意图,如图17所示,该第一BLE设备1700可以包括:连接单元1701、编码单元1702、传输单元1703、获取单元1704和确定单元1705等。In the case where each functional module is divided corresponding to each function, FIG. 17 shows a schematic diagram of a possible composition of the first BLE device 1700 involved in the above embodiment. As shown in FIG. 17, the first BLE device 1700 may Including: connection unit 1701, encoding unit 1702, transmission unit 1703, acquisition unit 1704, determination unit 1705, etc.
其中,连接单元1701可以用于支持第一BLE设备1700执行上述与第二BLE设备建立低功耗异步连接链路LE ACL连接;根据CIS的第一传输参数与第二BLE设备建立CIS连接等步骤,和/或用于本文所描述的技术的其他过程。The connection unit 1701 may be used to support the first BLE device 1700 to perform the foregoing steps of establishing a low-power asynchronous connection link LEACL connection with the second BLE device; establishing a CIS connection with the second BLE device according to the first transmission parameters of the CIS, etc. , And/or other processes used in the techniques described herein.
编码单元1702可以用于支持第一BLE设备1700执行上述基于第一编码参数对音频数据进行编码;基于第二编码参数对音频数据进行编码等步骤,和/或用于本文所描述的技术的其他过程。The encoding unit 1702 may be used to support the first BLE device 1700 to perform the steps of encoding audio data based on the first encoding parameter described above; encoding audio data based on the second encoding parameter, and/or other techniques used in the technology described herein process.
传输单元1703可以用于支持第一BLE设备1700执行上述基于第一传输参数,通过CIS连接向第二BLE设备发送编码后的音频数据;在通过CIS连接向第二BLE设备发送音频数据的同时,通过LE ACL连接将第二传输参数发送给第二BLE设备等步骤,和/或用于本文所描述的技术的其他过程。The transmission unit 1703 may be used to support the first BLE device 1700 to perform the above-described transmission based on the first transmission parameters, and send the encoded audio data to the second BLE device through the CIS connection; while sending the audio data to the second BLE device through the CIS connection, The steps of sending the second transmission parameter to the second BLE device through the LEACL connection, and/or other processes used in the technology described herein.
获取单元1704可以用于支持第一BLE设备1700执行上述获取参考参数等步骤,和/或用于本文所描述的技术的其他过程。The obtaining unit 1704 may be used to support the first BLE device 1700 to perform the above steps of obtaining reference parameters and/or other processes used in the technology described herein.
确定单元1705可以用于支持第一BLE设备1700执行上述根据参考参数确定第二编码参数和第二传输参数等步骤,和/或用于本文所描述的技术的其他过程。The determining unit 1705 may be used to support the first BLE device 1700 to perform the above steps of determining the second encoding parameter and the second transmission parameter according to the reference parameter, and/or other processes used in the technology described herein.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of each step involved in the above method embodiments can be referred to the function description of the corresponding function module, which will not be repeated here.
本实施例提供的第一BLE设备1700,用于执行上述速率控制方法,因此可以达到与上述实现方法相同的效果。The first BLE device 1700 provided in this embodiment is used to perform the above rate control method, and therefore can achieve the same effect as the above implementation method.
在采用集成的单元的情况下,第一BLE设备1700可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对第一BLE设备1700的动作进行控制管理,例如,可以用于支持第一BLE设备1700执行上述连接单元1701、编码单元1702、获取单元1704和确定单元1705执行的步骤。存储模块可以用于支持第一BLE设备1700存储程序代码和数据等。通信模块,可以用于支持第一BLE设备1700与其他设备的通信,例如可以用于支持第一BLE设备1700执行上述传输单元1703执行的步骤。In the case of using an integrated unit, the first BLE device 1700 may include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the actions of the first BLE device 1700, for example, may be used to support the first BLE device 1700 to perform the steps performed by the connection unit 1701, the encoding unit 1702, the acquisition unit 1704, and the determination unit 1705 . The storage module may be used to support the first BLE device 1700 to store program codes and data. The communication module may be used to support communication between the first BLE device 1700 and other devices, for example, may be used to support the first BLE device 1700 to perform the steps performed by the transmission unit 1703.
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他第一BLE设备交互的设备。The processing module may be a processor or a controller. It can implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of the present application. The processor may also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other first BLE devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的第一BLE设备可以为具有图2所示结构的手机100。In one embodiment, when the processing module is a processor and the storage module is a memory, the first BLE device involved in this embodiment may be a mobile phone 100 having the structure shown in FIG. 2.
本申请的实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在第一BLE设备上运行时,使得第一BLE设备执行上述相关 方法步骤实现上述实施例中的速率控制方法。An embodiment of the present application further provides a computer storage medium that stores computer instructions, and when the computer instructions run on the first BLE device, the first BLE device executes the above-mentioned related method steps to implement the above embodiment The rate control method in
本申请的实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中第一BLE设备执行的速率控制方法。An embodiment of the present application also provides a computer program product, which, when the computer program product runs 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 foregoing embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中第一BLE设备执行的速率控制方法。In addition, the embodiments of the present application also provide an apparatus. The apparatus may specifically be a chip, a component, or a module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer-executed instructions. When the apparatus is running, The processor may execute computer execution instructions stored in the memory, so that the chip executes the rate control method executed by the first BLE device in the foregoing method embodiments.
其中,本实施例提供的第一BLE设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。The first BLE device, computer storage medium, computer program product, or chip provided in this embodiment are used to perform the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, refer to the above provided The beneficial effects in the corresponding method will not be repeated here.
在采用对应各个功能划分各个功能模块的情况下,图18示出了上述实施例中涉及的第二BLE设备1800的一种可能的组成示意图,如图18所示,该第二BLE设备1800可以包括:连接单元1801、解码单元1802、传输单元1803和获取单元1804等。In the case where each function module is divided corresponding to each function, FIG. 18 shows a schematic diagram of a possible composition of the second BLE device 1800 involved in the above embodiment. As shown in FIG. 18, the second BLE device 1800 may Including: connection unit 1801, decoding unit 1802, transmission unit 1803, acquisition unit 1804, etc.
其中,连接单元1801可以用于支持第二BLE设备1800执行上述与第一BLE设备建立低功耗异步连接链路LE ACL连接;根据CIS的第一传输参数与第一BLE设备建立CIS连接等步骤,和/或用于本文所描述的技术的其他过程。Wherein, the connection unit 1801 may be used to support the second BLE device 1800 to perform the foregoing steps of establishing a low-power asynchronous connection link LE ACL connection with the first BLE device; establishing a CIS connection with the first BLE device according to the first transmission parameters of the CIS, etc. , And/or other processes used in the techniques described herein.
解码单元1802可以用于支持第二BLE设备1800执行上述基于第一编码参数,对从第一BLE设备接收到的音频数据进行解码;基于第二编码参数,对从第一BLE设备接收到的音频数据进行解码等步骤,和/或用于本文所描述的技术的其他过程。The decoding unit 1802 may be used to support the second BLE device 1800 to perform the decoding of the audio data received from the first BLE device based on the first encoding parameter; based on the second encoding parameter, the audio received from the first BLE device Steps such as decoding the data, and/or other processes used in the techniques described herein.
传输单元1803可以用于支持第二BLE设备1800执行上述基于第一传输参数,通过CIS连接接收第一BLE设备发送的音频数据;在通过CIS连接接收第一BLE设备发送的音频数据的同时,通过LE ACL连接接收第一BLE设备发送的第二传输参数等步骤,和/或用于本文所描述的技术的其他过程。The transmission unit 1803 may be used to support the second BLE device 1800 to perform the above-described first transmission parameters based on receiving the audio data sent by the first BLE device through the CIS connection; while receiving the audio data sent by the first BLE device through the CIS connection, through The LEACL connection receives steps such as the second transmission parameter sent by the first BLE device, and/or other processes used in the technology described herein.
获取单元1804可以用于支持第二BLE设备1800执行上述从第一BLE设备获知第二编码参数等步骤,和/或用于本文所描述的技术的其他过程。The obtaining unit 1804 may be used to support the second BLE device 1800 to perform the above steps of learning the second encoding parameter from the first BLE device, and/or other processes used in the technology described herein.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of each step involved in the above method embodiments can be referred to the function description of the corresponding function module, which will not be repeated here.
本实施例提供的第二BLE设备1800,用于执行上述速率控制方法,因此可以达到与上述实现方法相同的效果。The second BLE device 1800 provided in this embodiment is used to execute the above rate control method, and therefore can achieve the same effect as the above implementation method.
在采用集成的单元的情况下,第二BLE设备1800可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对第二BLE设备1800的动作进行控制管理,例如,可以用于支持第二BLE设备1800执行上述连接单元1801、解码单元1802和获取单元1804执行的步骤。存储模块可以用于支持第二BLE设备1800存储程序代码和数据等。通信模块,可以用于支持第二BLE设备1800与其他设备的通信,例如可以用于支持第二BLE设备1800执行上述传输单元1803执行的步骤。In the case of using an integrated unit, the second BLE device 1800 may include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the actions of the second BLE device 1800. For example, it may be used to support the second BLE device 1800 to perform the steps performed by the connection unit 1801, the decoding unit 1802, and the acquisition unit 1804. The storage module may be used to support the second BLE device 1800 to store program codes and data. The communication module may be used to support communication between the second BLE device 1800 and other devices, for example, may be used to support the second BLE device 1800 to perform the steps performed by the transmission unit 1803.
在一个实施例中,本实施例所涉及的第二BLE设备可以为具有图3A所示结构的TWS耳机。In one embodiment, the second BLE device involved in this embodiment may be a TWS earphone with the structure shown in FIG. 3A.
本申请的实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机 指令,当该计算机指令在第二BLE设备上运行时,使得第二BLE设备执行上述相关方法步骤实现上述实施例中的速率控制方法。An embodiment of the present application further provides a computer storage medium that stores computer instructions, and when the computer instructions run on the second BLE device, the second BLE device executes the above-mentioned related method steps to implement the above embodiment The rate control method in
本申请的实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中第二BLE设备执行的速率控制方法。An embodiment of the present application also provides a computer program product, which, when the computer program product runs on a computer, causes the computer to perform the above-mentioned related steps to implement the rate control method performed by the second BLE device in the foregoing embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中第二BLE设备执行的速率控制方法。In addition, the embodiments of the present application also provide an apparatus. The apparatus may specifically be a chip, a component, or a module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer-executed instructions. When the apparatus is running, The processor may execute computer execution instructions stored in the memory, so that the chip executes the rate control method performed by the second BLE device in the foregoing method embodiments.
其中,本实施例提供的第二BLE设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the second BLE device, computer storage medium, computer program product or chip provided in this embodiment are used to perform the corresponding methods provided above, therefore, for the beneficial effects that can be achieved, refer to the above provided The beneficial effects in the corresponding method will not be repeated here.
本申请另一实施例提供了一种系统,该系统可以包括上述第一BLE设备和第二BLE设备,可以用于实现上述速率控制方法。Another embodiment of the present application provides a system, which may include the foregoing first BLE device and second BLE device, and may be used to implement the foregoing rate control method.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and conciseness of description, only the above-mentioned division of each functional module is used as an example for illustration. In actual applications, the above-mentioned functions can be allocated by different The functional module is completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a division of logical functions. In actual implementation, there may be other divisions, for example, multiple units or components may be The combination can either be integrated into another device, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical, or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or software function unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on such an understanding, the technical solutions of the embodiments of the present application may essentially be part of or contribute to the prior art or all or part of the technical solutions may be embodied in the form of software products, which are stored in a storage medium In it, several instructions are included to enable a device (which may be a single-chip microcomputer, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage media include: U disk, mobile hard disk, read-only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above content is only the specific implementation of this application, but the scope of protection of this application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application. Covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (45)

  1. 一种速率控制方法,其特征在于,包括:A rate control method, which includes:
    第一低功耗蓝牙BLE设备与第二BLE设备建立低功耗异步连接链路LE ACL连接;The first low-power Bluetooth BLE device establishes a low-power asynchronous connection link LE ACL connection with the second BLE device;
    所述第一BLE设备根据基于连接的等时音频流CIS的第一传输参数与第二BLE设备建立CIS连接;所述第一传输参数用于确定音频数据的传输速率;The first BLE device establishes a CIS connection with the second BLE device according to the first transmission parameter of the connected isochronous audio stream CIS; the first transmission parameter is used to determine the transmission rate of audio data;
    所述第一BLE设备采用第一编码参数对音频数据进行编码;所述第一编码参数用于确定音频数据的编码速率;The first BLE device uses first encoding parameters to encode audio data; the first encoding parameters are used to determine the encoding rate of audio data;
    所述第一BLE设备采用所述第一传输参数,通过所述CIS连接向所述第二BLE设备发送采用第一编码参数编码后的音频数据;The first BLE device uses the first transmission parameter to send audio data encoded with the first encoding parameter to the second BLE device through the CIS connection;
    所述第一BLE设备确定第二编码参数和第二传输参数,所述第二编码参数用于确定音频数据的编码速率,且所述第二编码参数不同于所述第一编码参数;所述第二传输参数用于确定音频数据的传输速率,且所述第二传输参数不同于所述第一传输参数;The first BLE device determines a second encoding parameter and a second transmission 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; The second transmission parameter is used to determine the transmission rate of the audio data, and the second transmission parameter is different from the first transmission parameter;
    所述第一BLE设备采用所述第二编码参数对音频数据进行编码;The first BLE device uses the second encoding parameter to encode audio data;
    所述第一BLE设备在采用所述第一传输参数,通过所述CIS连接向所述第二BLE设备发送音频数据的同时,通过所述LE ACL连接将所述第二传输参数发送给所述第二BLE设备;The first BLE device uses the first transmission parameter to send audio data to the second BLE device through the CIS connection, and sends the second transmission parameter to the second BLE device through the LEACL connection Second BLE device;
    所述第一BLE设备采用所述第二传输参数,通过所述CIS连接向所述第二BLE设备发送采用所述第二编码参数编码后的音频数据。The first BLE device uses the second transmission parameter to send audio data encoded with the second encoding parameter to the second BLE device through the CIS connection.
  2. 根据权利要求1所述的方法,其特征在于,在所述第一BLE设备确定第二编码参数和第二传输参数之前,所述方法还包括:The method according to claim 1, wherein before the first BLE device determines the second encoding parameter and the second transmission parameter, the method further comprises:
    所述第一BLE设备获取参考参数;The first BLE device obtains reference parameters;
    所述第一BLE设备确定第二编码参数和第二传输参数,包括:The determination of the second encoding parameter and the second transmission parameter by the first BLE device includes:
    所述第一BLE设备在所述参考参数满足预设条件时,根据所述参考参数确定所述第二编码参数和所述第二传输参数。When the reference parameter satisfies a preset condition, the first BLE device determines the second encoding parameter and the second transmission parameter according to the reference parameter.
  3. 根据权利要求2所述的方法,其特征在于,所述参考参数包括所述CIS连接的信道质量参数;所述第一BLE设备在所述参考参数满足预设条件时,根据所述参考参数确定所述第二编码参数和所述第二传输参数,包括:The method according to claim 2, wherein the reference parameter includes a channel quality parameter of the CIS connection; the first BLE device determines according to the reference parameter when the reference parameter meets a preset condition The second encoding parameter and the second transmission parameter include:
    若所述CIS连接的信道质量参数大于或者等于第一预设值,则所述第一BLE设备根据所述CIS连接的信道质量参数确定所述第二编码参数和所述第二传输参数,使得所述第二编码参数确定的编码速率大于所述第一编码参数确定的编码速率,所述第二传输参数确定的传输速率大于所述第一传输参数确定的传输速率;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;
    若所述CIS连接的信道质量参数小于第二预设值,则所述第一BLE设备根据所述CIS连接的信道质量参数确定所述第二传输参数,使得所述第二编码参数确定的编码速率小于所述第一编码参数确定的编码速率,所述第二传输参数确定的传输速率小于所述第一传输参数确定的传输速率。If the channel quality parameter of the CIS connection is less than the second preset value, the first BLE device determines the second transmission parameter according to the channel quality parameter of the CIS connection, so that the encoding determined by the second encoding parameter The rate 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.
  4. 根据权利要求3所述的方法,其特征在于,若所述CIS连接的信道质量参数大于或者等于第一预设值,则在所述第一BLE设备采用所述第二编码参数对音频数据进行编码之后,所述第一BLE设备采用所述第二传输参数,通过所述CIS连接向所述第 二BLE设备发送采用所述第二编码参数编码后的音频数据;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 second encoding parameter is used to perform audio data processing on the first BLE device After encoding, the first BLE device uses the second transmission parameter, and sends audio data encoded with the second encoding parameter to the second BLE device through the CIS connection;
    若所述CIS连接的信道质量参数小于第二预设值,则在所述第一BLE设备采用所述第二编码参数对音频数据进行编码之前,所述第一BLE设备采用所述第二传输参数,通过所述CIS连接向所述第二BLE设备发送采用所述第二编码参数编码后的音频数据。If the channel quality parameter of the CIS connection is less than a second preset value, before the first BLE device uses the second encoding parameter to encode audio data, the first BLE device uses the second transmission Parameter, sending audio data encoded with the second encoding parameter to the second BLE device through the CIS connection.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述信道质量参数包括丢包率,所述第二编码参数包括bitpool值;所述第一BLE设备根据所述参考参数确定所述第二编码参数,包括:The method according to any one of claims 2-4, wherein the channel quality parameter includes a packet loss rate, and the second encoding parameter includes a bitpool value; the first BLE device determines according to the reference parameter The second encoding parameter includes:
    所述第一BLE设备根据所述丢包率确定对应的目标编码速率和目标bitpool值,所述第二编码参数包括所述目标bitpool值。The first BLE device determines the corresponding target coding rate and target bitpool value according to the packet loss rate, and the second coding parameter includes the target bitpool value.
  6. 根据权利要求2-4任一项所述的方法,其特征在于,所述参考参数包括编码后的音频数据的待传输数据量,所述第一BLE设备在所述参考参数满足预设条件时,根据所述参考参数确定所述第二传输参数,包括:The method according to any one of claims 2-4, wherein the reference parameter includes a data volume of encoded audio data to be transmitted, and the first BLE device when the reference parameter meets a preset condition , Determining the second transmission parameter according to the reference parameter, including:
    若编码后的音频数据的待传输数据量大于或者等于预设阈值,则所述第一BLE设备根据所述待传输数据量与预设的待传输数据量与编码参数和传输参数的映射关系,确定所述第二编码参数和所述第二传输参数,使得所述第二编码参数确定的编码速率小于所述第一编码参数确定的编码速率,所述第二传输参数确定的传输速率小于所述第一传输参数确定的传输速率。If the data volume of the encoded audio data to be transmitted is greater than or equal to a preset threshold, the first BLE device 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, Determining the second encoding parameter and the second 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 all The transmission rate determined by the first transmission parameter.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,在所述第一BLE设备采用所述第二传输参数,通过所述CIS连接向所述第二BLE设备发送音频数据之前,所述方法还包括:The method according to any one of claims 1 to 6, wherein before the first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, The method also includes:
    所述第一BLE设备将更新时刻指示信息发送给所述第二BLE设备;The first BLE device sends update time indication information to the second BLE device;
    所述第一BLE设备采用所述第二传输参数,通过所述CIS连接向所述第二BLE设备发送音频数据,包括:The first BLE device uses the second transmission parameter to send audio data to the second BLE device through the CIS connection, including:
    所述第一BLE设备在所述更新时刻指示信息所指示的时刻,采用所述第二传输参数,通过所述CIS连接向所述第二BLE设备发送音频数据。The first BLE device uses the second transmission parameter to transmit audio data to the second BLE device through the CIS connection at the time indicated by the update time indication information.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,在所述第一BLE设备确定所述第二编码参数之后,所述方法还包括: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:
    所述第一BLE设备将所述第二编码参数通知给所述第二BLE设备。The first BLE device notifies the second coding parameter to the second BLE device.
  9. 根据权利要求8所述的方法,其特征在于,采用所述第二编码参数编码后的音频数据中包括所述第二编码参数的指示信息。The method according to claim 8, wherein the audio data encoded with the second encoding parameter includes indication information of the second encoding parameter.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述第一BLE设备包括第一主机和第一链路层,所述第二BLE设备包括第二链路层;所述第一BLE设备通过所述LE ACL连接将所述第二传输参数发送给所述第二BLE设备,包括:The method according to any one of claims 1-9, wherein the first BLE device includes a first host and a first link layer, and the second BLE device includes a second link layer; The first BLE device sends the second transmission parameter to the second BLE device through the LEACL connection, including:
    所述第一主机向所述第一链路层发送参数更新信息,所述参数更新信息包括所述第二传输参数;The first host sends parameter update information to the first link layer, where the parameter update information includes the second transmission parameter;
    所述第一链路层向所述第二链路层发送CIS更新请求信息,所述CIS更新请求信息包括所述第二传输参数。The first link layer sends CIS update request information to the second link layer, where the CIS update request information includes the second transmission parameter.
  11. 根据权利要求10所述的方法,其特征在于,所述第一主机与所述第一链路层之间通过主机控制器接口协议HCI命令交互信息;所述第一链路层与所述第二链路层 之间通过链路层LL命令交互信息。The method according to claim 10, wherein the first host and the first link layer exchange information through a host controller interface protocol HCI command; the first link layer and the first link layer The two link layers exchange information through link layer LL commands.
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述参考参数包括所述CIS连接的信道质量参数,所述第一BLE设备获取所述CIS连接的信道质量参数包括:The method according to any one of claims 1-11, wherein the reference parameter includes a channel quality parameter of the CIS connection, and the first BLE device acquiring the channel quality parameter of the CIS connection includes:
    所述第一BLE设备从自身获取所述CIS连接的信道质量参数;或者,The first BLE device acquires the channel quality parameter of the CIS connection from itself; or,
    所述第一BLE设备从所述第二BLE设备获取所述CIS连接的信道质量参数。The first BLE device acquires the channel quality parameter of the CIS connection from the second BLE device.
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述第二传输参数包括以下一种或多种:突发数量BN、子事件数量NSE、刷新超时FT、子事件时长和PHY类型;其中,所述PHY类型包括传输的带宽和调制方式。The method according to any one of claims 1-12, wherein the second transmission parameter includes one or more of the following: number of bursts BN, number of sub-events NSE, refresh timeout FT, sub-event duration and PHY type; wherein, the PHY type includes transmission bandwidth and modulation method.
  14. 一种传输速率控制方法,其特征在于,包括:A transmission rate control method, which includes:
    第二低功耗蓝牙BLE设备与第一BLE设备建立低功耗异步连接链路LE ACL连接;The second low-power Bluetooth BLE device establishes a low-power asynchronous connection link LE ACL connection with the first BLE device;
    所述第二BLE设备根据基于连接的等时音频流CIS的第一传输参数与所述第一BLE设备建立CIS连接;所述第一传输参数用于确定音频数据的传输速率;The second BLE device establishes a CIS connection with the first BLE device based on the first transmission parameter of the connected isochronous audio stream CIS; the first transmission parameter is used to determine the transmission rate of audio data;
    所述第二BLE设备采用所述第一传输参数,通过所述CIS连接接收所述第一BLE设备发送的音频数据;The second BLE device uses the first transmission parameter to receive audio data sent by the first BLE device through the CIS connection;
    所述第二BLE设备根据第一编码参数,对从所述第一BLE设备接收到的音频数据进行解码;所述第一编码参数用于确定音频数据的编码速率;The second BLE device decodes the audio data received from the first BLE device according to the first encoding parameter; the first encoding parameter is used to determine the encoding rate of the audio data;
    若所述第二BLE设备从所述第一BLE设备获取到所述第二编码参数,则所述第二BLE设备根据第二编码参数,对从所述第一BLE设备接收到的音频数据进行解码;所述第二编码参数用于确定音频数据的编码速率,且所述第二编码参数不同于所述第一编码参数;If the second BLE device obtains the second encoding parameter from the first BLE device, the second BLE device performs audio data received from the first BLE device according to the second encoding parameter Decoding; the second encoding parameter is used to determine the encoding rate of the audio data, and the second encoding parameter is different from the first encoding parameter;
    若所述第二BLE设备在采用所述第一传输参数,通过所述CIS连接接收所述第一BLE设备发送的音频数据的同时,通过所述LE ACL连接接收所述第一BLE设备发送的第二传输参数;所述第二传输参数用于确定音频数据的传输速率,且所述第二传输参数不同于所述第一传输参数;则所述第二BLE设备采用所述第二传输参数,通过所述CIS连接接收所述第一BLE设备发送的音频数据。If the second BLE device uses the first transmission parameter and receives the audio data sent by the first BLE device through the CIS connection, it receives the first BLE device sent through the LEACL connection A second transmission parameter; the second transmission parameter is used to determine a transmission rate of audio data, and the second transmission parameter is different from the first transmission parameter; then the second BLE device adopts the second transmission parameter , Receiving audio data sent by the first BLE device through the CIS connection.
  15. 根据权利要求14所述的方法,其特征在于,所述第二BLE设备从所述第一BLE设备获取到所述第二编码参数,包括:The method according to claim 14, wherein the second BLE device acquiring the second encoding parameter from the first BLE device includes:
    所述第二BLE设备从所述第一BLE设备发送的采用所述第二编码参数编码后的音频数据中获取所述第二编码参数。The second BLE device obtains the second encoding parameter from the audio data sent by the first BLE device and encoded with the second encoding parameter.
  16. 根据权利要求14或15所述的方法,其特征在于,在所述第二BLE设备采用所述第二传输参数,通过所述CIS连接接收所述第一BLE设备发送的音频数据之前,所述方法还包括:The method according to claim 14 or 15, wherein before the second BLE device uses the second transmission parameter to receive audio data sent by the first BLE device through the CIS connection, the The method also includes:
    所述第二BLE设备接收所述第一BLE设备发送的更新时刻指示信息;The second BLE device receives update time indication information sent by the first BLE device;
    所述第二BLE设备采用所述第二传输参数,通过所述CIS连接接收所述第一BLE设备发送的音频数据,包括:The second BLE device uses the second transmission parameter to receive audio data sent by the first BLE device through the CIS connection, including:
    所述第二BLE设备在所述更新时刻指示信息所指示的时刻,采用所述第二传输参数,通过所述CIS连接接收所述第一BLE设备发送的音频数据。The second BLE device receives the audio data sent by the first BLE device through the CIS connection using the second transmission parameter at the time indicated by the update time indication information.
  17. 根据权利要求14-16任一项所述的方法,其特征在于,所述第一BLE设备包 括第一链路层,所述第二BLE设备包括第二主机和第二链路层;所述第二BLE设备通过所述LE ACL连接接收所述第一BLE设备发送的第二传输参数,包括:The method according to any one of claims 14 to 16, wherein the first BLE device includes a first link layer, and the second BLE device includes a second host and a second link layer; The second BLE device receives the second transmission parameter sent by the first BLE device through the LEACL connection, including:
    所述第二链路层接收所述第一链路层发送的CIS更新请求信息,所述更新请求信息中包括所述第二传输参数。The second link layer receives CIS update request information sent by the first link layer, and the update request information includes the second transmission parameter.
  18. 根据权利要求17所述的方法,其特征在于,所述第二主机与所述第二链路层之间通过主机控制器接口协议HCI命令交互信息;所述第一链路层与所述第二链路层之间通过链路层LL命令交互信息。The method according to claim 17, wherein the second host and the second link layer exchange information through a host controller interface protocol HCI command; the first link layer and the first The two link layers exchange information through link layer LL commands.
  19. 根据权利要求14-18任一项所述的方法,其特征在于,在所述第二BLE设备通过所述LE ACL连接接收所述第一BLE设备发送的第二传输参数,以及所述第二BLE设备采用第二编码参数,对从所述第一BLE设备接收到的音频数据进行解码之前,所述方法还包括:The method according to any one of claims 14 to 18, wherein the second BLE device receives the second transmission parameter sent by the first BLE device through the LEACL connection, and the second Before the BLE device uses the second encoding parameter to decode the audio data received from the first BLE device, the method further includes:
    所述第二BLE设备向所述第一BLE设备发送所述CIS连接的信道质量参数。The second BLE device sends the channel quality parameter of the CIS connection to the first BLE device.
  20. 根据权利要求14-19任一项所述的方法,其特征在于,所述第二BLE设备为无线耳机。The method according to any one of claims 14-19, wherein the second BLE device is a wireless headset.
  21. 一种低功耗蓝牙BLE设备,其特征在于,包括:一个或多个处理器;一个或多个存储器;其中所述一个或多个存储器中存储有计算机程序指令,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:A Bluetooth low energy BLE device, characterized by comprising: one or more processors; one or more memories; wherein the one or more memories store computer program instructions, when the instructions are When executed by one or more processors, the BLE device performs the following steps:
    与另一BLE设备建立低功耗异步连接链路LE ACL连接;Establish a low-power asynchronous connection link LE ACL connection with another BLE device;
    根据基于连接的等时音频流CIS的第一传输参数与另一BLE设备建立CIS连接;所述第一传输参数用于确定音频数据的传输速率;Establishing a CIS connection with another BLE device according to the first transmission parameter of the connected isochronous audio stream CIS; the first transmission parameter is used to determine the transmission rate of audio data;
    采用第一编码参数对音频数据进行编码;所述第一编码参数用于确定音频数据的编码速率;The first encoding parameter is used to encode the audio data; the first encoding parameter is used to determine the encoding rate of the audio data;
    采用所述第一传输参数,通过所述CIS连接向所述另一BLE设备发送编码后的音频数据;Using the first transmission parameter to send the encoded audio data to the another BLE device through the CIS connection;
    确定第二编码参数和第二传输参数,所述第二编码参数用于确定音频数据的编码速率,且所述第二编码参数不同于所述第一编码参数;所述第二传输参数用于确定音频数据的传输速率,且所述第二传输参数不同于所述第一传输参数;Determining a second encoding parameter and a second transmission 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; the second transmission parameter is used Determining a transmission rate of audio data, and the second transmission parameter is different from the first transmission parameter;
    采用所述第二编码参数对音频数据进行编码;Encoding the audio data using the second encoding parameter;
    在采用所述第一传输参数,通过所述CIS连接向所述另一BLE设备发送音频数据的同时,通过所述LE ACL连接将所述第二传输参数发送给所述另一BLE设备;Using the first transmission parameter to send audio data to the other BLE device through the CIS connection, and sending the second transmission parameter to the other BLE device through the LEACL connection;
    采用所述第二传输参数,通过所述CIS连接向所述另一BLE设备发送采用所述第二编码参数编码后的音频数据。Using the second transmission parameter, audio data encoded with the second encoding parameter is sent to the another BLE device through the CIS connection.
  22. 根据权利要求21所述的设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to claim 21, wherein when the instruction is executed by the one or more processors, the BLE device is caused to perform the following steps:
    在确定第二编码参数和第二传输参数之前,获取参考参数;Before determining the second encoding parameter and the second transmission parameter, obtain the reference parameter;
    在所述参考参数满足预设条件时,根据所述参考参数确定所述第二编码参数和所述第二传输参数。When the reference parameter satisfies a preset condition, the second encoding parameter and the second transmission parameter are determined according to the reference parameter.
  23. 根据权利要求22所述的设备,其特征在于,所述参考参数包括所述CIS连接的信道质量参数;当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执 行以下步骤:The device according to claim 22, wherein the reference parameter includes a channel quality parameter of the CIS connection; when the instruction is executed by the one or more processors, the BLE device performs the following step:
    若所述CIS连接的信道质量参数大于或者等于第一预设值,则根据所述CIS连接的信道质量参数确定所述第二编码参数和所述第二传输参数,使得所述第二编码参数确定的编码速率大于所述第一编码参数确定的编码速率,所述第二传输参数确定的传输速率大于所述第一传输参数确定的传输速率;If the channel quality parameter of the CIS connection is greater than or equal to a first preset value, the second encoding parameter and the second transmission parameter are determined according to the channel quality parameter of the CIS connection, so that the second encoding parameter The determined encoding rate 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;
    若所述CIS连接的信道质量参数小于第二预设值,则根据所述CIS连接的信道质量参数确定所述第二传输参数,使得所述第二编码参数确定的编码速率小于所述第一编码参数确定的编码速率,所述第二传输参数确定的传输速率小于所述第一传输参数确定的传输速率。If the channel quality parameter of the CIS connection is less than the second preset value, the second transmission parameter is determined according to the channel quality parameter of the CIS connection, so that the coding rate determined by the second coding parameter is less than the first The coding rate determined by the coding parameter, the transmission rate determined by the second transmission parameter is less than the transmission rate determined by the first transmission parameter.
  24. 根据权利要求23所述的设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to claim 23, wherein when the instruction is executed by the one or more processors, the BLE device is caused to perform the following steps:
    若所述CIS连接的信道质量参数大于或者等于第一预设值,则在采用所述第二编码参数对音频数据进行编码之后,采用所述第二传输参数,通过所述CIS连接向所述另一BLE设备发送采用所述第二编码参数编码后的音频数据;If the channel quality parameter of the CIS connection is greater than or equal to the first preset value, then after the second encoding parameter is used to encode the audio data, the second transmission parameter is used to pass the CIS connection to the Another BLE device sends audio data encoded using the second encoding parameter;
    若所述CIS连接的信道质量参数小于第二预设值,则在采用所述第二编码参数对音频数据进行编码之前,采用所述第二传输参数,通过所述CIS连接向所述另一BLE设备发送采用所述第二编码参数编码后的音频数据。If the channel quality parameter of the CIS connection is less than the second preset value, before encoding the audio data using the second encoding parameter, the second transmission parameter is used to pass the CIS connection to the other The BLE device sends audio data encoded using the second encoding parameter.
  25. 根据权利要求22-24任一项所述的设备,其特征在于,所述信道质量参数包括丢包率,所述第二编码参数包括bitpool值;当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to any one of claims 22-24, wherein the channel quality parameter includes a packet loss rate, and the second encoding parameter includes a bitpool value; when the instruction is processed by the one or more When the device is executed, the BLE device is caused to perform the following steps:
    根据所述丢包率确定对应的目标编码速率和目标bitpool值,所述第二编码参数包括所述目标bitpool值。The corresponding target coding rate and target bitpool value are determined according to the packet loss rate, and the second coding parameter includes the target bitpool value.
  26. 根据权利要求22-24任一项所述的设备,其特征在于,所述参考参数包括编码后的音频数据的待传输数据量,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to any one of claims 22-24, wherein the reference parameter includes a data volume of encoded audio data to be transmitted, and when the instruction is executed by the one or more processors, Causing the BLE device to perform the following steps:
    若编码后的音频数据的待传输数据量大于或者等于预设阈值,则根据所述待传输数据量与预设的待传输数据量与编码参数和传输参数的映射关系,确定所述第二编码参数和所述第二传输参数,使得所述第二编码参数确定的编码速率小于所述第一编码参数确定的编码速率,所述第二传输参数确定的传输速率小于所述第一传输参数确定的传输速率。If the data volume of the encoded audio data to be transmitted is greater than or equal to a preset threshold, the second encoding is determined 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 Parameters and the second transmission parameter, such that the coding rate determined by the second coding parameter is less than the coding rate determined by the first coding parameter, and the transmission rate determined by the second transmission parameter is less than determined by the first transmission parameter Transfer rate.
  27. 根据权利要求21-26任一项所述的设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to any one of claims 21 to 26, wherein when the instruction is executed by the one or more processors, the BLE device is caused to perform the following steps:
    在采用所述第二传输参数,通过所述CIS连接向所述另一BLE设备发送音频数据之前,将更新时刻指示信息发送给所述另一BLE设备;Before using the second transmission parameter to send audio data to the another BLE device through the CIS connection, send update time indication information to the another BLE device;
    在所述更新时刻指示信息所指示的时刻,采用所述第二传输参数,通过所述CIS连接向所述另一BLE设备发送音频数据。At the time indicated by the update time indication information, the second transmission parameter is used to send audio data to the other BLE device through the CIS connection.
  28. 根据权利要求21-27任一项所述的设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to any one of claims 21-27, wherein when the instruction is executed by the one or more processors, the BLE device is caused to perform the following steps:
    在确定所述第二编码参数之后,将所述第二编码参数通知给所述另一BLE设备。After determining the second encoding parameter, notify the other BLE device of the second encoding parameter.
  29. 根据权利要求28所述的设备,其特征在于,采用所述第二编码参数编码后的音频数据中包括所述第二编码参数的指示信息。The device according to claim 28, wherein the audio data encoded with the second encoding parameter includes indication information of the second encoding parameter.
  30. 根据权利要求21-29任一项所述的设备,其特征在于,所述BLE设备包括第一主机和第一链路层,所述另一BLE设备包括第二链路层;当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to any one of claims 21 to 29, wherein the BLE device includes a first host and a first link layer, and the other BLE device includes a second link layer; when the instruction When executed by the one or more processors, the BLE device is caused to perform the following steps:
    所述第一主机向所述第一链路层发送参数更新信息,所述参数更新信息包括所述第二传输参数;The first host sends parameter update information to the first link layer, where the parameter update information includes the second transmission parameter;
    所述第一链路层向所述第二链路层发送CIS更新请求信息,所述CIS更新请求信息中包括所述第二传输参数。The first link layer sends CIS update request information to the second link layer, and the CIS update request information includes the second transmission parameter.
  31. 根据权利要求30所述的设备,其特征在于,所述第一主机与所述第一链路层之间通过主机控制器接口协议HCI命令交互信息;所述第一链路层与所述第二链路层之间通过链路层LL命令交互信息。The device according to claim 30, wherein the first host and the first link layer exchange information through a host controller interface protocol HCI command; the first link layer and the first link layer The two link layers exchange information through link layer LL commands.
  32. 根据权利要求21-31任一项所述的设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to any one of claims 21 to 31, wherein when the instruction is executed by the one or more processors, the BLE device is caused to perform the following steps:
    从自身获取所述CIS连接的信道质量参数;或者,Obtain the channel quality parameter of the CIS connection from itself; or,
    从所述另一BLE设备获取所述CIS连接的信道质量参数。Acquiring the channel quality parameter of the CIS connection from the another BLE device.
  33. 根据权利要求21-32任一项所述的设备,其特征在于,所述第二传输参数包括以下一种或多种:突发数量BN、子事件数量NSE、刷新超时FT、子事件时长和PHY类型;其中,所述PHY类型包括传输的带宽和调制方式。The device according to any one of claims 21 to 32, wherein the second transmission parameter includes one or more of the following: number of bursts BN, number of sub-events NSE, refresh timeout FT, duration of sub-events, and PHY type; wherein, the PHY type includes transmission bandwidth and modulation method.
  34. 根据权利要求21-33任一项所述的设备,其特征在于,所述BLE设备为芯片。The device according to any one of claims 21 to 33, wherein the BLE device is a chip.
  35. 一种低功耗蓝牙BLE设备,其特征在于,包括:一个或多个处理器;一个或多个存储器;其中所述一个或多个存储器中存储有计算机程序指令,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:A Bluetooth low energy BLE device, characterized by comprising: one or more processors; one or more memories; wherein the one or more memories store computer program instructions, when the instructions are When executed by one or more processors, the BLE device performs the following steps:
    与另一BLE设备建立低功耗异步连接链路LE ACL连接;Establish a low-power asynchronous connection link LE ACL connection with another BLE device;
    根据基于连接的等时音频流CIS的第一传输参数与所述另一BLE设备建立CIS连接;所述第一传输参数用于确定音频数据的传输速率;Establishing a CIS connection with the another BLE device according to the first transmission parameter of the connected isochronous audio stream CIS; the first transmission parameter is used to determine the transmission rate of audio data;
    采用所述第一传输参数,通过所述CIS连接接收所述另一BLE设备发送的音频数据;Using the first transmission parameter to receive audio data sent by the other BLE device through the CIS connection;
    根据第一编码参数,对从所述另一BLE设备接收到的音频数据进行解码;所述第一编码参数用于确定音频数据的编码速率;Decoding the audio data received from the another BLE device according to the first encoding parameter; the first encoding parameter is used to determine the encoding rate of the audio data;
    若从所述另一BLE设备获取到所述第二编码参数,则根据第二编码参数,对从所述另一BLE设备接收到的音频数据进行解码;所述第二编码参数用于确定音频数据的编码速率,且所述第二编码参数不同于所述第一编码参数;If the second encoding parameter is obtained from the other BLE device, then the audio data received from the other BLE device is decoded according to the second encoding parameter; the second encoding parameter is used to determine the audio An encoding rate of data, and the second encoding parameter is different from the first encoding parameter;
    若在采用所述第一传输参数,通过所述CIS连接接收所述另一BLE设备发送的音频数据的同时,通过所述LE ACL连接接收所述另一BLE设备发送的第二传输参数;所述第二传输参数用于确定音频数据的传输速率,且所述第二传输参数不同于所述第一传输参数;则采用所述第二传输参数,通过所述CIS连接接收所述另一BLE设备发送的音频数据。If the first transmission parameter is used, while receiving the audio data sent by the other BLE device through the CIS connection, the second transmission parameter sent by the other BLE device is received through the LEACL connection; The second transmission parameter is used to determine a transmission rate of audio data, and the second transmission parameter is different from the first transmission parameter; then the second transmission parameter is used to receive the other BLE through the CIS connection Audio data sent by the device.
  36. 根据权利要求35所述的设备,其特征在于,当所述指令被所述一个或多个处 理器执行时,使得所述BLE设备执行以下步骤:The device according to claim 35, wherein when the instruction is executed by the one or more processors, the BLE device is caused to perform the following steps:
    从所述另一BLE设备发送的采用所述第二编码参数编码后的音频数据中获取所述第二编码参数。Acquiring the second encoding parameter from the audio data sent by the another BLE device and encoded with the second encoding parameter.
  37. 根据权利要求35或36所述的设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to claim 35 or 36, wherein when the instruction is executed by the one or more processors, the BLE device is caused to perform the following steps:
    在采用所述第二传输参数,通过所述CIS连接接收所述另一BLE设备发送的音频数据之前,接收所述另一BLE设备发送的更新时刻指示信息;Before using the second transmission parameter to receive the audio data sent by the another BLE device through the CIS connection, receive the update time indication information sent by the other BLE device;
    在所述更新时刻指示信息所指示的时刻,采用所述第二传输参数,通过所述CIS连接接收所述另一BLE设备发送的音频数据。At the time indicated by the update time indication information, the second transmission parameter is used to receive audio data sent by the other BLE device through the CIS connection.
  38. 根据权利要求35-37任一项所述的设备,其特征在于,所述另一BLE设备包括第一链路层,所述BLE设备包括第二主机和第二链路层;当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to any one of claims 35 to 37, wherein the other BLE device includes a first link layer, and the BLE device includes a second host and a second link layer; when the instruction When executed by the one or more processors, the BLE device is caused to perform the following steps:
    所述第二链路层接收所述第一链路层发送的CIS更新请求信息,所述更新请求信息中包括所述第二传输参数。The second link layer receives CIS update request information sent by the first link layer, and the update request information includes the second transmission parameter.
  39. 根据权利要求38所述的设备,其特征在于,所述第二主机与所述第二链路层之间通过主机控制器接口协议HCI命令交互信息;所述第一链路层与所述第二链路层之间通过链路层LL命令交互信息。The device according to claim 38, wherein the second host and the second link layer exchange information through a host controller interface protocol HCI command; the first link layer and the first link layer The two link layers exchange information through link layer LL commands.
  40. 根据权利要求35-39任一项所述的设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述BLE设备执行以下步骤:The device according to any one of claims 35 to 39, wherein when the instruction is executed by the one or more processors, the BLE device is caused to perform the following steps:
    在通过所述LE ACL连接接收所述另一BLE设备发送的第二传输参数,以及采用第二编码参数,对从所述另一BLE设备接收到的音频数据进行解码之前,向所述另一BLE设备发送所述CIS连接的信道质量参数。Before receiving the second transmission parameter sent by the another BLE device through the LEACL connection and using the second encoding parameter to decode the audio data received from the another BLE device, The BLE device sends the channel quality parameter of the CIS connection.
  41. 根据权利要求35-40任一项所述的设备,其特征在于,所述BLE设备为无线耳机。The device according to any one of claims 35 to 40, wherein the BLE device is a wireless headset.
  42. 根据权利要求35-41任一项所述的设备,其特征在于,所述BLE设备为芯片。The device according to any one of claims 35 to 41, wherein the BLE device is a chip.
  43. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在低功耗蓝牙BLE设备上运行时,使得所述BLE设备执行如权利要求1-20中任一项所述的速率控制方法。A computer storage medium, comprising computer instructions, which when executed on a Bluetooth low energy BLE device, causes the BLE device to perform the rate according to any one of claims 1-20 Control Method.
  44. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-20中任一项所述的速率控制方法。A computer program product, characterized in that, when the computer program product runs on a computer, the computer is caused to execute the rate control method according to any one of claims 1-20.
  45. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备包括执行如权利要求1-20中任一项所述的方法的装置。A Bluetooth low energy BLE device, characterized in that the BLE device comprises means for performing the method according to any one of claims 1-20.
PCT/CN2018/122959 2018-12-22 2018-12-22 Rate control method and device WO2020124611A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2018/122959 WO2020124611A1 (en) 2018-12-22 2018-12-22 Rate control method and device
CN202210890144.3A CN115426687A (en) 2018-12-22 2018-12-22 Rate control method, device and computer storage medium
CN201880098321.6A CN112789883B (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

Publications (1)

Publication Number Publication Date
WO2020124611A1 true WO2020124611A1 (en) 2020-06-25

Family

ID=71100127

Family Applications (1)

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

Country Status (2)

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

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113453114A (en) * 2021-06-30 2021-09-28 Oppo广东移动通信有限公司 Encoding control method, encoding control device, wireless headset and storage medium
CN113709619A (en) * 2021-08-31 2021-11-26 Oppo广东移动通信有限公司 Audio processing method and device, user terminal and computer readable medium
CN114157942A (en) * 2021-11-30 2022-03-08 广州番禺巨大汽车音响设备有限公司 Method and system for controlling sound system of real wireless stereo
WO2022068221A1 (en) * 2020-09-29 2022-04-07 南京中感微电子有限公司 Low-delay wireless audio sending and receiving method and device
WO2022160287A1 (en) * 2021-01-29 2022-08-04 华为技术有限公司 Cis link adjustment method and related device
CN114979772A (en) * 2021-02-24 2022-08-30 腾讯科技(深圳)有限公司 Configuration method, device and medium of decoder and electronic equipment
WO2022206270A1 (en) * 2021-04-01 2022-10-06 Oppo广东移动通信有限公司 Device addition method and apparatus, bluetooth chip, and device
CN115276920A (en) * 2022-07-27 2022-11-01 上海物骐微电子有限公司 Audio data processing method and device, electronic equipment and storage medium
CN116634492A (en) * 2023-01-29 2023-08-22 上海物骐微电子有限公司 Data scheduling method, device and storage medium based on Bluetooth LE audio
WO2023200615A1 (en) * 2022-04-15 2023-10-19 Qualcomm Incorporated Increasing reliability of bluetooth low energy audio links
US11870595B2 (en) 2021-08-24 2024-01-09 Rohde & Schwarz Gmbh & Co. Kg Method and test device for performing packet error rate measurement
CN117692338A (en) * 2024-02-01 2024-03-12 长城数字能源(西安)科技有限公司 Energy Internet of things data visualization method and system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114245168B (en) * 2021-12-16 2023-12-08 北京数码视讯技术有限公司 Multimedia stream transmission regulation device and method

Citations (5)

* 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
CN104936215A (en) * 2015-06-17 2015-09-23 福建联迪商用设备有限公司 Method and system for adjusting Wi-Fi (Wireless Fidelity) dynamic rate
US20170187487A1 (en) * 2014-05-27 2017-06-29 Mediatek Singapore Pte. Ltd. Method for rate indication
CN108471630A (en) * 2018-06-12 2018-08-31 Oppo广东移动通信有限公司 transmission rate adjusting method, device, mobile terminal and computer-readable medium
CN108737997A (en) * 2017-04-21 2018-11-02 展讯通信(上海)有限公司 Adjust method, equipment and the system of data packet transmission rates

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9565516B2 (en) * 2014-09-09 2017-02-07 Mediatek Inc. Rate indication and link adaptation for long range wireless networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170187487A1 (en) * 2014-05-27 2017-06-29 Mediatek Singapore Pte. Ltd. Method for rate indication
CN104135741A (en) * 2014-07-08 2014-11-05 福建联迪商用设备有限公司 Method of Bluetooth low energy communication, Bluetooth devices and system
CN104936215A (en) * 2015-06-17 2015-09-23 福建联迪商用设备有限公司 Method and system for adjusting Wi-Fi (Wireless Fidelity) dynamic rate
CN108737997A (en) * 2017-04-21 2018-11-02 展讯通信(上海)有限公司 Adjust method, equipment and the system of data packet transmission rates
CN108471630A (en) * 2018-06-12 2018-08-31 Oppo广东移动通信有限公司 transmission rate adjusting method, device, mobile terminal and computer-readable medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022068221A1 (en) * 2020-09-29 2022-04-07 南京中感微电子有限公司 Low-delay wireless audio sending and receiving method and device
WO2022160287A1 (en) * 2021-01-29 2022-08-04 华为技术有限公司 Cis link adjustment method and related device
CN114979772A (en) * 2021-02-24 2022-08-30 腾讯科技(深圳)有限公司 Configuration method, device and medium of decoder and electronic equipment
WO2022206270A1 (en) * 2021-04-01 2022-10-06 Oppo广东移动通信有限公司 Device addition method and apparatus, bluetooth chip, and device
CN113453114A (en) * 2021-06-30 2021-09-28 Oppo广东移动通信有限公司 Encoding control method, encoding control device, wireless headset and storage medium
WO2023273701A1 (en) * 2021-06-30 2023-01-05 Oppo广东移动通信有限公司 Coding control method and apparatus, wireless earphone, 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
CN114157942A (en) * 2021-11-30 2022-03-08 广州番禺巨大汽车音响设备有限公司 Method and system for controlling sound system of real wireless stereo
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
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
CN117692338A (en) * 2024-02-01 2024-03-12 长城数字能源(西安)科技有限公司 Energy Internet of things data visualization method and system

Also Published As

Publication number Publication date
CN112789883B (en) 2022-08-09
CN115426687A (en) 2022-12-02
CN112789883A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
WO2020124611A1 (en) Rate control method and device
WO2020124610A1 (en) Transmission speed control method and device
CN112313929B (en) Method for automatically switching Bluetooth audio coding modes and electronic equipment
CN113228701B (en) Audio data synchronization method and device
WO2020107485A1 (en) Bluetooth connection method and device
CN112771890B (en) Point-to-multipoint data transmission method and electronic equipment
CN112868244B (en) Point-to-multipoint data transmission method and device
WO2020249062A1 (en) Voice communication method and related device
CN112042212B (en) Audio data transmission method and electronic equipment
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
WO2022135303A1 (en) Tws earphone connection method and device
CN113039822B (en) Method and equipment for establishing data channel
CN112806092B (en) Microphone MIC switching method and device
CN112740728B (en) Bluetooth communication method and electronic equipment
WO2020132907A1 (en) Communication method for audio data, and electronic device
WO2021043250A1 (en) Bluetooth communication method, and related device
WO2021197163A1 (en) Transmission power control method, terminal, chip system and system
WO2024001735A1 (en) Network connection method, electronic device, and storage medium
CN115706755A (en) Echo cancellation method, electronic device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18943649

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18943649

Country of ref document: EP

Kind code of ref document: A1