WO2020124581A1 - Procédé de transmission de données audio et dispositif électronique - Google Patents

Procédé de transmission de données audio et dispositif électronique Download PDF

Info

Publication number
WO2020124581A1
WO2020124581A1 PCT/CN2018/122774 CN2018122774W WO2020124581A1 WO 2020124581 A1 WO2020124581 A1 WO 2020124581A1 CN 2018122774 W CN2018122774 W CN 2018122774W WO 2020124581 A1 WO2020124581 A1 WO 2020124581A1
Authority
WO
WIPO (PCT)
Prior art keywords
earplug
audio data
data packet
electronic device
received
Prior art date
Application number
PCT/CN2018/122774
Other languages
English (en)
Chinese (zh)
Inventor
倪观军
朱宇洪
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/122774 priority Critical patent/WO2020124581A1/fr
Priority to CN201880093055.8A priority patent/CN112042212B/zh
Publication of WO2020124581A1 publication Critical patent/WO2020124581A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • the embodiments of the present application relate to the technical field of short-distance communication, and in particular, to an audio data transmission method and an electronic device.
  • TWS earphones include two headphone bodies, such as left earphones (also called left earbuds) and right earphones (such as right earbuds), and no wire connection is needed between the left and right earbuds .
  • the left and right earplugs of the TWS headset can be used as an audio input/output device for mobile phones to achieve functions such as music playback or voice communication.
  • one earplug of the TWS earphone can be used as the main earplug to establish a wireless connection (such as a Bluetooth connection) with the mobile phone.
  • a wireless connection such as a Bluetooth connection
  • the secondary earbud can obtain the audio data packet sent by the mobile phone according to the wireless Bluetooth connection parameters.
  • the left and right earplugs of the TWS headset can obtain audio data packets from the mobile phone.
  • the signal quality of the audio data packet received by the primary earbud is different from the signal quality of the audio data packet acquired by the secondary earbud.
  • the signal quality of the primary and secondary earplugs differs greatly, it may cause one earplug to receive audio data packets correctly, while the other earplug cannot receive audio data packets correctly.
  • the embodiments of the present application provide an audio data transmission method and an electronic device, which can improve the possibility that the two earplugs of the TWS earphone correctly receive audio data packets during the audio data transmission between the electronic device and the TWS earphone, and improve the efficiency of audio data transmission .
  • an embodiment of the present application provides an audio data transmission method.
  • the method may include: the first earplug as the primary earplug may establish a first Bluetooth connection with the electronic device, and the first earplug as the primary earplug may establish a second Bluetooth connection with the second earplug as the secondary earplug.
  • the main and auxiliary earplugs can use the monitoring method to transmit audio data.
  • the first earplug as the main earplug sends the connection parameter of the first Bluetooth connection to the second earplug as the secondary earplug through the second Bluetooth connection.
  • the second earplug can obtain the audio data packet sent by the electronic device according to the connection parameter.
  • both earplugs can obtain audio data packets from the electronic device.
  • the first earplug and the second earplug are two earplugs of the TWS earphone.
  • the first earplug as the primary earplug may instruct the second earplug as the secondary earplug to stop acquiring the electronic device according to the connection parameter when the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold Audio packets.
  • the main earplugs in the first earplug and the second earplug forward the audio data packets received from the electronic device to the secondary earplugs. That is, when the signal quality of the audio data packets received by the left and right earplugs of the TWS headset differs greatly, the left and right earplugs can switch the transmission mode from the monitoring mode to the forwarding mode.
  • the first earplug as the main earplug establishes a first Bluetooth connection with the electronic device, including: the first earplug as the main earplug and the electronic device establish an asynchronous connection-oriented connection under the first protocol (asynchronous connection-oriented link, ACL) link, establish a synchronous connection-oriented/extended SCO (SCO/eSCO) link under the second protocol; the SCO/eSCO link is used For transmitting audio data, the ACL link is used to transmit control commands.
  • ACL asynchronous connection-oriented link
  • SCO/eSCO synchronous connection-oriented/extended SCO
  • the first earplug as the main earplug and the electronic device establish an ACL link under the first protocol, and establish an isochronous (ISO) channel under the second protocol; the ISO channel is used to transmit audio data, and the ACL link is used to transmit control commands.
  • ISO isochronous
  • the first earplug determines that the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold, which may specifically include: the first earplug determines that the first earplug receives audio The signal quality of the data packet is higher than the signal quality of the audio data packet received by the second earbud, and the difference between the signal quality of the audio data packet received by the first earbud and the signal quality of the audio data packet received by the second earbud is greater than the first difference threshold.
  • the first earbud determines that the difference in signal quality of the audio data packets received by the primary and secondary earbuds is greater than a preset difference threshold, which may specifically include: the first earbud determines that the first earbud receives The signal quality of the audio data packet is higher than the first quality threshold, and the signal quality of the audio data packet received by the second earplug is lower than the second quality threshold; wherein, the first quality threshold is higher than the second quality threshold.
  • the first earbud can still be used as the main Earplugs, the second earplug as a pair of earplugs. That is, the main and auxiliary earplugs will not exchange roles.
  • the primary earbud can notify the secondary earbud to stop listening to the data packet, but the primary earbud forwards the data packet to the secondary earbud. That is, the primary and secondary earplugs can switch the transmission mode of the audio data packet from the monitoring mode to the forwarding mode.
  • the level of the signal quality of the audio data packets received by the primary and secondary earplugs can be reflected by the level of the packet error rate (PER) of the primary and secondary earplugs to the audio data packets.
  • PER packet error rate
  • the lower the packet error rate the higher the signal quality of the received audio data packet.
  • the higher the packet error rate the lower the signal quality of the received audio packets.
  • the signal quality of the audio data packets received by the main earbuds is higher than that of the audio data packets received by the secondary earbuds, and the signal quality of the audio data packets received by the primary and secondary earbuds varies greatly.
  • the above-mentioned first earplug instructs the second earplug to stop acquiring the audio data packet sent by the electronic device according to the connection parameter, and the main earplug in the first earplug and the second earplug forwards the received data from the electronic device to the secondary earplug.
  • the audio data packet may include: the first earplug sends a first switching request to the second earplug through the second Bluetooth connection, the first switching request is used to instruct the second earplug to stop acquiring the audio data packet sent by the electronic device according to the connection parameter; One earplug forwards the audio data packet received from the electronic device to the second earplug.
  • the primary earplug receives the audio data packet and forwards the audio data to the secondary earplug Packets will cause forwarding delay.
  • the secondary earplugs may request the primary earplugs to transmit the audio data packets when the signal quality of the audio data packets received by the secondary earplugs is high The mode is switched from forwarding mode to monitoring mode.
  • the method in the embodiment of the present application may further include: the second earplug receives the first earplug through the second An audio data packet forwarded by a Bluetooth connection.
  • the audio data packet forwarded by the first earplug includes a frequency point at which the electronic device sends the audio data packet; the second earplug receives the audio data packet in the time slot of the first earplug and the electronic device sends the audio data packet Frequency point, estimate the quality parameter of the received audio data packet of the second earplug; the quality parameter of the received audio data packet includes: at least one of the received signal power and the signal-to-noise ratio of the received audio data packet; Set the power threshold, and/or, when the received signal power is greater than the preset power threshold, the second earplug acquires the audio data packet sent by the electronic device according to the connection parameter, and instructs the first earplug to stop forwarding the audio received from the electronic device to the second earplug data pack.
  • the above connection parameter includes a time slot for the first earplug to receive the audio data packet.
  • the time slot for the main earbud to receive the audio data packet determines the time-domain resource for the electronic device to send the audio data packet to the main earbud, and the frequency of the signal sent by the electronic device determines the frequency-domain resource for the electronic device to send the audio data packet to the main earbud.
  • the second earplug as the secondary earplug can determine when and in which frequency-domain resource the audio data packet is sent by the electronic device.
  • the first earbud determines that the difference in signal quality of the audio data packets received by the primary and secondary earbuds is greater than a preset difference threshold, which may specifically include: the first earbud determines that the second earbud receives The signal quality of the audio data packet is higher than the signal quality of the audio data packet received by the first earbud, and the difference between the signal quality of the audio data packet received by the second earbud and the signal quality of the audio data packet received by the first earbud is greater than the first difference threshold.
  • the first earbud determines that the difference in signal quality of the audio data packets received by the primary and secondary earbuds is greater than a preset difference threshold, which may specifically include: the first earbud determines that the second earbud receives The signal quality of the audio data packet is higher than the first quality threshold, and the signal quality of the audio data packet received by the first earbud is lower than the second quality threshold; wherein, the first quality threshold is higher than the second quality threshold.
  • the primary and secondary earplugs can exchange roles.
  • the second earplug plays the role of the primary earplug, and the first earplug serves as the secondary earplug.
  • the primary and secondary earplugs can switch the transmission mode of the audio data packet from the monitoring mode to the forwarding mode.
  • the method in the embodiment of the present application may further include:
  • the first earplug requests the electronic device to stop transmitting audio data packets through the first Bluetooth connection.
  • the first earplug may request the electronic device to stop transmitting audio data (ie, audio data packets) to the TWS headset through the SCO/eSCO link established under the second protocol.
  • the above-mentioned first earplug instructs the second earplug to stop acquiring audio data packets sent by the electronic device according to the connection parameters, and the first earplug and the main earplug in the second earplug forward the audio data packet received from the electronic device to the secondary earplug, Specifically, it may include: the first earplug sends a second switching request to the second earplug.
  • the second switching request is used to instruct the second earplug to stop acquiring audio data packets sent by the electronic device according to the connection parameters.
  • the second switching request is also used to instruct the second earplug to replace the first Bluetooth connection between the first earplug and the electronic device to exchange roles with the first earplug.
  • the second earplug serves as the main earplug
  • the first The earplugs serve as secondary earplugs.
  • the second earplug stops acquiring audio data packets sent by the electronic device according to the connection parameters.
  • the second earplug requests the electronic device to start transmitting audio data packets through the first Bluetooth connection, and the second earplug forwards the audio data packet received from the electronic device to the first earplug.
  • the method of the embodiment of the present application may further include: the first earplug receives The audio data packet forwarded by the second earplug through the second Bluetooth connection.
  • the audio data packet forwarded by the second earplug includes a frequency point at which the electronic device sends the audio data packet.
  • the first earplug receives the audio data packet in the time slot of the second earplug and the frequency of the audio data packet sent by the electronic device, and estimates the quality parameter of the audio data packet received by the first earplug; the connection parameter includes the time slot in which the second earplug receives the audio data packet ;
  • the quality parameters of the received audio data packet include: at least one of the received signal power and the signal-to-noise ratio of the received audio data packet; when the received signal power is greater than the preset power threshold, and/or, the received signal power is greater than the preset power threshold At this time, the first earplug acquires the audio data packet sent by the electronic device according to the connection parameter, and instructs the second earplug to stop forwarding the audio data packet received from the electronic device to the first earplug.
  • inventions of the present application provide an audio data transmission method.
  • the audio data transmission method may include: establishing a first Bluetooth connection between the first earplug as the main earplug and the electronic device, establishing a second Bluetooth connection between the first earplug as the main earplug and the second earplug as the secondary earplug, and the first earplug through the second Bluetooth
  • the connection sends the connection parameters of the first Bluetooth connection to the second earbud; the connection parameters are used by the second earbud to obtain the audio data packet sent by the electronic device; the first earbud receives the audio data packet sent by the electronic device through the first Bluetooth connection; the first The earbud determines that the difference in the signal quality of the audio data packets received by the primary and secondary earbuds is greater than the preset difference threshold; the first earbud instructs the second earbud to stop acquiring audio data packets sent by the electronic device according to the connection parameters.
  • the first earbud and the second earbud The primary earbud forwards the audio data packet received from the electronic device to the secondary earbud.
  • the first earplug and the second earplug are two earplugs of the TWS earphone.
  • the first earplug as the primary earplug may instruct the second earplug as the secondary earplug to stop acquiring the electronic device according to the connection parameter when the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold Audio packets.
  • the main earplugs in the first earplug and the second earplug forward the audio data packets received from the electronic device to the secondary earplugs. That is, when the signal quality of the audio data packets received by the left and right earplugs of the TWS headset differs greatly, the left and right earplugs can switch the transmission mode from the monitoring mode to the forwarding mode.
  • an embodiment of the present application provides an earplug, which is the first earplug of a TWS earphone.
  • the TWS headset also includes a second earplug.
  • the first earplug includes: a processor, a memory, a wireless communication module, a receiver, and a microphone.
  • the memory, the wireless communication module, the receiver, and the microphone are coupled to the processor.
  • the memory is used to store computer program code, and the computer program code includes computer instructions.
  • the processor of the first earplug executes computer instructions stored in the memory of the first earplug
  • the processor when the first earplug serves as the main earplug, establishes a first Bluetooth connection with the electronic device and establishes with the second earplug as the secondary earplug A second Bluetooth connection; a wireless communication module for sending connection parameters of the first Bluetooth connection to the second earbud via the second Bluetooth connection; receiving audio data packets sent by the electronic device through the first Bluetooth connection; connection parameters for the second earbud Obtain audio data packets sent by the electronic device; the processor is also used to determine that the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold; instruct the second earplug to stop acquiring audio data sent by the electronic device according to the connection parameters Packet, the main earplug in the first earplug and the second earplug forwards the audio data packet received from the electronic device to the secondary earplug; the receiver is used to convert the
  • the foregoing processor is configured to determine that a difference in signal quality of audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold, and includes: a processor configured to determine a wireless communication module The signal quality of the received audio data packet is higher than that of the second earbud received audio data packet, and the difference between the signal quality of the wireless communication module received audio data packet and the second earbud received audio data packet is greater than the first difference threshold .
  • the foregoing processor is configured to determine that the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold, including: a processor, configured to determine wireless communication The signal quality of the audio data packet received by the module is higher than the first quality threshold, and the signal quality of the audio data packet received by the second earplug is lower than the second quality threshold; wherein, the first quality threshold is higher than the second quality threshold.
  • the foregoing wireless communication module is further configured to send a first switching request to the second earplug through the second Bluetooth connection, and the first switching request is used to instruct the second earplug to stop according to
  • the connection parameter obtains the audio data packet sent by the electronic device; forwards the audio data packet received from the electronic device to the second earplug.
  • the foregoing processor is configured to determine that the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold, and includes: a processor to determine the second The signal quality of the audio data packet received by the earbud is higher than that of the audio data packet received by the wireless communication module, and the difference between the signal quality of the audio data packet received by the second earbud and the signal quality of the audio data packet received by the wireless communication module is greater than the first difference Threshold.
  • the foregoing processor is configured to determine that the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold, and includes: a processor to determine the second The signal quality of the audio data packet received by the earbud is higher than the first quality threshold, and the signal quality of the audio data packet received by the wireless communication module is lower than the second quality threshold; wherein, the first quality threshold is higher than the second quality threshold.
  • the foregoing wireless communication module is further configured to request the electronic device to stop after the processor determines that the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold Transmitting audio data packets through the first Bluetooth connection; the wireless communication module is also used to send a second switching request to the second earplug after the processor determines that the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold,
  • the second switching request is used to instruct the second earplug to stop acquiring audio data packets sent by the electronic device according to the connection parameters; the second switching request is also used to instruct the second earplug to replace the first Bluetooth connection between the first earplug and the electronic device, to Perform role exchange with the first earplug. After the role exchange, the second earplug serves as the main earplug, and the first earplug serves as the secondary earplug.
  • the above wireless communication module is further used to receive audio data packets forwarded by the second earbuds through the second Bluetooth connection after the roles are exchanged, and audio data forwarded by the second earbuds
  • the packet includes the frequency point at which the electronic device sends the audio data packet;
  • the processor is also used to receive the audio data packet time slot at the second earbud and the frequency point at which the electronic device sends the audio data packet.
  • connection parameters include time slots for receiving audio data packets by the second earbud; quality parameters for receiving audio data packets include: at least one of received signal power and signal-to-noise ratio for receiving audio data packets; the processor is also used for When the received signal power is greater than the preset power threshold, and/or the received signal power is greater than the preset power threshold, obtain audio data packets sent by the electronic device according to the connection parameters, and instruct the second earplug to stop forwarding the received earphone to the first earplug The audio packet of the device.
  • an embodiment of the present application provides a TWS earphone.
  • the TWS earphone includes a first earplug and a second earplug according to the third aspect and any possible design manner thereof.
  • the foregoing second earplug is further configured to receive an audio data packet forwarded by the first earplug through the second Bluetooth connection, and the audio data packet forwarded by the first earplug includes an electronic device to send The frequency of the audio data packet; at the time slot of receiving the audio data packet at the first earbud and the frequency of the audio data packet sent by the electronic device, the quality parameters of the audio data packet received by the second earbud are estimated; the connection parameters include the audio data received by the first earbud The time slot of the packet; the quality parameters of the received audio data packet include: at least one of the received signal power and the signal-to-noise ratio of the received audio data packet; when the received signal power is greater than the preset power threshold, and/or, the received signal power is greater than When the power threshold is preset, the audio data packet sent by the electronic device is obtained according to the connection parameter, and the first earplug is instructed to stop forwarding the audio data packet received from the electronic device to the second
  • an embodiment of the present application provides an electronic device including: a processor, 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, and the memory is used to store Computer program code, the computer program code includes computer instructions; when the processor of the electronic device executes the computer instructions stored in the memory of the electronic device, the processor is used to establish a first Bluetooth connection with the first earbud as the main earbud; wireless communication module For sending an audio data packet to the first earbud via the first Bluetooth connection; wherein, the audio data packet sent by the wireless communication module is acquired by the second earbud according to the connection parameter of the first communication connection; the connection parameter is that the first earbud passes the first The second Bluetooth connection between the earbud and the second earbud is sent to the second earbud; the processor is also used to pass the first earbud when the difference in the signal quality of the audio data packets received by the primary and secondary earbuds
  • the foregoing processor through the first earplug, instructs the second earplug to stop acquiring the audio data packet sent by the electronic device according to the connection parameter, and the master in the first earplug and the second earplug
  • the earplug forwards the audio data packet received from the electronic device to the secondary earplug, including: a processor, configured to send a first switching request to the first earplug, and the first earplug forwards the first switching request to the second earplug. Yu instructs the second earplug to stop acquiring audio data packets sent by the electronic device according to the connection parameters; the first switching request is also used to instruct the first earplug to forward the audio data packet received from the electronic device to the second earplug.
  • the foregoing processor is further used to estimate after the audio data packet received from the electronic device is forwarded from the primary earplug in the first earplug and the second earplug to the secondary earplug
  • the quality parameter of the second earplug for receiving the audio data packet includes: at least one of the received signal power and the signal-to-noise ratio of the received audio data packet
  • the wireless communication module is also used when the received signal power is greater than A preset power threshold, and/or, when the received signal power is greater than the preset power threshold, instruct the second earplug to obtain the audio data packet sent by the electronic device according to the connection parameter, and instruct the first earplug to stop forwarding the received audio device to the second earplug from the electronic device Audio packets.
  • the foregoing wireless communication module is further configured to stop transmission through the first Bluetooth connection after the difference in signal quality of the audio data packets received by the primary and secondary earplugs is greater than a preset difference threshold Audio data packet; the processor instructs the second earplug to stop acquiring the audio data packet sent by the electronic device according to the connection parameters through the first earplug, and forwards the audio received from the electronic device to the secondary earplug by the main earplug in the first earplug and the second earplug
  • the data packet includes a processor for sending a second switching request to the first earplug, and forwarding the second switching request from the first earplug to the second earplug.
  • the second switching request is used to instruct the second earplug to stop acquiring the electronic according to the connection parameter Audio data packet sent by the device; the second switching request is also used to instruct the second earplug to replace the first Bluetooth connection between the first earplug and the electronic device to exchange roles with the first earplug, and the second earplug as the master after the role exchange Earplugs, the first earplug serves as the secondary earplug; the wireless communication module is also used to transmit audio data packets to the second earplug through the first Bluetooth connection after the role exchange, and the second earplug forwards the received data from the wireless communication module to the first earplug Audio packets.
  • the foregoing processor is further configured to estimate that the first earplug receives audio data after forwarding the audio data packet received from the wireless communication module from the second earplug to the first earplug
  • the quality parameter of the packet includes: at least one of the received signal power and the signal-to-noise ratio of the received audio data packet.
  • the wireless communication module is further configured to, when the received signal power is greater than the preset power threshold, and/or the received signal power is greater than the preset power threshold, instruct the first earbud to acquire the audio data packet sent by the electronic device according to the connection parameter, and instruct the first The second earplug stops forwarding the audio data packet received from the electronic device to the first earplug.
  • the foregoing packet error rate of the first earbud for the audio data packet is used to characterize the signal quality of the audio packet received by the first earplug, and the error of the second earplug for the audio data packet
  • the packet rate is used to characterize the signal quality of the audio data packet received by the second earplug; the lower the packet error rate, the higher the signal quality of the received audio data packet; the higher the packet error rate, the lower the signal quality of the received audio data packet.
  • an embodiment of the present application provides a Bluetooth chip, which is used in an earbud of a true wireless stereo TWS headset;
  • the Bluetooth chip includes a memory and a processor, and the memory is used to store computer program code, and the computer program code includes computer instructions ;
  • the processor executes the computer instructions stored in the memory, when the processor is used for the earbud as the main earbud, establish a first Bluetooth connection with the electronic device, and establish a second Bluetooth connection with the secondary earbud; control the antenna of the earbud to the secondary through the second Bluetooth connection
  • the earbuds send connection parameters of the first Bluetooth connection; control the antenna to receive audio data packets sent by the electronic device through the first Bluetooth connection; the connection parameters are used by the secondary earbuds to obtain audio data packets sent by the electronic device; determine that the primary and secondary earbuds receive audio data packets The difference in the signal quality of is greater than the preset difference threshold; instruct the secondary earplug to stop acquiring audio data packets sent by the electronic device according to the connection parameters
  • a Bluetooth communication system may include: an electronic device (such as a mobile phone), and the TWS headset as described in the second aspect above.
  • a computer storage medium including computer instructions.
  • the first earplug is caused to perform the audio data transmission method as in any one of the first aspect or the possible implementation manner of the first aspect.
  • the second earplug is caused to perform the audio data transmission method as in any one of the first aspect or the possible implementation manner of the first aspect.
  • the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to perform any of the audio data transmission methods described above.
  • the earplugs described in the third aspect and any possible design method thereof provided above, the TWS earphones described in the fourth aspect and any possible design method thereof, the fifth aspect and any one of them The electronic device according to a possible design, the Bluetooth chip according to the sixth aspect, the Bluetooth communication system according to the seventh aspect, the computer storage medium according to the eighth aspect, and the computer program product according to the ninth aspect are all For performing the corresponding method provided above, therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding method provided above, which will not be repeated here.
  • FIG. 1A is a schematic diagram of a network architecture of a communication system provided by an embodiment of the present application.
  • FIG. 1B is a schematic diagram of a communication between a mobile phone and a TWS headset through monitoring mode provided by an embodiment of this application;
  • 1C is a schematic diagram of a communication between a mobile phone and a TWS headset in a forwarding manner provided by an embodiment of this application;
  • FIG. 2A is a schematic diagram of an example of a product form of a TWS earphone provided by an embodiment of the present application
  • FIG. 2B is a schematic diagram of an example of a hardware structure 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 hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 4 is a flowchart 1 of an audio data transmission method provided by an embodiment of the present application.
  • FIG. 5 is a second flowchart of an audio data transmission method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram 1 of an example of a processing flow of switching a forwarding mode in an listening mode according to an embodiment of the present application
  • FIG. 7 is a schematic diagram 2 of an example of a processing flow of switching a forwarding mode in an interception mode according to an embodiment of the present application;
  • FIG. 8 is a flowchart 3 of an audio data transmission method according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an example of a processing flow of switching a listening mode by a forwarding mode provided by an embodiment of the present application.
  • the embodiments of the present application provide an audio data transmission method, which can be used for data transmission between an electronic device (such as a mobile phone) and multiple bodies of peripheral devices (such as left and right earplugs of a TWS earphone).
  • an electronic device such as a mobile phone
  • multiple bodies of peripheral devices such as left and right earplugs of a TWS earphone.
  • the aforementioned electronic device may be referred to as a master device (Master, referred to as M), and the aforementioned peripheral device may be referred to as a slave device (Slave, referred to as S).
  • the communication system may include an electronic device (M) 100 and a peripheral device (S) 101.
  • the peripheral device 101 may include two main bodies, such as a device (S1) 101-1 and a device (S2) 101-2.
  • one subject of the peripheral device 101 may play a primary role
  • the other subject such as the device 101-2
  • the peripheral device 101 is a TWS earphone
  • one earplug (such as the left earplug) of the TWS earphone can serve as the main earplug and play a primary role
  • the other earplug (such as the right earplug) can serve as the secondary earplug and play a secondary role.
  • the roles played by the two subjects of the peripheral device 101 can be exchanged.
  • the left earplug can serve as a secondary earplug and play a secondary role
  • the right earplug can serve as a primary earplug and play a primary role.
  • the electronic device 100 may establish a first Bluetooth connection with a subject who plays a main role (such as the device 101-1).
  • a subject who plays a primary role (such as device 101-1) may establish a second Bluetooth connection with a subject who plays a secondary role (such as device 101-2).
  • the electronic device 100 may be a mobile phone (such as the mobile phone 200 shown in FIG. 1B or 1C), a tablet computer, a desktop type, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal) computer, UMPC), netbooks, and cellular phones, personal digital assistants (personal digital assistants, PDAs), augmented reality (augmented reality, AR) ⁇ virtual reality (virtual reality, VR) devices, media players, televisions and other devices,
  • PDAs personal digital assistants
  • augmented reality augmented reality, AR
  • VR virtual reality
  • the structure of the electronic device 100 may be as shown in FIG. 3, which will be described in detail in the following embodiments.
  • the above peripheral device 101 may be a TWS earphone (TWS earphone 201 shown in FIG. 1B or FIG. 1C), a Bluetooth speaker, smart glasses, etc., including two main bodies, and the two There is no need for equipment to connect wires between the main bodies.
  • device 101-1 and device 101-2 are the left and right earplugs of a TWS earphone.
  • the device 101-1 and the device 101-2 may be a pair of Bluetooth speakers.
  • the peripheral device 101 shown in FIG. 1A may be the TWS headset 201 shown in FIG. 1B or 1C, and the electronic device 100 may be a mobile phone 200.
  • the TWS earphone 201 includes two main bodies, such as an earplug 201-1 and an earplug 201-2.
  • the earplug 201-1 may be the left earplug of the TWS earphone 201, and the earplug 201-2 is the right earplug; or, the earplug 201-1 may be the right earplug of the TWS earphone 201, and the earplug 201-2 is the left earplug.
  • One earplug (such as earplug 201-1) of the above TWS earphone 201 can be used as the main earplug of the TWS earphone, and the other earplug (such as earplug 201-2) can be used as the secondary earplug of the TWS earphone.
  • the primary and secondary roles of the left and right earplugs of the TWS headset can be interchanged.
  • the structures of the earplug 201-1 and the earplug 201-2 of the TWS earphone 201 are shown in FIG. 2B and will be described in detail in the following embodiments.
  • the earplug 201-1 as the main earplug can establish a Bluetooth connection 1 (that is, the above-mentioned first Bluetooth connection) with the mobile phone 200, and establish a Bluetooth connection 2 (i.e. Second Bluetooth connection).
  • a Bluetooth connection 1 that is, the above-mentioned first Bluetooth connection
  • a Bluetooth connection 2 i.e. Second Bluetooth connection
  • the earplug 201-1 and the earplug 201-2 can transmit audio data with the mobile phone 200 in a monitoring manner.
  • the earplug 201-1 as the main earplug may send the connection parameters of the Bluetooth connection 1 to the earplug 201-2 as the secondary earplug through the Bluetooth connection 2.
  • the earbud 201-2 as the secondary earbud can obtain the audio data packet sent by the mobile phone 200 according to the connection parameters of the Bluetooth connection 1.
  • the left and right earplugs of the TWS headset 201 can obtain audio data packets from the mobile phone.
  • the earplug 201-2 may stop acquiring the audio data sent by the mobile phone 200 package. 1C, the audio data packet can be forwarded from the earplug 201-1 to the earplug 201-2. In this way, it can avoid the problem that one earplug can correctly receive the data packet, and the other earplug cannot receive the data packet correctly, which causes the mobile phone to repeatedly transmit the same data packet multiple times, and can improve the transmission efficiency of the audio data packet. .
  • the left and right earplugs of the TWS earphone 201 transmit audio data with the mobile phone through a monitoring method.
  • the left and right earplugs can switch the transmission mode from the monitoring mode to the forwarding mode.
  • the data transmitted by the electronic device 100 and the peripheral device 101 includes but is not limited to the above audio data.
  • the data transmitted by the electronic device 100 and the peripheral device 101 may also be pictures or video data.
  • the peripheral device 101 is smart glasses, and the device 101-1 and the device 101-2 are two lenses of smart glasses, the electronic device 100 may transmit picture or video data to the lenses of smart glasses.
  • the audio data transmitted by the electronic device 100 and the peripheral device 101 is taken as an example to describe the method of the embodiment of the present application.
  • FIG. 2A shows a schematic diagram of a product form example of a TWS earphone.
  • the TWS earphone 201 may include: an earplug 201-1, an earplug 201-2, and an earplug box 201-3.
  • the earplug box 201-3 can be used to store left and right earplugs of TWS earphones.
  • the product forms of the peripheral devices provided by the embodiments of the present application include but are not limited to the TWS earphone 201 shown in FIG. 2A.
  • FIG. 2B 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 (such as earplugs 201-2) of the TWS earphone 201 may include: a processor 210, a memory 220, a sensor 230, a wireless communication module 240, a receiver 250, a microphone 260, and a power supply 270.
  • the memory 220 may be used to store application code, such as for establishing a wireless connection with another earplug of the TWS headset 201 (such as earplug 201-2), and pairing the earplug with the electronic device 100 (such as mobile phone 200).
  • Application code may control to execute the above application program code to implement the function of the earplug of the TWS earphone in the embodiment of the present application.
  • the memory 220 may also store a Bluetooth address for uniquely identifying the earbud, and a Bluetooth address of another earbud where the TWS headset is stored.
  • the memory 220 may also store connection data of the electronic device that has been successfully paired with the earplug before.
  • the connection data may be the Bluetooth address of the electronic device that has successfully paired with the earbud. Based on the connection data, the earplug can be automatically paired with the electronic device without having to configure a connection with it, such as performing legality verification.
  • the aforementioned Bluetooth address may be a media access control (media access control, MAC) address.
  • the sensor 230 may be a distance sensor or a proximity light sensor.
  • the earplug can determine whether the earphone is worn by the user through the sensor 230.
  • the earplug may use a proximity light sensor to detect whether there is an object near the earplug, thereby determining whether the earplug is worn by the user.
  • the earplug may open the receiver 250.
  • the earplug may also include a bone conduction sensor, combined with a bone conduction earphone. Using the bone conduction sensor, the earplug can obtain the vibration signal of the vibrating bone mass of the voice part, analyze the voice signal, and realize the voice function.
  • the earplug may further include a touch sensor for detecting the user's touch operation.
  • the earplug may further include a fingerprint sensor, which is used to detect a user's fingerprint and identify the user's identity.
  • the earplug may further include an ambient light sensor, which may adaptively adjust some parameters, such as volume, according to the perceived brightness of the ambient light.
  • the wireless communication module 240 is used to support short-distance data exchange between the earplug of the TWS earphone and various electronic devices, such as the electronic device 100 described above.
  • the wireless communication module 240 may be a Bluetooth transceiver.
  • the earplugs of the TWS headset can establish a wireless connection with the electronic device 100 through the Bluetooth transceiver to achieve short-range data exchange between the two.
  • At least one receiver 250 which may also be referred to as a "handset,” may be used to convert audio electrical signals into sound signals and play them.
  • the receiver 250 may convert the received audio electrical signal into a sound signal and play it.
  • At least one microphone 260 which may also be referred to as a "microphone” or a “microphone,” is used to convert sound signals into audio electrical signals.
  • the microphone 260 can collect the user's voice signal during the user's speech (such as talking or sending a voice message) and convert it into audio signal.
  • the above audio electrical signal is the audio data in the embodiment of the present application.
  • the power supply 270 can be used to supply power to various components included in the earplugs of the TWS earphone 201.
  • the power source 270 may be a battery, such as a rechargeable battery.
  • the TWS earphone 201 will be equipped with an earplug box (eg, 201-3 shown in FIG. 2A).
  • the earplug box can be used to store the left and right earplugs of TWS earphones.
  • the earplug box 201-3 can be used to store the earplug 201-1 and the earplug 201-2 of a TWS earphone.
  • the earplug box can also charge the left and right earplugs of the TWS earphone 201.
  • the above-mentioned earplug may further include: an input/output interface 280.
  • the input/output interface 280 may be used to provide any wired connection between the earplug of the TWS earphone and the earplug box (such as the earplug box 201-3 described above).
  • the input/output interface 280 may be an electrical connector.
  • the earplugs of the TWS earphone 201 When the earplugs of the TWS earphone 201 are placed in the earplug box, the earplugs of the TWS earphone 201 can be electrically connected to the earplug box (such as the input/output interface with the earplug box) through the electrical connector. After the electrical connection is established, the earplug box can charge the power supply 270 of the earplug of the TWS earphone. After the electrical connection is established, the earplugs of the TWS earphone 201 can also perform data communication with the earplug box.
  • the earplugs of the TWS earphone 201 can receive pairing instructions from the earplug box through the electrical connection.
  • the pairing command is used to instruct the earbuds of the TWS headset 201 to turn on the wireless communication module 240, so that the earbuds of the TWS headset 201 can use the corresponding wireless communication protocol (such as Bluetooth) to pair with the electronic device 100.
  • the wireless communication protocol such as Bluetooth
  • the earplugs of the aforementioned TWS earphone 201 may not include the input/output interface 280.
  • the earplug may implement a charging or data communication function based on the wireless connection established with the earplug box through the wireless communication module 240 described above.
  • the earplug box (such as the aforementioned earplug box 301) may further include components such as a processor, a memory, a SIM card, and a sensor.
  • the memory can be used to store application program code, and is controlled and executed by the processor of the earplug box to realize the function of the earplug box.
  • the processor of the earbud box can send a pairing command to the earbud of the TWS headset in response to the user's operation of opening the lid by executing the application code stored in the memory.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the earplugs of the TWS earphone 201. It may have more or fewer components than shown in FIG. 2B, may combine two or more components, 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. 2B 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 201 may be the same.
  • the left and right earplugs of the TWS earphone 201 may include the components shown in FIG. 2B.
  • the structure of the left and right earplugs of the TWS earphone 201 may also be different.
  • one earplug (such as the right earplug) of the TWS earphone 201 may include the components shown in FIG. 2B
  • the other earplug (such as the left earplug) may include other components other than the microphone 260 in FIG. 2B.
  • FIG. 3 shows a schematic structural diagram of the electronic device 100.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, 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.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an environment Light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), and an image signal processor. (image)signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • the different processing units may be independent devices or may be integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 100.
  • the controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or recycled.
  • 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 interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic description, and does not constitute a limitation on the structure of the electronic device 100.
  • the electronic device 100 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 100. 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 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and so on.
  • 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 100 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 100 and the mobile communication module 150 are coupled, and the antenna 2 and the wireless communication module 160 are coupled so that the electronic device 100 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 100 may utilize the wireless communication module 160 to establish a wireless connection with a peripheral device through a wireless communication technology, such as Bluetooth (BT). Based on the established wireless connection, the electronic device 100 can send voice data to the peripheral device and can also receive voice data from the peripheral device.
  • BT Bluetooth
  • the electronic device 100 realizes a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP processes the data fed back by the camera 193.
  • the ISP may be set in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the video codec is used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • 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 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, 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 100.
  • the processor 110 may execute instructions stored in the internal memory 121, establish a wireless connection with the peripheral device through the wireless communication module 160, and perform short-range data exchange with the peripheral device to pass the peripheral device Realize functions such as calling and playing 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 use of the electronic device 100 and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
  • a wireless connection is established by Bluetooth
  • the electronic device 100 can store the Bluetooth address of the peripheral device in the internal memory 121.
  • 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
  • the electronic device 100 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 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.
  • the audio module 170 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 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also known as "handset" is used to convert audio electrical signals into sound signals.
  • the voice can be received by bringing the receiver 170B close to the ear.
  • the microphone 170C also known as “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a person's mouth, and input a sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 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 100 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the TWS headset when the electronic device 100 establishes a wireless connection with a peripheral device 101 such as a TWS headset, the TWS headset can be used as an audio input/output device of the electronic device 100.
  • the audio module 170 may receive the audio electrical signal transmitted by the wireless communication module 160 to realize functions such as answering a phone call and playing music through a TWS headset.
  • the TWS headset can collect the user's voice signal, convert it into an audio electrical signal, and send it to the wireless communication module 160 of the electronic device 100.
  • the wireless communication module 160 transmits the audio electrical signal to the audio module 170.
  • the audio module 170 can convert the received audio electrical signal into a digital audio signal, encode it, and pass it to the mobile communication module 150. It is transmitted by the mobile communication module 150 to the call peer device to realize the call.
  • the application processor may transmit the audio electrical signal corresponding to the music played by the media player to the audio module 170.
  • the audio electrical signal is transmitted to the wireless communication module 160 by the audio module 170.
  • the wireless communication module 160 may send the audio electrical signal to the TWS headset, so that the TWS headset converts the audio electrical signal into a sound signal and plays it.
  • the 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 electronic device 100 determines the strength of the pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the magnetic sensor 180D includes a Hall sensor.
  • the acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes).
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense the brightness of ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to application lock, fingerprint photo taking, fingerprint answering call, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • Touch sensor 180K also known as "touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M 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 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 may generate a vibration prompt.
  • the motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback.
  • 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 100.
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the electronic device 100 interacts with the network through a SIM card to realize functions such as call and data communication
  • the electronic device 100 shown in FIG. 1A is the mobile phone 200 shown in FIG. 1B
  • the peripheral device 101 is the TWS earphone 201.
  • the TWS earphone 201 includes an earplug 201-1 and an earplug 201-2 as examples.
  • An embodiment of the present application provides an audio data transmission method.
  • the audio data transmission method may include S301-S303.
  • the earbud 201-1 establishes a Bluetooth connection 2 with the earbud 201-2.
  • the lid of the earplug box 201-3 of the TWS earphone 201 can be opened.
  • the earplug 201-1 and the earplug 201-2 can be automatically paired and connected.
  • the earplug 201-1 is determined to be the main earplug, and the earplug 201-2 is determined to be the secondary earplug.
  • any earplug of the TWS earphone 201 can be used as the main earplug.
  • the earplug of the earplug box 201-3 (such as the earplug 201-1) is taken out as the main earplug, and the earplug box 201-3 is taken out Earplugs (such as earplug 201-2) serve as secondary earplugs.
  • the lid of the earplug box 201-3 is opened, and after the earplug is taken out of the earplug box 201-3, the earplug that is worn first (such as earplug 201-1) is used as the main earplug, and the earplug that is worn later (Such as earplugs 201-2) as a pair of earplugs.
  • the roles of the main and auxiliary earplugs can be switched. For example, when the power of the primary earplug (such as earplug 201-1) is lower than the first power threshold, and the power of the secondary earplug (such as earplug 201-2) is higher than the second power threshold, the roles of the primary and secondary earplugs can be exchanged.
  • the earplug 201-2 plays the role of the main earplug
  • the earplug 201-1 plays the role of the auxiliary earplug.
  • the specific conditions for determining the main and auxiliary earplugs and the role exchange of the main and auxiliary earplugs include, but are not limited to, the above conditions.
  • the earplug 201-1 as the main earplug establishes a Bluetooth connection 1 with the mobile phone 200.
  • the earplug 201-1 as the main earplug can send a paired broadcast to the outside. If the mobile phone 200 has turned on the Bluetooth function, the mobile phone 200 can receive the pairing broadcast and prompt the user that the relevant Bluetooth device (such as the earplug 201-1) has been scanned. After the user selects the earplug 201-1 as the connection device on the mobile phone 200, the mobile phone 200 can be paired and connected with the earplug 201-1. That is, the earplug 201-1 can establish a Bluetooth connection 1 with the mobile phone 200.
  • the earplug 201-1 as the main earplug establishes a Bluetooth connection 1 with the mobile phone 200 under the first protocol and the second protocol.
  • the earplug 201-1 as the main earplug and the mobile phone 200 may establish an ACL link for transmission of volume control commands and the like under the first protocol.
  • the earplug 201-1 as the main earplug and the mobile phone 200 may also establish an SCO/eSCO link for transmitting audio data (such as audio data when playing music and audio data during voice communication) under the second protocol.
  • the earplug 201-1 as the main earplug and the mobile phone 200 may establish an ACL link for transmission of volume control commands and the like under the first protocol.
  • the earplug 201-1 as the main earplug and the mobile phone 200 can also establish an isochronous (ISO) channel for transmitting audio data (such as audio data when playing music and audio data during voice communication) under the second protocol .
  • ISO isochronous
  • the method of establishing the Bluetooth connection 2 between the earplug 201-1 and the earplug 201-2 may be similar to the method of establishing the Bluetooth connection 1 between the earplug 201-1 and the mobile phone 200 as the main earplug, which will not be repeated here in the embodiments of the present application.
  • the primary and secondary earbuds may perform frequency data transmission with the mobile phone 200 through monitoring.
  • the method in the embodiment of the present application may further include S401-S410.
  • the earplug 201-1 as the main earplug transmits the connection parameters of the Bluetooth connection 1 to the earplug 201-2 as the secondary earplug through the Bluetooth connection 2.
  • connection parameters may include the Bluetooth address of the mobile phone 200, codec parameters, clock parameters, and encryption parameters negotiated between the mobile phone 200 and the main earbud.
  • the earplug 201-2 as the secondary earplug receives the connection parameter of the Bluetooth connection 1 sent by the earplug 201-1 as the main earplug through the Bluetooth connection 2.
  • the mobile phone 200 sends an audio data packet 1 to the earbud 201-1 as the main earbud via the Bluetooth connection 1.
  • the earplug 201-1 as the main earplug receives the audio data packet 1 sent by the mobile phone 200 through the Bluetooth connection 1.
  • the earplug 201-2 as the secondary earplug acquires the audio data packet 1 sent by the mobile phone 200 according to the connection parameters of the Bluetooth connection 1.
  • the secondary earplug can send the feedback information of the audio data packet 1 to the main earplug according to the result of monitoring the audio data packet 1.
  • the feedback information may be an acknowledgement (acknowledgement, ACK) or a negative acknowledgement (negative acknowledgement, NACK).
  • the NACK of the audio data packet 1 may be sent to the main earplug.
  • the main earplug can send the NACK of the audio data packet 1 to the mobile phone 200 to request the mobile phone 200 to retransmit the audio regardless of whether the main earplug correctly receives the audio data packet 1 Data packet 1. If the secondary earplug successfully receives the audio data packet 1, then S406 may be executed.
  • the earplug 201-2 as the secondary earplug correctly receives the audio data packet 1, and then sends the ACK of the audio data packet 1 to the earplug 201-1 as the main earplug through the Bluetooth connection 2.
  • the earplug 201-1 as the main earplug receives the ACK of the audio data packet 1 sent by the earplug 201-2 as the sub earplug.
  • the earplug 201-1 as the main earplug receives the ACK from the earplug 201-2 as the secondary earplug, and the earplug 201-1 as the main earplug correctly receives the audio data packet 1, and then sends it to the mobile phone 200 through the Bluetooth connection 1.
  • the mobile phone 200 receives the ACK of the audio data packet 1 sent by the earplug 201-1 as the main earplug.
  • the mobile phone 200 sends an audio data packet 2 to the earbud 201-1 as the main earbud via the Bluetooth connection 1.
  • the main earbud can send the NACK of the audio data packet 1 to the mobile phone 200 through the Bluetooth connection 1 to request the mobile phone 200 to retransmit the audio data packet 1.
  • the mobile phone 200 can retransmit the audio data packet 1 to the main earbud via the Bluetooth connection 1.
  • the main earplug can monitor the signal quality of the audio data packet received by the main earplug, and monitor the signal quality of the audio data packet received by the secondary earplug. Then, when the signal quality of the audio data packet received by the main earplug and the signal quality of the audio data packet received by the secondary earplug are significantly different, the left and right earplugs of the TWS earphone can switch the transmission mode from the monitoring mode to the forwarding mode.
  • the method of the embodiment of the present application may include S501-S503.
  • the method of the embodiment of the present application may further include S501-S503.
  • the earplug 201-1 as the main earplug acquires the signal quality of the audio data packet received by the main earplug.
  • the earplug 201-1 as the main earplug acquires the signal quality of the audio data packet received by the secondary earplug.
  • the level of the signal quality of the audio data packets received by the primary and secondary earplugs can be reflected by the level of the packet error rate PER of the primary and secondary earplugs to the audio data packets.
  • the lower the packet error rate the higher the signal quality of the received audio data packet.
  • the higher the packet error rate the lower the signal quality of the received audio packets.
  • the main earplug may determine the total number of audio data packets received by the main earplug within a preset time period (such as a) as the total number of audio data packets received by the secondary earplug within a preset time period.
  • the primary earplug may determine the number of ACKs that the secondary earplug replies to the primary earplug within the preset time period as the number of audio data packets correctly decoded by the secondary earplug within the preset time period (denoted as c).
  • the parameters that can reflect the signal quality of the audio data packets received by the primary and secondary earplugs include, but are not limited to, the packet error rate.
  • the signal-to-noise ratio of the audio data packets received by the primary and secondary earplugs can also reflect the signal quality of the audio data packets received by the primary and secondary earplugs.
  • the earplug 201-1 as the main earplug determines whether the signal quality of the audio data packet received by the main and auxiliary earplugs satisfies the first preset condition or the second preset condition.
  • the difference in signal quality of the audio data packets received by the primary and secondary earplugs may include the following cases (1), (2), and (3).
  • the difference in the signal quality of the audio data packets received by the primary and secondary earplugs is greater than the preset difference threshold may include the following cases (1) and (2).
  • Case (1) The signal quality of the audio data packets received by the primary and secondary earplugs meets the first preset condition.
  • the level of the packet error rate of the primary and secondary earplugs for the audio data packets to reflect the level of the signal quality of the audio data packets received by the primary and secondary earplugs as an example.
  • the signal quality of the audio data packet received by the primary and secondary earplugs satisfying the first preset condition may specifically be: the signal quality of the audio data packet received by the primary earplug is higher than the signal quality of the audio data packet received by the secondary earplug; and, The difference between the signal quality of the audio data packet received by the primary earbud and the signal quality of the audio data packet received by the secondary earbud is greater than the first difference threshold.
  • the signal quality of the audio data packets received by the primary and secondary earplugs satisfying the first preset condition may specifically be as follows: the packet error rate (ie PER_1) of the primary earplugs for the audio data packets within the preset time period is less than that of the secondary earplugs during the preset time period
  • the packet error rate of the internal audio data packet that is, PER_2), that is, PER_1 ⁇ PER_2; and the difference between PER_2 and PER_1 is greater than the first difference threshold (such as Y_1), that is, (PER_2)-(PER_1) is greater than Y_1.
  • the signal quality of the audio data packets received by the primary and secondary earplugs satisfying the first preset condition may specifically be: the signal quality of the audio data packets received by the primary earplugs is higher than the first quality threshold, and the audio quality of the secondary earplugs is received. The signal quality is below the second quality threshold. The first quality threshold is greater than the second quality threshold.
  • the signal quality of the audio data packets received by the primary and secondary earplugs satisfying the first preset condition may specifically be: the packet error rate PER_2 of the secondary earplugs for the audio data packet within a preset time period is greater than the packet error rate corresponding to the second quality threshold (such as Y_2), and the packet error rate PER_1 of the main earbuds for the audio data packet within a preset time period is less than the packet error rate corresponding to the first quality threshold (such as Y_3).
  • the signal quality of the audio data packet received by the main earbud is higher than the signal quality of the audio data packet received by the sub earbud, and the signal quality of the audio data packet received by the main earbud is greatly different.
  • the earplug 201-1 may still be the main earplug, and the earplug 201-2 may be the auxiliary earplug. That is, the main and auxiliary earplugs will not exchange roles.
  • the primary earbud can notify the secondary earbud to stop listening to the data packet, but the primary earbud forwards the data packet to the secondary earbud. That is, the primary and secondary earplugs can switch the transmission mode of the audio data packet from the monitoring mode to the forwarding mode.
  • the first switching request may be sent from the earplug 201-1 as the primary earplug to the earplug 201-2 as the secondary earplug.
  • the first switching request instructs the secondary earplug to stop acquiring the audio data packet sent by the mobile phone 200.
  • the earplug 201-2 as the secondary earplug stops acquiring audio data packets sent by the mobile phone 200.
  • the earplug 201-1 as the main earplug may forward the audio data packet to the earplug 201-2 as the sub earplug.
  • the primary earplug may send the first switching request to the secondary earplug through the control link of the Bluetooth connection 2.
  • the primary earbud may send the first switching request to the secondary earbud through the ACL link between the primary earbud and the secondary earbud.
  • the specific method for forwarding the audio data packet to the earplug 201-2 serving as the secondary earplug with the earplug 201-1 as the primary earplug can refer to the earplug 201-2 serving as the primary earplug to the earplug 201 serving as the secondary earplug in S603-S609. -1
  • the method for forwarding the audio data packet will not be repeated here in the embodiments of the present application.
  • the earplug 201-1 when the earplug 201-1 serves as the main earplug and the earplug 201-2 serves as the secondary earplug, and audio data transmission is performed by monitoring, the earplug 201-1 can receive the audio data packet sent by the mobile phone 200 and calculate PER_1 and PER_2.
  • the earplug 201-2 can obtain the audio data packet sent by the mobile phone 200, and feedback ACK/NACK to the earplug 201-1.
  • the earplug 201-1 can send a first switching request to the earplug 201-2 when PER_1>Y_2 and PER_2 ⁇ Y_3, and switch the transmission mode from the listening mode to the forwarding mode.
  • the earplug 201-2 may stop acquiring the audio data packet sent by the mobile phone 200. Subsequently, as shown in FIG. 6, the earplug 201-1 serves as the main earplug and the earplug 201-2 serves as the secondary earplug, and audio data transmission is performed by a forwarding method. The specific method of transmitting audio data by the primary and secondary earplugs in a forwarding manner is not repeated here in the embodiment of the present application.
  • Case (2) The signal quality of the audio data packets received by the primary and secondary earplugs meets the second preset condition.
  • the level of the packet error rate of the primary and secondary earplugs for the audio data packets to reflect the level of the signal quality of the audio data packets received by the primary and secondary earplugs as an example.
  • the signal quality of the audio data packets received by the primary and secondary earplugs satisfying the second preset condition may specifically be: the signal quality of the audio data packets received by the secondary earplugs is higher than the signal quality of the audio data packets received by the primary earplugs; and, The difference between the signal quality of the audio data packet received by the secondary earbud and the signal quality of the audio data packet received by the main earbud is greater than the first difference threshold.
  • the signal quality of the audio data packets received by the primary and secondary earplugs satisfying the second preset condition may specifically be: the packet error rate (ie PER_2) of the secondary earplugs for the audio data packets within the preset time period is less than that of the primary earplugs during the preset time period
  • the packet error rate of the internal audio packets that is, PER_1), that is, PER_2 ⁇ PER_1; and the difference between PER_1 and PER_2 is greater than the first difference threshold (such as Y_1), that is, (PER_1)-(PER_2) is greater than Y_1.
  • the signal quality of the audio data packets received by the primary and secondary earplugs satisfying the second preset condition may specifically be: the signal quality of the audio data packets received by the primary earbuds is lower than the second quality threshold, and the audio data packets received by the secondary earbuds The signal quality is higher than the first quality threshold. The first quality threshold is greater than the second quality threshold.
  • the signal quality of the audio data packets received by the primary and secondary earplugs satisfying the second preset condition may specifically be: the packet error rate PER_2 of the secondary earplugs for the audio data packet within a preset time period is less than the packet error rate corresponding to the first quality threshold (such as Y_3), and the packet error rate PER_1 of the main earbuds for the audio data packet within a preset time period is greater than the packet error rate corresponding to the second quality threshold (such as Y_2).
  • the signal quality of the audio data packets received by the secondary earbuds is higher than the signal quality of the audio data packets received by the primary earbuds, and the signal quality of the audio data packets received by the primary and secondary earbuds varies greatly.
  • the primary and secondary earbuds can exchange roles.
  • the earbud 201-2 plays the role of the primary earbud, and the earbud 201 -1 acts as a pair of earplugs.
  • the primary and secondary earplugs can switch the transmission mode of the audio data packet from the monitoring mode to the forwarding mode. Specifically, as shown in FIG. 5, if the signal quality of the audio data packet received by the primary and secondary earplugs meets the second preset condition, the method in the embodiment of the present application may further include S601-S609.
  • the role exchange between the earplug 201-1 and the earplug 201-2 may specifically include: the earplug 201-1 currently serving as the main earplug requests the mobile phone 200 to temporarily stop transmitting audio data packets; the earplug 201-1 transmits the status information to Earplug 201-2, the status information includes the device address (such as MAC address) of the TWS headset 201, the status information is used to instruct the earplug 201-2 to use the device address of the TWS headset 201 instead of the earplug 201-1 as the main earplug, and to replace the earplug A wireless connection between 201-1 and the mobile phone 200 (ie, Bluetooth connection 1); the earplug 201-2 as the main earplug requests the mobile phone 200 to transmit audio data packets to the earplug 201-2.
  • the earplug 201-1 currently serving as the main earplug requests the mobile phone 200 to temporarily stop transmitting audio data packets
  • the earplug 201-1 transmits the status information to
  • the above status information may be included in the second switching request, and the second switching request is also used to instruct the secondary earplug to stop acquiring the audio data packet sent by the mobile phone 200. Or, the above status information is also used to instruct the secondary earplug to stop acquiring the audio data packet sent by the mobile phone 200.
  • the primary earplug may send the second switching request to the secondary earplug through the control link of the Bluetooth connection 2.
  • the main earbud may send a second switching request to the secondary earbud through the ACL link between the main earbud and the secondary earbud.
  • the earplug 201-2 as the secondary earplug stops acquiring the audio data packet sent by the mobile phone 200.
  • the earplug 201-2 as the main earplug can receive the audio data packet sent by the mobile phone 200 through the Bluetooth connection 1.
  • the primary and secondary earplugs can transmit audio data packets through a forwarding method.
  • the earplug 201-2 as the main earplug receives the audio data packet sent by the mobile phone 200, it can forward the audio data packet to the earplug 201-1 as the secondary earplug.
  • the method in the embodiment of the present application may further include S603-S609.
  • the mobile phone 200 sends an audio data packet 3 to the earbud 201-2 as the main earbud via the Bluetooth connection 1.
  • the earplug 201-2 as the main earplug forwards the audio data packet 3 to the earplug 201-1 as the secondary earplug.
  • the NACK of the audio data packet 3 may be sent to the main earplug.
  • the primary earbud receives the NACK of the audio data packet 3 sent by the secondary earbud, regardless of whether the primary earbud correctly receives the audio data packet 3, the primary ear can send the NACK of the audio data packet 3 to the mobile phone 200 to request the mobile phone 200 to retransmit the audio Data packet 3. If the secondary earplug successfully receives the audio data packet 3, S605 may be performed.
  • the earplug 201-1 as the secondary earplug correctly receives the audio data packet 3, and then sends an ACK of the audio data packet 3 to the earplug 201-2 as the main earplug through the Bluetooth connection 2.
  • the earplug 201-2 as the main earplug receives the ACK of the audio data packet 3 sent by the earplug 201-1 as the sub earplug.
  • the earplug 201-2 as the main earplug sends an ACK of the audio data packet 3 to the mobile phone 200 through the Bluetooth connection 1.
  • the mobile phone 200 receives the ACK of the audio data packet 3 sent by the earplug 201-2 as the main earplug.
  • the mobile phone 200 sends the audio data packet 4 to the earbud 201-2 as the main earbud via the Bluetooth connection 1.
  • the main earplug can send the NACK of the audio data packet 3 to the mobile phone 200 through the Bluetooth connection 1, To request the mobile phone 200 to retransmit the audio data packet 3.
  • the mobile phone 200 can retransmit the audio data packet 3 to the main earbud via the Bluetooth connection 1.
  • the earplug 201-1 when the earplug 201-1 serves as the main earplug and the earplug 201-2 serves as the secondary earplug, and the audio data transmission is performed by monitoring, the earplug 201-1 can receive the audio data packet sent by the mobile phone 200 and calculate PER_1 and PER_2.
  • the earplug 201-2 can obtain the audio data packet sent by the mobile phone 200, and feedback ACK/NACK to the earplug 201-1.
  • the earplug 201-1 can send a second switching request to the earplug 201-2 when PER_2>Y_2 and PER_1 ⁇ Y_3, switch the transmission mode from the listening mode to the forwarding mode, and exchange the roles of the primary and secondary earplugs.
  • the earplug 201-2 may stop acquiring the audio data packet sent by the mobile phone 200 and exchange the roles of the primary and secondary earplugs. Subsequently, as shown in FIG. 7, the earplug 201-2 serves as the main earplug and the earplug 201-1 serves as the secondary earplug, and audio data transmission is performed by a forwarding method. The specific method of transmitting audio data by the primary and secondary earplugs in a forwarding manner is not repeated here in the embodiment of the present application.
  • Case (3) The signal quality of the audio data packets received by the primary and secondary earplugs does not satisfy the first preset condition, and does not satisfy the second preset condition.
  • the signal quality of the audio data packets received by the primary and secondary earplugs does not satisfy the first preset condition, nor the second preset condition.
  • the primary and secondary earplugs can execute S403-S410 to continue audio data transmission through monitoring.
  • the primary and secondary earbuds may perform frequency data transmission with the mobile phone 200 through a forwarding method.
  • the primary earplug may receive the audio data packet sent by the mobile phone 200 through the Bluetooth connection 1, and forward the audio data packet to the secondary earplug through the Bluetooth connection 2.
  • the method in the embodiment of the present application may further include S603-S609.
  • the primary and secondary earplugs switch the transmission mode of the audio data packet from the monitoring mode to the forwarding mode .
  • the forwarding delay will occur. Compared with the monitoring mode, the transmission delay of the audio data packet in the forwarding mode is larger, and the transmission efficiency of the audio data is lower.
  • forwarding audio data packets from the primary earbud to the secondary earbud increases the power consumption of the primary earbud and shortens the battery life of the primary earbud.
  • the secondary earplugs may request the primary earplugs to transmit the audio data packets when the signal quality of the audio data packets received by the secondary earplugs is high
  • the mode is switched from forwarding mode to monitoring mode.
  • the method of the embodiment of the present application may include S801-S804.
  • the method of the embodiment of the present application may include S801-S804.
  • the earplug 201-1 as the secondary earplug receives the audio data packet in the time slot of the main earplug and the frequency of the signal transmitted by the mobile phone 200, and estimates the quality parameter of the audio plug received by the earplug 201-1 as the secondary earplug.
  • the time slot in which the main earbud receives the audio data packet is a parameter negotiated when the main earbud and the mobile phone 200 establish the above-mentioned Bluetooth connection 1. That is, the connection parameters of the Bluetooth connection 1 may also include a time slot for the main earbud to receive the audio data packet.
  • the earplug 201-1 plays the role of the auxiliary earplug before the earplug 201-2 plays the role of the main earplug, and the main and auxiliary earplugs perform audio data transmission by monitoring.
  • the earplug 201-2 as the main earplug sends the connection parameters of the Bluetooth connection 1 to the earplug 201-1 as the secondary earplug.
  • the earplug 201-1 plays the role of the main earplug before the earplug 201-2 plays the role of the auxiliary earplug, and the main and auxiliary earplugs transmit audio data by monitoring.
  • the earplug 201-1 as the main earplug establishes the Bluetooth connection 1 with the mobile phone 200.
  • the earplug 201-1 can obtain the connection parameters of the Bluetooth connection 1.
  • the frequency at which the mobile phone 200 sends audio data packets may be included in the audio data packet sent by the mobile phone 200 to the earplug 201-2 as the main earplug.
  • the earplug 201-1 as the secondary earplug receives the audio data packet forwarded by the earplug 201-2, and thus the frequency point at which the mobile phone 200 sends the audio data packet can be obtained.
  • the earphone 201-1 as the secondary earphone can perform background scanning at the time slot where the primary earphone receives the audio data packet and the frequency at which the mobile phone 200 sends signals.
  • the process of the secondary earbud estimating the quality parameter of the audio data packet received by the secondary earbud is called background scanning.
  • the time slot for the main earbud to receive the audio data packet determines the time domain resource of the mobile phone 200 sending the audio data packet to the main earbud, and the frequency of the signal sent by the mobile phone 200 determines the frequency domain resource of the mobile phone 200 sending the audio data packet to the main earbud.
  • the earplug 201-1 as the secondary earplug can determine when and in which frequency-domain resource the mobile phone 200 sends audio data packets.
  • the earplug 201-1 as the secondary earplug can receive the audio data packet in the time slot of the main earplug and the frequency of the signal sent by the mobile phone 200, and obtain the capability (such as signal strength) of the audio data packet sent by the mobile phone 200 according to the earplug 201-1 ), estimate the quality parameter of the audio data packet received by the earplug 201-1 as the secondary earplug.
  • the quality parameter of the audio data packet received by the secondary earplug may include at least one of a received signal power and a signal-to-noise ratio of the audio data packet received by the secondary earplug.
  • the earplug 201-1 as a secondary earplug determines whether the estimated quality parameter satisfies the third preset condition.
  • the estimated quality parameter satisfies the third preset condition, which may specifically be: the received signal power is greater than the preset power threshold; or, the signal-to-noise ratio is greater than the preset signal-to-noise ratio threshold; or, the received signal power is greater than the preset power threshold, and the signal The noise ratio is greater than the preset signal-to-noise threshold.
  • the estimated quality parameter does not satisfy the third preset condition, which may specifically be: the received signal power is less than or equal to the preset power threshold, and the signal-to-noise ratio is less than or equal to the preset signal-to-noise ratio threshold.
  • the received signal power and signal-to-noise ratio of the audio data packet received by the secondary earplug may be used to characterize the signal quality of the audio data packet received by the secondary earplug. Wherein, when the received signal power is greater than the preset power threshold or the received signal power is greater than the preset power threshold, the signal quality of the audio data packet received by the secondary earbud is high.
  • the secondary earbuds can request the main earbuds to switch the transmission mode from the forwarding mode to the listening mode.
  • the earplug 201-1 as the secondary earplug may perform S803.
  • the primary and secondary earplugs continue to transmit audio data through a forwarding method.
  • the earplug 201-1 as the secondary earplug starts to acquire the audio data packet sent by the mobile phone 200, and sends a third switching request to the earplug 201-2 as the main earplug.
  • the primary earplug may send the third switching request to the secondary earplug through the control link of the Bluetooth connection 2.
  • the main earbud may send a third switching request to the secondary earbud through the ACL link between the main earbud and the secondary earbud.
  • the earplug 201-2 as the primary earplug receives the third switching request sent by the earplug 201-1 as the secondary earplug, and stops forwarding the audio data packet to the earplug 201-1 as the secondary earplug.
  • the earplug 201-2 serves as the main earplug
  • the earplug 201-1 serves as the secondary earplug.
  • S403-S410 for frequency data with the mobile phone 200 through the monitoring method. The transmission method will not be repeated here in the embodiments of the present application.
  • the earplugs 201-2 as the main earplugs can acquire the signal quality of the audio data packets received by the main and auxiliary earplugs, when the signal quality of the audio data packets received by the main and auxiliary earplugs meets the first preset condition or the second preset condition To switch the transmission mode from monitoring mode to forwarding mode again.
  • the primary and secondary earplugs can switch between the monitoring mode and the forwarding mode for audio data transmission according to the change in the signal quality of the audio data packets received by the primary and secondary earplugs.
  • the embodiment of the present application uses the switching process shown in FIG. 6, FIG. 7 or FIG. 9 as an example to illustrate the foregoing forwarding manner.
  • the earplug 201-2 can receive the audio sent by the mobile phone 200 The data packet, and forwards the audio data packet to the earplug 201-1.
  • the audio data packet includes a frequency point at which the mobile phone 200 sends the audio data packet.
  • the earplug 201-1 can perform background scanning and receive audio data packets forwarded by the earplug 201-2.
  • the earplug 201-1 can also estimate the signal power and signal-to-noise ratio of the earplug 201-1 receiving the audio data packet from the mobile phone 200 according to the background scanning result and the frequency point at which the mobile phone 200 sends the audio data packet. If the received signal power and the signal-to-noise ratio satisfy the third preset condition, the transmission mode can be switched from the forwarding mode to the monitoring mode. At this time, the earplug 201-1 may send a third switching request to the earplug 201-2. After receiving the third switching request, the earplug 201-2 may stop forwarding the audio data packet to the earplug 201-1. Subsequently, as shown in FIG.
  • the earplug 201-2 serves as the main earplug
  • the earplug 201-1 serves as the secondary earplug
  • audio data transmission is performed by monitoring.
  • the specific method of transmitting audio data by the main and auxiliary earplugs in the monitoring mode is not repeated here in the embodiment of the present application.
  • the earplug 201-1 serves as the main earplug
  • the earplug 201-2 serves as the secondary earplug.
  • a specific method of audio data transmission by forwarding refer to the earplug 201-2 in FIG. 7 as the main earplug, and the earplug 201 -1 as a secondary earplug, a method of audio data transmission through a forwarding method, which will not be repeated here in the embodiments of the present application.
  • a peripheral device is also provided, for example, the peripheral device is a TWS headset.
  • the structure of the earplug of the TWS earphone refer to the structure of the earplug shown in FIG. 2B.
  • One or more computer programs can be stored in the memory of the earplug.
  • the one or more computer programs include instructions. This instruction can be used to execute the earplugs (such as earplug 101-1 and earplug 101-2) of the TWS earphone in the description corresponding to any of the drawings in FIG. 4, FIG. 5, FIG. 6, FIG. 7, FIG. 8, or FIG. 9.
  • the earplugs of the TWS earphone shown in FIG. 2B may also include other devices such as sensors, which is not limited in this embodiment of the present application.
  • the functions or steps performed by the main bodies (such as earplugs 101-1 or earplugs 101-2) in the peripheral devices (such as the TWS earphone 101) may also be performed by electronic devices (such as the mobile phone 100).
  • An embodiment of the present application further provides an electronic device.
  • For the structure of the electronic device reference may be made to the structure of the electronic device shown in FIG. 3.
  • One or more computer programs can be stored in the memory of the electronic device.
  • the one or more computer programs include instructions. This instruction can be used to execute the earplugs (such as earplug 101-1 and earplug 101-2) of the TWS earphone in the description corresponding to any of the drawings in FIG. 4, FIG. 5, FIG. 6, FIG. 7, FIG. 8, or FIG. 9.
  • An embodiment of the present application further provides a computer storage medium, the computer storage medium including computer instructions, when the computer instructions run on the first earplug of the TWS earphone (such as earplug 101-1), the first earplug is executed as shown in FIG. 4.
  • the computer instruction runs on the second earplug (such as earplug 101-2) of the TWS earphone, the second earplug is executed as shown in FIG. 4, FIG. 5, FIG. 6, FIG. 7, FIG. 8, or FIG. 9.
  • a drawing correspondingly describes each function or step performed by the earplug 101-2.
  • An embodiment of the present application also provides a computer program product, which, when the computer program product runs on a computer, causes the computer to execute any of the drawings shown in FIG. 4, FIG. 5, FIG. 6, FIG. 7, FIG. 8, or FIG. The audio data transmission method shown.
  • the disclosed system, 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.
  • 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 or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. 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 of the embodiments of this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
  • the 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 computer-readable storage medium.
  • the technical solution of this embodiment essentially or part of the contribution to the existing technology or all or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium
  • several instructions are included to enable a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in the various embodiments.
  • the foregoing storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Reverberation, Karaoke And Other Acoustics (AREA)

Abstract

L'invention concerne un procédé de transmission de données audio, celui-ci étant appliqué au domaine technique des communications à courte distance et pouvant améliorer la probabilité qu'une première oreillette et qu'une seconde oreillette d'un écouteur TWS reçoivent correctement un paquet de données audio. La solution spécifique comprend : une première oreillette servant d'oreillette primaire établissant une première connexion Bluetooth avec un dispositif électronique, et la première oreillette établissant une seconde connexion Bluetooth avec la seconde oreillette servant d'oreillette secondaire. La seconde oreillette peut recevoir un paramètre de connexion, envoyé par la première oreillette au moyen de la seconde connexion Bluetooth, de la première connexion Bluetooth. Par conséquent, lorsque le dispositif électronique envoie un paquet de données audio à la première oreillette au moyen de la première connexion Bluetooth, le paquet de données audio envoyé par le dispositif électronique peut être acquis en fonction du paramètre de connexion. Lorsque la différence entre les qualités des signaux de l'oreillette primaire et de l'oreillette secondaire recevant le paquet de données audio est supérieure à une valeur de seuil de différence prédéfinie, la seconde oreillette arrête l'acquisition du paquet de données audio envoyé par le dispositif électronique, et l'oreillette primaire de la première oreillette et de la seconde oreillette transfère le paquet de données audio reçu du dispositif électronique à l'oreillette secondaire.
PCT/CN2018/122774 2018-12-21 2018-12-21 Procédé de transmission de données audio et dispositif électronique WO2020124581A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/122774 WO2020124581A1 (fr) 2018-12-21 2018-12-21 Procédé de transmission de données audio et dispositif électronique
CN201880093055.8A CN112042212B (zh) 2018-12-21 2018-12-21 一种音频数据传输方法及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/122774 WO2020124581A1 (fr) 2018-12-21 2018-12-21 Procédé de transmission de données audio et dispositif électronique

Publications (1)

Publication Number Publication Date
WO2020124581A1 true WO2020124581A1 (fr) 2020-06-25

Family

ID=71100122

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/122774 WO2020124581A1 (fr) 2018-12-21 2018-12-21 Procédé de transmission de données audio et dispositif électronique

Country Status (2)

Country Link
CN (1) CN112042212B (fr)
WO (1) WO2020124581A1 (fr)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111867144A (zh) * 2020-06-29 2020-10-30 炬芯科技股份有限公司 一种无线通信方法及无线通信设备
CN112437418A (zh) * 2020-07-17 2021-03-02 珠海市杰理科技股份有限公司 Tws设备通信数据配置方法、装置、设备、芯片及介质
CN113242546A (zh) * 2021-06-25 2021-08-10 南京中感微电子有限公司 音频转发方法、设备和存储介质
CN113286212A (zh) * 2021-05-20 2021-08-20 北京明略软件系统有限公司 一种佩戴式音频采集组件
CN113556650A (zh) * 2021-06-07 2021-10-26 广州安凯微电子股份有限公司 Tws耳机无线通信方法、系统、装置及存储介质
US11445286B1 (en) 2021-05-20 2022-09-13 Amazon Technologies, Inc. Wireless connection management
WO2023000565A1 (fr) * 2021-07-22 2023-01-26 珠海市杰理科技股份有限公司 Procédé et appareil de correction d'erreur de données de perte de paquets dans un mode double transmission, ainsi que dispositif et système
WO2024016754A1 (fr) * 2022-07-20 2024-01-25 哲库科技(上海)有限公司 Procédé et appareil de transmission de paquet multimédia, dispositif et support

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102020130037A1 (de) * 2019-11-18 2021-05-20 Avago Technologies International Sales Pte. Limited Drahtloses Audio Streaming
CN114499587B (zh) * 2021-07-22 2022-12-23 荣耀终端有限公司 音频同步的通信方法、系统、无线耳机、终端及存储介质
CN114268911B (zh) * 2021-09-23 2023-06-20 珠海市杰理科技股份有限公司 通信方法及装置、可读存储介质、tws系统
CN114786139A (zh) * 2022-02-28 2022-07-22 Oppo广东移动通信有限公司 连接建立方法、装置、设备、存储介质及程序产品
CN114666777B (zh) * 2022-05-26 2022-07-29 成都市安比科技有限公司 一种蓝牙音频系统的带宽提升方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170237845A1 (en) * 2016-01-08 2017-08-17 Lg Electronics Inc. Mobile terminal and mobile terminal audio signal processing system including the same
CN108337074A (zh) * 2018-06-22 2018-07-27 恒玄科技(上海)有限公司 高可靠性的蓝牙耳机无线通信方法
CN108419228A (zh) * 2018-02-09 2018-08-17 恒玄科技(上海)有限公司 一种适于蓝牙耳机的无线通信方法
CN108429949A (zh) * 2018-03-21 2018-08-21 恒玄科技(上海)有限公司 一种适于蓝牙耳机的蓝牙音频混合通信方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101471829A (zh) * 2007-12-28 2009-07-01 华为技术有限公司 一种无线局域网中站点的直连方法和设备
CN106792321B (zh) * 2017-02-08 2024-01-12 河荣华 一种分体式无线耳机及其通信方法
CN107894881A (zh) * 2017-10-18 2018-04-10 恒玄科技(上海)有限公司 蓝牙耳机的主从连接切换、通话监听和麦克切换的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170237845A1 (en) * 2016-01-08 2017-08-17 Lg Electronics Inc. Mobile terminal and mobile terminal audio signal processing system including the same
CN108419228A (zh) * 2018-02-09 2018-08-17 恒玄科技(上海)有限公司 一种适于蓝牙耳机的无线通信方法
CN108429949A (zh) * 2018-03-21 2018-08-21 恒玄科技(上海)有限公司 一种适于蓝牙耳机的蓝牙音频混合通信方法
CN108337074A (zh) * 2018-06-22 2018-07-27 恒玄科技(上海)有限公司 高可靠性的蓝牙耳机无线通信方法

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111867144A (zh) * 2020-06-29 2020-10-30 炬芯科技股份有限公司 一种无线通信方法及无线通信设备
CN112437418A (zh) * 2020-07-17 2021-03-02 珠海市杰理科技股份有限公司 Tws设备通信数据配置方法、装置、设备、芯片及介质
CN112437418B (zh) * 2020-07-17 2024-01-30 珠海市杰理科技股份有限公司 Tws设备通信数据配置方法、装置、设备、芯片及介质
CN113286212A (zh) * 2021-05-20 2021-08-20 北京明略软件系统有限公司 一种佩戴式音频采集组件
CN113286212B (zh) * 2021-05-20 2022-07-12 北京明略软件系统有限公司 一种佩戴式音频采集组件
US11445286B1 (en) 2021-05-20 2022-09-13 Amazon Technologies, Inc. Wireless connection management
WO2022245429A1 (fr) * 2021-05-20 2022-11-24 Amazon Technologies, Inc. Gestion de connexion sans fil
CN113556650A (zh) * 2021-06-07 2021-10-26 广州安凯微电子股份有限公司 Tws耳机无线通信方法、系统、装置及存储介质
CN113556650B (zh) * 2021-06-07 2023-04-21 广州安凯微电子股份有限公司 Tws耳机无线通信方法、系统、装置及存储介质
CN113242546A (zh) * 2021-06-25 2021-08-10 南京中感微电子有限公司 音频转发方法、设备和存储介质
WO2023000565A1 (fr) * 2021-07-22 2023-01-26 珠海市杰理科技股份有限公司 Procédé et appareil de correction d'erreur de données de perte de paquets dans un mode double transmission, ainsi que dispositif et système
WO2024016754A1 (fr) * 2022-07-20 2024-01-25 哲库科技(上海)有限公司 Procédé et appareil de transmission de paquet multimédia, dispositif et support

Also Published As

Publication number Publication date
CN112042212A (zh) 2020-12-04
CN112042212B (zh) 2021-12-21

Similar Documents

Publication Publication Date Title
WO2020124581A1 (fr) Procédé de transmission de données audio et dispositif électronique
CN112789867B (zh) 一种蓝牙连接方法及设备
US11778363B2 (en) Audio data transmission method applied to switching between single-earbud mode and double-earbud mode of TWS headset and device
CN113228701B (zh) 音频数据的同步方法及设备
CN112868244B (zh) 一种点对多点的数据传输方法及设备
CN112640505B (zh) 一种传输速率的控制方法及设备
WO2020113588A1 (fr) Procédé de transmission de données point à multipoint et dispositif électronique
WO2020124611A1 (fr) Procédé et dispositif de commande de débit
CN112913321B (zh) 一种使用蓝牙耳机进行通话的方法、设备及系统
WO2021043219A1 (fr) Procédé de reconnexion bluetooth et appareil associé
WO2021129521A1 (fr) Procédé et appareil de communication bluetooth
WO2020124371A1 (fr) Dispositif et procédé d'établissement de canaux de données
CN112806092B (zh) 一种麦克风mic切换方法及设备
WO2020132907A1 (fr) Procédé de communication pour données audios, et dispositif électronique
CN113678481B (zh) 无线音频系统、音频通讯方法及设备
WO2024001735A1 (fr) Procédé de connexion de réseau, dispositif électronique et support de stockage
CN115706755A (zh) 回声消除方法、电子设备及存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1