Audio transmission method and earphone

By sending audio data packets back to the electronic device through the master earphone for the slave earphone to listen to, and combining error rate detection and master-slave switching mechanisms, the audio stuttering problem of Bluetooth earphones in interference environments is solved, and more stable audio data transmission is achieved.

WO2026007712A1PCT designated stage Publication Date: 2026-01-08ANKER INNOVATIONS TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/102159
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-03
Filing Date
2025-06-19
Publication Date
2026-01-08

AI Technical Summary

Technical Problem

Bluetooth headphones are prone to audio stuttering due to failure to receive audio data under environmental interference, especially in crowded places such as airports and high-speed rail stations.

Method used

The system establishes a communication connection between the main earphone and the electronic device, and returns the received audio data packets to the electronic device for monitoring by the secondary earphone. By combining error rate detection and master-slave switching mechanisms, the transmission path of the audio data packets is optimized to reduce interference.

Benefits of technology

It effectively avoids stuttering issues caused by the inability to obtain audio data packets, and improves the stability and continuity of audio data transmission in interference environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025102159_08012026_PF_FP_ABST
    Figure CN2025102159_08012026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are an audio transmission method and an earphone. The method comprises: establishing a first communication connection with an electronic device; receiving a first audio data packet sent by the electronic device by means of the first communication connection; and sending the first audio data packet to the electronic device by means of the first communication connection, such that a second earphone can acquire the first audio data packet by means of monitoring, wherein the second earphone is a slave earphone paired with a first earphone. A master earphone establishes a first communication connection with an electronic device, and when a first earphone serving as the master earphone receives a first audio data packet sent by the electronic device, the first earphone returns the first audio data packet to the electronic device, such that a second earphone serving as a slave earphone can acquire the first audio data packet by means of monitoring, thereby avoiding the problem of audio freezing caused by the failure of the second earphone to receive the audio data packet.
Need to check novelty before this filing date? Find Prior Art

Description

Audio transmission method and earphone

[0001] The present application claims priority to the Chinese patent application No. 2024108883660, filed on July 3, 2024, and entitled "Audio transmission method and earphone", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of earphones, and in particular to an audio transmission method and a storage medium. BACKGROUND

[0003] With the wide popularity of wearable devices, Bluetooth earphones have become a common item in our daily life. With the continuous progress and maturity of wireless technology, consumers' expectations for sound quality have also increased. However, in real life, with the increase in the number of electronic devices and in certain specific environments, such as airports, high-speed rail stations, and other places with dense human flow, environmental interference becomes more and more significant. These interferences have a great impact on the transmission of Bluetooth signals, resulting in the problem of audio stuttering caused by the failure of receiving audio data in Bluetooth earphones on the market. Therefore, there is an urgent need to provide a method that can improve the problem of audio stuttering caused by interference in Bluetooth earphones. SUMMARY

[0004] The present application provides an audio transmission method and earphone, which can avoid the problem of audio stuttering caused by the failure of receiving audio data.

[0005] In a first aspect, an audio transmission method is provided, applied to a first earphone, the first earphone being a master earphone paired with a second earphone, the method comprising: establishing a first communication connection with an electronic device; receiving a first audio data packet sent by the electronic device through the first communication connection; and sending the first audio data packet to the electronic device through the first communication connection, so that the second earphone can obtain the first audio data packet by listening, the second earphone being a slave earphone paired with the first earphone.

[0006] Through the above technical solution, the first communication connection is established between the master earphone and the electronic device. When the first earphone as the master earphone receives the first audio data packet sent by the electronic device, the first audio data packet is returned to the electronic device, so that the second earphone as the slave earphone obtains the first audio data packet by listening, avoiding the problem of audio stuttering caused by the failure of obtaining the audio data packet.

[0007] In some possible implementation manners, the first communication connection with the electronic device is established, including: sending a first communication connection establishment request to the electronic device, the first communication connection establishment request carrying a first frequency band identifier, the first frequency band identifier being a frequency band identifier corresponding to a first frequency band; and establishing the first communication connection with the electronic device in the first frequency band.

[0008] Through the technical solution, the first earphone sends the first communication connection establishment request carrying the first frequency band identifier to the electronic device, so that the first earphone establishes the first communication connection with the electronic device in the first frequency band corresponding to the first frequency band identifier.

[0009] In some possible implementation manners, after the step of establishing the first communication connection with the electronic device in the first frequency band, the method further includes: sending the first frequency band identifier to the second earphone; and receiving the first audio data packet sent by the electronic device through the first communication connection, including: receiving the first audio data packet sent by the electronic device through the first communication connection in the first frequency band; and sending the first audio data packet to the electronic device through the first communication connection, so that the second earphone can listen to the first audio data packet, including: sending the first audio data packet to the electronic device through the first communication connection in the first frequency band, so that the second earphone can obtain the first audio data packet by listening to the first frequency band.

[0010] Through the technical solution, the first earphone feeds back the first audio data packet to the electronic device through the first communication connection in the first frequency band, so that the second earphone obtains the first audio data packet in the process of listening to the first frequency band, and the audio data packet is obtained.

[0011] In some possible implementation manners, after the step of establishing the first communication connection with the electronic device, the method further includes: receiving a device address sent by the electronic device, and sending the device address to the second earphone; and sending the first audio data packet to the electronic device through the first communication connection in the first frequency band, so that the second earphone listens to the first frequency band and obtains the first audio data packet, including: sending a first target data packet to the electronic device through the first communication connection in the first frequency band, the first target data packet including the first audio data packet and the device address; so that the second earphone can listen to the data packet in the first frequency band, and filter the first target data packet including the device address from the data packet according to the device address, to obtain the first audio data packet in the first target data packet, the data packet at least including the first target data packet.

[0012] By the technical solution, the device address of the electronic device and the first frequency band identifier received by the first earphone can be sent to the second earphone, and the first audio data packet and the device address are encapsulated into the first target data packet when the first audio data packet is fed back, so that the second earphone listens to the first frequency band corresponding to the first frequency band identifier, and the first target data packet including the device address is screened out from the plurality of data packets under the first frequency band according to the device address, and then the first audio data packet included in the first target data packet is obtained.

[0013] With reference to the first aspect, in some possible implementation manners, the method further includes: detecting a first data packet error rate of the received first audio data packet, and obtaining a second data packet error rate of the second audio data packet sent by the second earphone; determining whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches an error rate threshold; and if the current environment is the interference environment, determining whether the first earphone and the second earphone perform master-slave switching based on the first data packet error rate and the second data packet error rate.

[0014] By the technical solution, whether the current environment is an interference environment is determined based on whether the first data packet error rate and / or the second data packet error rate reaches an error rate threshold, and when the current environment is the interference environment, it is determined whether the master-slave switching between the first earphone and the second earphone needs to be performed, thereby reducing the influence degree of the interference.

[0015] With reference to the first aspect, in some possible implementation manners, the determination of whether the first earphone and the second earphone perform master-slave switching based on the first data packet error rate and the second data packet error rate includes: comparing the first data packet error rate with the second data packet error rate; if the first data packet error rate is greater than the second data packet error rate, it is determined that the first earphone and the second earphone perform master-slave switching; and if the first data packet error rate is less than or equal to the second data packet error rate, it is determined that the first earphone and the second earphone do not perform master-slave switching.

[0016] By the technical solution, when the first data packet error rate is less than or equal to the second data packet error rate, it indicates that the first earphone originally used as the master earphone is less affected by the interference, and it is determined that the first earphone and the second earphone do not perform master-slave switching; and when the first data packet error rate is greater than the second data packet error rate, it indicates that the second earphone originally used as the slave earphone is less affected by the interference, and it is determined that the first earphone and the second earphone perform master-slave switching, so that the earphone less affected by the interference is determined as the master earphone for use, thereby further reducing the problem of being unable to obtain the audio data packet caused by the influence of the interference.

[0017] With reference to the first aspect, in some possible implementation manners, the method further includes: after determining whether the first earphone and the second earphone perform the master-slave switching based on the first data packet error rate and the second data packet error rate, the method further includes: if the first earphone and the second earphone perform the master-slave switching, sending master-slave switching information to the second earphone, switching the master-slave relationship of the first earphone and the second earphone, and causing the second earphone to establish a second communication connection with the electronic device; and listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection.

[0018] Through the technical solution, when the first earphone and the second earphone perform the master-slave switching, the second earphone needs to establish the second communication connection with the electronic device and switch the master-slave relationship of the first earphone and the second earphone; and the first earphone as the slave earphone after the switching listens to the second earphone sending the second audio data packet to the electronic device through the second communication connection, so that the second audio data packet is acquired.

[0019] With reference to the first aspect, in some possible implementation manners, before the listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection, the method further includes: receiving the second frequency band identifier sent by the second earphone; and the listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection includes: listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection in the second frequency band.

[0020] Through the technical solution, the device address of the electronic device and the second frequency band identifier received by the second earphone are sent to the first earphone, so that the first earphone listens to the second earphone sending the second audio data packet to the electronic device through the second communication connection in the second frequency band, and the second audio data packet is further acquired.

[0021] With reference to the first aspect, in some possible implementation manners, whether the current environment is the interference environment is determined based on whether the first data packet error rate and / or the second data packet error rate reaches the error rate threshold, including: when the first data packet error rate reaches the error rate threshold, and / or the second data packet error rate reaches the error rate threshold, it is determined that the current environment is the interference environment.

[0022] Through the technical solution, if the first data packet error rate reaches the error rate threshold, and / or the second data packet error rate reaches the error rate threshold, it is determined that the current environment is the interference environment, so that the effect of determining whether the current environment is the interference environment is achieved.

[0023] The second aspect provides an earphone, which includes:

[0024] a memory configured to store executable program code;

[0025] A processor is configured to call and run the executable program code from the memory, so that the earphone executes the audio transmission method as any one of the above. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description only represent some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0027] Fig. 1 shows a system schematic diagram of an audio transmission method provided by an embodiment of the present application;

[0028] Fig. 2 shows a flow schematic diagram of an audio transmission method provided by an embodiment of the present application;

[0029] Fig. 3 shows a flow schematic diagram of an audio transmission method provided by an embodiment of the present application;

[0030] Fig. 4 shows a flow schematic diagram of an audio transmission method provided by an embodiment of the present application;

[0031] Fig. 5 shows a flow schematic diagram of an audio transmission method provided by an embodiment of the present application;

[0032] Fig. 6 shows a structure schematic diagram of an audio data packet acquisition device provided by an embodiment of the present application;

[0033] Fig. 7 shows a structure schematic diagram of an earphone provided by an embodiment of the present application;

[0034] Fig. 8 shows a structure schematic diagram of an earphone provided by an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments only represent some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0036] The following description refers to the accompanying drawings. Unless otherwise indicated, same or similar elements in different drawings are denoted by same or similar reference numerals. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0037] Hereinafter, the terms "first", "second", etc. are used only for the purpose of description, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second", etc. can explicitly or implicitly include one or more of the features.

[0038] With the increasing number of electronic devices and in certain specific environments, such as airports, high-speed rail stations and other places with dense human flow, environmental interference becomes more and more significant. These interferences have a great impact on the transmission of Bluetooth signals, resulting in the problem that the Bluetooth earphones on the market often fail to receive audio data and cause lag. Specifically, Bluetooth earphone lag mainly falls into two categories. The first category is that the interference received from the earphone and the mobile phone is greater, resulting in that the earphone receives incorrect data or receives no data, so that the master earphone cannot normally reply to the mobile phone, and the mobile phone is always in a retransmission state, so that the audio data cached by the earphone is consumed, and the earphone cannot receive new data, resulting in lag. The second category is that the signal of the master earphone and the mobile phone is weak, resulting in that the master earphone receives incorrect data or the master earphone directly receives no data, resulting in that the mobile phone is always retransmitted, so that the earphone cannot receive new data, resulting in lag. Therefore, it is urgent to provide a method for improving the audio lag problem caused by interference of Bluetooth earphones.

[0039] FIG. 1 shows a system schematic diagram of an audio transmission method provided by an embodiment of the present application. The system can include at least one earphone 1000 and at least one electronic device 2000. The earphone 1000 can be an in-ear earphone, a semi-in-ear earphone, or the like Bluetooth earphone. The electronic device 2000 is any device with computing hardware capable of supporting and executing a player application related to sound effect adjustment. The earphone 1000 and the electronic device 2000 can establish a connection through Bluetooth, near field communication (NFC), or a network. The network can be a wireless network, such as a wireless network being a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc.

[0040] Specifically, since the earphone and the electronic device are connected through Bluetooth, near field communication, or wireless network connection, etc. wireless connection method, it is easy to be interfered, resulting in problems such as earphone audio lag.

[0041] And the present application is aimed at the above scenario. The first communication connection between the master earphone and the electronic device is established. When the first earphone as the master earphone receives the first audio data packet sent by the electronic device, the first audio data packet is returned to the electronic device for the second earphone as the slave earphone to obtain the first audio data packet, avoiding the problem of audio lag due to failure to obtain the audio data packet.

[0042] It should be noted that the system schematic diagram of the audio data packet acquisition system shown in FIG. 1 is only an example, the audio data packet acquisition system and the scenario described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of the audio data packet acquisition system and the emergence of new transaction scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0043] Based on the scenario schematic diagram shown in FIG. 1, the audio transmission method provided by the embodiments of the present application will be described in detail below in combination with FIG. 2 to FIG. 6.

[0044] Please refer to FIG. 2, which shows a flow schematic diagram of an audio transmission method provided by the embodiments of the present application. The execution subject of the method is a first earphone, which is a master earphone paired with a second earphone. The specific process of the method can be as follows:

[0045] S101, a first communication connection with an electronic device is established.

[0046] The first communication connection is a communication connection initiated by the first earphone for data transmission with the electronic device. Specifically, the first communication connection can be a connection established through a wireless connection mode such as Bluetooth, near field communication or wireless network.

[0047] S102, receiving a first audio data packet sent by the electronic device through the first communication connection.

[0048] The process of audio playing by the earphone first needs the electronic device to send the audio data packet to be played to the earphone, so that the earphone can convert the audio data packet to be played into a playable format through transcoding or the like, and then play the audio. Therefore, the electronic device needs to send the audio data packet to be played to the first earphone, and the first audio data packet is the audio data packet to be played at this time.

[0049] Specifically, since the first earphone has established a first communication connection with the electronic device in advance, the electronic device can send the first audio data packet to the first earphone through the first communication connection.

[0050] S103, sending the first audio data packet to the electronic device through the first communication connection, so that the second earphone can obtain the first audio data packet by listening, and the second earphone is a slave earphone paired with the first earphone.

[0051] The difference of the application from the prior art is that, in the prior art, the slave earphone in the paired earphones generally receives the audio data packet directly sent by the electronic device, or the master earphone synchronizes the slave earphone after receiving the audio data packet directly sent by the electronic device. However, the first earphone used as the master earphone returns the first audio data packet to the electronic device after obtaining the first audio data packet sent by the electronic device, so that the second earphone used as the slave earphone obtains the first audio data packet by monitoring the first communication connection link.

[0052] The audio transmission method provided by the application establishes a first communication connection between the first earphone used as the master earphone and the electronic device, and returns the first audio data packet to the electronic device when the first earphone receives the first audio data packet sent by the electronic device, so that the second earphone used as the slave earphone can monitor the first audio data packet, thereby avoiding audio lag and other problems caused by the failure to obtain the audio data packet.

[0053] Please refer to FIG. 3, which shows a flowchart of an audio transmission method provided by an embodiment of the application. The specific process of the method can be as follows:

[0054] S201, detecting a first data packet error rate of the received first audio data packet and a second data packet error rate of the second data packet sent by the second earphone.

[0055] The error data packet can be determined by cyclic redundancy check (CRC). CRC check is commonly used to detect unexpected changes in data. The error checked by CRC refers to the failure of cyclic redundancy check during data transmission or storage. When extracting the compressed archive, the CRC calculated from the extracted data does not match the CRC value of the archive, indicating that the data packet has been damaged, i.e., the data packet is an error data packet, which will result in failure to access the content.

[0056] The first earphone and the second earphone can be set to periodically detect the data packet error rate of the received audio data packet. The first data packet error rate is the data packet error rate of the first audio data packet detected by the first earphone within a preset time, and the second data packet error rate is the data packet error rate of the second audio data packet detected by the second earphone within a preset time.

[0057] S202, determining whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches an error rate threshold.

[0058] The error rate threshold is a determination threshold for determining whether the earphone is disturbed from the error rate dimension, and the signal strength threshold can be additionally added, which is a determination threshold for determining whether the paired earphone is disturbed from the signal strength dimension.

[0059] Specifically, the second earphone sends the error rate of the second data packet detected by the second earphone to the first earphone, and the first earphone determines whether the error rate of the second data packet reaches the error rate threshold. If it is detected that the error rate of the first data packet reaches the error rate threshold and / or the error rate of the second data packet sent by the second earphone reaches the error rate threshold, it is determined that the current environment is a disturbance environment. The error rate threshold can be 10%, 20%, 30%, 40%, 50%, without specific limitation.

[0060] It should be noted that if the first earphone does not receive the first audio data packet within a preset time, that is, the first earphone cannot receive the first audio data packet within the preset time, it is considered that the error rate of the first data packet is 100%. Or the second earphone does not receive the second audio data packet within a preset time, that is, the second earphone cannot receive the second audio data packet within the preset time, it is considered that the error rate of the second data packet is 100%.

[0061] S203, if the current environment is a disturbance environment, determining whether the first earphone and the second earphone perform master-slave switching based on the error rate of the first data packet and the error rate of the second data packet.

[0062] If the current environment is a disturbance environment, in order to reduce the influence of the disturbed audio transmission, it is necessary to re-determine the master-slave earphone, that is, to determine whether the first earphone and the second earphone perform master-slave switching.

[0063] Specifically, based on the error rate of the first data packet and the error rate of the second data packet, the purpose of determining the master earphone is to determine whether the first earphone and the second earphone need to perform master-slave switching.

[0064] S204, if the first earphone and the second earphone do not perform master-slave switching, a first communication connection establishment request is sent to the electronic device, and the first communication connection establishment request carries a first frequency band identifier, and the first frequency band identifier is a frequency band identifier corresponding to the first frequency band.

[0065] If the first earphone and the second earphone do not perform master-slave switching, it means that the first earphone originally used as the master earphone is still the master earphone, and the first earphone sends a first communication connection establishment request to the electronic device, and the first communication connection establishment request carries a first frequency band identifier, and the first frequency band identifier is a frequency band identifier corresponding to the first frequency band.

[0066] Specifically, the first frequency band is a frequency band in which the first earphone and the electronic device agree to communicate in advance. Therefore, when the first earphone sends a first communication connection establishment request to the electronic device, the first communication connection establishment request needs to carry a first frequency band identifier, so that the electronic device can identify the corresponding first frequency band and establish a first communication connection with the first earphone in the first frequency band.

[0067] S205, establishing a first communication connection with the electronic device in the first frequency band.

[0068] Wherein, after the electronic device receives the first frequency band identifier sent by the first earphone, the first communication connection can be established with the first earphone in the first frequency band corresponding to the first frequency band identifier.

[0069] S206, receiving the first audio data packet sent by the electronic device in the first frequency band through the first communication connection.

[0070] Wherein, after the first earphone and the electronic device establish the first communication connection, when audio playback is needed, the electronic device will send the first audio data packet to be played in the first frequency band through the first communication connection, so that the first earphone can obtain it.

[0071] S207, sending the first audio data packet to the electronic device in the first frequency band through the first communication connection, so that the second earphone can obtain the first audio data packet by listening to the first frequency band.

[0072] Wherein, the first earphone will return the received first audio data packet to the electronic device in the first frequency band through the first communication connection, so that the second earphone can obtain the first audio data returned by the first earphone to the electronic device when listening to the first frequency band.

[0073] The audio transmission method provided in the embodiments of the present application can avoid audio lag and the like by establishing a first communication connection between the master earphone and the electronic device, returning the first audio data packet to the electronic device when the first earphone as the master earphone receives the first audio data packet sent by the electronic device, and enabling the second earphone as the slave earphone to obtain the first audio data packet. The first earphone sends a first communication connection establishment request carrying a first frequency band identifier to the electronic device, so that the first earphone and the electronic device establish the first communication connection in a first frequency band corresponding to the first frequency band identifier. The first earphone feeds back the first audio data packet to the electronic device in the first frequency band through the first communication connection, so that the second earphone obtains the first audio data packet in the process of monitoring the first frequency band, and the audio data packet is obtained. The first data packet error rate of the received audio data packet is periodically detected, and when the first data packet error rate reaches an error rate threshold and / or the interference abnormality information sent by the second earphone is received, it is determined that the current environment is an interference environment, and the step of establishing the first communication connection between the first earphone and the electronic device is performed in the interference environment. Whether the first earphone and the second earphone perform master-slave switching can be determined based on the first data packet error rate and the second data packet error rate of the audio data packet received by the second earphone within a preset time length. When the first earphone and the second earphone do not perform master-slave switching, that is, the first earphone is still used as the master earphone, the step of establishing the first communication connection with the electronic device is performed.

[0074] Referring to FIG. 4, FIG. 4 shows a flowchart of an audio transmission method provided in the embodiments of the present application. The audio transmission method is applied to the first earphone still being the master earphone after switching and the second earphone still being the slave earphone after switching, and specifically includes the following steps:

[0075] S301, detecting a first data packet error rate of a received first audio data packet and obtaining a second data packet error rate of a second audio data packet sent by the second earphone.

[0076] The first earphone and the second earphone can be configured to periodically detect the data packet error rate of the received audio data packet, and the first data packet error rate is the data packet error rate detected by the first earphone. For example, the first data packet error rate of the received audio data packet is detected every 5s.

[0077] S302, when the first data packet error rate reaches an error rate threshold and / or the second data packet error rate reaches the error rate threshold, determining that the current environment is an interference environment.

[0078] The error rate threshold is a determination threshold for determining whether the earphone is disturbed from the error rate dimension, and a signal strength threshold can also be added, which is a determination threshold for determining whether the paired earphone is disturbed from the signal strength dimension.

[0079] Specifically, the second earphone sends the error rate of the second data packet detected by the second earphone to the first earphone, and the first earphone determines whether the error rate of the second data packet reaches the error rate threshold. If it is detected that the error rate of the first data packet reaches the error rate threshold, and / or the error rate of the second data packet sent by the second earphone reaches the error rate threshold, it is determined that the current environment is an interference environment.

[0080] S303, compare the first data packet error rate with the second data packet error rate.

[0081] The data packet error rate can represent the interference degree of the earphone interference, and the data packet error rate is lower when the interference degree is smaller, and the data packet error rate is higher when the interference degree is higher. Therefore, by comparing the first data packet error rate of the first earphone and the second data packet error rate of the second earphone, the interference degree of the two earphones can be determined.

[0082] S304, if the first data packet error rate is less than or equal to the second data packet error rate, it is determined that the first earphone and the second earphone do not perform master-slave switching.

[0083] If the first data packet error rate is less than or equal to the second data packet error rate, it means that the first earphone originally used as the master earphone is less affected by the interference, and the first earphone is still used as the master earphone. It is determined that the first earphone and the second earphone do not perform master-slave switching.

[0084] Specifically, if the first data packet error rate and the second data packet error rate do not reach the error rate threshold, it is determined that the first earphone and the second earphone do not perform master-slave switching.

[0085] If the first data packet error rate and the second data packet error rate do not reach the error rate threshold, it means that the first earphone and the second earphone are not affected by the interference at this time, and the master-slave switching is not performed.

[0086] S305, if the first earphone and the second earphone do not perform master-slave relationship switching, a first communication connection establishment request is sent to the electronic device, and the first communication connection establishment request carries a first frequency band identifier. The first frequency band identifier is the frequency band identifier corresponding to the first frequency band.

[0087] If the first earphone and the second earphone do not perform master-slave switching, it means that the first earphone originally used as the master earphone is still the master earphone. The first earphone sends a first communication connection establishment request to the electronic device, and the first communication connection establishment request carries a first frequency band identifier. The first frequency band identifier is the frequency band identifier corresponding to the first frequency band.

[0088] Specifically, the first frequency band is a frequency band in which the first earphone and the electronic device agree to use for communication connection in advance. Therefore, when the first earphone sends a first communication connection establishment request to the electronic device, the first communication connection establishment request needs to carry a first frequency band identifier, so that the electronic device can identify the corresponding first frequency band in the first frequency band and establish a first communication connection with the first earphone.

[0089] S306, establishing a first communication connection with the electronic device in the first frequency band.

[0090] Wherein, after the electronic device receives the first frequency band identifier sent by the first earphone, the first communication connection can be established with the first earphone in the first frequency band corresponding to the first frequency band identifier.

[0091] S307, sending the first frequency band identifier to the second earphone.

[0092] Wherein, in order to make the second earphone know the specific frequency band it needs to listen to, the first earphone needs to send the first frequency band identifier to the second earphone.

[0093] S308, receiving the device address sent by the electronic device, and sending the device address to the second earphone.

[0094] Wherein, in order to realize that the second earphone obtains the first audio data packet from the first frequency band later, it is stipulated that when the electronic device establishes a communication connection with the first earphone or the second earphone, the device address of the electronic device needs to be sent to the earphone corresponding to the established communication connection.

[0095] Specifically, when the first earphone used as the master earphone receives the device address, it will send the device address to the second earphone used as the slave earphone.

[0096] S309, receiving the first audio data packet sent by the electronic device in the first frequency band through the first communication connection.

[0097] Wherein, after the first earphone establishes the first communication connection with the electronic device, when audio playback is needed, the electronic device will send the first audio data packet to be played in the first frequency band through the first communication connection, so that the first earphone can obtain it.

[0098] S310, sending the first target data packet to the electronic device in the first frequency band through the first communication connection, the first target data packet including the first audio data packet and the device address; so that the second earphone can filter out the first target data packet including the device address from the data packet by listening to the data packet in the first frequency band, and thus obtain the first audio data packet in the first target data packet, the data packet at least including the first target data packet.

[0099] In order to realize the first audio data packet obtained by the second earphone from the first frequency band, the first earphone needs to encapsulate the first audio data packet and the device address to obtain a first target data packet including the first audio data packet and the device address, and send the first target data packet to the electronic device through the first communication connection in the first frequency band.

[0100] Since there can be multiple data packets in the first frequency band, such as non-audio data packets sent by the first earphone to the electronic device, or data packets sent by the electronic watch to the electronic device, etc., the second earphone needs to analyze each data packet in the first frequency band, filter the first target data packet including the device address from the data packet, and obtain the first audio data packet included in the first target data packet.

[0101] The audio transmission method provided by the embodiment can send the device address of the electronic device and the first frequency band identifier received by the first earphone to the second earphone, and encapsulate the first audio data packet and the device address as a first target data packet when feeding back the first audio data packet, so that the second earphone listens to the first frequency band corresponding to the first frequency band identifier, and filters the first target data packet including the device address from the multiple data packets in the first frequency band according to the device address, and further obtains the first audio data packet included in the first target data packet. By judging whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches the error rate threshold, and determining whether the master-slave switching between the first earphone and the second earphone is needed when it is an interference environment, the influence degree of interference is reduced. When the first earphone and the second earphone do not perform master-slave switching, i.e., the first earphone is still used as the master earphone, the step of establishing the first communication connection with the electronic device is performed. When the first data packet error rate is less than or equal to the second data packet error rate, it means that the first earphone originally used as the master earphone is less affected by the interference, and it is determined that the first earphone and the second earphone do not perform master-slave switching; if the first data packet error rate is greater than the second data packet error rate, it means that the second earphone originally used as the slave earphone is less affected by the interference, and it is determined that the first earphone and the second earphone perform master-slave switching to determine the earphone less affected by the interference as the master earphone for use, further reducing the problem of unable to obtain the audio data packet caused by the interference. When the first data packet error rate and the second data packet error rate do not reach the error rate threshold, it is determined that the first earphone and the second earphone are not affected by the interference at this time, and the master-slave switching is not performed.

[0102] Please refer to FIG. 5, which shows a flowchart of an audio transmission method provided by an embodiment of the present application. The audio transmission method is applied to the first earphone as the switched slave earphone and the second earphone as the switched master earphone, and specifically includes the following steps:

[0103] S401, if the first data packet error rate is greater than the second data packet error rate, it is determined that the first earphone and the second earphone perform master-slave switching.

[0104] If the first data packet error rate is greater than the second data packet error rate, it means that the interference received by the second earphone is less than the interference received by the first earphone, and the second earphone is expected to be used as the master earphone. Then, it is determined that the first earphone and the second earphone perform master-slave switching.

[0105] S402, if the first earphone and the second earphone perform master-slave switching, the master-slave switching information is sent to the second earphone, so that the second earphone establishes a second communication connection with the electronic device and switches the master-slave relationship between the first earphone and the second earphone.

[0106] If the first earphone and the second earphone perform master-slave switching, the master-slave switching information needs to be sent from the first earphone to the second earphone, so that the second earphone establishes a second communication connection with the electronic device and switches the master-slave relationship between the first earphone and the second earphone.

[0107] S403, receiving the second frequency band identifier sent by the second earphone.

[0108] When the second earphone establishes a second communication connection with the electronic device, the second earphone also sends the device address and the second frequency band identifier sent by the electronic device to the first earphone for listening by the first earphone.

[0109] S404, listening to the second earphone sending the second audio data packet to the electronic device in the second frequency band through the second communication connection.

[0110] The first earphone listens to the second earphone sending the second audio data packet to the electronic device in the second frequency band through the second communication connection.

[0111] The audio transmission method provided by the embodiment needs the second earphone to establish a second communication connection with the electronic device and switch the master-slave relationship between the first earphone and the second earphone when the first earphone and the second earphone perform master-slave switching. After switching, the first earphone as a slave earphone listens to the second earphone sending the second audio data packet to the electronic device through the second communication connection, so as to realize the acquisition of the audio data packet. The device address and the second frequency band identifier of the electronic device received by the second earphone are sent to the first earphone, so that the first earphone listens to the second earphone sending the second audio data packet to the electronic device in the second frequency band through the second communication connection, and further acquires the second audio data packet.

[0112] Based on the scenario diagram shown in FIG. 1, the audio data packet acquisition apparatus provided by the embodiments of the present application will be described in detail below in combination with FIG. 6. It should be noted that the audio data packet acquisition apparatus in FIG. 6 is configured to execute the method of the embodiments of the present application shown in FIGS. 2-5. For the purpose of illustration, only the parts related to the embodiments of the present application are shown, and the specific technical details not disclosed can be referred to the embodiments shown in FIGS. 2-5.

[0113] Referring to FIG. 6, FIG. 6 shows a structural schematic diagram of an audio data packet acquisition apparatus according to an embodiment of the present application. The audio data packet acquisition apparatus 700 can be applied to a first earphone, which is a master earphone paired with a second earphone. The audio data packet acquisition apparatus 700 can include a communication unit 701, a receiving unit 702, and a first sending unit 703, which are specifically as follows.

[0114] The communication unit 701 is configured to establish a first communication connection with an electronic device.

[0115] The receiving unit 702 is configured to receive a first audio data packet sent by the electronic device through the first communication connection.

[0116] The first sending unit 703 is configured to send the first audio data packet to the electronic device through the first communication connection, so that the second earphone can acquire the first audio data packet by monitoring.

[0117] In some embodiments, the communication unit 701 is specifically configured to:

[0118] send a first communication connection establishment request to the electronic device, the first communication connection establishment request carrying a first frequency band identifier, the first frequency band identifier being a frequency band identifier corresponding to a first frequency band;

[0119] establish the first communication connection with the electronic device in the first frequency band.

[0120] In some embodiments, the apparatus is further specifically configured to:

[0121] send the first frequency band identifier to the second earphone;

[0122] The receiving unit 702 is specifically configured to:

[0123] receive the first audio data packet sent by the electronic device in the first frequency band through the first communication connection;

[0124] The first sending unit 703 is specifically configured to:

[0125] send the first audio data packet to the electronic device in the first frequency band through the first communication connection, so that the second earphone can acquire the first audio data packet by monitoring the first frequency band.

[0126] In some embodiments, the apparatus is also specifically used for:

[0127] receiving the device address sent by the electronic device, and sending the device address to the second earphone;

[0128] The first sending unit 703 is specifically configured to:

[0129] sending the first target data packet to the electronic device under the first frequency band through the first communication connection, the first target data packet comprising the first audio data packet and the device address; so that the second earphone can listen to the data packet under the first frequency band, and filter out the first target data packet comprising the device address from the data packet according to the device address, so as to obtain the first audio data packet in the first target data packet, the data packet at least comprising the first target data packet.

[0130] In some embodiments, the apparatus is also specifically used for:

[0131] detecting the first data packet error rate of the received first audio data packet, and obtaining the second data packet error rate of the second audio data packet sent by the second earphone;

[0132] judging whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches an error rate threshold;

[0133] if the current environment is an interference environment, determining whether the first earphone and the second earphone perform master-slave switching based on the first data packet error rate and the second data packet error rate;

[0134] if the first earphone and the second earphone do not perform master-slave switching, performing the step of establishing the first communication connection with the electronic device.

[0135] In some embodiments, the apparatus is also specifically used for:

[0136] comparing the first data packet error rate with the second data packet error rate;

[0137] if the first data packet error rate is greater than the second data packet error rate, determining that the first earphone and the second earphone perform master-slave switching;

[0138] if the first data packet error rate is less than or equal to the second data packet error rate, determining that the first earphone and the second earphone do not perform master-slave switching.

[0139] In some embodiments, the apparatus is also specifically used for:

[0140] if the first earphone and the second earphone perform master-slave switching, sending master-slave switching information to the second earphone, switching the master-slave relationship of the first earphone and the second earphone, and enabling the second earphone to establish the second communication connection with the electronic device;

[0141] listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection.

[0142] In some embodiments, the apparatus is further specifically configured to:

[0143] receiving the second frequency band identifier sent by the second earphone;

[0144] listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection, comprising:

[0145] listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection in the second frequency band.

[0146] In some embodiments, the apparatus is further specifically configured to:

[0147] determining that the current environment is an interference environment when the first data packet error rate reaches the error rate threshold, and / or the second data packet error rate reaches the error rate threshold.

[0148] The audio transmission method provided by the embodiments of the present application, by the master earphone and the electronic device establishing a first communication connection, when the first earphone as the master earphone receives the first audio data packet sent by the electronic device, the first audio data packet is returned to the electronic device for the second earphone as the slave earphone to obtain the first audio data packet by listening, avoiding the problem of audio lag due to the failure to obtain the audio data packet.

[0149] Please refer to FIG. 7, which shows a structural schematic diagram of an earphone provided by an embodiment of the present application. The earphone 1000 comprises a processor 1001 and a memory 1002. The processor 1001 is electrically connected with the memory 1002.

[0150] The processor 1001 is a control center of the earphone 1000, and can include one or more processing cores. The processor 1001 connects various parts of the earphone 1000 through various interfaces and lines, executes various functions of the earphone 1000 and processes data by running or invoking computer programs stored in the memory 1002 and invoking data stored in the memory 1002, thereby overall controlling the earphone 1000. Alternatively, the processor 1001 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1001 can be integrated with one or a combination of a CPU and a modem. Among them, the CPU mainly processes operating systems, user pages, and application programs; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 1001, but be implemented by a separate communication chip.

[0151] The memory 1002 can be used to store software programs and modules, and the processor 1001 executes various function applications and data processing by running the computer programs and modules stored in the memory 1002. The memory 1002 can mainly include a program storage area and a data storage area, wherein the program storage area can store operating systems, computer programs required by at least one function, and the like; and the data storage area can store data created according to the use of the earphone 1000, and the like.

[0152] In addition, the memory 1002 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 1002 can also include a memory controller to provide access for the processor 1001 to the memory 1002.

[0153] In the embodiments of the present application, the processor 1001 in the earphone 1000 loads the instructions corresponding to the processes of one or more computer programs into the memory 1002 according to the following steps, and the processor 1001 runs the computer programs stored in the memory 1002, thereby realizing various functions, as follows:

[0154] Establish a first communication connection with an electronic device;

[0155] Receive a first audio data packet sent by the electronic device through the first communication connection;

[0156] The first audio data packet is sent to the electronic device through the first communication connection, so that the second earphone can obtain the first audio data packet by monitoring.

[0157] Optionally, the processor 1001, in the execution of establishing the first communication connection with the electronic device, specifically executes:

[0158] sending a first communication connection establishment request to the electronic device, the first communication connection establishment request carrying a first frequency band identifier, the first frequency band identifier being a frequency band identifier corresponding to the first frequency band;

[0159] establishing the first communication connection with the electronic device in the first frequency band.

[0160] Optionally, the processor 1001, in the execution of establishing the first communication connection with the electronic device in the first frequency band, further specifically executes:

[0161] sending the first frequency band identifier to the second earphone;

[0162] The processor 1001, in the execution of receiving the first audio data packet sent by the electronic device through the first communication connection, specifically executes:

[0163] receiving the first audio data packet sent by the electronic device through the first communication connection in the first frequency band;

[0164] The processor 1001, in the execution of sending the first audio data packet to the electronic device through the first communication connection, so that the second earphone can obtain the first audio data packet by monitoring, specifically executes:

[0165] sending the first audio data packet to the electronic device through the first communication connection in the first frequency band, so that the second earphone can obtain the first audio data packet by monitoring the first frequency band.

[0166] Optionally, the processor 1001 further specifically executes:

[0167] receiving a device address sent by the electronic device, and sending the device address to the second earphone;

[0168] sending the first audio data packet to the electronic device through the first communication connection in the first frequency band, so that the second earphone can obtain the first audio data packet by monitoring the first frequency band, comprising:

[0169] transmitting the first target data packet to the electronic device under the first frequency band through the first communication connection, the first target data packet comprising the first audio data packet and the device address; enabling the second earphone to listen to the data packet under the first frequency band, and filtering the first target data packet comprising the device address from the data packet according to the device address, so as to obtain the first audio data packet in the first target data packet, the data packet at least comprising the first target data packet.

[0170] Optionally, the processor 1001 further specifically executes:

[0171] detecting a first data packet error rate of the received first audio data packet, and obtaining a second data packet error rate of the second audio data packet transmitted by the second earphone;

[0172] judging whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches an error rate threshold;

[0173] if the current environment is the interference environment, determining whether the first earphone and the second earphone perform master-slave switching based on the first data packet error rate and the second data packet error rate.

[0174] Optionally, when the processor 1001 performs the determination of whether the first earphone and the second earphone perform master-slave switching based on the first data packet error rate and the second data packet error rate, the processor 1001 specifically executes:

[0175] comparing the first data packet error rate with the second data packet error rate;

[0176] if the first data packet error rate is greater than the second data packet error rate, determining that the first earphone and the second earphone perform master-slave switching;

[0177] if the first data packet error rate is less than or equal to the second data packet error rate, determining that the first earphone and the second earphone do not perform master-slave switching.

[0178] Optionally, after the processor 1001 performs the determination of whether the first earphone and the second earphone perform master-slave switching based on the first data packet error rate and the second data packet error rate, the processor 1001 specifically executes:

[0179] if the first earphone and the second earphone perform master-slave switching, transmitting master-slave switching information to the second earphone, switching the master-slave relationship between the first earphone and the second earphone, and enabling the second earphone to establish a second communication connection with the electronic device;

[0180] listening to the second earphone transmitting the second audio data packet to the electronic device through the second communication connection.

[0181] Optionally, before the processor 1001 performs the listening to the second earphone transmitting the second audio data packet to the electronic device through the second communication connection, the processor 1001 further specifically executes:

[0182] receiving the second frequency band identifier sent by the second earphone;

[0183] listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection, comprising:

[0184] listening to the second earphone sending the second audio data packet to the electronic device through the second communication connection under the second frequency band.

[0185] Optionally, when the processor 1001 executes the judgment of whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches the error rate threshold, the processor 1001 specifically executes:

[0186] When the first data packet error rate reaches the error rate threshold, and / or the second data packet error rate reaches the error rate threshold, it is determined that the current environment is an interference environment.

[0187] The embodiment of the application establishes the first communication connection with the electronic device, receives the first audio data packet sent by the electronic device through the first communication connection, and sends the first audio data packet to the electronic device through the first communication connection, so that the second earphone obtains the first audio data packet. The second earphone is a slave earphone paired with the first earphone. By establishing the first communication connection between the master earphone and the electronic device, when the first earphone as the master earphone receives the first audio data packet sent by the electronic device, the first audio data packet is returned to the electronic device for the second earphone as the slave earphone to obtain the first audio data packet through listening, avoiding problems such as audio lag due to the failure to obtain the audio data packet.

[0188] Please refer to FIG. 8, which shows a structural schematic diagram of an earphone according to an embodiment of the application. The earphone 1000 can include a processor 1001, a memory 1002, a sensor 1003, and a power supply 1004. The processor 1001 is electrically connected to the sensor 1003 and the power supply 1004, respectively.

[0189] The sensor 1003 is used to collect information of the earphone 1000 itself or information of a user or external environment information. For example, the sensor 1003 can include one or more of a radar sensor, a vibration sensor, a temperature sensor, a distance sensor, a magnetic field sensor, a light sensor, an acceleration sensor, a fingerprint sensor, a Hall sensor, a position sensor, a gyroscope, an inertial sensor, a posture sensor, a barometer, a heart rate sensor, etc.

[0190] The power supply 1004 is used to supply power to each component of the earphone 1000. In some embodiments, the power supply 1004 can be logically connected to the processor 1001 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.

[0191] It should be understood that the apparatus provided by the embodiments of the present application is used to execute the above-mentioned audio transmission method, and thus can achieve the same effects as the above-mentioned implementation method.

[0192] In the case of using the integrated unit, the apparatus can include a processing module and a storage module. When the apparatus is applied to the earphone, the processing module can be used to control and manage the actions of the earphone. The storage module can be used to support the earphone to execute relevant program codes and the like.

[0193] The processing module can be a processor or a controller, which can realize or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, and the like. The storage module can be a memory.

[0194] In addition, the apparatus provided by the embodiments of the present application can be a chip, a component or a module, the chip can include a connected processor and a memory; the memory is used to store instructions, when the processor calls and executes the instructions, the chip can execute the above-mentioned audio transmission method provided by the embodiments.

[0195] The embodiments of the present application also provide a computer readable storage medium, the computer readable storage medium stores computer program codes, when the computer program codes run on the computer, the computer executes the above-mentioned related method steps to realize the above-mentioned audio transmission method provided by the embodiments.

[0196] The embodiments of the present application also provide a computer program product, when the computer program product runs on the computer, the computer executes the above-mentioned related steps to realize the above-mentioned audio transmission method provided by the embodiments.

[0197] The apparatus, computer readable storage medium, computer program product or chip provided by the embodiments can be used to execute the corresponding method provided above, and thus the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be described here.

[0198] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the above-mentioned division of functional modules is taken as an example, in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above.

[0199] In the embodiments of the present disclosure, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic, and the division of the modules or units is merely a logical function division. In actual implementation, another division manner can be adopted, for example, a plurality of units or components can be combined or integrated into another apparatus, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or in other forms.

[0200] The above merely describes specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present disclosure, which should be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. An audio transmission method, characterized by, The method is applied to a first earphone, the first earphone is a master earphone paired with a second earphone, and the method comprises: establishing a first communication connection with an electronic device; receiving a first audio data packet sent by the electronic device through the first communication connection; sending the first audio data packet to the electronic device through the first communication connection, so that the second earphone can obtain the first audio data packet by listening, the second earphone being a slave earphone paired with the first earphone.

2. The method of claim 1, wherein, The step of establishing the first communication connection with the electronic device comprises: sending a first communication connection establishment request to the electronic device, the first communication connection establishment request carrying a first frequency band identifier, the first frequency band identifier being a frequency band identifier corresponding to the first frequency band; establishing the first communication connection with the electronic device in the first frequency band.

3. The method of claim 2, wherein, After the step of establishing the first communication connection with the electronic device in the first frequency band, the method further comprises: sending the first frequency band identifier to the second earphone; The step of receiving the first audio data packet sent by the electronic device through the first communication connection comprises: receiving the first audio data packet sent by the electronic device in the first frequency band through the first communication connection; The step of sending the first audio data packet to the electronic device through the first communication connection, so that the second earphone can obtain the first audio data packet by listening, comprises: sending the first audio data packet to the electronic device in the first frequency band through the first communication connection, so that the second earphone can obtain the first audio data packet by listening to the first frequency band.

4. The method of claim 3, wherein, After the step of establishing the first communication connection with the electronic device, the method further comprises: receiving a device address sent by the electronic device and sending the device address to the second earphone; The step of sending the first audio data packet to the electronic device in the first frequency band through the first communication connection, so that the second earphone can obtain the first audio data packet by listening to the first frequency band, comprises: sending a first target data packet to the electronic device in the first frequency band through the first communication connection, the first target data packet comprising the first audio data packet and the device address; so that the second earphone can listen to data packets in the first frequency band, and according to the device address, filter out the first target data packet comprising the device address from the data packets, so as to obtain the first audio data packet in the first target data packet, the data packets at least comprising the first target data packet.

5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: detecting a first data packet error rate of the received first audio data packet, and obtaining a second data packet error rate of a second audio data packet sent by the second earphone; determining whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches an error rate threshold; if the current environment is an interference environment, determining whether the first earphone and the second earphone perform master-slave switching based on the first data packet error rate and the second data packet error rate.

6. The method of claim 5, wherein, After determining whether the first earphone and the second earphone perform the master-slave switching based on the first data packet error rate and the second data packet error rate, the method further comprises: If the first earphone and the second earphone do not perform the master-slave switching, performing the step of establishing the first communication connection with the electronic device.

7. The method of claim 5, wherein, The step of determining whether the first earphone and the second earphone perform the master-slave switching based on the first data packet error rate and the second data packet error rate comprises: Comparing the first data packet error rate with the second data packet error rate; If the first data packet error rate is greater than the second data packet error rate, determining that the first earphone and the second earphone perform the master-slave switching; If the first data packet error rate is less than or equal to the second data packet error rate, determining that the first earphone and the second earphone do not perform the master-slave switching.

8. The method of claim 5, wherein, After determining whether the first earphone and the second earphone perform the master-slave switching based on the first data packet error rate and the second data packet error rate, the method further comprises: If the first earphone and the second earphone perform the master-slave switching, sending master-slave switching information to the second earphone, switching the master-slave relationship between the first earphone and the second earphone, and enabling the second earphone to establish a second communication connection with the electronic device; Listening to the second earphone for sending second audio data packets to the electronic device through the second communication connection.

9. The method of claim 8, wherein, Before listening to the second earphone for sending second audio data packets to the electronic device through the second communication connection, the method further comprises: Receiving a second frequency band identifier sent by the second earphone; The step of listening to the second earphone for sending second audio data packets to the electronic device through the second communication connection comprises: Listening to the second earphone for sending second audio data packets to the electronic device through the second communication connection in the second frequency band.

10. The method of claim 5, wherein, The step of determining whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches an error rate threshold value comprises: When the first data packet error rate reaches the error rate threshold value, and / or the second data packet error rate reaches the error rate threshold value, determining that the current environment is an interference environment.

11. An audio data packet acquisition apparatus characterized by comprising: The first earphone is a master earphone paired with a second earphone, and the audio data packet acquisition apparatus comprises: A communication unit configured to establish a first communication connection with an electronic device; A receiving unit configured to receive first audio data packets sent by the electronic device through the first communication connection; A first sending unit configured to send the first audio data packets to the electronic device through the first communication connection, so that the second earphone can acquire the first audio data packets by listening, and the second earphone is a slave earphone paired with the first earphone.

12. The audio data packet acquisition apparatus of claim 11, wherein, The communication unit is specifically configured to: Send a first communication connection establishment request to the electronic device, the first communication connection establishment request carrying a first frequency band identifier, and the first frequency band identifier being a frequency band identifier corresponding to the first frequency band; Establish the first communication connection with the electronic device in the first frequency band.

13. The audio data packet acquisition apparatus of claim 12, wherein, The audio data packet acquisition apparatus is also specifically configured to send the first frequency band identifier to the second earphone. The receiving unit is specifically configured to receive a first audio data packet sent by the electronic device in a first frequency band through the first communication connection. The first sending unit is specifically configured to send a first audio data packet to the electronic device in the first frequency band through the first communication connection, so that the second earphone can acquire the first audio data packet by monitoring the first frequency band.

14. The audio data packet acquisition apparatus of claim 13, wherein, The audio data packet acquisition apparatus is also specifically configured to receive a device address sent by the electronic device and send the device address to the second earphone. The first sending unit is specifically configured to send a first target data packet to the electronic device in the first frequency band through the first communication connection, the first target data packet comprising the first audio data packet and the device address; so that the second earphone can monitor data packets in the first frequency band and filter out the first target data packet comprising the device address from the data packets according to the device address, thereby acquiring the first audio data packet in the first target data packet, the data packets comprising at least the first target data packet.

15. The apparatus of any of claims 11 to 14, wherein, The audio data packet acquisition apparatus is also specifically configured to: detect a first data packet error rate of the received first audio data packet and acquire a second data packet error rate of a second audio data packet sent by the second earphone; determine whether the current environment is an interference environment based on whether the first data packet error rate and / or the second data packet error rate reaches an error rate threshold; if the current environment is an interference environment, determine whether the first earphone and the second earphone perform master-slave switching based on the first data packet error rate and the second data packet error rate; if the first earphone and the second earphone do not perform master-slave switching, perform the step of establishing the first communication connection with the electronic device.

16. The apparatus of claim 15, wherein, The audio data packet acquisition apparatus is also specifically configured to: compare the first data packet error rate with the second data packet error rate; if the first data packet error rate is greater than the second data packet error rate, determine that the first earphone and the second earphone perform master-slave switching; if the first data packet error rate is less than or equal to the second data packet error rate, determine that the first earphone and the second earphone do not perform master-slave switching.

17. The apparatus for acquiring audio data packets of claim 15, wherein, The audio data packet acquisition apparatus is also specifically configured to: if the first earphone and the second earphone perform master-slave switching, send master-slave switching information to the second earphone, switch the master-slave relationship of the first earphone and the second earphone, and enable the second earphone to establish a second communication connection with the electronic device; monitor the second earphone to send a second audio data packet to the electronic device through the second communication connection.

18. The apparatus of claim 17, wherein, The audio data packet acquisition apparatus is also specifically configured to: receive a second frequency band identifier sent by the second earphone; The listening, by the second earphone, for the second earphone to send a second audio data packet to the electronic device through the second communication connection includes listening, by the second earphone, for the second earphone to send a second audio data packet to the electronic device through the second communication connection at the second frequency band.

19. The apparatus for acquiring audio data packets of claim 15, wherein, The audio data packet acquisition apparatus is further specifically used for: When the first data packet error rate reaches an error rate threshold and / or the second data packet error rate reaches an error rate threshold, determining that the current environment is an interference environment.

20. An earphone, characterized by The earphone comprises: a memory for storing executable program codes; a processor for calling and running the executable program codes from the memory, so that the vehicle executes the method as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Bluetooth mode switching method and device, communication system and stereophonic audio transmission method

    CN106535081A

  • High-reliability Bluetooth earphone wireless communication method

    CN108337074A

  • Audio data communication method and system and audio communication equipment

    CN109995479A

  • Data transmission method and device

    CN111447603A

  • Bluetooth communication method, medium, Bluetooth device and communication system

    CN112020047A