WO2020124371A1 - Method and device for establishing data channels - Google Patents

Method and device for establishing data channels Download PDF

Info

Publication number
WO2020124371A1
WO2020124371A1 PCT/CN2018/121774 CN2018121774W WO2020124371A1 WO 2020124371 A1 WO2020124371 A1 WO 2020124371A1 CN 2018121774 W CN2018121774 W CN 2018121774W WO 2020124371 A1 WO2020124371 A1 WO 2020124371A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
cig
cis
audio
parameters
Prior art date
Application number
PCT/CN2018/121774
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 CN201880099602.3A priority Critical patent/CN113039822B/en
Priority to PCT/CN2018/121774 priority patent/WO2020124371A1/en
Priority to CN202211077887.5A priority patent/CN115643554A/en
Publication of WO2020124371A1 publication Critical patent/WO2020124371A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor

Definitions

  • the present application relates to the field of short-range communications, and in particular, to a method and device for establishing a data channel.
  • Bluetooth is a wireless technology standard that enables short-range data interaction between different devices.
  • the mobile phone can turn on the Bluetooth module and perform short-range data interaction with the Bluetooth headset to use the Bluetooth headset as the audio input/output device of the mobile phone to realize the functions of audio services such as voice and music.
  • audio data (or audio stream, stream) can be transmitted between different devices through an isochronous (ISO) channel of Bluetooth (Bluetooth Low Energy). ) Transmission.
  • ISO isochronous
  • the ISO channel of BLE defines a transmission mechanism. Under this transmission mechanism, a master device (Master, abbreviated as M, such as the above-mentioned mobile phone) can send audio data to one or more slave devices (Slave, abbreviated as S, as the aforementioned Bluetooth headset).
  • a connection-based isochronous group (CIG) is defined in the transmission mechanism, and CIG is the concept of group.
  • a CIG may include one or more connected isochronous audio streams (CIS).
  • a master device can send audio data to a slave device through a CIS in a CIG.
  • a master device can send audio data to multiple slave devices through multiple CISs in a CIG, and multiple slave devices correspond to multiple CISs in one-to-one correspondence.
  • the embodiments of the present application provide a method and equipment for establishing a data channel. Before the audio service is started, all CISs in the CIG corresponding to the audio service have been established. Compared with establishing all CISs in the corresponding CIG after the audio service is started, the transmission delay of audio data can be effectively reduced.
  • a first aspect of the present application provides a method for establishing a data channel.
  • the method can be applied to a first electronic device.
  • the method may include: the first electronic device obtains an audio service supported by a second electronic device, and determines that the audio service corresponds to The CIG parameters of the CIG of the CIG; the first electronic device can configure the CIG parameters, and establish the CIS in the CIG according to the configured CIG parameters, wherein the CIS in the CIG is not activated; when the audio service is turned on, the first electronic device can be activated CIS in the CIG and send an activation instruction to the second electronic device, the activation instruction can be used to instruct the second electronic device to activate the CIS in the CIG; in this way, the first electronic device can communicate with the second electronic device through the CIS in the CIG Transfer audio data.
  • the first electronic device may be an electronic device such as a mobile phone, and the second electronic device may be a peripheral device such as a Bluetooth headset, or the second electronic device may also be a main body such as a peripheral device, such as a main body of a TWS headset.
  • the first electronic device is a CIS established between each main body of the peripheral device and belongs to the same CIG.
  • the configuration of the CIG parameters corresponding to the audio service and the establishment of all CISs in the CIG are completed before the audio service is started. It does not activate all CIS in the CIG.
  • all CISs in the CIG can be activated through the air interface signaling of the corresponding number (the number is the same as the number of CISs in the CIG), and then all CISs in the CIG can be used to perform the Audio data transmission for audio services. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
  • the method may further include: at the end of the audio service, the first electronic device may deactivate the CIS in the CIG, and send a deactivation instruction to the second electronic device, the deactivation instruction is used to Instruct the second electronic device to deactivate the CIS in the CIG; the first electronic device stops transmitting audio data with the second electronic device through the CIS in the CIG.
  • the end of the audio service by deactivating the CIS in the CIG corresponding to the audio service and retaining the virtual link instead of deleting it, it is not necessary to establish the CIG corresponding to the audio service when the audio service is restarted CIS, thereby reducing the transmission delay of audio data.
  • the method may further include: the first electronic device performs a pairing operation with the second electronic device; the first electronic device Implement the operation of establishing an ACL link with the second electronic device; the first electronic device acquiring audio services supported by the second electronic device may specifically include: the first electronic device implements a business scenario negotiation with the second electronic device through the ACL link
  • the first electronic device determines the audio service supported by the second electronic device according to the business scenario negotiation result
  • the first electronic device determines the CIG parameter of the connection-based isochronous stream group CIG corresponding to the audio service, which may specifically include: the first electronic device
  • the device implements an operation of negotiating parameters with the second electronic device through the ACL link, and the first electronic device determines the CIG parameters of the CIG corresponding to the audio service according to the parameter negotiation result.
  • the CIG state machine is set in the first electronic device; after the first electronic device and the second electronic device establish the CIS in the CIG, the CIG state machine is in the first state.
  • the first state may be used to indicate that the CIS in the CIG is not activated and cannot be used for audio data transmission; the first electronic device may activate the CIS in the CIG, which may specifically include: the first electronic device changes the state machine of the CIG from the first state Switch to the second state, which can be used to indicate that the CIS in the CIG is activated and can be used for the transmission of audio data.
  • the first electronic device deactivates the CIS in the CIG, which may specifically include: the first electronic device switches the state machine of the CIG from the second state to the first state.
  • the first state is an open state
  • the second state is an audio streaming state
  • the method may further include: the first electronic device establishes a correspondence between the audio service and the CIG; when the audio service is turned on, the first electronic device activates the CIS in the CIG, which may specifically include: When the audio service is turned on, the first electronic device may activate the CIS in the CIG corresponding to the audio service according to the above correspondence. In this way, according to the maintained correspondence, the first electronic device can activate the CIS in the CIG that can adapt to the currently activated audio service, ensuring that the transmission of audio data can meet the service requirements.
  • the CIG parameters may include at least one of the following: quality of service (QoS) parameters, codec parameters, and CIS parameters.
  • QoS quality of service
  • codec parameters codec parameters
  • CIS parameters may be used for the first electronic device and the second Transmission parameters for electronic device data transmission and reception.
  • a second aspect of the present application provides a method for establishing a data channel.
  • the method may be applied to a second electronic device.
  • the method may include: the second electronic device establishes a CIS in the CIG, and the audio supported by the CIG and the second electronic device Business correspondence, the CIS in the CIG is not activated; the second electronic device receives the activation instruction sent by the first electronic device; in response to the received activation instruction, the second electronic device activates the CIS in the CIG; the second electronic device passes the CIG CIS transmits audio data with the first electronic device.
  • the configuration of the CIG parameters corresponding to the audio service and the establishment of all CISs in the CIG are completed before the audio service is started. It does not activate all CIS in the CIG.
  • all CISs in the CIG can be activated through the air interface signaling of the corresponding number (the number is the same as the number of CISs in the CIG), and then all CISs in the CIG can be used to perform the Audio data transmission for audio services. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
  • the method may further include: the second electronic device receives the deactivation instruction sent by the first electronic device; in response to the deactivation instruction, the second electronic device deactivates the CIS in the CIG; the second The electronic device stops transmitting audio data with the first electronic device through the CIS in the CIG.
  • the second electronic device receives the deactivation instruction sent by the first electronic device; in response to the deactivation instruction, the second electronic device deactivates the CIS in the CIG; the second The electronic device stops transmitting audio data with the first electronic device through the CIS in the CIG.
  • the method may further include: the second electronic device performs a pairing operation with the first electronic device; the second electronic device implements the The electronic device establishes an ACL link; the second electronic device implements an operation of negotiating a business scenario with the first electronic device through the ACL link, and the operation of negotiating the business scenario is used by the first electronic device to determine the audio service supported by the second electronic device; The second electronic device implements an operation of negotiating parameters with the first electronic device through the ACL link.
  • the operation of negotiating parameters is used for the first electronic device to determine the CIG parameters of the CIG corresponding to the audio service, and the CIG parameters are used to establish the CIS in the CIG.
  • the second electronic device may be provided with a CIG state machine; after the second electronic device and the first electronic device establish a CIS in the CIG, the CIG state machine is the first state ,
  • the first state can be used to indicate that the CIS in the CIG is not activated and cannot be used for audio data transmission; the second electronic device activates the CIS in the CIG, which may specifically include: A state is switched to a second state, which can be used to indicate that the CIS in the CIG is activated and can be used for audio data transmission.
  • the second electronic device deactivates the CIS in the CIG, which may specifically include: the second electronic device switches the state machine of the CIG from the second state to the first state.
  • the first state is an open state
  • the second state is a streaming state
  • the CIG parameter may include at least one of the following: a QoS parameter, a codec parameter, and a CIS parameter.
  • the CIS parameter may be a transmission parameter used for data transmission and reception between the first electronic device and the second electronic device.
  • a third aspect of the present application provides a method for establishing a data channel.
  • the method may be applied to a first electronic device.
  • the method may include: the first electronic device obtains an audio service supported by the second electronic device; the first electronic device determines The CIG parameter of the CIG corresponding to the audio service.
  • the CIG parameter can be used to establish the CIS in the CIG; the first electronic device configures the CIG parameter, and sends a CIS establishment request message to the second electronic device according to the configured CIG parameter; the first electronic device receives The CIS establishment response message sent by the second electronic device; when the audio service is turned on, the first electronic device sends a CIS establishment message to the second electronic device.
  • the CIS establishment message can be used to establish the CIS in the CIG with the second electronic device; An electronic device transmits audio data with the second electronic device through the CIS in the CIG.
  • the configuration of the CIG parameters corresponding to the audio service is completed, and a CIS establishment request message is sent to the second electronic device. If the CIS establishment response message sent by the second electronic device is received, the CIS establishment message is not sent to the second electronic device temporarily. Instead, when the audio service is started, a CIS establishment message is sent to the second electronic device to establish the CIS in the CIG with the second electronic device, and then the audio of the audio service can be conducted through the CIS in the CIG and the second electronic device Data transmission. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
  • the method may further include: the first electronic device performs a pairing operation with the second electronic device; the first electronic device implements The operation of establishing an ACL link with the second electronic device; the first electronic device acquiring audio services supported by the second electronic device may specifically include: the first electronic device implements an operation of negotiating a business scenario with the second electronic device through the ACL link , The first electronic device determines the audio service supported by the second electronic device according to the negotiation result of the business scenario; the first electronic device determines the CIG parameters of the connection-based isochronous stream group CIG corresponding to the audio service, which may specifically include: the first electronic device The operation of negotiating parameters with the second electronic device through the ACL link is implemented, and the first electronic device determines the CIG parameters of the CIG corresponding to the audio service according to the parameter negotiation result.
  • an electronic device may include: one or more processors, a memory, a wireless communication module, and a mobile communication module; a memory, a wireless communication module, and a mobile communication module and one or more
  • the processor is coupled, and the memory is used to store computer program code.
  • the computer program code includes computer instructions.
  • the electronic device executes the first aspect or a possible implementation manner of the first aspect, or the first The method for establishing a data channel according to any one of the three aspects or any possible implementation manner of the third aspect.
  • the electronic device may be the above-mentioned first electronic device.
  • a fifth aspect of the present application provides an electronic device, which may include: one or more processors, a memory, a wireless communication module, a receiver, and a microphone; a memory, a wireless communication module, a receiver, and a microphone are coupled to the processor,
  • the memory is used to store computer program code.
  • the computer program code includes computer instructions.
  • the electronic device executes any one of the second aspect or any possible implementation manner of the second aspect. How to establish a data channel.
  • the electronic device may be the above-mentioned second electronic device.
  • a Bluetooth system may include: the electronic device according to the fourth aspect, and the electronic device according to the fifth aspect.
  • a seventh aspect of the present application provides a computer storage medium, including computer instructions, which when executed on an electronic device (such as the above-mentioned first electronic device), causes the electronic device to execute the first aspect or the first aspect A possible implementation manner, or the method for establishing a data channel according to any one of the third aspect or any possible implementation manner of the third aspect.
  • An eighth aspect of the present application provides a computer storage medium, including computer instructions, which when executed on an electronic device (such as the above-mentioned second electronic device), causes the electronic device to perform the second aspect or the second aspect
  • the method for establishing a data channel according to any one of the possible implementation manners.
  • the present application provides a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the method for establishing a data channel described in any one of the above.
  • the electronic device described in the fourth and fifth aspects provided above, the Bluetooth system described in the sixth aspect, the computer storage medium described in the seventh and eighth aspects, and the electronic device described in the ninth aspect The computer program products are used to execute the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
  • FIG. 1 is a schematic diagram of the composition of a Bluetooth system provided by an embodiment of this application.
  • FIG. 2 is a schematic structural diagram of an earplug of a TWS earphone provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of an example of a product form of a TWS earphone provided by an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a data channel provided by an embodiment of this application.
  • FIG. 6 is a schematic diagram of the composition of a Bluetooth transmission framework provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a CIS establishment process provided by an embodiment of this application.
  • FIG. 8 is a schematic flowchart of a method for establishing a data channel according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a CIG state transition provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of the distribution of different CIG in the time domain between a mobile phone and left and right earplugs of a TWS earphone according to an embodiment of the present application;
  • FIG. 11 is a schematic diagram of the distribution of different CIG in the time domain between another mobile phone and the left and right earplugs of the TWS headset provided by the embodiment of the present application;
  • FIG. 12 is a schematic diagram of the composition of a Bluetooth device provided by some embodiments of the present application.
  • the CIG parameters (such as CIG parameters) used to transmit audio data of different audio services may be different.
  • the CIG parameters corresponding to the audio service are configured, and all CISs in the CIG are established according to the configured CIG parameters.
  • the establishment of a CIS in CIG requires at least 3 air interface signaling to complete. For example, if two CISs are included in a CIG, at least 6 air interface signalings are required to complete the establishment of all CISs in the CIG. And all the CIS in the CIG can only be transmitted after the establishment of the CIS, which will inevitably increase the transmission delay of the audio data.
  • Embodiments of the present application provide a method and device for establishing a data channel.
  • the CIG parameters corresponding to the audio service have been configured and all CISs in the CIG have been established. However, all CIS in this CIG have not been activated.
  • all CISs in the CIG can be activated through all corresponding CISs in the CIG through air interface signaling corresponding to the number (the number is the same as the number of CISs in the CIG). Audio data for audio services.
  • the audio service is turned on, only two CISs in the CIG need to be activated through two air interface signaling to transmit audio data. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
  • the above CIG parameters can be used to establish all CISs in the CIG.
  • the CIG parameters may include one or more of quality of service (QoS) parameters, codec parameters, and CIS parameters.
  • QoS parameters may include parameters such as delay, packet loss rate, throughput, etc. that represent transmission quality.
  • the codec parameters may include encoding methods, compression ratios, and other parameters that affect audio quality.
  • the CIS parameters may include CIG anchor points, ISO intervals, CIS identification (ID), and so on.
  • the CIG may include multiple CIG events (CIG_event).
  • the CIG anchor point is the starting time point of the corresponding CIG event.
  • the ISO interval is the time between two consecutive CIG anchors. Each CIG event belongs to an ISO interval in time.
  • all CISs in the CIG are not activated, and it can also be understood that the CIG is not activated.
  • activating all CIS in the CIG can also be understood as activating the CIG.
  • the CIG parameters of the audio service have been configured and all CISs in the CIG have been established, but the CIG has not been activated.
  • the audio service is started, only the CIG needs to be activated to transmit the audio data of the audio service.
  • all CISs in the CIG are not activated may mean that all CISs in the CIG are virtual links, and none in all CISs in the CIG For actual data transmission and reception, the actual duty cycle is 0.
  • the method for establishing a data channel may be applied to a Bluetooth system composed of a peripheral device 101 and an electronic device 102.
  • the peripheral device 101 and the electronic device 102 may use Bluetooth to establish a Bluetooth connection. Based on the established Bluetooth connection, short-range data interaction can be realized between the peripheral device 101 and the electronic device 102. Exemplarily, the audio data may be transmitted between the peripheral device 101 and the electronic device 102 based on the Bluetooth connection. For example, based on the Bluetooth connection described above, the peripheral device 101 can be used as an audio input/output device of the electronic device 102 to implement a voice call. For another example, based on the Bluetooth connection described above, the peripheral device 101 can be used as an output device of the electronic device 102, such as a speaker to play music.
  • the peripheral device 101 may be a device such as a wireless headset, a wireless speaker, a wireless bracelet, a wireless vehicle, a wireless smart glasses, etc., which includes a main body.
  • the electronic device 102 may serve as a master device to transmit audio data to a peripheral device 101 as a slave device through a CIS in a CIG.
  • the wireless earphone may be a headphone, earplugs or other portable listening devices.
  • the electronic device 102 can serve as a master device to transmit audio data to multiple peripheral devices 101 as slave devices through multiple CISs in a CIG, and the multiple CIS correspond to the multiple peripheral devices 101 in one-to-one correspondence.
  • the peripheral device 101 may also be a true wireless stereo (TWS) headset, Bluetooth speaker, smart glasses and other devices, which include two main bodies, and no wire connection is required between the two main bodies , Can cooperate with each other and work together.
  • the electronic device 102 can serve as a master device to transmit audio data to two main bodies of the peripheral device 101 (both main bodies of the peripheral device 101 are slave devices) through two CISs in a CIG.
  • the two CIS and the peripheral device 101 There is a one-to-one correspondence between the two subjects.
  • the peripheral device 101 shown in FIG. 1 is illustrated with a TWS earphone as an example.
  • the TWS earphone includes two main bodies (such as a headphone main body), such as a left earplug 101-1 and a right earplug 101-2.
  • the electronic device 102 may serve as a master device to transmit audio data to the left earplug 101-1 and the right earplug 101-2 as slave devices through two CISs in a CIG, respectively.
  • the structures of the left earplug 101-1 and the right earplug 101-2 of the TWS earphone may be as shown in FIG. 2 and will be described in detail in the following embodiments.
  • the electronic device 102 can also transmit audio data to one of the main bodies of the device through a CIS in a CIG, and the other main body of the device can obtain the electronic by monitoring or forwarding. Audio data sent by the device 102.
  • the electronic device 102 may be a mobile phone, a tablet, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, personal Digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) ⁇ virtual reality (virtual reality, VR) devices, media players, televisions and other devices, the specific form of the device is not special in the embodiments of the present application limit.
  • PDA personal digital assistant
  • augmented reality augmented reality, AR
  • virtual reality, VR virtual reality
  • the structure of the electronic device 102 may be as shown in FIG. 4 and will be described in detail in the following embodiments.
  • the first electronic device in this application may be the above-mentioned electronic device 102.
  • the second electronic device in the present application may be the aforementioned peripheral device 101, or the main body included in the peripheral device 101.
  • FIG. 2 is a schematic structural diagram of an earplug (left earplug or right earplug) of a TWS earphone provided by an embodiment of the present application.
  • the earplugs of the TWS headset may include: a processor 201, a memory 202, a sensor 203, a wireless communication module 204, at least one receiver 205, at least one microphone 206, and a power supply 207.
  • the memory 202 may be used to store application code, such as an application code used to establish a Bluetooth connection with another earbud of the TWS headset and to pair the earbud with the electronic device 102 via Bluetooth.
  • the processor 201 can control the execution of the above application program code to implement the function of the earplug of the TWS headset in the embodiment of the present application.
  • the memory 202 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 202 may also store connection data of the electronic device that has successfully paired with the earbud before Bluetooth.
  • the connection data may be a Bluetooth address of an electronic device that has successfully paired with the earbud via Bluetooth. Based on the connection data, the earplug can automatically perform Bluetooth pairing with the electronic device without configuring a connection with it, such as performing legality verification.
  • the aforementioned Bluetooth address may be a Media Access Control (Media Access Control, MAC) address.
  • Media Access Control Media Access Control
  • the sensor 203 may be a distance sensor or a proximity light sensor.
  • the processor 201 of the earplug can determine whether it is worn by the user through the sensor 203.
  • the processor 201 of 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 processor 201 of the earplug may turn on the receiver 205.
  • the earplug may also include a bone conduction sensor, combined with a bone conduction earphone.
  • the bone conduction sensor can obtain the vibration signal of the vibrating bone mass of the voice part, and the processor 201 parses out the voice signal to realize the control function corresponding to the voice signal.
  • the earplug may further include a touch sensor or a pressure sensor, which are used to detect the user's touch operation and pressing operation, respectively.
  • 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, and the processor 201 of the earplug may adaptively adjust some parameters, such as volume, according to the brightness of the ambient light sensed by the ambient light sensor.
  • the wireless communication module 204 is used to support short-distance data interaction between the left and right earplugs of the TWS earphone and the earplugs and various electronic devices, such as the electronic device 102 described above.
  • the wireless communication module 204 may be a Bluetooth transceiver.
  • the earplugs of the TWS headset can establish a Bluetooth connection with the electronic device 102 through the Bluetooth transceiver to achieve short-range data interaction between the two.
  • the receiver 205 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 205 may convert the received audio electrical signal into a sound signal and play it.
  • the microphone 206 which may also be referred to as a "microphone” or a “microphone,” is used to convert sound signals into audio electrical signals.
  • a microphone When the earplug of the TWS earphone is used as the audio input device of the electronic device 102, when the user speaks (such as talking or sending a voice message), the microphone 206 can collect the user's voice signal and convert it into an audio electrical signal.
  • the above audio electrical signal is the audio data in the embodiment of the present application.
  • the power supply 207 can be used to supply power to various components included in the earplugs of the TWS earphone.
  • the power source 207 may be a battery, such as a rechargeable battery.
  • TWS earphones will be equipped with a headphone box (eg, 301 shown in Figure 3).
  • the earphone box 301 may include a cavity 301-1 and a box cover 301-2.
  • the cavity 301-1 can be used to store the left and right earplugs of the TWS earphone.
  • the cavity 301-1 of the earphone box 301 can be used to house the left earplug 101-1 and the right earplug 101-2 of the TWS earphone.
  • the earphone box 301 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 208.
  • the input/output interface 208 may be used to provide any wired connection between the earplug of the TWS earphone and the earphone box (such as the cavity 301-1 of the earphone box 301 described above).
  • the input/output interface 208 may be an electrical connector.
  • the earplug of the TWS earphone when the earplug of the TWS earphone is placed in the cavity 301-1 of the earphone box 301, the earplug of the TWS earphone may be electrically connected to the earphone box 301 (such as the input/output interface with the earphone box 301) through the electrical connector. After the electrical connection is established, the earphone box 301 can charge the power supply 207 of the earplug of the TWS earphone.
  • the earplugs of the TWS earphone can also perform data communication with the earphone box 301.
  • the processor 201 of the earplug of the TWS earphone may receive the pairing instruction from the earphone box 301 through the electrical connection.
  • the pairing instruction is used to instruct the processor 201 of the earphone of the TWS earphone to turn on the wireless communication module 204, so that the earphone of the TWS earphone can use the corresponding wireless communication protocol (such as Bluetooth) to pair with the electronic device 102.
  • the earplugs of the aforementioned TWS earphones may not include the input/output interface 208.
  • the earplugs can implement charging or data communication functions based on the Bluetooth connection established with the earphone box 301 through the wireless communication module 204 described above.
  • the earphone box (such as the aforementioned earphone box 301) may further include a processor, a memory, and other components.
  • the memory can be used to store application program codes, and is controlled and executed by the processor of the earphone box 301 to realize the function of the earphone box 301.
  • the processor of the earphone box 301 can send the pairing to the earplug of the TWS headset in response to the user's operation of opening the lid 301-2 by executing the application code stored in the memory Instructions etc.
  • 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. 2, two or more components may be combined, or may have different component configurations.
  • the earplug may also include an indicator light (which can indicate the status of the earplug's power level, etc.), a dust filter (which can be used with the earpiece), and other components.
  • the various components shown in FIG. 2 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
  • the structure of the left and right earplugs of the TWS earphone can be the same.
  • the left and right earplugs of the TWS earphone may include the components shown in FIG. 2.
  • 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. 2, and the other earplug (such as the left earplug) may include other components in FIG. 2 other than the microphone 206.
  • FIG. 4 is a schematic structural diagram of an electronic device 102 in the Bluetooth system shown in FIG. 1 according to an embodiment of the present application.
  • the electronic device 102 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, and a battery 142 , Antenna 1, 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, button 190, motor 191, indicator 192, camera 193 , A display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • the sensor module 180 may include a pressure sensor 180A, a proximity light sensor 180B, a fingerprint sensor 180C, a touch sensor 180D, a bone conduction sensor 180E, and so on.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 102.
  • the electronic device 102 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of 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 processor 110 may be used to perform the process of determining the audio service supported by the TWS headset in S803, S804, and S805 in the following embodiments, determining CIG parameters that can be adapted to the audio service, and performing CIG configuration.
  • the controller may be the nerve center and command center of the electronic device 102.
  • 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 can 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 electronic device 102.
  • 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 realize the function of answering the phone call through the Bluetooth headset.
  • 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 electronic device 102.
  • the processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 102.
  • 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 electronic device 102, and can also be used to transfer data between the electronic device 102 and peripheral devices. It can also be used to connect headphones and play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in this embodiment is only a schematic description, and does not constitute a limitation on the structure of the electronic device 102.
  • the electronic device 102 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 electronic device 102. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device 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 electronic device 102 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 electronic device 102 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 electronic device 102.
  • 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 networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites that are applied to the electronic device 102. Wireless communication solutions such as global navigation (satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc.
  • 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 antenna 1 of the electronic device 102 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160 so that the electronic device 102 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include a 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 Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite-based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS beidou navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation system
  • the electronic device 102 may use the wireless communication module 160 to establish a Bluetooth connection with a peripheral device through a wireless communication technology, such as Bluetooth (BT). Based on the established Bluetooth connection, the electronic device 102 can send voice data to the peripheral device and can also receive voice data from the peripheral device.
  • BT Bluetooth
  • the wireless communication module 160 can be used to perform the processes of pairing, ACL link establishment, and CIS establishment in S801, S802, and S805 in the following embodiments.
  • the wireless communication module 160 may also be used to perform data interaction processes with peripheral devices based on the established connections in S803, S804, and S806 of the following embodiments, such as conducting business scenario negotiation, parameter negotiation, and transmitting audio data.
  • the electronic device 102 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 electronic device 102 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device 102 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, and light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. 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 electronic device 102 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 electronic device 102 selects 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 electronic device 102 may support one or more video codecs. In this way, the electronic device 102 can play or record videos in various encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent recognition of the electronic device 102, 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 electronic device 102.
  • 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, where 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 electronic device 102.
  • the processor 110 may execute instructions stored in the internal memory 121, establish a Bluetooth connection with the peripheral device through the wireless communication module 160, and perform short-range data interaction with the peripheral device to pass the peripheral device Realize the functions of audio services such as voice and music.
  • 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 electronic device 102 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 wireless communication technology is adopted between the electronic device 102 and the peripheral device, for example, after the Bluetooth connection is established by the Bluetooth, the electronic device 102 can store the Bluetooth address of the peripheral device in the internal memory 121.
  • the peripheral device when the peripheral 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 electronic device 102 may associate the Bluetooth addresses of the left and right earbuds of the TWS headset in the In the internal memory 121.
  • the electronic device 102 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 can also be used to encode and decode 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 electronic device 102 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 electronic device 102 answers a call or a voice message, it can answer the voice 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 approach the microphone 170C through the human mouth to sound, and input the sound signal to the microphone 170C.
  • the electronic device 102 may be provided with at least one microphone 170C. In other embodiments, the electronic device 102 may be provided with two microphones 170C. In addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 102 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 TWS headset when the electronic device 102 establishes a Bluetooth connection with a peripheral device, such as a TWS headset, the TWS headset can be used as an audio input/output device of the electronic device 102.
  • the audio module 170 may receive the audio electrical signal transmitted by the wireless communication module 160 to realize the functions of answering calls, playing music and other audio services through the 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 electronic device 102.
  • 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 electronic device 102 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.
  • the headset interface 170D is used to connect wired headsets.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile electronic device (open mobile terminal) platform (OMTP) standard interface, and the American Telecommunications Industry Association (cellular telecommunications industry association of the United States, CTIA) standard interface.
  • OMTP open mobile electronic device
  • CTIA American Telecommunications Industry Association
  • 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 electronic device 102 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 102 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 102 may also calculate the touched position according to 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 proximity light sensor 180B 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 electronic device 102 emits infrared light outward through the light emitting diode.
  • the electronic device 102 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 102. When insufficient reflected light is detected, the electronic device 102 may determine that there is no object near the electronic device 102.
  • the electronic device 102 can use the proximity light sensor 180B to detect that the user holds the electronic device 102 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180B can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
  • the fingerprint sensor 180C is used to collect fingerprints.
  • the electronic device 102 can use the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a picture of the fingerprint, answer the call with the fingerprint, and so on.
  • the touch sensor 180D is also called “touch panel”.
  • the touch sensor 180D may be disposed on the display screen 194, and the touch sensor 180D and the display screen 194 constitute a touch screen, which is also called a "touch screen”.
  • the touch sensor 180D 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 180D may also be disposed on the surface of the electronic device 102, which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180E can acquire vibration signals.
  • the bone conduction sensor 180E may acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180E can also contact the pulse of the human body and receive a blood pressure beating signal.
  • the bone conduction sensor 180E may also be provided in the earphone and combined into a bone conduction earphone.
  • the audio module 170 may 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 180E to realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180E to implement 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 electronic device 102 can receive key input and generate key signal input related to user settings and function control of the electronic device 102.
  • 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 electronic device 102.
  • the electronic device 102 may 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 the multiple cards may 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 electronic device 102 interacts with the network through the SIM card to realize functions such as call and data communication.
  • the electronic device 102 uses eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 102 and cannot be separated from the electronic device 102.
  • CIG In the transmission mechanism defined by the ISO channel of BLE, CIG is defined. CIG is a concept of a group and may include one or more CISs. Among them, a master device can send audio data of audio services to a slave device through a CIS in the CIG. A master device can send audio data of audio services to multiple slave devices through multiple CISs in the CIG. Multiple CIS correspond to multiple slave devices in one-to-one correspondence.
  • the above-mentioned CIS can be established through an asynchronous connection-oriented (ACL) link between the master device and the slave device.
  • the CIS can be a unidirectional link or a bidirectional link.
  • the master device (M) may establish an ACL link with the slave device (S), such as the ACL link a.
  • the master device and the slave device can exchange stream control (stream control) to establish CIS_a.
  • the CIS_a is a unidirectional link from the master device to the slave device.
  • the master device can send audio data to the slave device through this CIS_a.
  • FIG. 5 the master device
  • S the slave device
  • stream control stream control
  • the master device (M) can establish an ACL link with the slave device (S), such as the ACL link b. Through this ACL link b, the master device can interact with the slave device for flow control to establish CIS_b.
  • the CIS_b is a bidirectional link from the master device to the slave device and from the slave device to the master device.
  • the master device can send audio data to the slave device through the CIS_b, and the slave device can also send audio data to the master device through the CIS_b.
  • the master device (M) can establish ACL links with two slave devices, S1 and S2, such as ACL link c1 and ACL link c2, respectively.
  • the master device can interact with S1 for flow control to establish CIS_c1.
  • the master device can interact with S2 for flow control to establish CIS_c2.
  • CIS_c1 is a unidirectional link from the master device to the slave device
  • CIS_c2 is a bidirectional link from the master device to the slave device and from the slave device to the master device.
  • the master device can send audio data to S1 through CIS_c1.
  • the master device can send audio data to S2 through CIS_c2, and S2 can also send audio data to the master device through the CIS_c2.
  • the audio service in this application may refer to a service or application capable of providing audio functions (such as audio playback, audio recording, etc.).
  • audio services can be divided into voice, music, games, video, voice assistants, navigation sounds, alarms, and prompt sounds (such as the application's prompt sound, which can be emails, text messages, etc.) and other services.
  • the audio service can be divided into: media (audio), voice (voice), background sound and other services according to different services that can be provided. The specific division method is not limited in the embodiments of the present application.
  • the audio service may involve audio-related data transmission, for example, audio data itself, content control for controlling the playback of audio data, and flow control for creating the above-mentioned CIS.
  • audio data may correspond to: media data, voice data, and background sound data.
  • the media data may include: music, sound recordings, videos, games, sounds in navigation sounds.
  • the voice data may include: sound during a voice call, etc.
  • the background sound data may include: prompt sounds and the like.
  • Content control may include media control, call control, volume control, etc.
  • the media control may include: pause, play, previous track, next track and other instructions.
  • Telephone control can include: answering the call, hanging up, rejecting the call, voice dialing, holding the call, and calling back.
  • Volume control can include: volume down, volume up and other commands.
  • the Bluetooth transmission framework may include an application layer, a host, a host controller interface (HCI), and a controller.
  • HCI host controller interface
  • the application layer may include telephone applications, multimedia applications (such as music players, video players) and other applications.
  • the host may include various application profiles of Bluetooth and transmission protocols.
  • hands-free profile HFP
  • advanced audio transmission profile advanced audio distribution profile
  • A2DP advanced audio transmission profile
  • audio/video remote control profile audio/video remote control profile
  • AVRCP general access profile
  • GAP Generic Attribute Profile
  • GATT Generic Attribute Profile
  • Audio and Video Distribution Transmission Protocol audio/video distribution protocol, AVDTP
  • Audio and Video Control Transmission Protocol audio/video control transmission protocol
  • AVCTP Service Discovery Protocol
  • serial port emulation protocol radio frequency communications protocols
  • RFCOMM logical link control and adaptation protocol
  • L2CAP logical link control and adaptation protocol
  • Interoperable devices need to use the same application specification to communicate. Different applications require different application specifications.
  • HCI is located between the host and the controller, and can provide a unified interface for the upper layer protocol to enter the link layer in the controller and a unified way to enter the baseband in the controller.
  • the controller may include a link layer (LL), a baseband, and a radio frequency (Bluetooth radio frequency) unit.
  • the link layer is responsible for managing the communication between the 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 host may be implemented in the AP of the device.
  • the controller can be implemented in the Bluetooth chip of the device. In other embodiments, the host and the controller may be implemented in the same processor or controller of the device, in which case HCI is optional.
  • the flow of establishing a CIS for transmitting audio data is specifically described (see 702 in FIG. 7 ).
  • the master device implements the CIG parameter configuration process (see 701 in FIG. 7).
  • the master device and the slave device both have a host (host) and a link layer (LL), and the host and LL can communicate through HCI.
  • the master device can implement the CIG parameter configuration process.
  • the CIG parameter may be obtained through negotiation between the master device and the slave device, and is used to create a CIS.
  • the host of the master device sets CIG parameters.
  • the host of the master device can send the HCI command "Low Power CIG Parameter Settings (LE Set CIG parameters)" to the LL of the master device through the HCI.
  • the LL of the master device may return a response message to the host of the master device, such as "command complete”.
  • the host of the master device initiates the creation of CIS.
  • the host of the master device can send the HCI command "LE create CIS (LE createCIS)" to the LL of the master device through the HCI.
  • the LL of the master device may return a response message to the host of the master device, such as "HCI command status (HCI command status)".
  • the master device can establish CIS with the slave device.
  • the ACL link has been established between the master and slave devices.
  • the LL of the master device sends a CIS establishment request message to the LL of the slave device through the ACL link, such as an air interface request message LL_CIS_REQ, to request the LL of the slave device to create a CIS.
  • the LL of the slave device initiates a CIS creation request to the host of the slave device.
  • the LL of the slave device can send the HCI command “LE CIS request” to the host of the slave device through the HCI.
  • the host of the slave device can accept the CIS creation request of the LL of the slave device.
  • the host of the slave device can send the HCI command "low-power CIS acceptance (LE accept CIS)" to the LL of the slave device through the HCI.
  • the host of the slave device After receiving the HCI command from the LL of the slave device, it can return a response message, such as "command status", to the host of the slave device.
  • the LL of the slave device can also send a CIS establishment response message to the LL of the master device through an ACL link, such as an air interface response message LL_CIS_RSP, to indicate to the master device that the slave device agrees to the establishment of CIS.
  • the LL of the master device can send a CIS establishment message to the LL of the slave device through the ACL link, such as an air interface notification message LL_CIS_IND, to notify the LL of the slave device that the CIS has completed the establishment.
  • the LL of the master device can also send the HCI instruction "LE CIS establishment (LE) CIS establishment” to the host of the master device through HCI to notify the host of the master device to complete the establishment.
  • the LL of the slave device can also send the HCI command "LE CIS establish" to the host of the master device through HCI to notify the host of the slave device to complete the establishment.
  • the CIS between the master device and the slave device is created.
  • audio data can be transmitted between the master device and the slave device.
  • the foregoing electronic device may be used as a master device, and the foregoing peripheral device or main body of the peripheral device may be used as a slave device.
  • the CIG parameter configuration process and the CIS establishment process shown in FIG. 7 can be performed between the electronic device and the peripheral device to complete the configuration of the CIG parameter of the audio service and the establishment of all CIS in the CIG .
  • the CIG is not activated, all CISs in the CIG are not activated.
  • the electronic device can activate the CIG (that is, activate all CISs in the CIG) to transmit audio data of the audio service.
  • an electronic device and a peripheral device can establish an ACL link. Based on the established ACL link, the electronic device can negotiate with the peripheral device in a business scenario to determine the audio service supported by the peripheral device. For each audio service supported, before the audio service is started, the electronic device may negotiate with the peripheral device to determine the CIG parameters that can be adapted to the audio service. According to the negotiated CIG parameters, the CIG parameters of the audio service can be configured between the electronic device and the peripheral device, and all CISs in the CIG are established according to the configured CIG parameters, but the CIG is not activated. In addition, electronic devices can maintain the correspondence between audio services and CIG.
  • CIGs have different CIG logos
  • electronic devices can maintain the correspondence between audio services and CIG logos.
  • the electronic device can determine the CIG corresponding to the audio service according to the maintained correspondence and activate the CIG, so that the audio data of the audio service can be transmitted.
  • the electronic device can also deactivate the CIG corresponding to the audio service, that is, stop sending and receiving data on all CISs in the CIG.
  • the electronic device is a mobile phone
  • the peripheral device is a TWS headset.
  • the TWS headset includes two headphone bodies, a left earplug and a right earplug, respectively.
  • the mobile phone is connected to the TWS headset through two CISs in the same CIG.
  • the left earplug and the right earplug implement audio data transmission as an example, and a method for establishing a data channel provided by an embodiment of the present application will be described in detail. As shown in FIG. 8, the method may include:
  • the left earplug and right earplug of the S801 and TWS earphones are paired with the mobile phone via Bluetooth respectively.
  • the lid of the earphone box of the TWS earphone can be opened.
  • the left earplug and right earplug of the TWS headset turn on automatically, or the function key is pressed and then turned on. If the left earbud and the right earbud have not completed Bluetooth pairing before, the left earbud and the right earbud can automatically perform Bluetooth pairing, or the left earbud and right earbud can perform Bluetooth pairing after the pairing function key is pressed. If the left earbud and the right earbud have previously completed Bluetooth pairing, the Bluetooth pairing process can be omitted. After Bluetooth pairing is completed, a Bluetooth connection can be established between the left and right earbuds of the TWS headset.
  • any one of the left earplug and the right earplug of the TWS earphone can send a paired broadcast to the outside.
  • the mobile phone has turned on the Bluetooth function, the mobile phone can receive the pairing broadcast and prompt the user that the relevant Bluetooth device (such as a TWS headset) has been scanned.
  • the mobile phone can be paired with the right earbud of the TWS headset via Bluetooth.
  • the Bluetooth pairing process can be omitted. In other words, after receiving the pairing broadcast, the mobile phone can automatically perform Bluetooth pairing with the right earbud.
  • the right earbud After the right earbud is paired with the mobile phone via Bluetooth, the right earbud can send the Bluetooth address of the mobile phone to the left earbud through the Bluetooth connection between the left earbud and the left earbud, and notify the left earbud to send a pairing broadcast to the outside. In this way, the mobile phone can receive the pairing broadcast sent by the left earplug and perform Bluetooth pairing with the left earplug.
  • the right earplug of the TWS headset may also send the Bluetooth address of the left earplug to the mobile phone to indicate to the mobile phone that the left earplug and the right earplug are two main bodies of the same peripheral device.
  • the mobile phone can transmit audio data to the right earplug and the left earplug respectively through the two CISs in the same CIG. In this way, playback level synchronization of audio data between the right earplug and the left earplug can be achieved.
  • the playback level synchronization of audio data between the right earplug and the left earplug may refer to: the left earplug and the right earplug of the TWS earphone may respectively receive audio data sent by the mobile phone through two CISs in the same CIG And, for the user, the left earplug and the right earplug can play the received audio data at the same time point.
  • the mobile phone may also perform Bluetooth pairing with the left earbud of the TWS earphone, and then the left earbud sends the Bluetooth address of the mobile phone to the right earbud and notifies the right earbud to send a pairing broadcast to the outside so that the right earbud and the mobile phone can perform Bluetooth pair.
  • the left earplug and the right earplug of the TWS earphone can separately send pairing broadcasts after being turned on, so that the left earplug and the right earplug can perform Bluetooth pairing with the mobile phone respectively.
  • the trigger condition for the left earplug or the right earplug of the TWS earphone to send the pairing broadcast externally may be that the cover of the earphone box of the TWS earphone is opened, or the Bluetooth pairing of the left and right earphones of the TWS earphone is completed, or The left earplug or right earplug of the TWS earphone is taken out of the earphone box, or the pairing function key is pressed, and other trigger conditions can also be used.
  • the pairing function key can be set on the earphone box of the TWS earphone.
  • the earphone box of the TWS earphone is equipped with a pairing function key.
  • the left or right earplug of the TWS earphone can be Send paired broadcasts to the outside world.
  • the pairing function keys can also be set on the left and right earbuds of the TWS headset.
  • the pairing function keys are configured on the left and/or right earbuds of the TWS headset.
  • the mobile phone establishes an ACL link with the left earplug and the right earplug of the TWS earphone, respectively.
  • the mobile phone can establish an ACL link with the left and right earplugs, respectively.
  • a mobile phone can establish an ACL link 1 with the left earbud, and a mobile phone can establish an ACL link 2 with the right earbud.
  • the mobile phone can send a request to establish an ACL link to the left earplug.
  • the left earbud answers after receiving the request to establish the ACL link.
  • ACL link 1 is established.
  • the electronic device can configure the CIG parameters of the audio service with the peripheral device and establish all CISs in the CIG. Specifically, the following may be included: S803-S805.
  • the mobile phone separately negotiates a business scenario with the left earplug and the right earplug of the TWS headset to determine the audio service supported by the TWS headset.
  • the mobile phone can separately negotiate business scenarios with the left earplug and the right earplug. For example, taking the business scenario negotiation between the mobile phone and the left earplug of the TWS headset as an example, combined with the example in S802 above, the mobile phone can send a query command to the left earplug through the ACL link 1, the query command is used to obtain audio services supported by the left earplug . After receiving the query command, the left earplug can return the audio service supported by the left earplug to the mobile phone through the ACL link 1.
  • the mobile phone can also negotiate service scenarios with the right earplug through the ACL link 2, so that the right earplug returns to the audio service supported by the right earplug.
  • the mobile phone can determine the audio services supported by the TWS headset. For example, the mobile phone can use the audio service supported by the left and right earplugs as the audio service supported by the TWS headset.
  • the mobile phone may also only negotiate with any of the left and right earplugs of the TWS headset (such as the left earplug) for business scenarios. can. That is to say, the above S803 can be replaced with that the mobile phone negotiates a business scenario with any of the left and right earplugs (such as the left earplug) of the TWS headset to determine the audio service supported by the TWS headset.
  • the audio service supported by the left earplug returned by the left earplug is the audio service supported by the TWS headset.
  • the mobile phone determines the audio service supported by the TWS headset, for each audio service it supports, the following S804-S805 can be performed.
  • the mobile phone performs parameter negotiation with the left earplug and the right earplug of the TWS headset to determine the CIG parameters that can be adapted to the audio service.
  • the mobile phone may perform an audio link with the left and right earbuds based on the ACL link established with the left and right earbuds, respectively Parameter negotiation.
  • the parameter negotiation may include one or more of the following: QoS parameter negotiation, codec parameter negotiation, and CIS parameter negotiation.
  • the CIG parameters that can be adapted to the audio service 1 may include one or more of the following: QoS parameters, codec parameters, CIS parameters.
  • the specific process of the parameter negotiation may include the following steps:
  • Step a The mobile phone can send a parameter negotiation message to the left earplug via ACL link 1.
  • the parameter negotiation message may carry CIG parameters corresponding to the audio service 1.
  • the CIG parameters corresponding to the audio service 1 may be predefined.
  • Step b The left earplug receives the parameter negotiation message sent by the mobile phone through ACL link 1. If the left earplug agrees with the CIG parameters carried in the parameter negotiation message, it can return a confirmation message to the mobile phone; if the left earplug does not agree with the parameters carried in the parameter negotiation message or agrees with some of the parameters carried in the parameter negotiation message, you can send The mobile phone returns a continue negotiation message to continue parameter negotiation with the mobile phone until the left earbud returns a confirmation message to the mobile phone.
  • Step c The mobile phone receives the confirmation message returned by the left earplug through ACL link 1.
  • the mobile phone obtains the parameter negotiation result with the left earplug according to the confirmation message.
  • the mobile phone can also perform parameter negotiation with the right earplug through the ACL link 2 in order to obtain the parameter negotiation result with the right earplug.
  • the mobile phone can determine the CIG parameters that can be adapted to the audio service 1 according to the parameter negotiation results obtained through negotiation with the left and right earplugs.
  • the mobile phone may only perform parameter negotiation with any one of the left and right earplugs (such as the left earplug) of the TWS earphone.
  • S804 can be replaced by the mobile phone and any one of the left and right earplugs of the TWS headset (such as the left earplug) performing parameter negotiation to determine the CIG parameters that can be adapted to the audio service.
  • the parameter negotiation result obtained through negotiation with the left earplug is the CIG parameter that can be adapted to the audio service.
  • the mobile phone configures CIG parameters and establishes CIS with the left earplug and right earplug of the TWS earphone, respectively.
  • the CIG parameters can be configured for the audio service 1, and CISs are established with the left and right earplugs, respectively.
  • the mobile phone can establish CIS 1 with the left earplug, and the mobile phone can establish CIS 2 with the right earplug.
  • the CIS1 and the CIS2 are included in the same CIG, and the CIG corresponds to the audio service 1.
  • the mobile phone may configure the CIG parameters according to the determined CIG parameters that can be adapted to the audio service 1.
  • the mobile phone can establish CIS1 with the left earplug and CIS2 with the right earplug.
  • CIS1 with the left earplug
  • CIS2 with the right earplug.
  • the configuration of the CIG parameters that can be adapted to the audio service and the corresponding between the mobile phone and the left and right earplugs of the TWS headset can be completed before the corresponding audio service is started Establishment of all CIS in CIG of audio business.
  • the mobile phone determines that the audio services supported by the TWS headset include: audio service 1, audio service 2, ..., audio service n. n can be an integer greater than or equal to 1.
  • the mobile phone and the left and right earbuds of the TWS headset can complete the CIG parameters that can be adapted to audio service 1, audio service 2, ..., and audio service n, respectively Configuration and corresponding establishment of all CIS in CIG.
  • the mobile phone determines that an audio service is turned on, it activates the CIG corresponding to the audio service for audio data transmission of the audio service.
  • the audio service 1 can be adapted between the mobile phone and the left and right earplugs of the TWS headset Service 2, ..., and the configuration of CIG parameters of audio service n and the establishment of all CISs in the corresponding CIG, the CIG corresponding to the above audio service 1, audio service 2, ..., and audio service n may not be activated. That is, all CISs in the CIG corresponding to the audio service 1, the audio service 2, ..., and the audio service n may not be activated.
  • the audio service may not be activated
  • the CIG corresponding to 1 does not activate the above CIS 1 and the above CIS 2.
  • the CIG corresponding to the audio service is activated, that is, all CISs included in the CIG are activated.
  • the CIG corresponding to the audio service 1 is activated, that is, the CIS 1 and the CIS 2 included in the CIG are activated.
  • the mobile phone can maintain the correspondence between different audio services and CIG.
  • different CIGs have different CIG logos.
  • audio service 1 corresponds to the CIG labeled CIG_1
  • audio service 2 corresponds to the CIG labeled CIG_2
  • audio service n corresponds to the CIG labeled CIG_n.
  • Audio business CIG logo Audio business 1 CIG_1 Audio business 2 CIG_2 ... Audio business n CIG_n
  • the mobile phone when it determines that an audio service is turned on, it can determine the CIG identifier corresponding to the audio service according to Table 1, so that the corresponding CIG is activated according to the CIG identifier, which is used for audio data transmission of the audio service.
  • the mobile phone may first obtain the CIG parameters corresponding to all audio services. Then, the mobile phone executes the above S805 for these audio services with the same CIG parameters to complete the CIG parameter configuration of these audio services and the establishment of all CISs in the corresponding CIG. In other words, it can be considered that multiple audio services correspond to one CIG. Similarly, mobile phones can also maintain correspondence between different audio services and CIG logos. Based on the corresponding relationship, when an audio service is turned on, the mobile phone can activate the CIG corresponding to the audio service for audio data transmission.
  • the specific implementation of not activating the CIG may be: the mobile phone and the TWS headset may set up a state machine for each CIG separately. After configuring the CIG parameters between the mobile phone and the left and right earbuds of the TWS headset and establishing all the CISs in the corresponding CIG, the mobile phone and the TWS headset can set the CIG state to the first state respectively. The first state is used to identify that all CISs in the CIG have been established, but all CISs in the CIG are not activated, are virtual links, and cannot be used to send and receive actual data.
  • the specific implementation of activating the CIG may be: when the corresponding audio service is turned on, the mobile phone and the TWS headset may change the state of the CIG from the first state to the second state, respectively.
  • the second state is used to identify that all CISs in the CIG are activated, and can be used to send and receive actual data.
  • the state machine of the CIG is in the second state, the mobile phone can transmit audio data to the left and right earplugs of the TWS headset through all CISs in the CIG.
  • a state machine may be set for the CIG.
  • the state machine may include four states, namely: an idle state, a configured state, an open state, and a stream ( streaming) status.
  • the open state may be the above-mentioned first state
  • the streaming state may be the above-mentioned second state.
  • the CIG state machine is in the idle state.
  • the CIG state machine switches from the idle state to the Configured state.
  • the CIG state machine switches from the Configured state to the Open state.
  • the open state all CISs in the CIG have been established, but all CISs in the CIG are virtual links and cannot be used to send and receive actual data.
  • the CIG state machine switches from the open state to the streaming state. In the Streaming state, the mobile phone can transmit the audio data of the audio service to the left and right earplugs of the TWS headset through all CISs in the CIG.
  • the CIG corresponding to the audio service may also be deactivated, that is, stop sending and receiving data on all CISs in the CIG.
  • deactivating CIG may be: when the corresponding audio service ends, the mobile phone and the TWS headset can change the state of the CIG from the above-mentioned second state to the above-mentioned first state, so as to stop data on all CISs in the CIG Of sending and receiving.
  • the mobile phone and the TWS headset can switch the CIG state machine from the Streaming state to the open state.
  • the audio services supported by the TWS headset include: audio service 1 and audio service 2.
  • Audio service 1 is a music service
  • audio service 2 is a voice service as an example.
  • the configuration of the CIG parameters that can be adapted to the music service and the voice service and the establishment of all CIS in the corresponding CIG are completed between the mobile phone and the left and right earbuds of the TWS headset.
  • the correspondence between the music service and voice service and the CIG logo is shown in Table 2.
  • the music service corresponds to the CIG identified as CIG_1 (such as CIG1)
  • the voice service corresponds to the CIG identified as CIG_2 (such as CIG2).
  • CIG1 and CIG2 are not activated, that is, there is no actual data transmission and reception on CIG1 and CIG2 including CIS.
  • the time domain resources occupied by CIG1 and CIG2 may overlap, or there may be no overlap.
  • FIG. 10 it is a schematic diagram of the distribution of CIG1 and CIG2 in the time domain between the mobile phone and the left and right earplugs of the TWS headset.
  • both CIG1 and CIG2 include two CISs.
  • CIG1 includes CIS 1_1 and CIS 1_2.
  • CIG 2 includes CIS 2_1 and CIS 2_2.
  • Each CIS in each CIG can maintain the CIG anchor point and ISO interval of the CIG.
  • the CIG may include multiple CIG events (CIG_event).
  • the CIG anchor point is the starting time point of the corresponding CIG event.
  • the ISO interval is the time between two consecutive CIG anchors.
  • Each CIG event belongs to an ISO interval in time.
  • CIG1 may include multiple CIG events, such as CIG1 event (X), CIG1 event (X+1), and CIG1 event (X+2).
  • the CIG1(X) anchor point is the starting point of the CIG1 event (X).
  • the CIG1(X+1) anchor point is the starting point of the CIG1 event (X+1).
  • the CIG1(X+2) anchor point is the starting point of the CIG1 event (X+2).
  • the CIG1(X) anchor point and CIG1(X+1) anchor point are two consecutive CIG anchor points of CIG.
  • the CIG1ISO interval is the time between the CIG1(X) anchor point and the CIG1(X+1) anchor point.
  • CIS1_1 and CIS1_2 in CIG1 maintain the CIG anchor point of CIS1, such as CIG1(X) anchor point, CIG1(X+1) anchor point, CIG1(X+2) anchor point, etc., Maintain the ISO interval of CIG1, such as CIG1ISO interval.
  • CIS 2_1 and CIS 2_2 in CIG 2 maintain CIG anchor points of CIS 2, such as CIG 2 (X) anchor points, CIG 2 (X+1) anchor points, etc., and maintain ISO intervals of CIG 2, such as CIG 2 ISO intervals .
  • the mobile phone determines that the music service is started, and the mobile phone activates the CIG1 corresponding to the music service. For example, when the user opens the music player to play music, the mobile phone can determine that the music service is turned on.
  • the CIG corresponding to the music service can be determined according to Table 2, that is, the CIG with the CIG identifier of CIG_1 is determined, that is, CIG1 is the CIG corresponding to the music service.
  • the mobile phone can switch the state machine of CIG1 from the open state to the Streaming state.
  • the mobile phone can send activation instructions to the left and right earplugs of the TWS headset, respectively.
  • This activation instruction can be used to instruct the left and right earplugs of the TWS headset to activate the CIS in CIG1.
  • the mobile phone can send the activation instruction to the left and right earplugs through the ACL link with the left and right earplugs, respectively.
  • the activation instruction may carry the CIG1 logo.
  • the left and right earbuds of the TWS headset can switch the state machine of CIG1 from the open state to the Streaming state.
  • the audio data of the music service can be transmitted between the mobile phone 1 and the left and right earplugs of the TWS earphone through the CIS 1_1 and CIS 1_2 in the CIG1.
  • the CIG anchor point and ISO interval between the mobile phone 1 and the left and right earbuds of the TWS headset can be used to perform audio data of the music service through CIS 1_1 and CIS 1_2 in CIG1 transmission.
  • the CIG2 corresponding to the voice service still remains in an inactive state.
  • each CIS in CIG can also maintain the maximum data size of M to S transmission, the maximum data size of S to M transmission, the maximum time interval of M to S data packet transmission at the link layer, and the S to M transmission time. Data packets are transmitted at the link layer for the longest interval and other parameters, and are used to send and receive audio data.
  • the user when the user wants to end the music playback, the user can trigger the end of the music playback on the mobile phone or the TWS headset.
  • the mobile phone can determine that the music service ends.
  • the mobile phone can switch the state machine of the above CIG 1 from the Streaming state to the open state.
  • the mobile phone can send deactivation instructions to the left and right earplugs of the TWS headset, respectively.
  • the deactivation instruction is used to instruct the left and right earplugs of the TWS earphone to deactivate the CIS in CIG1.
  • the mobile phone can send the deactivation instruction to the left and right earplugs through the ACL link with the left and right earplugs, respectively.
  • the left and right earbuds of the TWS headset can switch the state machine of CIG1 from Streaming state to open state. In this way, CIG1 deactivation is completed.
  • the CIS in CIG1 cannot be used for the transmission of audio data, that is, the left and right earphones of the mobile phone and TWS headset stop audio data on CIS1_1 and CIS1_2 in CIG1 Of sending and receiving.
  • the mobile phone can determine that the voice service is turned on. When the mobile phone determines that the voice service is turned on, it can deactivate the CIG1 corresponding to the music service.
  • the mobile phone can also determine the CIG corresponding to the voice service according to Table 2, that is, the CIG whose CIG identifier is CIG_2, that is, CIG2 is the CIG corresponding to the voice service.
  • the mobile phone can switch the CIG2 state machine from the open state to the Streaming state.
  • the mobile phone can also send activation instructions to the left and right earplugs of the TWS headset, respectively.
  • the activation instruction may carry the CIG2 logo.
  • the mobile phone can send the activation instruction to the left and right earplugs through the ACL link with the left and right earplugs, respectively.
  • the left and right earbuds of the TWS headset can switch the CIG2 state machine from the open state to the Streaming state. In this way, the audio data of the voice service can be realized between the mobile phone 1 and the left and right earplugs of the TWS headset through the CIS 2_1 and CIS 2_2 in the CIG2.
  • the CIG anchor point and ISO interval between the mobile phone 1 and the left and right earbuds of the TWS headset based on the maintenance CIG 2 can be used to perform audio data of the voice service through CIS 2_1 and CIS 2_2 in CIG 2.
  • the left and right earphones of the mobile phone and the TWS headset can deactivate CIG2 and activate CIG1, so that the audio data between the mobile phone and the left and right earphones of the TWS headset can continue to be transmitted through the CIS included in CIG1.
  • the left and right earplugs of the mobile phone and the TWS headset may not deactivate the currently activated CIG
  • the audio data of another audio service can be mixed (or called superimposed) with the audio data of the currently playing audio service, and then transmitted through the CIG in the currently activated CIG.
  • the TWS headset also supports audio service 3, such as the prompt tone service.
  • the reminder tone service corresponds to the CIG identified as CIG_3 (such as CIG 3).
  • CIG_3 such as CIG 3
  • the mobile phone can confirm that the prompt tone service is started.
  • the mobile phone can not activate the CIG3 corresponding to the prompt tone service, but superimpose the SMS prompt tone and the currently playing music, and then transmit it to the left and right earplugs of the TWS headset through CIS 1_1 and CIS 1_2 in CIG1.
  • the mobile phone can activate the CIG3 corresponding to the prompt tone service to transmit the corresponding audio data.
  • the configuration of the CIG parameters corresponding to the audio service and the establishment of all CISs in the CIG are completed. It does not activate all CIS in the CIG.
  • all CISs in the CIG can be activated through the air interface signaling of the corresponding number (the number is the same as the number of CISs in the CIG), and then all CISs in the CIG can be used to perform the Audio data transmission for audio services. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
  • the mobile phone determines the audio service supported by the TWS headset. For each audio service supported, before the audio service is started, the mobile phone can negotiate parameters with the TWS headset to determine the CIG parameters corresponding to the audio service After that, only the configuration of the corresponding CIG parameters is performed, and the establishment of the CIS in the CIG is not performed.
  • the non-establishment of CIS in CIG mentioned here refers to: for each CIS in CIG, the mobile phone sends an air interface request message LL_CIS_REQ to the earplug of the TWS headset to send the earplug to the TWS headset Request to create a CIS.
  • the earplug of the TWS headset can send an air interface response message LL_CIS_RSP to the mobile phone after determining to accept the CIS creation request.
  • the mobile phone does not reply the air interface notification message LL_CIS_IND to the earplugs of the TWS headset.
  • the mobile phone sends an air interface notification message LL_CIS_IND to the earplug of the TWS headset to notify the earplug of the TWS headset that the CIS has been established.
  • the audio data can be transmitted between the mobile phone and the earplugs of the TWS headset through the CIS in the CIG. In this way, the establishment delay of all CISs in the CIG can also be reduced, thereby reducing the transmission delay of audio data.
  • the Bluetooth device may include: a link establishment module 1201, an application identification module 1202, a data path establishment module 1203, and a data path activation module 1204.
  • the link establishment module 1201 may be used to establish an ACL link with peripheral devices, such as the left and right earplugs of a TWS headset. As used to execute S802 in the above embodiment.
  • the application identification module 1202 may be used to obtain audio services supported by the left and right earplugs of the TWS headset. As used to execute S803 in the above embodiment. The application identification module 1202 can also be used to negotiate parameters with the left and right earplugs of the TWS headset to obtain CIG parameters that can be adapted to the audio service. As used to execute S804 in the above embodiment. The application identification module 1202 can also be used to establish the correspondence between the audio services supported by the left and right earbuds of the TWS headset and the CIG, as shown in Table 1 or Table 2 in the above embodiment.
  • the data path establishment module 1203 can be used to configure CIG parameters, and establish the CIS in the CIG according to the configured CIG parameters with the left and right earplugs of the TWS earphone. As used to execute S805 in the above embodiment. Among them, the CIS in the CIG is not activated.
  • the data path activation module 1204 may be used to activate the CIS in the CIG corresponding to the audio service when the audio service is turned on. As used to execute S806 in the above embodiment.
  • the data path activation module 1204 may also be used to send activation instructions to the left and right earplugs of the TWS headset so that the left and right earplugs of the TWS headset activate the CIS in the corresponding CIG.
  • the link establishment module 1201 may be the wireless communication module 160 in the embodiment shown in FIG. 4 described above.
  • the application identification module 1202, the data path establishment module 1203, and the data path activation module 1204 may be modules that integrate corresponding functions of the wireless communication module 160 and the processor 110 of the embodiment shown in FIG. 4 described above.
  • 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 various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

Disclosed in the present application are a method and a device for establishing data channels, relating to the field of short distance communication, and enabling all of the CIS in an audio service CIG to be established before the audio service is started. Compared to establishing all of the CIS in the corresponding CIG after the audio service is started, the transmission latency of audio data can be effectively reduced. The specific solution is: a first electronic device acquires an audio service supported by a second electronic device, and determines CIG parameters of a CIG corresponding to the audio service; the first electronic device configures the CIG parameters and, on the basis of the configured CIG parameters, establishes a CIS in the CIG, the CIS in the CIG not being activated; before the audio service is started, the first electronic device activates the CIS in the CIG and sends an activation command to the second electronic device, the activation command being used for instructing the second electronic device to activate the CIS in the CIG; and the first electronic device transmits audio data with the second electronic device by means of the CIS in the CIG.

Description

一种数据信道的建立方法及设备Method and equipment for establishing data channel 技术领域Technical field
本申请涉及短距离通信领域,尤其涉及一种数据信道的建立方法及设备。The present application relates to the field of short-range communications, and in particular, to a method and device for establishing a data channel.
背景技术Background technique
蓝牙(bluetooth)是一种无线技术标准,其可实现不同设备之间的短距离数据交互。如手机可以开启蓝牙模块与蓝牙耳机进行短距离数据交互,以将蓝牙耳机作为手机的音频输入/输出设备实现语音、音乐等音频业务的功能。在采用蓝牙进行短距离数据交互时,不同设备之间可以通过低功耗蓝牙(bluetooth low energy,BLE)的等时(isochronous,ISO)信道(channel)进行音频数据(或称为音频流,stream)的传输。Bluetooth (bluetooth) is a wireless technology standard that enables short-range data interaction between different devices. For example, the mobile phone can turn on the Bluetooth module and perform short-range data interaction with the Bluetooth headset to use the Bluetooth headset as the audio input/output device of the mobile phone to realize the functions of audio services such as voice and music. When using Bluetooth for short-range data interaction, audio data (or audio stream, stream) can be transmitted between different devices through an isochronous (ISO) channel of Bluetooth (Bluetooth Low Energy). ) Transmission.
BLE的ISO信道定义了一种传输机制。在该传输机制下,一个主设备(Master,简称M,如上述手机)可以向一个或多个从设备(Slave,简称S,如上述蓝牙耳机)发送音频数据。具体的,该传输机制中定义了基于连接的等时流组(connected isochronous group,CIG),CIG是组的概念。一个CIG可以包括一个或多个基于连接的等时音频流(connected isochronous stream,CIS)。一个主设备可以通过一个CIG中的一个CIS向一个从设备发送音频数据。一个主设备可以通过一个CIG中的多个CIS向多个从设备发送音频数据,多个从设备与多个CIS一一对应。The ISO channel of BLE defines a transmission mechanism. Under this transmission mechanism, a master device (Master, abbreviated as M, such as the above-mentioned mobile phone) can send audio data to one or more slave devices (Slave, abbreviated as S, as the aforementioned Bluetooth headset). Specifically, a connection-based isochronous group (CIG) is defined in the transmission mechanism, and CIG is the concept of group. A CIG may include one or more connected isochronous audio streams (CIS). A master device can send audio data to a slave device through a CIS in a CIG. A master device can send audio data to multiple slave devices through multiple CISs in a CIG, and multiple slave devices correspond to multiple CISs in one-to-one correspondence.
发明内容Summary of the invention
本申请实施例提供一种数据信道的建立方法及设备,在音频业务开启之前,对应该音频业务的CIG中的所有CIS便已建立完成。相较于在音频业务开启后建立对应CIG中的所有CIS,可有效降低音频数据的传输时延。The embodiments of the present application provide a method and equipment for establishing a data channel. Before the audio service is started, all CISs in the CIG corresponding to the audio service have been established. Compared with establishing all CISs in the corresponding CIG after the audio service is started, the transmission delay of audio data can be effectively reduced.
本申请采用如下技术方案:This application uses the following technical solutions:
本申请的第一方面,提供一种数据信道的建立方法,该方法可以应用于第一电子设备,该方法可以包括:第一电子设备获取第二电子设备支持的音频业务,确定该音频业务对应的CIG的CIG参数;第一电子设备可以配置该CIG参数,并根据配置的CIG参数建立CIG中的CIS,其中,该CIG中的CIS未激活;在音频业务开启时,第一电子设备可以激活该CIG中的CIS,并向第二电子设备发送激活指令,该激活指令可以用于指示第二电子设备激活CIG中的CIS;这样,第一电子设备可以通过CIG中的CIS与第二电子设备传输音频数据。A first aspect of the present application provides a method for establishing a data channel. The method can be applied to a first electronic device. The method may include: the first electronic device obtains an audio service supported by a second electronic device, and determines that the audio service corresponds to The CIG parameters of the CIG of the CIG; the first electronic device can configure the CIG parameters, and establish the CIS in the CIG according to the configured CIG parameters, wherein the CIS in the CIG is not activated; when the audio service is turned on, the first electronic device can be activated CIS in the CIG and send an activation instruction to the second electronic device, the activation instruction can be used to instruct the second electronic device to activate the CIS in the CIG; in this way, the first electronic device can communicate with the second electronic device through the CIS in the CIG Transfer audio data.
其中,上述第一电子设备可以是手机等电子设备,第二电子设备可以是如蓝牙耳机等外围设备,或者,第二电子设备也可是如外围设备的主体,如TWS耳机的主体。当第二电子设备是外围设备的主体时,第一电子设备为外围设备的每个主体之间建立的CIS,归属于同一个CIG。The first electronic device may be an electronic device such as a mobile phone, and the second electronic device may be a peripheral device such as a Bluetooth headset, or the second electronic device may also be a main body such as a peripheral device, such as a main body of a TWS headset. When the second electronic device is the main body of the peripheral device, the first electronic device is a CIS established between each main body of the peripheral device and belongs to the same CIG.
采用该技术方案,通过在音频业务开启之前,完成对应该音频业务的CIG参数的配置,以及CIG中的所有CIS的建立。但不激活该CIG中的所有CIS。在该音频业务开启时,只需通过对应条数(该条数与CIG中的CIS的数量相同)的空口信令将该 CIG中的所有CIS激活,便可以通过该CIG中的所有CIS进行该音频业务的音频数据的传输。这样,有效降低了CIG中所有CIS的建立时延,从而降低了音频数据的传输时延。Using this technical solution, the configuration of the CIG parameters corresponding to the audio service and the establishment of all CISs in the CIG are completed before the audio service is started. It does not activate all CIS in the CIG. When the audio service is turned on, all CISs in the CIG can be activated through the air interface signaling of the corresponding number (the number is the same as the number of CISs in the CIG), and then all CISs in the CIG can be used to perform the Audio data transmission for audio services. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
在一种可能的实现方式中,该方法还可以包括:在音频业务结束时,第一电子设备可以去激活CIG中的CIS,并向第二电子设备发送去激活指令,该去激活指令用于指示第二电子设备去激活CIG中的CIS;第一电子设备停止通过CIG中的CIS与第二电子设备传输音频数据。这样,在音频业务结束时,通过将该音频业务对应的CIG中的CIS去激活,保留虚拟链路,而不是删除,可以在该音频业务再次启动时,无需建立对应该音频业务的CIG中的CIS,从而降低了音频数据的传输时延。In a possible implementation, the method may further include: at the end of the audio service, the first electronic device may deactivate the CIS in the CIG, and send a deactivation instruction to the second electronic device, the deactivation instruction is used to Instruct the second electronic device to deactivate the CIS in the CIG; the first electronic device stops transmitting audio data with the second electronic device through the CIS in the CIG. In this way, at the end of the audio service, by deactivating the CIS in the CIG corresponding to the audio service and retaining the virtual link instead of deleting it, it is not necessary to establish the CIG corresponding to the audio service when the audio service is restarted CIS, thereby reducing the transmission delay of audio data.
在另一种可能的实现方式中,在第一电子设备获取第二电子设备支持的音频业务之前,该方法还可以包括:第一电子设备实施与第二电子设备的配对操作;第一电子设备实施与第二电子设备建立ACL链路的操作;第一电子设备获取第二电子设备支持的音频业务,具体的可以包括:第一电子设备实施与第二电子设备通过ACL链路协商业务场景的操作,第一电子设备根据业务场景协商结果确定第二电子设备支持的音频业务;第一电子设备确定音频业务对应的基于连接的等时流组CIG的CIG参数,具体的可以包括:第一电子设备实施与第二电子设备通过ACL链路协商参数的操作,第一电子设备根据参数协商结果确定音频业务对应的CIG的CIG参数。这样,通过建立的ACL链路可以实现业务场景,以及CIG参数的协商,以便确定第二电子设备支持的音频业务,并获得能够适配该第二电子设备支持的音频业务的CIG参数,确保了预先建立的CIG中的CIS能够满足对应音频业务的业务需求。In another possible implementation manner, before the first electronic device obtains the audio service supported by the second electronic device, the method may further include: the first electronic device performs a pairing operation with the second electronic device; the first electronic device Implement the operation of establishing an ACL link with the second electronic device; the first electronic device acquiring audio services supported by the second electronic device may specifically include: the first electronic device implements a business scenario negotiation with the second electronic device through the ACL link In operation, the first electronic device determines the audio service supported by the second electronic device according to the business scenario negotiation result; the first electronic device determines the CIG parameter of the connection-based isochronous stream group CIG corresponding to the audio service, which may specifically include: the first electronic device The device implements an operation of negotiating parameters with the second electronic device through the ACL link, and the first electronic device determines the CIG parameters of the CIG corresponding to the audio service according to the parameter negotiation result. In this way, business scenarios and CIG parameter negotiation can be realized through the established ACL link, so as to determine the audio service supported by the second electronic device, and obtain CIG parameters that can be adapted to the audio service supported by the second electronic device, ensuring that The CIS in the pre-established CIG can meet the business needs of corresponding audio services.
在另一种可能的实现方式中,第一电子设备中设置有CIG的状态机;在第一电子设备与第二电子设备建立了CIG中的CIS后,CIG的状态机为第一状态,该第一状态可以用于指示CIG中的CIS未激活,不能用于音频数据的传输;第一电子设备激活CIG中的CIS,具体的可以包括:第一电子设备将CIG的状态机由第一状态切换为第二状态,该第二状态可以用于指示CIG中的CIS被激活,能够用于音频数据的传输。In another possible implementation manner, the CIG state machine is set in the first electronic device; after the first electronic device and the second electronic device establish the CIS in the CIG, the CIG state machine is in the first state. The first state may be used to indicate that the CIS in the CIG is not activated and cannot be used for audio data transmission; the first electronic device may activate the CIS in the CIG, which may specifically include: the first electronic device changes the state machine of the CIG from the first state Switch to the second state, which can be used to indicate that the CIS in the CIG is activated and can be used for the transmission of audio data.
在另一种可能的实现方式中,第一电子设备去激活CIG中的CIS,具体的可以包括:第一电子设备将CIG的状态机由第二状态切换为第一状态。In another possible implementation manner, the first electronic device deactivates the CIS in the CIG, which may specifically include: the first electronic device switches the state machine of the CIG from the second state to the first state.
在另一种可能的实现方式中,第一状态为打开(open)状态,第二状态为音频流(streaming)状态。In another possible implementation manner, the first state is an open state, and the second state is an audio streaming state.
在另一种可能的实现方式中,该方法还可以包括:第一电子设备建立音频业务与CIG的对应关系;在音频业务开启时,第一电子设备激活CIG中的CIS,具体的可以包括:在音频业务开启时,第一电子设备可以根据上述对应关系,激活音频业务对应的CIG中的CIS。这样,根据维护的对应关系,第一电子设备能够激活可以适配当前启动的音频业务的CIG中的CIS,确保了音频数据的传输能够满足业务需求。In another possible implementation manner, the method may further include: the first electronic device establishes a correspondence between the audio service and the CIG; when the audio service is turned on, the first electronic device activates the CIS in the CIG, which may specifically include: When the audio service is turned on, the first electronic device may activate the CIS in the CIG corresponding to the audio service according to the above correspondence. In this way, according to the maintained correspondence, the first electronic device can activate the CIS in the CIG that can adapt to the currently activated audio service, ensuring that the transmission of audio data can meet the service requirements.
在另一种可能的实现方式中,上述CIG参数可以包括以下至少一项:服务质量(QoS)参数、编码(codec)参数、CIS参数,该CIS参数可以为用于第一电子设备与第二电子设备数据收发的传输参数。In another possible implementation manner, the CIG parameters may include at least one of the following: quality of service (QoS) parameters, codec parameters, and CIS parameters. The CIS parameters may be used for the first electronic device and the second Transmission parameters for electronic device data transmission and reception.
本申请的第二方面,提供一种数据信道的建立方法,该方法可以应用于第二电子设备,该方法可以包括:第二电子设备建立CIG中的CIS,CIG与第二电子设备支持 的音频业务对应,该CIG中的CIS未激活;第二电子设备接收第一电子设备发送的激活指令;响应于接收到的激活指令,第二电子设备激活CIG中的CIS;第二电子设备通过CIG中的CIS与第一电子设备传输音频数据。A second aspect of the present application provides a method for establishing a data channel. The method may be applied to a second electronic device. The method may include: the second electronic device establishes a CIS in the CIG, and the audio supported by the CIG and the second electronic device Business correspondence, the CIS in the CIG is not activated; the second electronic device receives the activation instruction sent by the first electronic device; in response to the received activation instruction, the second electronic device activates the CIS in the CIG; the second electronic device passes the CIG CIS transmits audio data with the first electronic device.
采用该技术方案,通过在音频业务开启之前,完成对应该音频业务的CIG参数的配置,以及CIG中的所有CIS的建立。但不激活该CIG中的所有CIS。在该音频业务开启时,只需通过对应条数(该条数与CIG中的CIS的数量相同)的空口信令将该CIG中的所有CIS激活,便可以通过该CIG中的所有CIS进行该音频业务的音频数据的传输。这样,有效降低了CIG中所有CIS的建立时延,从而降低了音频数据的传输时延。Using this technical solution, the configuration of the CIG parameters corresponding to the audio service and the establishment of all CISs in the CIG are completed before the audio service is started. It does not activate all CIS in the CIG. When the audio service is turned on, all CISs in the CIG can be activated through the air interface signaling of the corresponding number (the number is the same as the number of CISs in the CIG), and then all CISs in the CIG can be used to perform the Audio data transmission for audio services. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
在一种可能的实现方式中,该方法还可以包括:第二电子设备接收第一电子设备发送的去激活指令;响应于该去激活指令,第二电子设备去激活CIG中的CIS;第二电子设备停止通过该CIG中的CIS与第一电子设备传输音频数据。这样,在音频业务结束时,通过将该音频业务对应的CIG中的CIS去激活,保留虚拟链路,而不是删除,可以在该音频业务再次启动时,无需建立对应该音频业务的CIG中的CIS,从而降低了音频数据的传输时延。In a possible implementation, the method may further include: the second electronic device receives the deactivation instruction sent by the first electronic device; in response to the deactivation instruction, the second electronic device deactivates the CIS in the CIG; the second The electronic device stops transmitting audio data with the first electronic device through the CIS in the CIG. In this way, at the end of the audio service, by deactivating the CIS in the CIG corresponding to the audio service and retaining the virtual link instead of deleting it, it is not necessary to establish the CIG corresponding to the audio service when the audio service is restarted CIS, thereby reducing the transmission delay of audio data.
在另一种可能的实现方式中,在第二电子设备建立CIG中的CIS之前,该方法还可以包括:第二电子设备实施与第一电子设备的配对操作;第二电子设备实施与第一电子设备建立ACL链路的操作;第二电子设备实施与第一电子设备通过ACL链路协商业务场景的操作,协商业务场景的操作用于第一电子设备确定第二电子设备支持的音频业务;第二电子设备实施与第一电子设备通过ACL链路协商参数的操作,协商参数的操作用于第一电子设备确定音频业务对应的CIG的CIG参数,CIG参数用于建立CIG中的CIS。这样,通过建立的ACL链路可以实现业务场景,以及CIG参数的协商,以便第一电子设备能够确定第二电子设备支持的音频业务,并获得能够适配该第二电子设备支持的音频业务的CIG参数,确保了预先建立的CIG中的CIS能够满足对应音频业务的业务需求。In another possible implementation manner, before the second electronic device establishes the CIS in the CIG, the method may further include: the second electronic device performs a pairing operation with the first electronic device; the second electronic device implements the The electronic device establishes an ACL link; the second electronic device implements an operation of negotiating a business scenario with the first electronic device through the ACL link, and the operation of negotiating the business scenario is used by the first electronic device to determine the audio service supported by the second electronic device; The second electronic device implements an operation of negotiating parameters with the first electronic device through the ACL link. The operation of negotiating parameters is used for the first electronic device to determine the CIG parameters of the CIG corresponding to the audio service, and the CIG parameters are used to establish the CIS in the CIG. In this way, business scenarios and CIG parameter negotiation can be realized through the established ACL link, so that the first electronic device can determine the audio service supported by the second electronic device, and obtain an audio service capable of adapting to the audio service supported by the second electronic device The CIG parameters ensure that the CIS in the pre-established CIG can meet the service requirements of the corresponding audio service.
在另一种可能的实现方式中,第二电子设备中可以设置有CIG的状态机;在第二电子设备与第一电子设备建立了CIG中的CIS后,该CIG的状态机为第一状态,该第一状态可以用于指示CIG中的CIS未激活,不能用于音频数据的传输;第二电子设备激活CIG中的CIS,具体的可以包括:第二电子设备将CIG的状态机由第一状态切换为第二状态,该第二状态可以用于指示CIG中的CIS被激活,能够用于音频数据的传输。In another possible implementation manner, the second electronic device may be provided with a CIG state machine; after the second electronic device and the first electronic device establish a CIS in the CIG, the CIG state machine is the first state , The first state can be used to indicate that the CIS in the CIG is not activated and cannot be used for audio data transmission; the second electronic device activates the CIS in the CIG, which may specifically include: A state is switched to a second state, which can be used to indicate that the CIS in the CIG is activated and can be used for audio data transmission.
在另一种可能的实现方式中,第二电子设备去激活CIG中的CIS,具体的可以包括:第二电子设备将CIG的状态机由第二状态切换为第一状态。In another possible implementation manner, the second electronic device deactivates the CIS in the CIG, which may specifically include: the second electronic device switches the state machine of the CIG from the second state to the first state.
在另一种可能的实现方式中,第一状态为open状态,第二状态为streaming状态。In another possible implementation manner, the first state is an open state, and the second state is a streaming state.
在另一种可能的实现方式中,CIG参数可以包括以下至少一项:QoS参数、codec参数、CIS参数,CIS参数可以为用于第一电子设备与第二电子设备数据收发的传输参数。In another possible implementation manner, the CIG parameter may include at least one of the following: a QoS parameter, a codec parameter, and a CIS parameter. The CIS parameter may be a transmission parameter used for data transmission and reception between the first electronic device and the second electronic device.
本申请的第三方面,提供一种数据信道的建立方法,该方法可以应用于第一电子设备,该方法可以包括:第一电子设备获取第二电子设备支持的音频业务;第一电子 设备确定音频业务对应的CIG的CIG参数,该CIG参数可以用于建立CIG中的CIS;第一电子设备配置CIG参数,根据配置的CIG参数向第二电子设备发送CIS建立请求消息;第一电子设备接收第二电子设备发送的CIS建立响应消息;在音频业务开启时,第一电子设备向第二电子设备发送CIS建立消息,该CIS建立消息可以用于与第二电子设备建立CIG中的CIS;第一电子设备通过CIG中的CIS与第二电子设备传输音频数据。A third aspect of the present application provides a method for establishing a data channel. The method may be applied to a first electronic device. The method may include: the first electronic device obtains an audio service supported by the second electronic device; the first electronic device determines The CIG parameter of the CIG corresponding to the audio service. The CIG parameter can be used to establish the CIS in the CIG; the first electronic device configures the CIG parameter, and sends a CIS establishment request message to the second electronic device according to the configured CIG parameter; the first electronic device receives The CIS establishment response message sent by the second electronic device; when the audio service is turned on, the first electronic device sends a CIS establishment message to the second electronic device. The CIS establishment message can be used to establish the CIS in the CIG with the second electronic device; An electronic device transmits audio data with the second electronic device through the CIS in the CIG.
采用该技术方案,在音频业务开启之前,完成对应该音频业务的CIG参数的配置,并向第二电子设备发送CIS建立请求消息。如果接收到第二电子设备发送的CIS建立响应消息,则暂时不向第二电子设备发送CIS建立消息。而是在该音频业务开启时,向第二电子设备发送CIS建立消息,以与第二电子设备建立CIG中的CIS,进而可以通过该CIG中的CIS与第二电子设备进行该音频业务的音频数据的传输。这样,有效降低了CIG中所有CIS的建立时延,从而降低了音频数据的传输时延。With this technical solution, before the audio service is started, the configuration of the CIG parameters corresponding to the audio service is completed, and a CIS establishment request message is sent to the second electronic device. If the CIS establishment response message sent by the second electronic device is received, the CIS establishment message is not sent to the second electronic device temporarily. Instead, when the audio service is started, a CIS establishment message is sent to the second electronic device to establish the CIS in the CIG with the second electronic device, and then the audio of the audio service can be conducted through the CIS in the CIG and the second electronic device Data transmission. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
在一种可能的实现方式中,在第一电子设备获取第二电子设备支持的音频业务之前,该方法还可以包括:第一电子设备实施与第二电子设备的配对操作;第一电子设备实施与第二电子设备建立ACL链路的操作;第一电子设备获取第二电子设备支持的音频业务,具体的可以包括:第一电子设备实施与第二电子设备通过ACL链路协商业务场景的操作,第一电子设备根据业务场景协商结果确定第二电子设备支持的音频业务;第一电子设备确定音频业务对应的基于连接的等时流组CIG的CIG参数,具体的可以包括:第一电子设备实施与第二电子设备通过ACL链路协商参数的操作,第一电子设备根据参数协商结果确定音频业务对应的CIG的CIG参数。这样,通过建立的ACL链路可以实现业务场景,以及CIG参数的协商,以便第一电子设备能够确定第二电子设备支持的音频业务,并获得能够适配该第二电子设备支持的音频业务的CIG参数,确保了预先建立的CIG中的CIS能够满足对应音频业务的业务需求。In a possible implementation manner, before the first electronic device obtains the audio service supported by the second electronic device, the method may further include: the first electronic device performs a pairing operation with the second electronic device; the first electronic device implements The operation of establishing an ACL link with the second electronic device; the first electronic device acquiring audio services supported by the second electronic device may specifically include: the first electronic device implements an operation of negotiating a business scenario with the second electronic device through the ACL link , The first electronic device determines the audio service supported by the second electronic device according to the negotiation result of the business scenario; the first electronic device determines the CIG parameters of the connection-based isochronous stream group CIG corresponding to the audio service, which may specifically include: the first electronic device The operation of negotiating parameters with the second electronic device through the ACL link is implemented, and the first electronic device determines the CIG parameters of the CIG corresponding to the audio service according to the parameter negotiation result. In this way, business scenarios and CIG parameter negotiation can be realized through the established ACL link, so that the first electronic device can determine the audio service supported by the second electronic device, and obtain an audio service capable of adapting to the audio service supported by the second electronic device The CIG parameters ensure that the CIS in the pre-established CIG can meet the service requirements of the corresponding audio service.
本申请的第四方面,提供一种电子设备,该电子设备可以包括:一个或多个处理器、存储器、无线通信模块以及移动通信模块;存储器、无线通信模块以及移动通信模块与一个或多个处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,电子设备执行如第一方面或第一方面的可能的实现方式,或者第三方面或第三方面的可能的实现方式中任一项所述的数据信道的建立方法。该电子设备可以是上述第一电子设备。According to a fourth aspect of the present application, an electronic device is provided. The electronic device may include: one or more processors, a memory, a wireless communication module, and a mobile communication module; a memory, a wireless communication module, and a mobile communication module and one or more The processor is coupled, and the memory is used to store computer program code. The computer program code includes computer instructions. When one or more processors execute the computer instructions, the electronic device executes the first aspect or a possible implementation manner of the first aspect, or the first The method for establishing a data channel according to any one of the three aspects or any possible implementation manner of the third aspect. The electronic device may be the above-mentioned first electronic device.
本申请的第五方面,提供一种电子设备,该电子设备可以包括:一个或多个处理器、存储器、无线通信模块、受话器以及麦克风;存储器、无线通信模块、受话器以及麦克风与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,电子设备执行如第二方面或第二方面的可能的实现方式中任一项所述的数据信道的建立方法。该电子设备可以是上述第二电子设备。A fifth aspect of the present application provides an electronic device, which may include: one or more processors, a memory, a wireless communication module, a receiver, and a microphone; a memory, a wireless communication module, a receiver, and a microphone are coupled to the processor, The memory is used to store computer program code. The computer program code includes computer instructions. When one or more processors execute the computer instructions, the electronic device executes any one of the second aspect or any possible implementation manner of the second aspect. How to establish a data channel. The electronic device may be the above-mentioned second electronic device.
本申请的第六方面,提供一种蓝牙系统,该蓝牙系统可以包括:如第四方面所述的电子设备,以及如第五方面所述的电子设备。According to a sixth aspect of the present application, a Bluetooth system is provided. The Bluetooth system may include: the electronic device according to the fourth aspect, and the electronic device according to the fifth aspect.
本申请的第七方面,提供一种计算机存储介质,包括计算机指令,当该计算机指令在电子设备(如上述第一电子设备)上运行时,使得电子设备执行如第一方面或第 一方面的可能的实现方式,或者第三方面或第三方面的可能的实现方式中任一项所述的数据信道的建立方法。A seventh aspect of the present application provides a computer storage medium, including computer instructions, which when executed on an electronic device (such as the above-mentioned first electronic device), causes the electronic device to execute the first aspect or the first aspect A possible implementation manner, or the method for establishing a data channel according to any one of the third aspect or any possible implementation manner of the third aspect.
本申请的第八方面,提供一种计算机存储介质,包括计算机指令,当该计算机指令在电子设备(如上述第二电子设备)上运行时,使得电子设备执行如第二方面或第二方面的可能的实现方式中任一项所述的数据信道的建立方法。An eighth aspect of the present application provides a computer storage medium, including computer instructions, which when executed on an electronic device (such as the above-mentioned second electronic device), causes the electronic device to perform the second aspect or the second aspect The method for establishing a data channel according to any one of the possible implementation manners.
本申请的第九方面,本申请提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述任一项所述的数据信道的建立方法。In a ninth aspect of the present application, the present application provides a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the method for establishing a data channel described in any one of the above.
可以理解地,上述提供的第四方面和第五方面所述的电子设备,第六方面所述的蓝牙系统,第七方面和第八方面所述的计算机存储介质,以及第九方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Understandably, the electronic device described in the fourth and fifth aspects provided above, the Bluetooth system described in the sixth aspect, the computer storage medium described in the seventh and eighth aspects, and the electronic device described in the ninth aspect The computer program products are used to execute the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
附图说明BRIEF DESCRIPTION
图1为本申请实施例提供的一种蓝牙系统的组成示意图;1 is a schematic diagram of the composition of a Bluetooth system provided by an embodiment of this application;
图2为本申请实施例提供的一种TWS耳机的耳塞的结构示意图;2 is a schematic structural diagram of an earplug of a TWS earphone provided by an embodiment of the present application;
图3为本申请实施例提供的一种TWS耳机的产品形态实例示意图;3 is a schematic diagram of an example of a product form of a TWS earphone provided by an embodiment of the present application;
图4为本申请实施例提供的一种电子设备的结构示意图;4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图5为本申请实施例提供的一种数据信道的示意图;5 is a schematic diagram of a data channel provided by an embodiment of this application;
图6为本申请实施例提供的一种蓝牙传输框架的组成示意图;6 is a schematic diagram of the composition of a Bluetooth transmission framework provided by an embodiment of the present application;
图7为本申请实施例提供的一种CIS建立流程示意图;7 is a schematic diagram of a CIS establishment process provided by an embodiment of this application;
图8为本申请实施例提供的一种数据信道的建立方法的流程示意图;8 is a schematic flowchart of a method for establishing a data channel according to an embodiment of the present application;
图9为本申请实施例提供的一种CIG的状态变换示意图;9 is a schematic diagram of a CIG state transition provided by an embodiment of the present application;
图10为本申请实施例提供的一种手机与TWS耳机的左右耳塞之间不同CIG在时域上的分布示意图;10 is a schematic diagram of the distribution of different CIG in the time domain between a mobile phone and left and right earplugs of a TWS earphone according to an embodiment of the present application;
图11为本申请实施例提供的另一种手机与TWS耳机的左右耳塞之间不同CIG在时域上的分布示意图;11 is a schematic diagram of the distribution of different CIG in the time domain between another mobile phone and the left and right earplugs of the TWS headset provided by the embodiment of the present application;
图12为本申请些实施例提供一种蓝牙装置的组成示意图。FIG. 12 is a schematic diagram of the composition of a Bluetooth device provided by some embodiments of the present application.
具体实施方式detailed description
目前,用于传输不同音频业务的音频数据的CIG的参数(如称为CIG参数)可能是不同的。为了适配不同的音频业务,通常是在音频业务开启后,再进行对应该音频业务的CIG参数的配置,以及根据配置的CIG参数进行CIG中所有CIS的建立。而CIG中一个CIS的建立至少需要3条空口信令才能完成。以一个CIG中包括两个CIS为例,那么至少需要6条空口信令才能完成该CIG中的所有CIS的建立。且在CIG中所有CIS均建立完成后才能进行音频数据的传输,这必然会增加音频数据的传输时延。At present, the CIG parameters (such as CIG parameters) used to transmit audio data of different audio services may be different. In order to adapt to different audio services, usually after the audio service is started, the CIG parameters corresponding to the audio service are configured, and all CISs in the CIG are established according to the configured CIG parameters. The establishment of a CIS in CIG requires at least 3 air interface signaling to complete. For example, if two CISs are included in a CIG, at least 6 air interface signalings are required to complete the establishment of all CISs in the CIG. And all the CIS in the CIG can only be transmitted after the establishment of the CIS, which will inevitably increase the transmission delay of the audio data.
本申请实施例提供一种数据信道的建立方法及设备,在音频业务开启之前,对应该音频业务的CIG参数已配置完成,且CIG中的所有CIS已完成建立。但该CIG中的所有CIS均未被激活。在该音频业务开启时,只需通过对应条数(该条数与CIG中的CIS的数量相同)的空口信令将该CIG中的所有CIS激活,便可以通过该CIG中的所有CIS传输该音频业务的音频数据。继续以一个CIG中包括两个CIS为例,在音频业务开启时,只需通过两条空口信令将该CIG中的两个CIS激活,便可进行音频数据 的传输。这样,有效降低了CIG中所有CIS的建立时延,从而降低了音频数据的传输时延。Embodiments of the present application provide a method and device for establishing a data channel. Before the audio service is started, the CIG parameters corresponding to the audio service have been configured and all CISs in the CIG have been established. However, all CIS in this CIG have not been activated. When the audio service is turned on, all CISs in the CIG can be activated through all corresponding CISs in the CIG through air interface signaling corresponding to the number (the number is the same as the number of CISs in the CIG). Audio data for audio services. Continue to take the example of including two CISs in one CIG. When the audio service is turned on, only two CISs in the CIG need to be activated through two air interface signaling to transmit audio data. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
其中,在本申请实施例中,上述CIG参数可以用于建立CIG中的所有CIS。示例性的,该CIG参数可以包括:服务质量(quality of service,QoS)参数、编码(codec)参数、CIS参数中的一项或多项。QoS参数可以包括时延、丢包率、吞吐量等表示传输质量的参数。codec参数可以包括编码方式、压缩率等影响音频质量的参数。CIS参数可以包括CIG锚点(anchor point)、ISO间隔(interval)、CIS的标识(dentify,ID)等等。CIG可以包括多个CIG事件(CIG_event)。CIG锚点是对应CIG事件的开始时间点。ISO间隔是两个连续的CIG锚点之间的时间。每个CIG事件在时间上归属于一个ISO间隔。In the embodiment of the present application, the above CIG parameters can be used to establish all CISs in the CIG. Exemplarily, the CIG parameters may include one or more of quality of service (QoS) parameters, codec parameters, and CIS parameters. QoS parameters may include parameters such as delay, packet loss rate, throughput, etc. that represent transmission quality. The codec parameters may include encoding methods, compression ratios, and other parameters that affect audio quality. The CIS parameters may include CIG anchor points, ISO intervals, CIS identification (ID), and so on. The CIG may include multiple CIG events (CIG_event). The CIG anchor point is the starting time point of the corresponding CIG event. The ISO interval is the time between two consecutive CIG anchors. Each CIG event belongs to an ISO interval in time.
另外,需要说明的是,在本申请实施例中,CIG中的所有CIS均未被激活,也可理解为该CIG未被激活。相应的,将该CIG中的所有CIS激活,也可理解为将该CIG激活。也就是说,在音频业务开启之前,该音频业务的CIG参数已配置完成,且CIG中的所有CIS已完成建立,但该CIG未被激活。在该音频业务开启时,只需将该CIG激活,便可进行该音频业务的音频数据的传输。另外,在本申请实施例中,CIG中的所有CIS均未被激活(或者CIG未被激活)可以是指:该CIG中的所有CIS均为虚拟链路,在该CIG的所有CIS上均没有实际的数据收发,其实际的占空比是0。In addition, it should be noted that, in the embodiments of the present application, all CISs in the CIG are not activated, and it can also be understood that the CIG is not activated. Correspondingly, activating all CIS in the CIG can also be understood as activating the CIG. In other words, before the audio service is started, the CIG parameters of the audio service have been configured and all CISs in the CIG have been established, but the CIG has not been activated. When the audio service is started, only the CIG needs to be activated to transmit the audio data of the audio service. In addition, in the embodiment of the present application, all CISs in the CIG are not activated (or the CIG is not activated) may mean that all CISs in the CIG are virtual links, and none in all CISs in the CIG For actual data transmission and reception, the actual duty cycle is 0.
下面将结合附图对本申请实施例的实施方式进行详细描述。The implementation of the embodiments of the present application will be described in detail below with reference to the drawings.
如图1所示,本申请实施例提供的数据信道的建立方法可以应用于外围设备101与电子设备102组成的蓝牙系统中。As shown in FIG. 1, the method for establishing a data channel provided by an embodiment of the present application may be applied to a Bluetooth system composed of a peripheral device 101 and an electronic device 102.
其中,外围设备101与电子设备102可以采用蓝牙建立蓝牙连接。基于建立的蓝牙连接,外围设备101与电子设备102之间可以实现短距离的数据交互。示例性的,外围设备101与电子设备102之间可以基于上述蓝牙连接进行音频数据的传输。如,基于上述蓝牙连接,外围设备101可以作为电子设备102的音频输入/输出设备实现语音通话。又如,基于上述蓝牙连接,外围设备101可以作为电子设备102的输出设备,如扬声器播放音乐等。Among them, the peripheral device 101 and the electronic device 102 may use Bluetooth to establish a Bluetooth connection. Based on the established Bluetooth connection, short-range data interaction can be realized between the peripheral device 101 and the electronic device 102. Exemplarily, the audio data may be transmitted between the peripheral device 101 and the electronic device 102 based on the Bluetooth connection. For example, based on the Bluetooth connection described above, the peripheral device 101 can be used as an audio input/output device of the electronic device 102 to implement a voice call. For another example, based on the Bluetooth connection described above, the peripheral device 101 can be used as an output device of the electronic device 102, such as a speaker to play music.
在一些实施例中,外围设备101可以是无线耳机,无线音箱,无线手环,无线车载,无线智能眼镜等设备,其包括一个主体。例如,电子设备102可以作为主设备通过一个CIG中的一个CIS向作为从设备的外围设备101传输音频数据。其中,无线耳机可以是头戴式耳机、耳塞式或其他便携式收听设备。又例如,电子设备102可以作为主设备通过一个CIG中的多个CIS,向多个作为从设备的外围设备101传输音频数据,多个CIS与多个外围设备101一一对应。In some embodiments, the peripheral device 101 may be a device such as a wireless headset, a wireless speaker, a wireless bracelet, a wireless vehicle, a wireless smart glasses, etc., which includes a main body. For example, the electronic device 102 may serve as a master device to transmit audio data to a peripheral device 101 as a slave device through a CIS in a CIG. Wherein, the wireless earphone may be a headphone, earplugs or other portable listening devices. For another example, the electronic device 102 can serve as a master device to transmit audio data to multiple peripheral devices 101 as slave devices through multiple CISs in a CIG, and the multiple CIS correspond to the multiple peripheral devices 101 in one-to-one correspondence.
在另一些实施例中,外围设备101也可以是真无线立体声(true wireless stereo,TWS)耳机、蓝牙音箱、智能眼镜等设备,其包括两个主体,且这两个主体之间不需要线材连接,可以相互配合、协同工作。例如,电子设备102可以作为主设备通过一个CIG中的两个CIS向该外围设备101的两个主体(外围设备101的两个主体均为从设备)传输音频数据,两个CIS与外围设备101的两个主体一一对应。In other embodiments, the peripheral device 101 may also be a true wireless stereo (TWS) headset, Bluetooth speaker, smart glasses and other devices, which include two main bodies, and no wire connection is required between the two main bodies , Can cooperate with each other and work together. For example, the electronic device 102 can serve as a master device to transmit audio data to two main bodies of the peripheral device 101 (both main bodies of the peripheral device 101 are slave devices) through two CISs in a CIG. The two CIS and the peripheral device 101 There is a one-to-one correspondence between the two subjects.
作为一种示例,图1中所示的外围设备101以TWS耳机为例示出。其中,该TWS耳机包含两个主体(如耳机主体),如称为左耳塞101-1和右耳塞101-2。左耳塞101-1 和右耳塞101-2之间不需要线材连接,可以相互配合、协同工作,如实现立体声播放。电子设备102可以作为主设备通过一个CIG中的两个CIS分别向作为从设备的左耳塞101-1和右耳塞101-2传输音频数据。在本申请实施例中,TWS耳机的左耳塞101-1和右耳塞101-2的结构可以如图2所示,在以下实施例中将详细介绍。当然,对于包含两个主体的外围设备101,电子设备102也可以通过一个CIG中的一个CIS向该设备的其中一个主体传输音频数据,该设备的另一个主体可以通过监听或转发的方式获得电子设备102发送的音频数据。As an example, the peripheral device 101 shown in FIG. 1 is illustrated with a TWS earphone as an example. Among them, the TWS earphone includes two main bodies (such as a headphone main body), such as a left earplug 101-1 and a right earplug 101-2. There is no cable connection between the left earplug 101-1 and the right earplug 101-2, and they can cooperate with each other and work together, for example, to achieve stereo playback. The electronic device 102 may serve as a master device to transmit audio data to the left earplug 101-1 and the right earplug 101-2 as slave devices through two CISs in a CIG, respectively. In the embodiment of the present application, the structures of the left earplug 101-1 and the right earplug 101-2 of the TWS earphone may be as shown in FIG. 2 and will be described in detail in the following embodiments. Of course, for a peripheral device 101 that includes two main bodies, the electronic device 102 can also transmit audio data to one of the main bodies of the device through a CIS in a CIG, and the other main body of the device can obtain the electronic by monitoring or forwarding. Audio data sent by the device 102.
在一些实施例中,电子设备102可以是手机、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、媒体播放器、电视机等设备,本申请实施例对该设备的具体形态不作特殊限制。在本申请实施例中,电子设备102的结构可以如图4所示,在以下实施例中将详细介绍。In some embodiments, the electronic device 102 may be a mobile phone, a tablet, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, personal Digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) devices, media players, televisions and other devices, the specific form of the device is not special in the embodiments of the present application limit. In the embodiment of the present application, the structure of the electronic device 102 may be as shown in FIG. 4 and will be described in detail in the following embodiments.
需要说明的是,本申请中的第一电子设备可以是上述电子设备102。本申请中的第二电子设备可以是上述外围设备101,或外围设备101包括的主体。It should be noted that the first electronic device in this application may be the above-mentioned electronic device 102. The second electronic device in the present application may be the aforementioned peripheral device 101, or the main body included in the peripheral device 101.
请参考图2,为本申请实施例提供的一种TWS耳机的耳塞(左耳塞或右耳塞)的结构示意图。如图2所示,TWS耳机的耳塞可以包括:处理器201、存储器202、传感器203、无线通信模块204、至少一个受话器205、至少一个麦克风206以及电源207。Please refer to FIG. 2, which is a schematic structural diagram of an earplug (left earplug or right earplug) of a TWS earphone provided by an embodiment of the present application. As shown in FIG. 2, the earplugs of the TWS headset may include: a processor 201, a memory 202, a sensor 203, a wireless communication module 204, at least one receiver 205, at least one microphone 206, and a power supply 207.
其中,存储器202可以用于存储应用程序代码,如用于与TWS耳机的另一个耳塞建立蓝牙连接,以及使得耳塞与上述电子设备102进行蓝牙配对的应用程序代码。处理器201可以控制执行上述应用程序代码,以实现本申请实施例中TWS耳机的耳塞的功能。The memory 202 may be used to store application code, such as an application code used to establish a Bluetooth connection with another earbud of the TWS headset and to pair the earbud with the electronic device 102 via Bluetooth. The processor 201 can control the execution of the above application program code to implement the function of the earplug of the TWS headset in the embodiment of the present application.
存储器202中还可以存储有用于唯一标识该耳塞的蓝牙地址,以及存储有TWS耳机的另一个耳塞的蓝牙地址。另外,该存储器202中还可以存储有与该耳塞之前成功进行了蓝牙配对的电子设备的连接数据。例如,该连接数据可以是与该耳塞成功进行过蓝牙配对的电子设备的蓝牙地址。基于该连接数据,该耳塞能够与该电子设备自动进行蓝牙配对,而不必配置与其之间的连接,如进行合法性验证等。上述蓝牙地址可以为媒体访问控制(Media Access Control,MAC)地址。The memory 202 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 202 may also store connection data of the electronic device that has successfully paired with the earbud before Bluetooth. For example, the connection data may be a Bluetooth address of an electronic device that has successfully paired with the earbud via Bluetooth. Based on the connection data, the earplug can automatically perform Bluetooth pairing with the electronic device without configuring a connection with it, such as performing legality verification. The aforementioned Bluetooth address may be a Media Access Control (Media Access Control, MAC) address.
传感器203可以为距离传感器或接近光传感器。耳塞的处理器201可以通过该传感器203确定是否被用户佩戴。例如,耳塞的处理器201可以利用接近光传感器来检测耳塞附近是否有物体,从而确定耳塞是否被用户佩戴。在确定耳塞被佩戴时,耳塞的处理器201可以打开受话器205。在一些实施例中,该耳塞还可以包括骨传导传感器,结合成骨传导耳机。该骨传导传感器可以获取声部振动骨块的振动信号,处理器201解析出语音信号,实现语音信号对应的控制功能。在另一些实施例中,该耳塞还可以包括触摸传感器或压力传感器,分别用于检测用户的触摸操作和按压操作。在另一些实施例中,该耳塞还可以包括指纹传感器,用于检测用户指纹,识别用户身份等。在另一些实施例中,该耳塞还可以包括环境光传感器,耳塞的处理器201可以根据该环境光传感器感知的环境光的亮度,自适应调节一些参数,如音量大小。The sensor 203 may be a distance sensor or a proximity light sensor. The processor 201 of the earplug can determine whether it is worn by the user through the sensor 203. For example, the processor 201 of 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 processor 201 of the earplug may turn on the receiver 205. In some embodiments, the earplug may also include a bone conduction sensor, combined with a bone conduction earphone. The bone conduction sensor can obtain the vibration signal of the vibrating bone mass of the voice part, and the processor 201 parses out the voice signal to realize the control function corresponding to the voice signal. In other embodiments, the earplug may further include a touch sensor or a pressure sensor, which are used to detect the user's touch operation and pressing operation, respectively. 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, and the processor 201 of the earplug may adaptively adjust some parameters, such as volume, according to the brightness of the ambient light sensed by the ambient light sensor.
无线通信模块204,用于支持TWS耳机的左右耳塞之间,以及耳塞与各种电子设 备,如上述电子设备102之间的短距离数据交互。在一些实施例中,该无线通信模块204可以为蓝牙收发器。TWS耳机的耳塞可以通过该蓝牙收发器与上述电子设备102之间建立蓝牙连接,以实现两者之间的短距离数据交互。The wireless communication module 204 is used to support short-distance data interaction between the left and right earplugs of the TWS earphone and the earplugs and various electronic devices, such as the electronic device 102 described above. In some embodiments, the wireless communication module 204 may be a Bluetooth transceiver. The earplugs of the TWS headset can establish a Bluetooth connection with the electronic device 102 through the Bluetooth transceiver to achieve short-range data interaction between the two.
受话器205,也可以称为“听筒”,可以用于将音频电信号转换成声音信号并播放。例如,当TWS耳机的耳塞作为上述电子设备102的音频输出设备时,受话器205可以将接收到的音频电信号转换为声音信号并播放。The receiver 205, 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 serves as the audio output device of the electronic device 102 described above, the receiver 205 may convert the received audio electrical signal into a sound signal and play it.
麦克风206,也可以称为“话筒”,“传声器”,用于将声音信号转换为音频电信号。例如,当TWS耳机的耳塞作为上述电子设备102的音频输入设备时,在用户说话(如通话或发语音消息)时,麦克风206可以采集用户的声音信号,并将其转换为音频电信号。上述音频电信号即为本申请实施例中的音频数据。The microphone 206, 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 102, when the user speaks (such as talking or sending a voice message), the microphone 206 can collect the user's voice signal and convert it into an audio electrical signal. The above audio electrical signal is the audio data in the embodiment of the present application.
电源207,可以用于向TWS耳机的耳塞包含的各个部件供电。在一些实施例中,该电源207可以是电池,如可充电电池。The power supply 207 can be used to supply power to various components included in the earplugs of the TWS earphone. In some embodiments, the power source 207 may be a battery, such as a rechargeable battery.
通常,TWS耳机会配有一耳机盒(如,图3中所示的301)。如图3所示,该耳机盒301可以包括腔体301-1和盒盖301-2。腔体301-1可以用于收纳TWS耳机的左右耳塞。如结合图1,如图3所示,耳机盒301的腔体301-1可以用于收纳TWS耳机的左耳塞101-1和右耳塞101-2。另外,该耳机盒301还可以为TWS耳机的左右耳塞充电。相应的,在一些实施例中,上述TWS耳机的耳塞还可以包括:输入/输出接口208。Usually, TWS earphones will be equipped with a headphone box (eg, 301 shown in Figure 3). As shown in FIG. 3, the earphone box 301 may include a cavity 301-1 and a box cover 301-2. The cavity 301-1 can be used to store the left and right earplugs of the TWS earphone. As shown in FIG. 3 in combination with FIG. 1, the cavity 301-1 of the earphone box 301 can be used to house the left earplug 101-1 and the right earplug 101-2 of the TWS earphone. In addition, the earphone box 301 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 208.
输入/输出接口208可以用于提供TWS耳机的耳塞与耳机盒(如上述耳机盒301的腔体301-1)之间的任何有线连接。在一些实施例中,输入/输出接口208可以为电连接器。例如,当TWS耳机的耳塞置于耳机盒301的腔体301-1中时,TWS耳机的耳塞可以通过该电连接器与耳机盒301(如与耳机盒301的输入/输出接口)电连接。在该电连接建立后,耳机盒301可以为TWS耳机的耳塞的电源207充电。在该电连接建立后,TWS耳机的耳塞还可以与耳机盒301进行数据通信。例如,TWS耳机的耳塞的处理器201可以通过该电连接接收来自耳机盒301的配对指令。该配对指令用于指示TWS耳机的耳塞的处理器201打开无线通信模块204,从而使得TWS耳机的耳塞可以采用对应的无线通信协议(如蓝牙)与电子设备102进行配对。The input/output interface 208 may be used to provide any wired connection between the earplug of the TWS earphone and the earphone box (such as the cavity 301-1 of the earphone box 301 described above). In some embodiments, the input/output interface 208 may be an electrical connector. For example, when the earplug of the TWS earphone is placed in the cavity 301-1 of the earphone box 301, the earplug of the TWS earphone may be electrically connected to the earphone box 301 (such as the input/output interface with the earphone box 301) through the electrical connector. After the electrical connection is established, the earphone box 301 can charge the power supply 207 of the earplug of the TWS earphone. After the electrical connection is established, the earplugs of the TWS earphone can also perform data communication with the earphone box 301. For example, the processor 201 of the earplug of the TWS earphone may receive the pairing instruction from the earphone box 301 through the electrical connection. The pairing instruction is used to instruct the processor 201 of the earphone of the TWS earphone to turn on the wireless communication module 204, so that the earphone of the TWS earphone can use the corresponding wireless communication protocol (such as Bluetooth) to pair with the electronic device 102.
当然,上述TWS耳机的耳塞还可以不包括输入/输出接口208。在这种情况下,耳塞可以基于通过上述无线通信模块204与耳机盒301建立的蓝牙连接,实现充电或者数据通信功能。Of course, the earplugs of the aforementioned TWS earphones may not include the input/output interface 208. In this case, the earplugs can implement charging or data communication functions based on the Bluetooth connection established with the earphone box 301 through the wireless communication module 204 described above.
另外,在一些实施例中,耳机盒(如上述耳机盒301)还可以包括处理器,存储器等部件。该存储器可以用于存储应用程序代码,并由耳机盒301的处理器来控制执行,以实现耳机盒301的功能。例如。当用户打开耳机盒301的盒盖301-2时,耳机盒301的处理器通过执行存储在存储器中的应用程序代码,可以响应于用户打开盒盖301-2的操作向TWS耳机的耳塞发送配对指令等。In addition, in some embodiments, the earphone box (such as the aforementioned earphone box 301) may further include a processor, a memory, and other components. The memory can be used to store application program codes, and is controlled and executed by the processor of the earphone box 301 to realize the function of the earphone box 301. E.g. When the user opens the lid 301-2 of the earphone box 301, the processor of the earphone box 301 can send the pairing to the earplug of the TWS headset in response to the user's operation of opening the lid 301-2 by executing the application code stored in the memory Instructions etc.
可以理解的是,本申请实施例示意的结构并不构成对TWS耳机的耳塞的具体限定。其可以具有比图2中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。例如,该耳塞还可以包括指示灯(可以指示耳塞的电量等状态)、防尘网(可以配合听筒使用)等部件。图2中所示出的各种部件可以在 包括一个或多个信号处理或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。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. 2, two or more components may be combined, or may have different component configurations. For example, the earplug may also include an indicator light (which can indicate the status of the earplug's power level, etc.), a dust filter (which can be used with the earpiece), and other components. The various components shown in FIG. 2 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
需要说明的是,TWS耳机的左右耳塞的结构可以相同。例如,TWS耳机的左右耳塞可以都包括图2中所示的部件。或者,TWS耳机的左右耳塞的结构也可以不同。例如,TWS耳机的一个耳塞(如右耳塞)可以包括图2中所示的部件,而另一个耳塞(如左耳塞)可以包括图2中除麦克风206之外的其他的部件。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 the TWS earphone may include the components shown in FIG. 2. 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. 2, and the other earplug (such as the left earplug) may include other components in FIG. 2 other than the microphone 206.
请参考图4,为本申请实施例提供的一种图1所示的蓝牙系统中的电子设备102的结构示意图。如图4所示,电子设备102可以包括处理器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等。Please refer to FIG. 4, which is a schematic structural diagram of an electronic device 102 in the Bluetooth system shown in FIG. 1 according to an embodiment of the present application. As shown in FIG. 4, the electronic device 102 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, and a battery 142 , Antenna 1, 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, button 190, motor 191, indicator 192, camera 193 , A display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a proximity light sensor 180B, a fingerprint sensor 180C, a touch sensor 180D, a bone conduction sensor 180E, and so on.
可以理解的是,本实施例示意的结构并不构成对电子设备102的具体限定。在另一些实施例中,电子设备102可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 102. In other embodiments, the electronic device 102 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of 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)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。例如,处理器110可以用于执行下述实施例的S803、S804以及S805中确定TWS耳机支持的音频业务,确定能够适配该音频业务的CIG参数,进行CIG配置的过程。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. For example, the processor 110 may be used to perform the process of determining the audio service supported by the TWS headset in S803, S804, and S805 in the following embodiments, determining CIG parameters that can be adapted to the audio service, and performing CIG configuration.
控制器可以是电子设备102的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 102. 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 can 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总线接口通信,实现电子设备102的触摸功能。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 electronic device 102.
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 realize the function of answering the phone call through the 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 the I2S interface and the 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接口通信,实现电子设备102的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备102的显示功能。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 electronic device 102. The processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 102.
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可以用于连接充电器为电子设备102充电,也可以用于电子设备102与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如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 electronic device 102, and can also be used to transfer data between the electronic device 102 and peripheral devices. It can also be used to connect headphones and play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备102的结构限定。在另一些实施例中,电子设备102也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in this embodiment is only a schematic description, and does not constitute a limitation on the structure of the electronic device 102. In other embodiments, the electronic device 102 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB 接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备102的无线充电线圈接收无线充电输入。充电管理模块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 electronic device 102. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device 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.
电子设备102的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 102 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用于发射和接收电磁波信号。电子设备102中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 102 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可以提供应用在电子设备102上的包括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 electronic device 102. 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可以提供应用在电子设备102上的包括无线局域网(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 networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites that are applied to the electronic device 102. Wireless communication solutions such as global navigation (satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc. 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.
在一些实施例中,电子设备102的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备102可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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)。例如,在本申请实施例中,电子设备102可以利用无线通信模块160,通过无线通信技术,如蓝牙(BT)与外围设备建立蓝牙连接。基于建立的蓝牙连接,电子设备102可以向外围设备发送语音数据,还可以接收来自外围设备的语音数据。如,该无线通信模块160可以用于执行下述实施例的S801、S802以及S805中配对,ACL链路建立以及CIS建立的过程。该无线通信模块160还可以用于执行下述实施例的S803、S804以及S806中与外围设备基于建立的连接进行数据交互的过程,如进行业务场景协商,参数协商,传输音频数据等。In some embodiments, the antenna 1 of the electronic device 102 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160 so that the electronic device 102 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include a 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 Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite-based augmentation system (SBAS). For example, in the embodiment of the present application, the electronic device 102 may use the wireless communication module 160 to establish a Bluetooth connection with a peripheral device through a wireless communication technology, such as Bluetooth (BT). Based on the established Bluetooth connection, the electronic device 102 can send voice data to the peripheral device and can also receive voice data from the peripheral device. For example, the wireless communication module 160 can be used to perform the processes of pairing, ACL link establishment, and CIS establishment in S801, S802, and S805 in the following embodiments. The wireless communication module 160 may also be used to perform data interaction processes with peripheral devices based on the established connections in S803, S804, and S806 of the following embodiments, such as conducting business scenario negotiation, parameter negotiation, and transmitting audio data.
电子设备102通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 102 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)等。在一些实施例中,电子设备102可以包括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 electronic device 102 may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备102可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 102 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, and light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. 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等格式的图像信号。在一些实施例中,电子设备102可以包括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 electronic device 102 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备102在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。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 electronic device 102 selects at a frequency point, the digital signal processor is used to perform Fourier transform on the energy at the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备102可以支持一种或多种视频编解码器。这样,电子设备102可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。The video codec is used to compress or decompress digital video. The electronic device 102 may support one or more video codecs. In this way, the electronic device 102 can play or record videos in various encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备102的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。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 electronic device 102, such as image recognition, face recognition, voice recognition, and text understanding.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备102的存储能力。外部存储卡通过外部存储器接口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 electronic device 102. 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的指令,从而执行电子设备102的各种功能应用以及数据处理。例如,在本申请实施例中,处理器110可以通过执行存储在内部存储器121中的指令,通过无线通信模块160与外围设备建立蓝牙连接,以及与外围设备进行短距离数据交互,以通过外围设备实现语音、音乐等音频业务的功能。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备102使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。在本申请实施例中,在电子设备102与外围设备之间采用无线通信技术,如蓝牙建立了蓝牙连接后,电子设备102可以将外围设备的蓝牙地址存储在内部存储器121中。在一些实施例中,当外围设备为包含两个主体的设备,如TWS耳机时,TWS耳机的左右耳塞分别有各自的蓝牙地址,电子设备102可以将TWS耳机的左右耳塞的蓝牙地址关联存储在内部存储器121中。The internal memory 121 may be used to store computer executable program code, where 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 electronic device 102. For example, in the embodiment of the present application, the processor 110 may execute instructions stored in the internal memory 121, establish a Bluetooth connection with the peripheral device through the wireless communication module 160, and perform short-range data interaction with the peripheral device to pass the peripheral device Realize the functions of audio services such as voice and music. 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 electronic device 102 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. In the embodiment of the present application, the wireless communication technology is adopted between the electronic device 102 and the peripheral device, for example, after the Bluetooth connection is established by the Bluetooth, the electronic device 102 can store the Bluetooth address of the peripheral device in the internal memory 121. In some embodiments, when the peripheral 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 electronic device 102 may associate the Bluetooth addresses of the left and right earbuds of the TWS headset in the In the internal memory 121.
电子设备102可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 102 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 can also be used to encode and decode 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,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备102可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device 102 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备102接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also known as "handset", is used to convert audio electrical signals into sound signals. When the electronic device 102 answers a call or a voice message, it can answer the voice by holding the receiver 170B close to the ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息或需要通过语音助手触发电子设备102执行某些功能时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备102可以设置至少一个麦克风170C。在另一些实施例中,电子设备102可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备102还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also known as "microphone", "microphone", is used to convert sound signals into electrical signals. When a phone call is made or voice information is sent or the voice assistant needs to trigger the electronic device 102 to perform certain functions, the user can approach the microphone 170C through the human mouth to sound, and input the sound signal to the microphone 170C. The electronic device 102 may be provided with at least one microphone 170C. In other embodiments, the electronic device 102 may be provided with two microphones 170C. In addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 102 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.
在本申请实施例中,当电子设备102与外围设备,如TWS耳机建立了蓝牙连接时,TWS耳机可以作为电子设备102的音频输入/输出设备使用。示例性的,音频模块170可以接收无线通信模块160传递的音频电信号,实现通过TWS耳机接听电话、播放音乐等音频业务的功能。例如,在用户打电话的过程中,TWS耳机可以采集用户的声音信号,并转换为音频电信号后发送给电子设备102的无线通信模块160。无线通信模块160将该音频电信号传输给音频模块170。音频模块170可以将接收到的音频电信号转换为数字音频信号,并进行编码后传递至移动通信模块150。由移动通信模块150传输至通话对端设备,以实现通话。又例如,用户在使用电子设备102的媒体播放器播放音乐时,应用处理器可以将媒体播放器播放的音乐对应的音频电信号传输至音频模块170。由音频模块170将该音频电信号传输至无线通信模块160。无线通信模块160可以将音频电信号发送给TWS耳机,以便TWS耳机将该音频电信号转换为声音信号后播放。In the embodiment of the present application, when the electronic device 102 establishes a Bluetooth connection with a peripheral device, such as a TWS headset, the TWS headset can be used as an audio input/output device of the electronic device 102. Exemplarily, the audio module 170 may receive the audio electrical signal transmitted by the wireless communication module 160 to realize the functions of answering calls, playing music and other audio services through the 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 electronic device 102. 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 electronic device 102 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.
耳机接口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 earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile electronic device (open mobile terminal) platform (OMTP) standard interface, and the American Telecommunications Industry Association (cellular telecommunications industry association of the United States, CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备102根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备102根据压力传感器180A检测所述触摸操作强度。电子设备102也可以根据压力传感器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 electronic device 102 determines the intensity of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 102 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 102 may also calculate the touched position according to 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可以包括例如发光二极管(LED)和光检测器,例如光电二极 管。发光二极管可以是红外发光二极管。电子设备102通过发光二极管向外发射红外光。电子设备102使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备102附近有物体。当检测到不充分的反射光时,电子设备102可以确定电子设备102附近没有物体。电子设备102可以利用接近光传感器180B检测用户手持电子设备102贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180B也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 180B 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 electronic device 102 emits infrared light outward through the light emitting diode. The electronic device 102 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 102. When insufficient reflected light is detected, the electronic device 102 may determine that there is no object near the electronic device 102. The electronic device 102 can use the proximity light sensor 180B to detect that the user holds the electronic device 102 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180B can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
指纹传感器180C用于采集指纹。电子设备102可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180C is used to collect fingerprints. The electronic device 102 can use the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a picture of the fingerprint, answer the call with the fingerprint, and so on.
触摸传感器180D,也称“触控面板”。触摸传感器180D可以设置于显示屏194,由触摸传感器180D与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180D用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180D也可以设置于电子设备102的表面,与显示屏194所处的位置不同。The touch sensor 180D is also called "touch panel". The touch sensor 180D may be disposed on the display screen 194, and the touch sensor 180D and the display screen 194 constitute a touch screen, which is also called a "touch screen". The touch sensor 180D 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 180D may also be disposed on the surface of the electronic device 102, which is different from the location where the display screen 194 is located.
骨传导传感器180E可以获取振动信号。在一些实施例中,骨传导传感器180E可以获取人体声部振动骨块的振动信号。骨传导传感器180E也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180E也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180E获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180E获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180E can acquire vibration signals. In some embodiments, the bone conduction sensor 180E may acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180E can also contact the pulse of the human body and receive a blood pressure beating signal. In some embodiments, the bone conduction sensor 180E may also be provided in the earphone and combined into a bone conduction earphone. The audio module 170 may 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 180E to realize the voice function. The application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180E to implement the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备102可以接收按键输入,产生与电子设备102的用户设置以及功能控制有关的键信号输入。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 electronic device 102 can receive key input and generate key signal input related to user settings and function control of the electronic device 102.
马达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拔出,实现和电子设备102的接触和分离。电子设备102可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备102通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备102采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备102中,不能和电子设备102分离。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 electronic device 102. The electronic device 102 may 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 the multiple cards may 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 electronic device 102 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the electronic device 102 uses eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 102 and cannot be separated from the electronic device 102.
在BLE的ISO信道定义的传输机制中,定义了CIG,CIG是组的概念,可以包括 一个或多个CIS。其中,一个主设备可以通过CIG中的一个CIS向一个从设备发送音频业务的音频数据。一个主设备可以通过CIG中的多个CIS可以向多个从设备发送音频业务的音频数据,多个CIS与多个从设备一一对应。In the transmission mechanism defined by the ISO channel of BLE, CIG is defined. CIG is a concept of a group and may include one or more CISs. Among them, a master device can send audio data of audio services to a slave device through a CIS in the CIG. A master device can send audio data of audio services to multiple slave devices through multiple CISs in the CIG. Multiple CIS correspond to multiple slave devices in one-to-one correspondence.
其中,上述CIS可以通过主设备和从设备之间的异步面向连接(asynchronous connection-oriented link,ACL)链路来建立。CIS可以是单向链路,也可以是双向链路。例如,结合图5,如图5中的(a)所示,主设备(M)可以与从设备(S)建立ACL链路,如称为ACL链路a。通过该ACL链路a,主设备可以与从设备交互流控制(stream control),以建立CIS_a。该CIS_a为由主设备到从设备的单向链路。主设备通过该CIS_a可以向从设备发送音频数据。如图5中的(b)所示,主设备(M)可以与从设备(S)建立ACL链路,如称为ACL链路b。通过该ACL链路b,主设备可以与从设备交互流控制,以建立CIS_b。该CIS_b为由主设备到从设备,由从设备到主设备的双向链路。主设备通过该CIS_b可以向从设备发送音频数据,从设备也可以通过该CIS_b向主设备发送音频数据。如图5中的(c)所示,主设备(M)可以与两个从设备,S1和S2分别建立ACL链路,如分别称为ACL链路c1和ACL链路c2。通过该ACL链路c1,主设备可以与S1交互流控制,以建立CIS_c1。通过该ACL链路c2,主设备可以与S2交互流控制,以建立CIS_c2。CIS_c1为由主设备到从设备的单向链路,CIS_c2为由主设备到从设备,由从设备到主设备的双向链路。主设备通过CIS_c1可以向S1发送音频数据。主设备通过CIS_c2可以向S2发送音频数据,S2也可以通过该CIS_c2向主设备发送音频数据。Among them, the above-mentioned CIS can be established through an asynchronous connection-oriented (ACL) link between the master device and the slave device. The CIS can be a unidirectional link or a bidirectional link. For example, referring to FIG. 5, as shown in (a) of FIG. 5, the master device (M) may establish an ACL link with the slave device (S), such as the ACL link a. Through this ACL link a, the master device and the slave device can exchange stream control (stream control) to establish CIS_a. The CIS_a is a unidirectional link from the master device to the slave device. The master device can send audio data to the slave device through this CIS_a. As shown in (b) of FIG. 5, the master device (M) can establish an ACL link with the slave device (S), such as the ACL link b. Through this ACL link b, the master device can interact with the slave device for flow control to establish CIS_b. The CIS_b is a bidirectional link from the master device to the slave device and from the slave device to the master device. The master device can send audio data to the slave device through the CIS_b, and the slave device can also send audio data to the master device through the CIS_b. As shown in (c) in FIG. 5, the master device (M) can establish ACL links with two slave devices, S1 and S2, such as ACL link c1 and ACL link c2, respectively. Through this ACL link c1, the master device can interact with S1 for flow control to establish CIS_c1. Through this ACL link c2, the master device can interact with S2 for flow control to establish CIS_c2. CIS_c1 is a unidirectional link from the master device to the slave device, and CIS_c2 is a bidirectional link from the master device to the slave device and from the slave device to the master device. The master device can send audio data to S1 through CIS_c1. The master device can send audio data to S2 through CIS_c2, and S2 can also send audio data to the master device through the CIS_c2.
在一些实施例中,本申请中的音频业务可以是指能够提供音频功能(如音频播放、音频录制等)的服务(service)或应用(application)。例如,音频业务可以根据应用的不同划分为:语音,音乐,游戏,视频,语音助手,导航音,告警,提示音(如应用的提示音,该应用可以为邮件,短信等)等业务。又例如,音频业务可以根据所能提供服务的不同划分为:媒体(media)音频,语音(voice),背景声等业务。具体的划分方式本申请实施例并不做限制。In some embodiments, the audio service in this application may refer to a service or application capable of providing audio functions (such as audio playback, audio recording, etc.). For example, audio services can be divided into voice, music, games, video, voice assistants, navigation sounds, alarms, and prompt sounds (such as the application's prompt sound, which can be emails, text messages, etc.) and other services. For another example, the audio service can be divided into: media (audio), voice (voice), background sound and other services according to different services that can be provided. The specific division method is not limited in the embodiments of the present application.
音频业务会涉及音频相关的数据传输,例如,音频数据本身、用于控制音频数据播放的内容控制(content control)、用于创建上述CIS的流控制等。其中,以音频业务分为媒体音频,语音,背景声为例,根据音频业务的不同,音频数据可以对应为:媒体数据,语音数据、背景声数据。例如,媒体数据可以包括:音乐、录音、视频、游戏、导航音中的声音。语音数据可以包括:语音通话过程中的声音等。背景声数据可以包括:提示音等。内容控制可以包括媒体控制(media control),电话控制(call control),音量控制(volume control)等。例如,媒体控制可以包括:暂停,播放,上一首,下一首等指令。电话控制可以包括:接听来电,挂断电话,拒接来电,语音拨号,保持通话,回拨电话等指令。音量控制可以包括:调小音量,调大音量等指令。The audio service may involve audio-related data transmission, for example, audio data itself, content control for controlling the playback of audio data, and flow control for creating the above-mentioned CIS. Taking the audio service divided into media audio, voice, and background sound as an example, according to different audio services, audio data may correspond to: media data, voice data, and background sound data. For example, the media data may include: music, sound recordings, videos, games, sounds in navigation sounds. The voice data may include: sound during a voice call, etc. The background sound data may include: prompt sounds and the like. Content control may include media control, call control, volume control, etc. For example, the media control may include: pause, play, previous track, next track and other instructions. Telephone control can include: answering the call, hanging up, rejecting the call, voice dialing, holding the call, and calling back. Volume control can include: volume down, volume up and other commands.
为了使上述音频业务能够通过蓝牙技术实现,采用蓝牙通信的设备(如上述电子设备102和外围设备101)需要遵循一定的蓝牙传输框架。图6为本申请实施例提供的一种蓝牙传输框架的组成示意图。如图6所示,该蓝牙传输框架可以包括应用(application)层、主机(host)、主机控制器接口(host controller interface,HCI)以及控制器(controller)。In order to enable the above audio service to be implemented through Bluetooth technology, devices that use Bluetooth communication (such as the above-mentioned electronic device 102 and peripheral device 101) need to follow a certain Bluetooth transmission framework. 6 is a schematic diagram of the composition of a Bluetooth transmission framework provided by an embodiment of the present application. As shown in FIG. 6, the Bluetooth transmission framework may include an application layer, a host, a host controller interface (HCI), and a controller.
其中,应用层可以包括电话应用,多媒体应用(如音乐播放器,视频播放器)等应用程序。Among them, the application layer may include telephone applications, multimedia applications (such as music players, video players) and other applications.
主机可以包括蓝牙的各种应用规范(profile)以及传输协议。如,免提规范(hands free profile,HFP),高级音频传送规范(advanced audio distribution profile,A2DP),音频/视频遥控规范(audio/video remote control profile,AVRCP),通用接入规范(generic access profile,GAP),通用属性规范(generic attribute profile,GATT),音视频分发传输协议(audio/video distribution transport protocol,AVDTP),音视频控制传输协议(audio/video control transport protocol,AVCTP),服务发现协议(service discover protocol,SDP),串口仿真协议(radio frequency communications protocol,RFCOMM),逻辑链路控制与适配协议(logical link control and adaptation protocol,L2CAP)。互相操作的设备需要使用相同的应用规范才能实现通信。不同的应用需要使用不同的应用规范。The host may include various application profiles of Bluetooth and transmission protocols. For example, hands-free profile (HFP), advanced audio transmission profile (advanced audio distribution profile, A2DP), audio/video remote control profile (audio/video remote control profile, AVRCP), general access profile (generic access profile) , GAP), Generic Attribute Profile (GATT), Audio and Video Distribution Transmission Protocol (audio/video distribution protocol, AVDTP), Audio and Video Control Transmission Protocol (audio/video control transmission protocol, AVCTP), Service Discovery Protocol (service discovery protocol, SDP), serial port emulation protocol (radio frequency communications protocols, RFCOMM), logical link control and adaptation protocol (logical link control and adaptation protocol, L2CAP). Interoperable devices need to use the same application specification to communicate. Different applications require different application specifications.
HCI位于主机和控制器之间,可以为上层协议提供进入控制器中的链路层的统一接口和进入控制器中的基带的统一方式。HCI is located between the host and the controller, and can provide a unified interface for the upper layer protocol to enter the link layer in the controller and a unified way to enter the baseband in the controller.
控制器可以包括链路层(link layer,LL),基带(baseband),以及无线射频(蓝牙射频)单元等。其中,链路层负责管理设备之间的通信,实现链路的建立、验证、链路配置等操作。基带主要进行射频信号与数字或语音信号的相互转化,实现基带协议和其它的底层连接规程。无线射频单元用于发射和接收蓝牙信号。在一些实施例中,主机可以实现于设备的AP中。控制器可以实现于设备的蓝牙芯片中。在另一些实施例中,主机和控制器可以实现于设备的同一个处理器或控制器中,此时HCI是可选的。The controller may include a link layer (LL), a baseband, and a radio frequency (Bluetooth radio frequency) unit. Among them, the link layer is responsible for managing the communication between the 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. In some embodiments, the host may be implemented in the AP of the device. The controller can be implemented in the Bluetooth chip of the device. In other embodiments, the host and the controller may be implemented in the same processor or controller of the device, in which case HCI is optional.
示例性的,结合图6,如图7所示,以一个主设备与一个从设备建立CIS为例,具体说明用于传输音频数据的CIS的建立流程(参见图7中的702)。在CIS建立之前,主设备要实施CIG参数的配置流程(参见图7中的701)。其中,主设备和从设备都具有主机(host)和链路层(LL),host和LL之间可以通过HCI进行通信。Exemplarily, referring to FIG. 6 and as shown in FIG. 7, taking a master device and a slave device to establish a CIS as an example, the flow of establishing a CIS for transmitting audio data is specifically described (see 702 in FIG. 7 ). Before the CIS is established, the master device implements the CIG parameter configuration process (see 701 in FIG. 7). Among them, the master device and the slave device both have a host (host) and a link layer (LL), and the host and LL can communicate through HCI.
首先,主设备可以实施CIG参数的配置流程。该CIG参数可以是主设备与从设备协商得到的,用于创建CIS。示例性的,如图7中的701所示,主设备的host设置CIG参数。如,主设备的host可以通过HCI向主设备的LL发送HCI指令“低功耗CIG参数设置(LE Set CIG parameters)”。主设备的LL接收到该HCI指令后,可以向主设备的host返回响应消息,如“命令完成(command complete)”。主设备的host发起CIS的创建。如主设备的host可以通过HCI向主设备的LL发送HCI指令“低功耗CIS创建(LE createCIS)”。主设备的LL接收到该HCI指令后,可以向主设备的host返回响应消息,如“HCI命令状态(HCI command status)”。First, the master device can implement the CIG parameter configuration process. The CIG parameter may be obtained through negotiation between the master device and the slave device, and is used to create a CIS. Exemplarily, as shown in 701 in FIG. 7, the host of the master device sets CIG parameters. For example, the host of the master device can send the HCI command "Low Power CIG Parameter Settings (LE Set CIG parameters)" to the LL of the master device through the HCI. After receiving the HCI command, the LL of the master device may return a response message to the host of the master device, such as "command complete". The host of the master device initiates the creation of CIS. For example, the host of the master device can send the HCI command "LE create CIS (LE createCIS)" to the LL of the master device through the HCI. After receiving the HCI command, the LL of the master device may return a response message to the host of the master device, such as "HCI command status (HCI command status)".
然后,主设备可以与从设备进行CIS的建立。在建立CIS之前,主设备和从设备之间已建立了ACL链路。示例性的,如图7中的702所示,主设备的LL通过ACL链路向从设备的LL发送CIS建立请求消息,如空口请求消息LL_CIS_REQ,以向从设备的LL请求创建CIS。从设备的LL向从设备的host发起CIS的创建请求。如从设备的LL可以通过HCI向从设备的host发送HCI指令“低功耗CIS请求(LE CIS request)”。从设备的host可以接受从设备的LL的CIS创建请求。如从设备的host可以通过HCI向从设备的LL发送HCI指令“低功耗CIS接受(LE accept CIS)”。 从设备的LL接收到该HCI指令后,可以向从设备的host返回响应消息,如“命令状态(command status)”。从设备的LL还可以通过ACL链路向主设备的LL发送CIS建立响应消息,如空口响应消息LL_CIS_RSP,以向主设备指示从设备同意CIS的建立。主设备的LL可以通过ACL链路向从设备的LL发送CIS建立消息,如空口通知消息LL_CIS_IND,以通知从设备的LL CIS完成建立。另外,主设备的LL还可以通过HCI向主设备的host发送HCI指令“低功耗CIS建立(LE CIS establish)”,以通知主设备的host CIS完成建立。从设备的LL还可以通过HCI向主设备的host发送HCI指令“LE CIS establish”,以通知从设备的host CIS完成建立。Then, the master device can establish CIS with the slave device. Before establishing CIS, the ACL link has been established between the master and slave devices. Exemplarily, as shown in 702 in FIG. 7, the LL of the master device sends a CIS establishment request message to the LL of the slave device through the ACL link, such as an air interface request message LL_CIS_REQ, to request the LL of the slave device to create a CIS. The LL of the slave device initiates a CIS creation request to the host of the slave device. For example, the LL of the slave device can send the HCI command “LE CIS request” to the host of the slave device through the HCI. The host of the slave device can accept the CIS creation request of the LL of the slave device. For example, the host of the slave device can send the HCI command "low-power CIS acceptance (LE accept CIS)" to the LL of the slave device through the HCI. After receiving the HCI command from the LL of the slave device, it can return a response message, such as "command status", to the host of the slave device. The LL of the slave device can also send a CIS establishment response message to the LL of the master device through an ACL link, such as an air interface response message LL_CIS_RSP, to indicate to the master device that the slave device agrees to the establishment of CIS. The LL of the master device can send a CIS establishment message to the LL of the slave device through the ACL link, such as an air interface notification message LL_CIS_IND, to notify the LL of the slave device that the CIS has completed the establishment. In addition, the LL of the master device can also send the HCI instruction "LE CIS establishment (LE) CIS establishment" to the host of the master device through HCI to notify the host of the master device to complete the establishment. The LL of the slave device can also send the HCI command "LE CIS establish" to the host of the master device through HCI to notify the host of the slave device to complete the establishment.
至此,主设备与从设备之间的CIS便创建完成。在该CIS激活后,基于该CIS,主设备与从设备之间便可进行音频数据的传输。At this point, the CIS between the master device and the slave device is created. After the CIS is activated, based on the CIS, audio data can be transmitted between the master device and the slave device.
在本申请实施例中,上述电子设备可以作为主设备,上述外围设备或外围设备的主体可以作为从设备。在音频业务开启之前,电子设备与外围设备之间可以执行上述图7所示的CIG参数的配置流程以及CIS的建立流程,以完成该音频业务的CIG参数的配置,以及CIG中所有CIS的建立。但不激活该CIG,即不激活该CIG中的所有CIS。在音频业务开启时,电子设备可以将该CIG激活(即激活该CIG中的所有CIS),以进行该音频业务的音频数据的传输。In the embodiments of the present application, the foregoing electronic device may be used as a master device, and the foregoing peripheral device or main body of the peripheral device may be used as a slave device. Before the audio service is started, the CIG parameter configuration process and the CIS establishment process shown in FIG. 7 can be performed between the electronic device and the peripheral device to complete the configuration of the CIG parameter of the audio service and the establishment of all CIS in the CIG . However, if the CIG is not activated, all CISs in the CIG are not activated. When the audio service is turned on, the electronic device can activate the CIG (that is, activate all CISs in the CIG) to transmit audio data of the audio service.
例如,具体的,电子设备与外围设备可以进行ACL链路的建立。基于建立的ACL链路,电子设备可以与外围设备进行业务场景的协商,确定出该外围设备支持的音频业务。针对支持的每个音频业务,在音频业务开启之前,电子设备可以与外围设备进行参数协商,以确定出能够适配该音频业务的CIG参数。根据协商出的CIG参数,电子设备与外围设备之间可以进行该音频业务的CIG参数的配置,以及根据配置的CIG参数进行CIG中所有CIS的建立,但不激活该CIG。并且,电子设备可以维护音频业务与CIG的对应关系。如,不同的CIG具有不同的CIG标识,电子设备可以维护音频业务与CIG标识的对应关系。在某个音频业务开启时,电子设备根据维护的对应关系,可以确定出与该音频业务对应的CIG,并激活该CIG,这样,便可进行该音频业务的音频数据的传输。在该音频业务结束时,电子设备还可以将该音频业务对应的CIG去激活,即停止在该CIG中的所有CIS上进行数据的收发。For example, specifically, an electronic device and a peripheral device can establish an ACL link. Based on the established ACL link, the electronic device can negotiate with the peripheral device in a business scenario to determine the audio service supported by the peripheral device. For each audio service supported, before the audio service is started, the electronic device may negotiate with the peripheral device to determine the CIG parameters that can be adapted to the audio service. According to the negotiated CIG parameters, the CIG parameters of the audio service can be configured between the electronic device and the peripheral device, and all CISs in the CIG are established according to the configured CIG parameters, but the CIG is not activated. In addition, electronic devices can maintain the correspondence between audio services and CIG. For example, different CIGs have different CIG logos, and electronic devices can maintain the correspondence between audio services and CIG logos. When an audio service is turned on, the electronic device can determine the CIG corresponding to the audio service according to the maintained correspondence and activate the CIG, so that the audio data of the audio service can be transmitted. At the end of the audio service, the electronic device can also deactivate the CIG corresponding to the audio service, that is, stop sending and receiving data on all CISs in the CIG.
为了便于理解,以下实施例中以电子设备为手机,外围设备为TWS耳机,TWS耳机包括两个耳机主体,分别为左耳塞和右耳塞,手机通过同一个CIG中的两个CIS分别与TWS耳机的左耳塞和右耳塞实现音频数据的传输为例,对本申请实施例提供的数据信道的建立方法进行详细介绍。如图8所示,该方法可以包括:For ease of understanding, in the following embodiments, the electronic device is a mobile phone, and the peripheral device is a TWS headset. The TWS headset includes two headphone bodies, a left earplug and a right earplug, respectively. The mobile phone is connected to the TWS headset through two CISs in the same CIG. The left earplug and the right earplug implement audio data transmission as an example, and a method for establishing a data channel provided by an embodiment of the present application will be described in detail. As shown in FIG. 8, the method may include:
S801、TWS耳机的左耳塞和右耳塞分别与手机进行蓝牙配对。The left earplug and right earplug of the S801 and TWS earphones are paired with the mobile phone via Bluetooth respectively.
示例性的,当用户希望使用TWS耳机时,可打开TWS耳机的耳机盒的盒盖。TWS耳机的左耳塞和右耳塞自动开机,或被按下功能键后开机。若左耳塞和右耳塞之前没有完成蓝牙配对,左耳塞和右耳塞可自动进行蓝牙配对,或者左耳塞和右耳塞在被按下配对功能键后进行蓝牙配对。若左耳塞和右耳塞之前已完成了蓝牙配对,则蓝牙配对过程可省略。在蓝牙配对完成后,TWS耳机的左耳塞和右耳塞之间可以建立蓝牙连接。然后,TWS耳机的左耳塞和右耳塞中的任一耳塞(如右耳塞)可对外发送配对广播。如果手机已经打开了蓝牙功能,则手机可以接收到该配对广播并提示用户已经扫 描到相关的蓝牙设备(如TWS耳机)。当该TWS耳机作为连接设备在手机上被选中后,手机可与TWS耳机的右耳塞进行蓝牙配对。当然,如果手机与TWS耳机的右耳塞之前已完成了蓝牙配对,则蓝牙配对过程可省略。也就是说,手机在接收到上述配对广播后,可自动与右耳塞进行蓝牙配对。Exemplarily, when the user wishes to use the TWS earphone, the lid of the earphone box of the TWS earphone can be opened. The left earplug and right earplug of the TWS headset turn on automatically, or the function key is pressed and then turned on. If the left earbud and the right earbud have not completed Bluetooth pairing before, the left earbud and the right earbud can automatically perform Bluetooth pairing, or the left earbud and right earbud can perform Bluetooth pairing after the pairing function key is pressed. If the left earbud and the right earbud have previously completed Bluetooth pairing, the Bluetooth pairing process can be omitted. After Bluetooth pairing is completed, a Bluetooth connection can be established between the left and right earbuds of the TWS headset. Then, any one of the left earplug and the right earplug of the TWS earphone (such as the right earplug) can send a paired broadcast to the outside. If the mobile phone has turned on the Bluetooth function, the mobile phone can receive the pairing broadcast and prompt the user that the relevant Bluetooth device (such as a TWS headset) has been scanned. When the TWS headset is selected as the connected device on the mobile phone, the mobile phone can be paired with the right earbud of the TWS headset via Bluetooth. Of course, if the Bluetooth pairing of the mobile phone and the right earbud of the TWS headset has been completed before, the Bluetooth pairing process can be omitted. In other words, after receiving the pairing broadcast, the mobile phone can automatically perform Bluetooth pairing with the right earbud.
在右耳塞与手机完成蓝牙配对后,右耳塞可以通过与左耳塞之间的蓝牙连接,向左耳塞发送手机的蓝牙地址,并通知左耳塞对外发送配对广播。这样,手机可以接收左耳塞发送的配对广播并与左耳塞进行蓝牙配对。After the right earbud is paired with the mobile phone via Bluetooth, the right earbud can send the Bluetooth address of the mobile phone to the left earbud through the Bluetooth connection between the left earbud and the left earbud, and notify the left earbud to send a pairing broadcast to the outside. In this way, the mobile phone can receive the pairing broadcast sent by the left earplug and perform Bluetooth pairing with the left earplug.
在一些实施例中,TWS耳机的右耳塞还可以向手机发送左耳塞的蓝牙地址,以向手机指示左耳塞与右耳塞是同一个外围设备的两个主体。在后续有音频数据需要传输给TWS耳机的左右耳塞时,手机可以通过同一个CIG中的两个CIS分别向右耳塞与左耳塞传输音频数据。这样,可以实现右耳塞与左耳塞之间音频数据的播放级同步。在本申请实施例中,右耳塞和左耳塞之间的音频数据的播放级同步可以是指:TWS耳机的左耳塞和右耳塞可以分别接收手机通过同一个CIG中的两个CIS发送的音频数据,且对用户来说,左耳塞和右耳塞能够在相同的时间点播放接收到的音频数据。In some embodiments, the right earplug of the TWS headset may also send the Bluetooth address of the left earplug to the mobile phone to indicate to the mobile phone that the left earplug and the right earplug are two main bodies of the same peripheral device. When audio data needs to be transmitted to the left and right earplugs of the TWS earphone, the mobile phone can transmit audio data to the right earplug and the left earplug respectively through the two CISs in the same CIG. In this way, playback level synchronization of audio data between the right earplug and the left earplug can be achieved. In the embodiment of the present application, the playback level synchronization of audio data between the right earplug and the left earplug may refer to: the left earplug and the right earplug of the TWS earphone may respectively receive audio data sent by the mobile phone through two CISs in the same CIG And, for the user, the left earplug and the right earplug can play the received audio data at the same time point.
需要说明的是,上述对TWS耳机的左耳塞和右耳塞分别与手机进行蓝牙配对的过程仅是一种示例。在一些实施例中,手机也可以先和TWS耳机的左耳塞进行蓝牙配对,然后左耳塞通过向右耳塞发送手机的蓝牙地址,并通知右耳塞对外发送配对广播,以使得右耳塞与手机进行蓝牙配对。在另外一些实施例中,TWS耳机的左耳塞和右耳塞在开机后可以分别对外发送配对广播,以便于左耳塞和右耳塞能够分别与手机进行蓝牙配对。另外,在本申请实施例中,TWS耳机的左耳塞或右耳塞对外发送配对广播的触发条件,可以是TWS耳机的耳机盒的盒盖被打开,或者是TWS耳机的左右耳塞蓝牙配对完成,或者,TWS耳机的左耳塞或右耳塞被拿出耳机盒,或者是配对功能键被按下,还可以是其他的触发条件。其中,所述的配对功能键可以设置在TWS耳机的耳机盒上,如TWS耳机的耳机盒上配置有配对功能键,当该配对功能键被按下时,TWS耳机的左耳塞或右耳塞可对外发送配对广播。配对功能键也可以设置在TWS耳机的左右耳塞上,如,TWS耳机的左耳塞和/或右耳塞上配置有配对功能键,在该配对功能键被按下时,对应的耳塞对外发送配对广播。It should be noted that the above process of pairing the left earplug and the right earplug of the TWS headset with the mobile phone via Bluetooth is only an example. In some embodiments, the mobile phone may also perform Bluetooth pairing with the left earbud of the TWS earphone, and then the left earbud sends the Bluetooth address of the mobile phone to the right earbud and notifies the right earbud to send a pairing broadcast to the outside so that the right earbud and the mobile phone can perform Bluetooth pair. In some other embodiments, the left earplug and the right earplug of the TWS earphone can separately send pairing broadcasts after being turned on, so that the left earplug and the right earplug can perform Bluetooth pairing with the mobile phone respectively. In addition, in the embodiment of the present application, the trigger condition for the left earplug or the right earplug of the TWS earphone to send the pairing broadcast externally may be that the cover of the earphone box of the TWS earphone is opened, or the Bluetooth pairing of the left and right earphones of the TWS earphone is completed, or The left earplug or right earplug of the TWS earphone is taken out of the earphone box, or the pairing function key is pressed, and other trigger conditions can also be used. The pairing function key can be set on the earphone box of the TWS earphone. For example, the earphone box of the TWS earphone is equipped with a pairing function key. When the pairing function key is pressed, the left or right earplug of the TWS earphone can be Send paired broadcasts to the outside world. The pairing function keys can also be set on the left and right earbuds of the TWS headset. For example, the pairing function keys are configured on the left and/or right earbuds of the TWS headset. When the pairing function key is pressed, the corresponding earbud sends a pairing broadcast to the outside .
S802、手机分别与TWS耳机的左耳塞和右耳塞建立ACL链路。S802, the mobile phone establishes an ACL link with the left earplug and the right earplug of the TWS earphone, respectively.
手机与TWS耳机的左耳塞和右耳塞进行蓝牙配对后,手机可以分别与左耳塞和右耳塞建立ACL链路。例如,手机可以与左耳塞建立ACL链路1,手机可以与右耳塞建立ACL链路2。以手机与左耳塞建立ACL链路1为例。手机可以向左耳塞发送建立ACL链路的请求。左耳塞接收到建立ACL链路的请求后应答。手机接收到左耳塞的应答后,ACL链路1建立完成。After the mobile phone is Bluetooth paired with the left and right earplugs of the TWS headset, the mobile phone can establish an ACL link with the left and right earplugs, respectively. For example, a mobile phone can establish an ACL link 1 with the left earbud, and a mobile phone can establish an ACL link 2 with the right earbud. Take the case where the mobile phone and the left earbud establish ACL link 1 as an example. The mobile phone can send a request to establish an ACL link to the left earplug. The left earbud answers after receiving the request to establish the ACL link. After the mobile phone receives the response from the left earplug, ACL link 1 is established.
在一些实施例中,可以认为,用户触发TWS耳机的左右耳塞与手机进行蓝牙配对(如用户打开TWS耳机的耳机盒的盒盖,或用户将左右耳塞从耳机盒中拿出)后,就是想通过TWS耳机来实现某音频业务的功能,如播放音乐或打电话。因此,在本申请实施例中,在S802之后,电子设备便可与外围设备进行音频业务的CIG参数的配置,以及CIG中所有CIS的建立。具体的,可以包括以下:S803-S805。In some embodiments, it can be considered that after the user triggers the left and right earbuds of the TWS headset to pair with the mobile phone via Bluetooth (eg, the user opens the lid of the earphone box of the TWS earphone, or the user removes the left and right earbuds from the earphone box), they just want to Use TWS headset to realize the function of an audio service, such as playing music or making a phone call. Therefore, in the embodiment of the present application, after S802, the electronic device can configure the CIG parameters of the audio service with the peripheral device and establish all CISs in the CIG. Specifically, the following may be included: S803-S805.
S803、手机分别与TWS耳机的左耳塞和右耳塞进行业务场景的协商,确定该TWS 耳机支持的音频业务。S803. The mobile phone separately negotiates a business scenario with the left earplug and the right earplug of the TWS headset to determine the audio service supported by the TWS headset.
在一些实施例中,在手机分别与左右耳塞的ACL链路建立完成后,基于建立的ACL链路,手机可以分别与左耳塞和右耳塞进行业务场景的协商。例如,以手机与TWS耳机的左耳塞进行业务场景协商为例,结合上述S802中的示例,手机可以通过ACL链路1向左耳塞发送查询命令,该查询命令用于获取左耳塞支持的音频业务。左耳塞接收到该查询命令后可以通过该ACL链路1向手机返回左耳塞支持的音频业务。类似的,手机还可以通过ACL链路2与右耳塞进行业务场景的协商,以便右耳塞返回该右耳塞支持的音频业务。手机根据左右耳塞返回的各自支持的音频业务,便可以确定出TWS耳机支持的音频业务。如手机可以将左右耳塞均支持的音频业务作为TWS耳机支持的音频业务。In some embodiments, after the establishment of the ACL link between the mobile phone and the left and right earplugs, respectively, based on the established ACL link, the mobile phone can separately negotiate business scenarios with the left earplug and the right earplug. For example, taking the business scenario negotiation between the mobile phone and the left earplug of the TWS headset as an example, combined with the example in S802 above, the mobile phone can send a query command to the left earplug through the ACL link 1, the query command is used to obtain audio services supported by the left earplug . After receiving the query command, the left earplug can return the audio service supported by the left earplug to the mobile phone through the ACL link 1. Similarly, the mobile phone can also negotiate service scenarios with the right earplug through the ACL link 2, so that the right earplug returns to the audio service supported by the right earplug. According to the audio services supported by the left and right earbuds, the mobile phone can determine the audio services supported by the TWS headset. For example, the mobile phone can use the audio service supported by the left and right earplugs as the audio service supported by the TWS headset.
一般的,TWS耳机的左右耳塞支持的音频业务是相同,因此,在另一些实施例中,手机也可以仅与TWS耳机的左右耳塞中的任意一个耳塞(如左耳塞)进行业务场景的协商即可。也就是说,上述S803可以替换为,手机与TWS耳机的左右耳塞中的任一耳塞(如左耳塞)进行业务场景协商,确定该TWS耳机支持的音频业务。其中,左耳塞返回的该左耳塞支持的音频业务即为TWS耳机支持的音频业务。Generally, the audio services supported by the left and right earplugs of the TWS headset are the same. Therefore, in other embodiments, the mobile phone may also only negotiate with any of the left and right earplugs of the TWS headset (such as the left earplug) for business scenarios. can. That is to say, the above S803 can be replaced with that the mobile phone negotiates a business scenario with any of the left and right earplugs (such as the left earplug) of the TWS headset to determine the audio service supported by the TWS headset. The audio service supported by the left earplug returned by the left earplug is the audio service supported by the TWS headset.
在手机确定出TWS耳机支持的音频业务后,针对其支持的每个音频业务,可以执行以下S804-S805。After the mobile phone determines the audio service supported by the TWS headset, for each audio service it supports, the following S804-S805 can be performed.
S804、手机分别与TWS耳机的左耳塞和右耳塞进行参数协商,以确定出能够适配音频业务的CIG参数。S804. The mobile phone performs parameter negotiation with the left earplug and the right earplug of the TWS headset to determine the CIG parameters that can be adapted to the audio service.
示例性的,针对S803中手机确定出的TWS耳机支持的音频业务中的一个音频业务(如称为音频业务1),手机可以基于与左右耳塞之间建立的ACL链路,分别与左右耳塞进行参数协商。如,该参数协商可以包括以下一项或多项:QoS参数的协商、codec参数的协商、CIS参数的协商。相应的,能够适配该音频业务1的CIG参数可以包括以下一项或多项:QoS参数、codec参数、CIS参数。Exemplarily, for one of the audio services (such as audio service 1) supported by the TWS earphone determined by the mobile phone in S803, the mobile phone may perform an audio link with the left and right earbuds based on the ACL link established with the left and right earbuds, respectively Parameter negotiation. For example, the parameter negotiation may include one or more of the following: QoS parameter negotiation, codec parameter negotiation, and CIS parameter negotiation. Correspondingly, the CIG parameters that can be adapted to the audio service 1 may include one or more of the following: QoS parameters, codec parameters, CIS parameters.
例如,针对TWS耳机支持的音频业务1,以手机与TWS耳机的左耳塞进行参数协商为例,结合上述S802中的示例,该参数协商的具体过程可以包括以下步骤:For example, for the audio service 1 supported by the TWS headset, taking the parameter negotiation between the mobile phone and the left earbud of the TWS headset as an example, and in conjunction with the example in S802 above, the specific process of the parameter negotiation may include the following steps:
步骤a:手机可以通过ACL链路1向左耳塞发送参数协商消息。该参数协商消息可以携带与该音频业务1对应的CIG参数。在一些实施例中,与该音频业务1对应的CIG参数可以是预定义的。Step a: The mobile phone can send a parameter negotiation message to the left earplug via ACL link 1. The parameter negotiation message may carry CIG parameters corresponding to the audio service 1. In some embodiments, the CIG parameters corresponding to the audio service 1 may be predefined.
步骤b:左耳塞通过ACL链路1接收到手机发送的参数协商消息。如果左耳塞同意该参数协商消息中携带的CIG参数,则可以向手机返回确认消息;如果左耳塞不同意该参数协商消息中携带的参数或同意该参数协商消息中携带的部分参数,则可以向手机返回继续协商消息,以便与手机继续进行参数协商,直到左耳塞向手机返回确认消息。Step b: The left earplug receives the parameter negotiation message sent by the mobile phone through ACL link 1. If the left earplug agrees with the CIG parameters carried in the parameter negotiation message, it can return a confirmation message to the mobile phone; if the left earplug does not agree with the parameters carried in the parameter negotiation message or agrees with some of the parameters carried in the parameter negotiation message, you can send The mobile phone returns a continue negotiation message to continue parameter negotiation with the mobile phone until the left earbud returns a confirmation message to the mobile phone.
步骤c:手机通过ACL链路1接收左耳塞返回的确认消息。手机根据该确认消息获得与左耳塞的参数协商结果。Step c: The mobile phone receives the confirmation message returned by the left earplug through ACL link 1. The mobile phone obtains the parameter negotiation result with the left earplug according to the confirmation message.
类似的,针对TWS耳机支持的音频业务1,手机还可以通过ACL链路2与右耳塞进行参数协商,以便获得与右耳塞的参数协商结果。手机根据与左右耳塞协商得到的参数协商结果,便可以确定出能够适配该音频业务1的CIG参数。Similarly, for the audio service 1 supported by the TWS headset, the mobile phone can also perform parameter negotiation with the right earplug through the ACL link 2 in order to obtain the parameter negotiation result with the right earplug. The mobile phone can determine the CIG parameters that can be adapted to the audio service 1 according to the parameter negotiation results obtained through negotiation with the left and right earplugs.
当然,手机也可以仅与TWS耳机的左右耳塞中的任意一个耳塞(如左耳塞)进行参数协商即可。也就是说,S804可以替换为,手机与TWS耳机的左右耳塞中的任一耳塞(如左耳塞)进行参数协商,以确定能够适配音频业务的CIG参数。其中,与左耳塞协商得到的参数协商结果即为能够适配该音频业务的CIG参数。Of course, the mobile phone may only perform parameter negotiation with any one of the left and right earplugs (such as the left earplug) of the TWS earphone. In other words, S804 can be replaced by the mobile phone and any one of the left and right earplugs of the TWS headset (such as the left earplug) performing parameter negotiation to determine the CIG parameters that can be adapted to the audio service. The parameter negotiation result obtained through negotiation with the left earplug is the CIG parameter that can be adapted to the audio service.
S805、手机进行CIG参数的配置,并分别与TWS耳机的左耳塞和右耳塞建立CIS。S805. The mobile phone configures CIG parameters and establishes CIS with the left earplug and right earplug of the TWS earphone, respectively.
示例性的,在手机确定出能够适配音频业务(如上述音频业务1)的CIG参数后,可以针对该音频业务1,进行CIG参数的配置,并分别与左右耳塞建立CIS。手机可以与左耳塞建立CIS 1,手机可以与右耳塞建立CIS 2。该CIS1和该CIS 2包含于同一个CIG中,该CIG与该音频业务1对应。例如,手机可以根据确定出的能够适配音频业务1的CIG参数,进行CIG参数的配置,如CIG参数的配置流程可以参考图7中所示的701,此处不再详细赘述。在CIG参数配置完成后,手机可以与左耳塞建立CIS1,与右耳塞建立CIS 2。手机与左耳塞,手机与右耳塞进行CIS的建立流程可以分别参考图7中所示的702,此处不再详细赘述。Exemplarily, after the mobile phone determines the CIG parameters that can be adapted to the audio service (such as the audio service 1 above), the CIG parameters can be configured for the audio service 1, and CISs are established with the left and right earplugs, respectively. The mobile phone can establish CIS 1 with the left earplug, and the mobile phone can establish CIS 2 with the right earplug. The CIS1 and the CIS2 are included in the same CIG, and the CIG corresponds to the audio service 1. For example, the mobile phone may configure the CIG parameters according to the determined CIG parameters that can be adapted to the audio service 1. For the configuration process of the CIG parameters, reference may be made to 701 shown in FIG. 7, which will not be described in detail here. After the CIG parameter configuration is completed, the mobile phone can establish CIS1 with the left earplug and CIS2 with the right earplug. For the process of establishing the CIS between the mobile phone and the left earplug, and between the mobile phone and the right earplug, please refer to 702 shown in FIG.
这样,通过针对TWS耳机支持的每个音频业务执行上述S804-S805,手机与TWS耳机的左右耳塞之间可以在对应音频业务开启之前,完成能够适配该音频业务的CIG参数的配置以及对应该音频业务的CIG中所有CIS的建立。一般的,如在上述S803中,手机确定出TWS耳机支持的音频业务包括:音频业务1,音频业务2,…,音频业务n。n可以为大于或等于1的整数。针对TWS耳机支持的每个音频业务执行上述S804-S805后,手机与TWS耳机的左右耳塞之间便可以完成分别能够适配音频业务1,音频业务2,…,以及音频业务n的CIG参数的配置以及对应CIG中所有CIS的建立。In this way, by performing the above S804-S805 for each audio service supported by the TWS headset, the configuration of the CIG parameters that can be adapted to the audio service and the corresponding between the mobile phone and the left and right earplugs of the TWS headset can be completed before the corresponding audio service is started Establishment of all CIS in CIG of audio business. Generally, as in the above S803, the mobile phone determines that the audio services supported by the TWS headset include: audio service 1, audio service 2, ..., audio service n. n can be an integer greater than or equal to 1. After performing the above S804-S805 for each audio service supported by the TWS headset, the mobile phone and the left and right earbuds of the TWS headset can complete the CIG parameters that can be adapted to audio service 1, audio service 2, ..., and audio service n, respectively Configuration and corresponding establishment of all CIS in CIG.
S806、手机确定某音频业务开启时,激活该音频业务对应的CIG,用于该音频业务的音频数据的传输。S806. When the mobile phone determines that an audio service is turned on, it activates the CIG corresponding to the audio service for audio data transmission of the audio service.
另外,在本申请实施例中,由于上述音频业务1,音频业务2,…,以及音频业务n并未开启,因此,在手机与TWS耳机的左右耳塞之间完成能够适配音频业务1,音频业务2,…,以及音频业务n的CIG参数的配置以及对应CIG中所有CIS的建立后,可以不激活与上述音频业务1,音频业务2,…,以及音频业务n对应的CIG。即可以不激活与上述音频业务1,音频业务2,…,以及音频业务n对应的CIG中的所有CIS。例如,以音频业务1为例,在手机与TWS耳机的左右耳塞之间完成能够适配音频业务1的CIG参数的配置以及对应CIG中CIS 1和CIS 2的建立后,可以不激活该音频业务1对应的CIG,即不激活上述CIS 1和上述CIS 2。而是,当手机确定某个音频业务开启时,激活该音频业务对应的CIG,即激活该CIG包括的所有CIS。例如,当手机确定音频业务1开启时,激活该音频业务1对应的CIG,即激活该CIG包括的CIS 1和CIS 2。In addition, in the embodiment of the present application, since the audio service 1, the audio service 2, ..., and the audio service n are not enabled, the audio service 1 can be adapted between the mobile phone and the left and right earplugs of the TWS headset Service 2, ..., and the configuration of CIG parameters of audio service n and the establishment of all CISs in the corresponding CIG, the CIG corresponding to the above audio service 1, audio service 2, ..., and audio service n may not be activated. That is, all CISs in the CIG corresponding to the audio service 1, the audio service 2, ..., and the audio service n may not be activated. For example, taking audio service 1 as an example, after the configuration of the CIG parameters that can be adapted to audio service 1 and the establishment of corresponding CIS 1 and CIS 2 in the CIG between the mobile phone and the left and right earbuds of the TWS headset, the audio service may not be activated The CIG corresponding to 1 does not activate the above CIS 1 and the above CIS 2. Instead, when the mobile phone determines that an audio service is turned on, the CIG corresponding to the audio service is activated, that is, all CISs included in the CIG are activated. For example, when the mobile phone determines that the audio service 1 is turned on, the CIG corresponding to the audio service 1 is activated, that is, the CIS 1 and the CIS 2 included in the CIG are activated.
在有音频业务开启时,为了能够适配该音频业务,利用与该音频业务对应的CIG进行音频数据的传输。在一些实施例中,手机可以维护不同音频业务与CIG的对应关系。例如,不同的CIG具有不同的CIG标识。继续以TWS耳机支持的音频业务包括:音频业务1,音频业务2,…,音频业务n(如,语音,音乐,游戏,视频,语音助手,导航音,告警,提示音等)为例,电子设备可以维护不同音频业务与CIG标识的对应关系。如表1所示,音频业务1与标识为CIG_1的CIG对应,音频业务2与标识为 CIG_2的CIG对应,…,音频业务n与标识为CIG_n的CIG对应。When an audio service is started, in order to be able to adapt to the audio service, the CIG corresponding to the audio service is used for audio data transmission. In some embodiments, the mobile phone can maintain the correspondence between different audio services and CIG. For example, different CIGs have different CIG logos. Continue to take the audio services supported by TWS headsets as follows: audio service 1, audio service 2, ..., audio service n (eg, voice, music, games, video, voice assistant, navigation sound, alarm, prompt sound, etc.) as an example, electronic The device can maintain the correspondence between different audio services and the CIG logo. As shown in Table 1, audio service 1 corresponds to the CIG labeled CIG_1, audio service 2 corresponds to the CIG labeled CIG_2, ..., and audio service n corresponds to the CIG labeled CIG_n.
表1Table 1
音频业务Audio business CIG标识CIG logo
音频业务1Audio business 1 CIG_1 CIG_1
音频业务2Audio business 2 CIG_2CIG_2
音频业务nAudio business n CIG_nCIG_n
这样,当手机确定某个音频业务开启时,可以根据表1确定出与该音频业务对应的CIG标识,从而根据CIG标识激活对应的CIG,用于该音频业务的音频数据的传输。In this way, when the mobile phone determines that an audio service is turned on, it can determine the CIG identifier corresponding to the audio service according to Table 1, so that the corresponding CIG is activated according to the CIG identifier, which is used for audio data transmission of the audio service.
需要说明的是,上述示例是以针对每个音频业务,执行S804和S805以完成每个音频业务的CIG参数配置和对应CIG中所有CIS的建立为例示出的,也就是说,可以认为一个音频业务对应一个CIG,如表1所示。当然,也可能存在不同的音频业务对应的CIG相同的场景,即存在多个(两个或两个以上)的音频业务对应的CIG参数相同的情况。例如,音乐,游戏,视频,语音助手,导航音等这些业务可以认为是多媒体音频业务,这些业务对应的CIG参数可能是相同的。告警,提示音等业务可以认为是背景声,这些业务的CIG参数可能是相同的。因此,在另一些实施例中,在手机确定出TWS耳机支持的音频业务后,可以先获取所有音频业务对应的CIG参数。然后,手机针对这些具有相同CIG参数的音频业务执行上述S805,以完成这些音频业务的CIG参数配置和对应CIG中所有CIS的建立。也就是说,可以认为多个音频业务对应一个CIG。类似的,手机也可以维护不同音频业务与CIG标识的对应关系。基于该对应关系,当有音频业务开启时,手机可以激活该音频业务对应的CIG,以进行音频数据的传输。It should be noted that the above example is illustrated by performing S804 and S805 for each audio service to complete the CIG parameter configuration of each audio service and the establishment of all CISs in the corresponding CIG, that is, one audio can be considered The business corresponds to a CIG, as shown in Table 1. Of course, there may also be scenarios where different audio services correspond to the same CIG, that is, there are multiple (two or more) audio services corresponding to the same CIG parameter. For example, music, games, video, voice assistants, navigation sounds and other services can be considered as multimedia audio services, and the CIG parameters corresponding to these services may be the same. Services such as alarms and prompts can be considered as background sound, and the CIG parameters of these services may be the same. Therefore, in other embodiments, after the mobile phone determines the audio service supported by the TWS headset, it may first obtain the CIG parameters corresponding to all audio services. Then, the mobile phone executes the above S805 for these audio services with the same CIG parameters to complete the CIG parameter configuration of these audio services and the establishment of all CISs in the corresponding CIG. In other words, it can be considered that multiple audio services correspond to one CIG. Similarly, mobile phones can also maintain correspondence between different audio services and CIG logos. Based on the corresponding relationship, when an audio service is turned on, the mobile phone can activate the CIG corresponding to the audio service for audio data transmission.
在一些实施例中,不激活CIG的具体实现可以是:手机和TWS耳机可以分别为每个CIG设置一个状态机。在手机与TWS耳机的左右耳塞之间完成CIG参数的配置以及对应CIG中所有CIS的建立后,手机和TWS耳机可以分别设置该CIG的状态为第一状态。该第一状态用于标识该CIG中所有CIS已完成建立,但该CIG中的所有CIS未激活,为虚拟链路,不能用于进行实际数据的收发。激活CIG的具体实现可以是:当对应音频业务开启时,手机和TWS耳机可以分别将该CIG的状态由第一状态更改为第二状态。该第二状态用于标识该CIG中的所有CIS被激活,可以用于进行实际数据的收发。在CIG的状态机处于第二状态时,手机便可以通过该CIG中的所有CIS向TWS耳机的左右耳塞传输音频数据。In some embodiments, the specific implementation of not activating the CIG may be: the mobile phone and the TWS headset may set up a state machine for each CIG separately. After configuring the CIG parameters between the mobile phone and the left and right earbuds of the TWS headset and establishing all the CISs in the corresponding CIG, the mobile phone and the TWS headset can set the CIG state to the first state respectively. The first state is used to identify that all CISs in the CIG have been established, but all CISs in the CIG are not activated, are virtual links, and cannot be used to send and receive actual data. The specific implementation of activating the CIG may be: when the corresponding audio service is turned on, the mobile phone and the TWS headset may change the state of the CIG from the first state to the second state, respectively. The second state is used to identify that all CISs in the CIG are activated, and can be used to send and receive actual data. When the state machine of the CIG is in the second state, the mobile phone can transmit audio data to the left and right earplugs of the TWS headset through all CISs in the CIG.
示例性的,如图9所示,可以为CIG设置一个状态机,该状态机可以包括四个状态,分别为:空闲(idle)状态,配置(configured)状态,打开(open)状态,流(streaming)状态。手机和TWS耳机通过该状态机可以保持两者之间的状态同步。其中,open状态可以为上述第一状态,streaming状态可以为上述第二状态。例如,在手机与TWS耳机蓝牙配对完成和ACL链路建立完成后,CIG的状态机处于idle状态。在手机与TWS耳机业务场景协商完成和参数协商完成后,CIG的状态机由idle状态切换到Configured状态。在手机CIG参数配置完成和CIS建立完成后,CIG的状态机由Configured状态切换为open状态。在open状态下,该CIG中所有CIS已完成建立, 但该CIG中的所有CIS为虚拟链路,不能用于进行实际数据的收发。在本实施例中,在对应音频业务开启之前,该音频业务对应的CIG处于open状态。在该音频业务开启后,CIG的状态机由open状态切换为Streaming状态。在Streaming状态下,手机可以通过该CIG中的所有CIS向TWS耳机的左右耳塞传输该音频业务的音频数据。Exemplarily, as shown in FIG. 9, a state machine may be set for the CIG. The state machine may include four states, namely: an idle state, a configured state, an open state, and a stream ( streaming) status. Through this state machine, the mobile phone and the TWS headset can keep the state synchronization between the two. The open state may be the above-mentioned first state, and the streaming state may be the above-mentioned second state. For example, after the Bluetooth pairing of the mobile phone and the TWS headset is completed and the ACL link is established, the CIG state machine is in the idle state. After the business scenario negotiation and parameter negotiation between the mobile phone and the TWS headset are completed, the CIG state machine switches from the idle state to the Configured state. After the mobile phone CIG parameter configuration is completed and the CIS is established, the CIG state machine switches from the Configured state to the Open state. In the open state, all CISs in the CIG have been established, but all CISs in the CIG are virtual links and cannot be used to send and receive actual data. In this embodiment, before the corresponding audio service is started, the CIG corresponding to the audio service is in the open state. After the audio service is started, the CIG state machine switches from the open state to the streaming state. In the Streaming state, the mobile phone can transmit the audio data of the audio service to the left and right earplugs of the TWS headset through all CISs in the CIG.
在一些实施例中,在音频业务结束时,还可以将该音频业务对应的CIG去激活,即停止在该CIG中的所有CIS上进行数据的收发。去激活CIG的具体实现可以是:当对应音频业务结束时,手机和TWS耳机可以将该CIG的状态由上述第二状态更改为上述第一状态,以便停止在该CIG中的所有CIS上进行数据的收发。例如,继续以图9为例,在音频业务结束时,手机和TWS耳机可以将CIG的状态机由Streaming状态切换为open状态。In some embodiments, at the end of the audio service, the CIG corresponding to the audio service may also be deactivated, that is, stop sending and receiving data on all CISs in the CIG. The specific implementation of deactivating CIG may be: when the corresponding audio service ends, the mobile phone and the TWS headset can change the state of the CIG from the above-mentioned second state to the above-mentioned first state, so as to stop data on all CISs in the CIG Of sending and receiving. For example, continuing to take FIG. 9 as an example, at the end of the audio service, the mobile phone and the TWS headset can switch the CIG state machine from the Streaming state to the open state.
以下结合具体示例说明上述S806的具体过程。其中,以TWS耳机支持的音频业务包括:音频业务1和音频业务2。音频业务1为音乐业务,音频业务2为语音业务为例。The specific process of the above S806 is described below with reference to specific examples. Among them, the audio services supported by the TWS headset include: audio service 1 and audio service 2. Audio service 1 is a music service, and audio service 2 is a voice service as an example.
其中,在这些音频业务开启之前,手机与TWS耳机的左右耳塞之间完成了能够适配音乐业务和语音业务的CIG参数的配置以及对应CIG中所有CIS的建立。且,音乐业务和语音业务与CIG标识的对应关系如表2所示。Among them, before the start of these audio services, the configuration of the CIG parameters that can be adapted to the music service and the voice service and the establishment of all CIS in the corresponding CIG are completed between the mobile phone and the left and right earbuds of the TWS headset. Moreover, the correspondence between the music service and voice service and the CIG logo is shown in Table 2.
表2Table 2
音频业务Audio business CIG标识CIG logo
音乐业务Music business CIG_1CIG_1
语音业务Voice service CIG_2CIG_2
由表2可知,音乐业务与标识为CIG_1的CIG(如称为CIG 1)对应,语音业务与标识为CIG_2的CIG(如称为CIG 2)对应。CIG 1和CIG2均未激活,即在CIG 1和CIG 2包含CIS上没有实际数据的收发。且CIG 1和CIG2所占用的时域资源可能存在重叠,也可以不存在重叠。例如,如图10所示,为手机与TWS耳机的左右耳塞之间的CIG 1和CIG2在时域上的分布示意图。另外,CIG 1和CIG2均包括两个CIS。如CIG 1包括CIS 1_1和CIS 1_2。CIG 2包括CIS 2_1和CIS 2_2。It can be seen from Table 2 that the music service corresponds to the CIG identified as CIG_1 (such as CIG1), and the voice service corresponds to the CIG identified as CIG_2 (such as CIG2). CIG1 and CIG2 are not activated, that is, there is no actual data transmission and reception on CIG1 and CIG2 including CIS. And the time domain resources occupied by CIG1 and CIG2 may overlap, or there may be no overlap. For example, as shown in FIG. 10, it is a schematic diagram of the distribution of CIG1 and CIG2 in the time domain between the mobile phone and the left and right earplugs of the TWS headset. In addition, both CIG1 and CIG2 include two CISs. For example, CIG1 includes CIS 1_1 and CIS 1_2. CIG 2 includes CIS 2_1 and CIS 2_2.
每个CIG中的每个CIS可以维护CIG的CIG锚点和ISO间隔。CIG可以包括多个CIG事件(CIG_event)。CIG锚点是对应CIG事件的开始时间点。ISO间隔是两个连续的CIG锚点之间的时间。每个CIG事件在时间上归属于一个ISO间隔。例如,参见图10所示,CIG 1可以包括多个CIG事件,如CIG 1事件(X),CIG 1事件(X+1),CIG 1事件(X+2)。CIG 1(X)锚点是CIG 1事件(X)的开始时间点。CIG 1(X+1)锚点是CIG 1事件(X+1)的开始时间点。CIG 1(X+2)锚点是CIG 1事件(X+2)的开始时间点。CIG 1(X)锚点和CIG 1(X+1)锚点是CIG的两个连续的CIG锚点。CIG 1ISO间隔是CIG 1(X)锚点和CIG 1(X+1)锚点之间的时间。例如,CIG 1中的CIS 1_1和CIS 1_2分别维护CIS 1的CIG锚点,如CIG 1(X)锚点,CIG 1(X+1)锚点,CIG 1(X+2)锚点等,维护CIG 1的ISO间隔,如CIG 1ISO间隔。CIG 2中的CIS 2_1和CIS 2_2分别维护CIS 2的CIG锚点,如CIG 2(X)锚点,CIG 2(X+1)锚点等,维护CIG 2的ISO间隔,如CIG 2 ISO间隔。Each CIS in each CIG can maintain the CIG anchor point and ISO interval of the CIG. The CIG may include multiple CIG events (CIG_event). The CIG anchor point is the starting time point of the corresponding CIG event. The ISO interval is the time between two consecutive CIG anchors. Each CIG event belongs to an ISO interval in time. For example, referring to FIG. 10, CIG1 may include multiple CIG events, such as CIG1 event (X), CIG1 event (X+1), and CIG1 event (X+2). The CIG1(X) anchor point is the starting point of the CIG1 event (X). The CIG1(X+1) anchor point is the starting point of the CIG1 event (X+1). The CIG1(X+2) anchor point is the starting point of the CIG1 event (X+2). The CIG1(X) anchor point and CIG1(X+1) anchor point are two consecutive CIG anchor points of CIG. The CIG1ISO interval is the time between the CIG1(X) anchor point and the CIG1(X+1) anchor point. For example, CIS1_1 and CIS1_2 in CIG1 maintain the CIG anchor point of CIS1, such as CIG1(X) anchor point, CIG1(X+1) anchor point, CIG1(X+2) anchor point, etc., Maintain the ISO interval of CIG1, such as CIG1ISO interval. CIS 2_1 and CIS 2_2 in CIG 2 maintain CIG anchor points of CIS 2, such as CIG 2 (X) anchor points, CIG 2 (X+1) anchor points, etc., and maintain ISO intervals of CIG 2, such as CIG 2 ISO intervals .
手机确定音乐业务开启,手机激活该音乐业务对应的CIG 1。例如,在用户打开 音乐播放器播放音乐时,手机可以确定音乐业务开启。在手机确定音乐业务开启时,可以根据表2确定音乐业务对应的CIG,即确定CIG标识为CIG_1的CIG,即CIG 1为与音乐业务对应的CIG。The mobile phone determines that the music service is started, and the mobile phone activates the CIG1 corresponding to the music service. For example, when the user opens the music player to play music, the mobile phone can determine that the music service is turned on. When the mobile phone determines that the music service is turned on, the CIG corresponding to the music service can be determined according to Table 2, that is, the CIG with the CIG identifier of CIG_1 is determined, that is, CIG1 is the CIG corresponding to the music service.
手机可以将上述CIG 1的状态机由open状态切换为Streaming状态。另外,手机可以向TWS耳机的左右耳塞分别发送激活指令。该激活指令可以用于指示TWS耳机的左右耳塞激活CIG 1中的CIS。如,手机可以通过与左右耳塞之间的ACL链路分别向左右耳塞发送该激活指令。该激活指令中可以携带CIG 1的标识。TWS耳机的左右耳塞接收到激活指令后,可以将CIG 1的状态机由open状态切换为Streaming状态。这样,手机1与TWS耳机的左右耳塞之间便可以通过该CIG1中的CIS 1_1和CIS 1_2实现该音乐业务的音频数据的传输。例如,如图11所示,手机1与TWS耳机的左右耳塞之间基于维护的CIG 1的CIG锚点和ISO间隔,便可以通过CIG1中的CIS 1_1和CIS 1_2进行该音乐业务的音频数据的传输。而语音业务对应的CIG 2依然维持未激活的状态。另外,CIG中的每个CIS,还可以维护M到S传输的最大数据大小、S到M传输的最大数据大小、M到S的数据包在链路层传输最长时间间隔、S到M的数据包在链路层传输最长时间间隔等参数,用于音频数据的收发。The mobile phone can switch the state machine of CIG1 from the open state to the Streaming state. In addition, the mobile phone can send activation instructions to the left and right earplugs of the TWS headset, respectively. This activation instruction can be used to instruct the left and right earplugs of the TWS headset to activate the CIS in CIG1. For example, the mobile phone can send the activation instruction to the left and right earplugs through the ACL link with the left and right earplugs, respectively. The activation instruction may carry the CIG1 logo. After receiving the activation command, the left and right earbuds of the TWS headset can switch the state machine of CIG1 from the open state to the Streaming state. In this way, the audio data of the music service can be transmitted between the mobile phone 1 and the left and right earplugs of the TWS earphone through the CIS 1_1 and CIS 1_2 in the CIG1. For example, as shown in Figure 11, the CIG anchor point and ISO interval between the mobile phone 1 and the left and right earbuds of the TWS headset can be used to perform audio data of the music service through CIS 1_1 and CIS 1_2 in CIG1 transmission. The CIG2 corresponding to the voice service still remains in an inactive state. In addition, each CIS in CIG can also maintain the maximum data size of M to S transmission, the maximum data size of S to M transmission, the maximum time interval of M to S data packet transmission at the link layer, and the S to M transmission time. Data packets are transmitted at the link layer for the longest interval and other parameters, and are used to send and receive audio data.
在一些实施例中,在用户想要结束音乐播放时,可以在手机上或TWS耳机上,触发结束该音乐的播放。响应于该触发,手机可以确定该音乐业务结束。在手机确定音乐业务结束时,手机可以将上述CIG 1的状态机由Streaming状态切换为open状态。另外,手机可以向TWS耳机的左右耳塞分别发送去激活指令。该去激活指令用于指示TWS耳机的左右耳塞去激活CIG 1中的CIS。如,手机可以通过与左右耳塞之间的ACL链路分别向左右耳塞发送该去激活指令。TWS耳机的左右耳塞接收到去激活指令后,可以将CIG 1的状态机由Streaming状态切换为open状态。这样,CIG 1便去激活完成。在将CIG 1中的CIS去激活后,该CIG 1中的CIS便不能用于音频数据的传输,即手机与TWS耳机的左右耳塞停止在该CIG 1中的CIS 1_1和CIS 1_2上进行音频数据的收发。In some embodiments, when the user wants to end the music playback, the user can trigger the end of the music playback on the mobile phone or the TWS headset. In response to the trigger, the mobile phone can determine that the music service ends. When the mobile phone determines that the music service is over, the mobile phone can switch the state machine of the above CIG 1 from the Streaming state to the open state. In addition, the mobile phone can send deactivation instructions to the left and right earplugs of the TWS headset, respectively. The deactivation instruction is used to instruct the left and right earplugs of the TWS earphone to deactivate the CIS in CIG1. For example, the mobile phone can send the deactivation instruction to the left and right earplugs through the ACL link with the left and right earplugs, respectively. After receiving the deactivation command, the left and right earbuds of the TWS headset can switch the state machine of CIG1 from Streaming state to open state. In this way, CIG1 deactivation is completed. After the CIS in CIG1 is deactivated, the CIS in CIG1 cannot be used for the transmission of audio data, that is, the left and right earphones of the mobile phone and TWS headset stop audio data on CIS1_1 and CIS1_2 in CIG1 Of sending and receiving.
在其他一些实施例中,如果用户在通过TWS耳机的左右耳塞播放音乐的过程中,接收到来电。在用户选择接听来电后,响应于用户接听来电的操作,手机可以确定语音业务开启。手机在确定语音业务开启时,可以去激活音乐业务对应的CIG 1。手机还可以根据表2确定语音业务对应的CIG,即确定CIG标识为CIG_2的CIG,即CIG2为与语音业务对应的CIG。手机可以将上述CIG 2的状态机由open状态切换为Streaming状态。手机还可以向TWS耳机的左右耳塞分别发送激活指令。该激活指令中可以携带CIG 2的标识。如,手机可以通过与左右耳塞之间的ACL链路分别向左右耳塞发送该激活指令。TWS耳机的左右耳塞接收到激活指令后,可以将CIG 2的状态机由open状态切换为Streaming状态。这样,手机1与TWS耳机的左右耳塞之间便可以通过该CIG2中的CIS 2_1和CIS 2_2实现该语音业务的音频数据的传输。例如,如图11所示,手机1与TWS耳机的左右耳塞之间基于维护的CIG 2的CIG锚点和ISO间隔,便可以通过CIG 2中的CIS 2_1和CIS 2_2进行该语音业务的音频数据的传输。在通话结束后,手机与TWS耳机的左右耳塞可以去激活CIG 2,激活CIG 1,这样,可以继续通过CIG 1中包括的CIS实现手机与TWS耳机的左右耳塞之间音频数据的传 输。In some other embodiments, if the user receives an incoming call while playing music through the left and right earplugs of the TWS headset. After the user chooses to answer the call, in response to the user's operation to answer the call, the mobile phone can determine that the voice service is turned on. When the mobile phone determines that the voice service is turned on, it can deactivate the CIG1 corresponding to the music service. The mobile phone can also determine the CIG corresponding to the voice service according to Table 2, that is, the CIG whose CIG identifier is CIG_2, that is, CIG2 is the CIG corresponding to the voice service. The mobile phone can switch the CIG2 state machine from the open state to the Streaming state. The mobile phone can also send activation instructions to the left and right earplugs of the TWS headset, respectively. The activation instruction may carry the CIG2 logo. For example, the mobile phone can send the activation instruction to the left and right earplugs through the ACL link with the left and right earplugs, respectively. After receiving the activation command, the left and right earbuds of the TWS headset can switch the CIG2 state machine from the open state to the Streaming state. In this way, the audio data of the voice service can be realized between the mobile phone 1 and the left and right earplugs of the TWS headset through the CIS 2_1 and CIS 2_2 in the CIG2. For example, as shown in Figure 11, the CIG anchor point and ISO interval between the mobile phone 1 and the left and right earbuds of the TWS headset based on the maintenance CIG 2 can be used to perform audio data of the voice service through CIS 2_1 and CIS 2_2 in CIG 2. Transmission. After the call ends, the left and right earphones of the mobile phone and the TWS headset can deactivate CIG2 and activate CIG1, so that the audio data between the mobile phone and the left and right earphones of the TWS headset can continue to be transmitted through the CIS included in CIG1.
在另一些实施例中,当在通过TWS耳机的左右耳塞实现某个音频业务的功能时,如果有另一个音频业务开启,手机与TWS耳机的左右耳塞也可以不对当前激活的CIG进行去激活处理,而是可以将另一个音频业务的音频数据,与当前播放的音频业务的音频数据进行混音(或称为叠加)处理后,通过当前激活的CIG中的CIG进行传输。例如,TWS耳机还支持音频业务3,如提示音业务。提示音业务与标识为CIG_3的CIG(如称为CIG 3)对应。当前正在通过TWS耳机的左右耳塞播放音乐,手机接收到短信。此时手机可以确定提示音业务开启。手机可以不激活提示音业务对应的CIG 3,而是将短信提示音与当前播放的音乐进行叠加后,通过CIG1中的CIS 1_1和CIS 1_2传输至TWS耳机的左右耳塞。而在手机当前与TWS耳机建立了连接,但未进行任何音频业务时,当手机接收到短信时,手机可以激活提示音业务对应的CIG 3,以进行对应音频数据的传输。In other embodiments, when a certain audio service function is implemented through the left and right earplugs of the TWS headset, if another audio service is enabled, the left and right earplugs of the mobile phone and the TWS headset may not deactivate the currently activated CIG Instead, the audio data of another audio service can be mixed (or called superimposed) with the audio data of the currently playing audio service, and then transmitted through the CIG in the currently activated CIG. For example, the TWS headset also supports audio service 3, such as the prompt tone service. The reminder tone service corresponds to the CIG identified as CIG_3 (such as CIG 3). Currently, music is being played through the left and right earplugs of the TWS headset, and the mobile phone receives text messages. At this time, the mobile phone can confirm that the prompt tone service is started. The mobile phone can not activate the CIG3 corresponding to the prompt tone service, but superimpose the SMS prompt tone and the currently playing music, and then transmit it to the left and right earplugs of the TWS headset through CIS 1_1 and CIS 1_2 in CIG1. However, when the mobile phone is currently connected to the TWS headset, but no audio service is being performed, when the mobile phone receives a text message, the mobile phone can activate the CIG3 corresponding to the prompt tone service to transmit the corresponding audio data.
可以看到的是,在本申请实施例中,通过在音频业务开启之前,完成对应该音频业务的CIG参数的配置,以及CIG中的所有CIS的建立。但不激活该CIG中的所有CIS。在该音频业务开启时,只需通过对应条数(该条数与CIG中的CIS的数量相同)的空口信令将该CIG中的所有CIS激活,便可以通过该CIG中的所有CIS进行该音频业务的音频数据的传输。这样,有效降低了CIG中所有CIS的建立时延,从而降低了音频数据的传输时延。It can be seen that, in the embodiments of the present application, before the audio service is started, the configuration of the CIG parameters corresponding to the audio service and the establishment of all CISs in the CIG are completed. It does not activate all CIS in the CIG. When the audio service is turned on, all CISs in the CIG can be activated through the air interface signaling of the corresponding number (the number is the same as the number of CISs in the CIG), and then all CISs in the CIG can be used to perform the Audio data transmission for audio services. In this way, the establishment delay of all CIS in CIG is effectively reduced, thereby reducing the transmission delay of audio data.
在本申请另外一些实施例中,手机确定出TWS耳机支持的音频业务,针对支持的每个音频业务,在音频业务开启之前,手机可以在与TWS耳机进行参数协商,确定音频业务对应的CIG参数后,只进行对应CIG参数的配置,而不进行CIG中CIS的建立。其中,参见图7所示,此处所述的不进行CIG中CIS的建立指的是:针对CIG中的每个CIS,手机向TWS耳机的耳塞发送空口请求消息LL_CIS_REQ,以向TWS耳机的耳塞请求创建CIS,TWS耳机的耳塞接收到该空口请求消息后,可以在确定接受CIS创建请求后,向手机发送空口响应消息LL_CIS_RSP。手机在接收到该空口响应消息后,暂时不向TWS耳机的耳塞回复空口通知消息LL_CIS_IND。而是在音频业务开启时,手机向TWS耳机的耳塞发送空口通知消息LL_CIS_IND,以通知TWS耳机的耳塞CIS完成建立。之后,手机与TWS耳机的耳塞之间便可通过CIG中的CIS进行音频数据的传输。这样一来,也可以降低CIG中所有CIS的建立时延,从而降低音频数据的传输时延。In some other embodiments of the present application, the mobile phone determines the audio service supported by the TWS headset. For each audio service supported, before the audio service is started, the mobile phone can negotiate parameters with the TWS headset to determine the CIG parameters corresponding to the audio service After that, only the configuration of the corresponding CIG parameters is performed, and the establishment of the CIS in the CIG is not performed. Among them, referring to FIG. 7, the non-establishment of CIS in CIG mentioned here refers to: for each CIS in CIG, the mobile phone sends an air interface request message LL_CIS_REQ to the earplug of the TWS headset to send the earplug to the TWS headset Request to create a CIS. After receiving the air interface request message, the earplug of the TWS headset can send an air interface response message LL_CIS_RSP to the mobile phone after determining to accept the CIS creation request. After receiving the air interface response message, the mobile phone does not reply the air interface notification message LL_CIS_IND to the earplugs of the TWS headset. Instead, when the audio service is turned on, the mobile phone sends an air interface notification message LL_CIS_IND to the earplug of the TWS headset to notify the earplug of the TWS headset that the CIS has been established. After that, the audio data can be transmitted between the mobile phone and the earplugs of the TWS headset through the CIS in the CIG. In this way, the establishment delay of all CISs in the CIG can also be reduced, thereby reducing the transmission delay of audio data.
本申请另外一些实施例提供一种蓝牙装置,该蓝牙装置可以应用于上述电子设备,如手机。如图12所示,该蓝牙装置可以包括:链路建立模块1201,应用识别模块1202,数据通路建立模块1203以及数据通路激活模块1204。Other embodiments of the present application provide a Bluetooth device, which can be applied to the above-mentioned electronic equipment, such as a mobile phone. As shown in FIG. 12, the Bluetooth device may include: a link establishment module 1201, an application identification module 1202, a data path establishment module 1203, and a data path activation module 1204.
其中,该链路建立模块1201可以用于与外围设备,如TWS耳机的左右耳塞建立ACL链路。如用于执行上述实施例中的S802。The link establishment module 1201 may be used to establish an ACL link with peripheral devices, such as the left and right earplugs of a TWS headset. As used to execute S802 in the above embodiment.
应用识别模块1202可以用于获取TWS耳机的左右耳塞支持的音频业务。如用于执行上述实施例中的S803。该应用识别模块1202还可以用于与TWS耳机的左右耳塞进行参数的协商,以便获得能够适配音频业务的CIG参数。如用于执行上述实施例中的S804。该应用识别模块1202还可以用于建立TWS耳机的左右耳塞支持的音频业务 与CIG的对应关系,如上述实施例中的表1或表2所示的对应关系。The application identification module 1202 may be used to obtain audio services supported by the left and right earplugs of the TWS headset. As used to execute S803 in the above embodiment. The application identification module 1202 can also be used to negotiate parameters with the left and right earplugs of the TWS headset to obtain CIG parameters that can be adapted to the audio service. As used to execute S804 in the above embodiment. The application identification module 1202 can also be used to establish the correspondence between the audio services supported by the left and right earbuds of the TWS headset and the CIG, as shown in Table 1 or Table 2 in the above embodiment.
数据通路建立模块1203可以用于进行CIG参数的配置,以及与TWS耳机的左右耳塞根据配置的CIG参数进行CIG中的CIS的建立。如用于执行上述实施例中的S805。其中,该CIG中的CIS均未激活。The data path establishment module 1203 can be used to configure CIG parameters, and establish the CIS in the CIG according to the configured CIG parameters with the left and right earplugs of the TWS earphone. As used to execute S805 in the above embodiment. Among them, the CIS in the CIG is not activated.
数据通路激活模块1204可以用于在音频业务开启时,激活该音频业务对应的CIG中的CIS。如用于执行上述实施例中的S806。数据通路激活模块1204还可以用于向TWS耳机的左右耳塞发送激活指令,以便TWS耳机的左右耳塞激活对应CIG中的CIS。The data path activation module 1204 may be used to activate the CIS in the CIG corresponding to the audio service when the audio service is turned on. As used to execute S806 in the above embodiment. The data path activation module 1204 may also be used to send activation instructions to the left and right earplugs of the TWS headset so that the left and right earplugs of the TWS headset activate the CIS in the corresponding CIG.
需要说明的是,在本实施例中,对于链路建立模块1201,应用识别模块1202,数据通路建立模块1203以及数据通路激活模块1204的具体描述可以参数上述实施例中对应内容的具体描述,此处不再详细赘述。另外,作为一种示例,该链路建立模块1201可以为上述图4所示的实施例中的无线通信模块160。应用识别模块1202,数据通路建立模块1203,以及数据通路激活模块1204分别可以是集成了上述图4所示的实施例的无线通信模块160和处理器110的对应功能的模块。It should be noted that, in this embodiment, for the link establishment module 1201, the application identification module 1202, the data path establishment module 1203, and the data path activation module 1204, specific descriptions can be parameters specific descriptions of the corresponding content in the above embodiments, this I won’t go into details here. In addition, as an example, the link establishment module 1201 may be the wireless communication module 160 in the embodiment shown in FIG. 4 described above. The application identification module 1202, the data path establishment module 1203, and the data path activation module 1204 may be modules that integrate corresponding functions of the wireless communication module 160 and the processor 110 of the embodiment shown in FIG. 4 described above.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly 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 practical applications, the above-mentioned functions can be allocated as needed Completed by different functional modules, that is, dividing the internal structure of the device 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盘、移动硬盘、ROM、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 various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因 此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only the specific implementation of this application, but the scope of protection of this application is not limited to this, any change or replacement within the technical scope disclosed in this application should be 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 (22)

  1. 一种数据信道的建立方法,其特征在于,应用于第一电子设备,所述方法包括:A method for establishing a data channel is characterized by being applied to a first electronic device. The method includes:
    所述第一电子设备获取第二电子设备支持的音频业务;The first electronic device obtains the audio service supported by the second electronic device;
    所述第一电子设备确定所述音频业务对应的基于连接的等时流组CIG的CIG参数;The first electronic device determines CIG parameters of the connection-based isochronous stream group CIG corresponding to the audio service;
    所述第一电子设备配置CIG参数,根据配置的所述CIG参数建立所述CIG中的基于连接的等时音频流CIS,所述CIG中的CIS未激活;The first electronic device configures CIG parameters, and establishes a connection-based isochronous audio stream CIS in the CIG according to the configured CIG parameters, and the CIS in the CIG is not activated;
    在所述音频业务开启时,所述第一电子设备激活所述CIG中的CIS;When the audio service is turned on, the first electronic device activates the CIS in the CIG;
    所述第一电子设备向所述第二电子设备发送激活指令,所述激活指令用于指示所述第二电子设备激活所述CIG中的CIS;The first electronic device sends an activation instruction to the second electronic device, where the activation instruction is used to instruct the second electronic device to activate the CIS in the CIG;
    所述第一电子设备通过所述CIG中的CIS与所述第二电子设备传输音频数据。The first electronic device transmits audio data with the second electronic device through the CIS in the CIG.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在所述音频业务结束时,所述第一电子设备去激活所述CIG中的CIS;At the end of the audio service, the first electronic device deactivates the CIS in the CIG;
    所述第一电子设备向所述第二电子设备发送去激活指令,所述去激活指令用于指示所述第二电子设备去激活所述CIG中的CIS;The first electronic device sends a deactivation instruction to the second electronic device, where the deactivation instruction is used to instruct the second electronic device to deactivate the CIS in the CIG;
    所述第一电子设备停止通过所述CIG中的CIS与所述第二电子设备传输音频数据。The first electronic device stops transmitting audio data with the second electronic device through the CIS in the CIG.
  3. 根据权利要求1或2所述的方法,其特征在于,在所述第一电子设备获取第二电子设备支持的音频业务之前,还包括:The method according to claim 1 or 2, wherein before the first electronic device obtains the audio service supported by the second electronic device, the method further comprises:
    所述第一电子设备实施与所述第二电子设备的配对操作;The first electronic device performs a pairing operation with the second electronic device;
    所述第一电子设备实施与所述第二电子设备建立异步面向连接ACL链路的操作;The first electronic device implements an operation of establishing an asynchronous connection-oriented ACL link with the second electronic device;
    所述第一电子设备获取第二电子设备支持的音频业务,包括:所述第一电子设备实施与所述第二电子设备通过所述ACL链路协商业务场景的操作,所述第一电子设备根据业务场景协商结果确定所述第二电子设备支持的音频业务;Acquiring audio services supported by the second electronic device by the first electronic device includes: the first electronic device implementing an operation to negotiate a business scenario with the second electronic device through the ACL link, the first electronic device Determine the audio service supported by the second electronic device according to the business scene negotiation result;
    所述第一电子设备确定所述音频业务对应的基于连接的等时流组CIG的CIG参数,包括:所述第一电子设备实施与所述第二电子设备通过所述ACL链路协商参数的操作,所述第一电子设备根据参数协商结果确定所述音频业务对应的CIG的CIG参数。The first electronic device determining the CIG parameters of the connection-based isochronous stream group CIG corresponding to the audio service includes: the first electronic device implementing a parameter negotiation with the second electronic device through the ACL link In operation, the first electronic device determines CIG parameters of the CIG corresponding to the audio service according to the parameter negotiation result.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一电子设备中设置有所述CIG的状态机;The method according to any one of claims 1 to 3, wherein the CIG state machine is provided in the first electronic device;
    在所述第一电子设备与所述第二电子设备建立了所述CIG中的CIS后,所述CIG的状态机为第一状态,所述第一状态用于指示所述CIG中的CIS未激活,不能用于音频数据的传输;After the first electronic device and the second electronic device establish the CIS in the CIG, the state machine of the CIG is the first state, and the first state is used to indicate that the CIS in the CIG has not Activation, can not be used for audio data transmission;
    所述第一电子设备激活所述CIG中的CIS,包括:所述第一电子设备将所述CIG的状态机由所述第一状态切换为第二状态,所述第二状态用于指示所述CIG中的CIS被激活,能够用于音频数据的传输。Activating the CIS in the CIG by the first electronic device includes: the first electronic device switches the state machine of the CIG from the first state to a second state, and the second state is used to indicate The CIS in the CIG is activated and can be used for audio data transmission.
  5. 根据权利要求4所述的方法,其特征在于,所述第一电子设备去激活所述CIG中的CIS,包括:The method according to claim 4, wherein the deactivation of the CIS in the CIG by the first electronic device includes:
    所述第一电子设备将所述CIG的状态机由所述第二状态切换为所述第一状态。The first electronic device switches the state machine of the CIG from the second state to the first state.
  6. 根据权利要求4或5所述的方法,其特征在于,所述第一状态为打开open状态,所述第二状态为音频流streaming状态。The method according to claim 4 or 5, wherein the first state is an open state, and the second state is an audio stream streaming state.
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,The method according to any one of claims 1-6, characterized in that
    所述方法还包括:所述第一电子设备建立所述音频业务与所述CIG的对应关系;The method further includes: the first electronic device establishing a correspondence between the audio service and the CIG;
    所述在所述音频业务开启时,所述第一电子设备激活所述CIG中的CIS,包括:在所述音频业务开启时,所述第一电子设备根据所述对应关系,激活所述音频业务对应的所述CIG中的CIS。The activation of the CIS in the CIG by the first electronic device when the audio service is turned on includes: when the audio service is turned on, the first electronic device activates the audio according to the corresponding relationship The CIS in the CIG corresponding to the business.
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述CIG参数包括以下至少一项:服务质量QoS参数、编码codec参数、CIS参数,所述CIS参数为用于所述第一电子设备与所述第二电子设备数据收发的传输参数。The method according to any one of claims 1-7, wherein the CIG parameters include at least one of the following: quality of service QoS parameters, coding codec parameters, CIS parameters, and the CIS parameters are used for the Transmission parameters for data transmission and reception between the first electronic device and the second electronic device.
  9. 一种数据信道的建立方法,其特征在于,应用于第二电子设备,所述方法包括:A method for establishing a data channel is characterized in that it is applied to a second electronic device, and the method includes:
    所述第二电子设备建立基于连接的等时流组CIG中的基于连接的等时音频流CIS,所述CIG与所述第二电子设备支持的音频业务对应,所述CIG中的CIS未激活;The second electronic device establishes a connection-based isochronous stream group-based connection-based isochronous audio stream CIS, the CIG corresponds to an audio service supported by the second electronic device, and the CIS in the CIG is not activated ;
    所述第二电子设备接收第一电子设备发送的激活指令;The second electronic device receives the activation instruction sent by the first electronic device;
    响应于所述激活指令,所述第二电子设备激活所述CIG中的CIS;In response to the activation instruction, the second electronic device activates the CIS in the CIG;
    所述第二电子设备通过所述CIG中的CIS与所述第一电子设备传输音频数据。The second electronic device transmits audio data with the first electronic device through the CIS in the CIG.
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method according to claim 9, wherein the method further comprises:
    所述第二电子设备接收所述第一电子设备发送的去激活指令;The second electronic device receives the deactivation instruction sent by the first electronic device;
    响应于所述去激活指令,所述第二电子设备去激活所述CIG中的CIS;In response to the deactivation instruction, the second electronic device deactivates the CIS in the CIG;
    所述第二电子设备停止通过所述CIG中的CIS与所述第一电子设备传输音频数据。The second electronic device stops transmitting audio data with the first electronic device through the CIS in the CIG.
  11. 根据权利要求9或10所述的方法,其特征在于,在所述第二电子设备建立基于连接的等时流组CIG中的基于连接的等时音频流CIS之前,还包括:The method according to claim 9 or 10, wherein before the second electronic device establishes the connection-based isochronous audio stream CIS in the connection-based isochronous stream group CIG, further comprising:
    所述第二电子设备实施与所述第一电子设备的配对操作;The second electronic device performs a pairing operation with the first electronic device;
    所述第二电子设备实施与所述第一电子设备建立异步面向连接ACL链路的操作;The second electronic device implements an operation of establishing an asynchronous connection-oriented ACL link with the first electronic device;
    所述第二电子设备实施与所述第一电子设备通过所述ACL链路协商业务场景的操作,所述协商业务场景的操作用于所述第一电子设备确定所述第二电子设备支持的音频业务;The second electronic device implements an operation of negotiating a business scenario with the first electronic device through the ACL link, and the operation of negotiating the business scenario is used by the first electronic device to determine what the second electronic device supports Audio service
    所述第二电子设备实施与所述第一电子设备通过所述ACL链路协商参数的操作,所述协商参数的操作用于所述第一电子设备确定所述音频业务对应的CIG的CIG参数,所述CIG参数用于建立所述CIG中的CIS。The second electronic device implements an operation of negotiating parameters with the first electronic device through the ACL link, and the operation of negotiating parameters is used by the first electronic device to determine CIG parameters of the CIG corresponding to the audio service , The CIG parameter is used to establish the CIS in the CIG.
  12. 根据权利要求9-11中任一项所述的方法,其特征在于,所述第二电子设备中设置有所述CIG的状态机;The method according to any one of claims 9 to 11, wherein a state machine of the CIG is provided in the second electronic device;
    在所述第二电子设备与所述第一电子设备建立了所述CIG中的CIS后,所述CIG的状态机为第一状态,所述第一状态用于指示所述CIG中的CIS未激活,不能用于音频数据的传输;After the second electronic device and the first electronic device establish the CIS in the CIG, the state machine of the CIG is the first state, and the first state is used to indicate that the CIS in the CIG is not Activation, can not be used for audio data transmission;
    所述第二电子设备激活所述CIG中的CIS,包括:所述第二电子设备将所述CIG的状态机由所述第一状态切换为第二状态,所述第二状态用于指示所述CIG中的CIS被激活,能够用于音频数据的传输。Activating the CIS in the CIG by the second electronic device includes: the second electronic device switches the state machine of the CIG from the first state to a second state, the second state is used to indicate The CIS in the CIG is activated and can be used for audio data transmission.
  13. 根据权利要求12所述的方法,其特征在于,所述第二电子设备去激活所述CIG中的CIS,包括:The method according to claim 12, wherein the deactivating the CIS in the CIG by the second electronic device includes:
    所述第二电子设备将所述CIG的状态机由所述第二状态切换为所述第一状态。The second electronic device switches the state machine of the CIG from the second state to the first state.
  14. 根据权利要求12或13所述的方法,其特征在于,所述第一状态为打开open 状态,所述第二状态为音频流streaming状态。The method according to claim 12 or 13, wherein the first state is an open state, and the second state is an audio stream streaming state.
  15. 根据权利要求11所述的方法,其特征在于,所述CIG参数包括以下至少一项:服务质量QoS参数、编码codec参数、CIS参数,所述CIS参数为用于所述第一电子设备与所述第二电子设备数据收发的传输参数。The method according to claim 11, wherein the CIG parameters include at least one of the following: quality of service QoS parameters, coded codec parameters, CIS parameters, and the CIS parameters are used for the first electronic device and all The transmission parameters for data transmission and reception of the second electronic device.
  16. 一种数据信道的建立方法,其特征在于,应用于第一电子设备,所述方法包括:A method for establishing a data channel is characterized by being applied to a first electronic device. The method includes:
    所述第一电子设备获取第二电子设备支持的音频业务;The first electronic device obtains the audio service supported by the second electronic device;
    所述第一电子设备确定所述音频业务对应的基于连接的等时流组CIG的CIG参数,所述CIG参数用于建立所述CIG中的基于连接的等时音频流CIS;The first electronic device determines CIG parameters of a connection-based isochronous stream group CIG corresponding to the audio service, and the CIG parameters are used to establish a connection-based isochronous audio stream CIS in the CIG;
    所述第一电子设备配置CIG参数,根据配置的所述CIG参数向所述第二电子设备发送CIS建立请求消息;The first electronic device configures CIG parameters, and sends a CIS establishment request message to the second electronic device according to the configured CIG parameters;
    所述第一电子设备接收所述第二电子设备发送的CIS建立响应消息;The first electronic device receives a CIS establishment response message sent by the second electronic device;
    在所述音频业务开启时,所述第一电子设备向所述第二电子设备发送CIS建立消息,所述CIS建立消息用于与所述第二电子设备建立所述CIG中的CIS;When the audio service is turned on, the first electronic device sends a CIS establishment message to the second electronic device, and the CIS establishment message is used to establish a CIS in the CIG with the second electronic device;
    所述第一电子设备通过所述CIG中的CIS与所述第二电子设备传输音频数据。The first electronic device transmits audio data with the second electronic device through the CIS in the CIG.
  17. 根据权利要求16所述的方法,其特征在于,在所述第一电子设备获取第二电子设备支持的音频业务之前,还包括:The method of claim 16, before the first electronic device obtains an audio service supported by a second electronic device, further comprising:
    所述第一电子设备实施与所述第二电子设备的配对操作;The first electronic device performs a pairing operation with the second electronic device;
    所述第一电子设备实施与所述第二电子设备建立异步面向连接ACL链路的操作;The first electronic device implements an operation of establishing an asynchronous connection-oriented ACL link with the second electronic device;
    所述第一电子设备获取第二电子设备支持的音频业务,包括:所述第一电子设备实施与所述第二电子设备通过所述ACL链路协商业务场景的操作,所述第一电子设备根据业务场景协商结果确定所述第二电子设备支持的音频业务;Acquiring audio services supported by the second electronic device by the first electronic device includes: the first electronic device implementing an operation to negotiate a business scenario with the second electronic device through the ACL link, the first electronic device Determine the audio service supported by the second electronic device according to the business scene negotiation result;
    所述第一电子设备确定所述音频业务对应的基于连接的等时流组CIG的CIG参数,包括:所述第一电子设备实施与所述第二电子设备通过所述ACL链路协商参数的操作,所述第一电子设备根据参数协商结果确定所述音频业务对应的CIG的CIG参数。The first electronic device determining the CIG parameters of the connection-based isochronous stream group CIG corresponding to the audio service includes: the first electronic device implementing a parameter negotiation with the second electronic device through the ACL link In operation, the first electronic device determines CIG parameters of the CIG corresponding to the audio service according to the parameter negotiation result.
  18. 一种电子设备,其特征在于,包括:一个或多个处理器、存储器、无线通信模块以及移动通信模块;An electronic device, characterized in that it includes: one or more processors, a memory, a wireless communication module, and a mobile communication module;
    所述存储器、所述无线通信模块以及所述移动通信模块与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求1-8、16-17中任一项所述的数据信道的建立方法。The memory, the wireless communication module, and the mobile communication module are coupled to the one or more processors. The memory is used to store computer program code. The computer program code includes computer instructions. When the one or When multiple processors execute the computer instructions, the electronic device executes the method for establishing a data channel according to any one of claims 1-8 and 16-17.
  19. 一种电子设备,其特征在于,包括:一个或多个处理器、存储器、无线通信模块、受话器以及麦克风;An electronic device, characterized in that it includes: one or more processors, a memory, a wireless communication module, a receiver, and a microphone;
    所述存储器、所述无线通信模块、所述受话器以及所述麦克风与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求9-15中任一项所述的数据信道的建立方法。The memory, the wireless communication module, the receiver, and the microphone are coupled to the processor, and the memory is used to store computer program code, where the computer program code includes computer instructions, when the one or more When the processor executes the computer instruction, the electronic device executes the method for establishing a data channel according to any one of claims 9-15.
  20. 一种蓝牙系统,其特征在于,所述蓝牙系统包括:A Bluetooth system, characterized in that the Bluetooth system includes:
    如权利要求18所述的电子设备,以及如权利要求19所述的电子设备。The electronic device according to claim 18, and the electronic device according to claim 19.
  21. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-8、16-17中任一项所述的数据信道的建立方法。A computer storage medium, comprising computer instructions, which when executed on an electronic device, causes the electronic device to execute the data according to any one of claims 1-8, 16-17 Channel establishment method.
  22. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求9-15中任一项所述的数据信道的建立方法。A computer storage medium, comprising computer instructions, which when executed on an electronic device, causes the electronic device to perform the method for establishing a data channel according to any one of claims 9-15 .
PCT/CN2018/121774 2018-12-18 2018-12-18 Method and device for establishing data channels WO2020124371A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201880099602.3A CN113039822B (en) 2018-12-18 2018-12-18 Method and equipment for establishing data channel
PCT/CN2018/121774 WO2020124371A1 (en) 2018-12-18 2018-12-18 Method and device for establishing data channels
CN202211077887.5A CN115643554A (en) 2018-12-18 2018-12-18 Method and equipment for establishing data channel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/121774 WO2020124371A1 (en) 2018-12-18 2018-12-18 Method and device for establishing data channels

Publications (1)

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

Family

ID=71102375

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/121774 WO2020124371A1 (en) 2018-12-18 2018-12-18 Method and device for establishing data channels

Country Status (2)

Country Link
CN (2) CN115643554A (en)
WO (1) WO2020124371A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022206270A1 (en) * 2021-04-01 2022-10-06 Oppo广东移动通信有限公司 Device addition method and apparatus, bluetooth chip, and device

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115701724A (en) * 2021-08-02 2023-02-10 华为技术有限公司 Method, electronic device and system for device connection
CN114945208A (en) * 2022-04-30 2022-08-26 恒玄科技(上海)股份有限公司 Method and system for reducing power consumption and earphone pair
KR20240019486A (en) * 2022-08-04 2024-02-14 삼성전자주식회사 Electronic device, method, and non-transitory computer readable storage medium for audio streaming in wireless environment
CN115348548A (en) * 2022-08-11 2022-11-15 无锡中感微电子股份有限公司 Audio broadcasting method, device, system, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105406923A (en) * 2015-12-28 2016-03-16 惠州Tcl移动通信有限公司 Bluetooth interconnection method and system for mobile terminal
US20160366263A1 (en) * 2015-06-09 2016-12-15 Lg Electronics Inc. Method and device for transmitting or receiving data in wireless communication system
US20170303076A1 (en) * 2016-04-14 2017-10-19 Lg Electronics Inc. Method and apparatus for transmitting or receiving data using bluetooth in wireless communication system
CN107493595A (en) * 2017-08-23 2017-12-19 北京中电华大电子设计有限责任公司 A kind of low-power consumption safety certification device and control method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016003064A1 (en) * 2014-07-03 2016-01-07 엘지전자(주) Method for transmitting and receiving audio data in wireless communication system supporting bluetooth communication and device therefor
US9544718B2 (en) * 2014-09-11 2017-01-10 Lg Electronics Inc. Method and apparatus for transmitting and receiving audio stream in wireless communication system
US9716969B2 (en) * 2015-07-01 2017-07-25 Lg Electronics Inc. Method and apparatus for controlling device in wireless communication system
US9930477B2 (en) * 2015-12-10 2018-03-27 Lg Electronics Inc. Method and apparatus for transmitting and receiving data in wireless communication system
KR102340127B1 (en) * 2017-03-24 2021-12-16 삼성전자주식회사 Method and electronic apparatus for transmitting audio data to a plurality of external devices
CN108966197A (en) * 2018-08-20 2018-12-07 南昌黑鲨科技有限公司 Audio frequency transmission method, system, audio-frequence player device and computer readable storage medium based on bluetooth

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160366263A1 (en) * 2015-06-09 2016-12-15 Lg Electronics Inc. Method and device for transmitting or receiving data in wireless communication system
CN105406923A (en) * 2015-12-28 2016-03-16 惠州Tcl移动通信有限公司 Bluetooth interconnection method and system for mobile terminal
US20170303076A1 (en) * 2016-04-14 2017-10-19 Lg Electronics Inc. Method and apparatus for transmitting or receiving data using bluetooth in wireless communication system
CN107493595A (en) * 2017-08-23 2017-12-19 北京中电华大电子设计有限责任公司 A kind of low-power consumption safety certification device and control method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AUDIO VIDEO WG: "AUDIO/VIDEO DISTRIBUTION TRANSPORT PROTOCOL SPECIFICATION", BLUETOOTH SPECIFICATION, 24 July 2012 (2012-07-24) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022206270A1 (en) * 2021-04-01 2022-10-06 Oppo广东移动通信有限公司 Device addition method and apparatus, bluetooth chip, and device

Also Published As

Publication number Publication date
CN113039822A (en) 2021-06-25
CN115643554A (en) 2023-01-24
CN113039822B (en) 2022-09-09

Similar Documents

Publication Publication Date Title
US11805350B2 (en) Point-to-multipoint data transmission method and device
WO2020133183A1 (en) Audio data synchronization method and device
US11653398B2 (en) Bluetooth connection method and device
US11778363B2 (en) Audio data transmission method applied to switching between single-earbud mode and double-earbud mode of TWS headset and device
CN114915880B (en) Point-to-multipoint data transmission method and electronic equipment
CN112313929B (en) Method for automatically switching Bluetooth audio coding modes and electronic equipment
WO2020124611A1 (en) Rate control method and device
WO2020124610A1 (en) Transmission speed control method and device
WO2020124371A1 (en) Method and device for establishing data channels
WO2020124581A1 (en) Audio data transmission method and electronic device
WO2021082829A1 (en) Bluetooth connection method and related apparatus
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
WO2021017909A1 (en) Method, electronic device and system for realizing functions through nfc tag
WO2020113587A1 (en) Method, device and system for calling using bluetooth earpiece
WO2021013196A1 (en) Simultaneous response method and device
WO2022135303A1 (en) Tws earphone connection method and device
CN115665670A (en) Wireless audio system, audio communication method and equipment
WO2020118641A1 (en) Microphone (mic) switching method and device
WO2020132907A1 (en) Communication method for audio data, and electronic device
WO2021043250A1 (en) Bluetooth communication method, and related device
CN113678481B (en) Wireless audio system, audio communication method and equipment
WO2022095581A1 (en) Data transmission method and terminal device

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: 18943870

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: 18943870

Country of ref document: EP

Kind code of ref document: A1