Signal detection method and device of wireless earphone

By switching to the second antenna to detect signal quality after the wireless headset successfully receives the first signal frame, the problem of signal quality instability caused by antenna polarity changes is solved, ensuring that the user experience is not affected, and the antenna with the best signal is selected for communication without affecting the current signal playback and reception.

CN120358443APending Publication Date: 2025-07-22HISILICON (SHANGHAI) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410056854.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-15
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

When wireless headphones communicate with terminals, the signal quality instability caused by changes in the antenna polarity relationship affects the user experience, and the prior art may lead to poor reception signal quality or miss the opportunity to choose a better antenna when switching antennas.

Method used

After successfully receiving the first signal frame, the wireless headset switches from the current antenna to the second antenna to detect the signal quality, and completes the detection before receiving the next initial signal frame, ensuring that the playback and reception of the first signal frame is not affected.

Benefits of technology

The user experience is guaranteed to the maximum extent, and the antenna with the best signal quality is accurately selected for communication without affecting the current signal playback and the next initial signal reception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358443A_ABST
    Figure CN120358443A_ABST
Patent Text Reader

Abstract

The invention provides a signal detection method and device of a wireless earphone, and relates to the field of wireless communication. In the method, the wireless earphone can receive a first signal frame through a first antenna, switch from the first antenna to a second antenna under the condition that the first signal frame is successfully received, and detect the signal quality of the second antenna. Subsequently, the wireless headset may receive the second signal frame through the target antenna. Wherein the second signal frame is the next initial transmission signal frame of the first signal frame, and the target antenna is the antenna with the best signal quality in the first antenna and the second antenna. Under the condition that the wireless earphone successfully receives the first signal frame, the signal quality of the second antenna is detected before the next initial transmission signal frame of the first signal frame is received, so that the signal detection method does not influence the playing of the first signal frame and the receiving of the next initial transmission signal frame of the first signal frame; therefore, the user experience is guaranteed to the greatest extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication, and in particular, to a signal detection method and apparatus for wireless earphones. Background Art

[0002] After a wireless earphone successfully establishes a wireless connection with a terminal (such as a mobile phone, a computer, etc.), wireless communication can be carried out. During the wireless communication between the wireless earphone and the terminal, since the wireless channel between the wireless earphone and the terminal is changing, and the relative positions of the wireless earphone and the terminal are not constant, the antenna polarization relationship between the wireless earphone and the terminal may also change. Therefore, a wireless earphone with dual antennas or multiple antennas continuously detects the signal quality of each antenna to ensure the communication quality between the wireless earphone and the terminal.

[0003] Currently, a wireless earphone can use one antenna to communicate with a terminal at the same time. If it is necessary to measure the signal quality of other antennas except the current antenna, the wireless earphone needs to switch the antenna for communicating with the terminal from the current antenna to other antennas. If the signal quality of other antennas is poor, it will affect the wireless earphone's reception of audio frames from the terminal, resulting in a poor user experience. Summary of the Invention

[0004] This application provides a signal detection method and apparatus for wireless earphones, which can measure the signal quality of multiple antennas of a wireless earphone without affecting the user experience.

[0005] To achieve the above object, the following technical solutions are adopted in this application:

[0006] In a first aspect, a signal detection method for a wireless earphone is provided, and this method can be executed by a wireless earphone. Here, the wireless earphone can refer to the wireless earphone itself, or a processor, module, logical node, chip, or chip system in the wireless earphone that implements this method.

[0007] The method includes: receiving a first signal frame through a first antenna; in the case of successfully receiving the first signal frame, switching from the first antenna to a second antenna and detecting the signal quality of the second antenna; receiving a second signal frame through a target antenna, where the second signal frame is the next initial transmission signal frame of the first signal frame, and the target antenna is the antenna with the best signal quality among the first antenna and the second antenna.

[0008] Based on the method provided in the above first aspect, since the wireless earphone detects the signal quality of the second antenna before receiving the next initial transmission signal frame of the first signal frame in the case of successfully receiving the first signal frame, this signal detection method neither affects the playback of the first signal frame nor affects the reception of the next initial transmission signal frame of the first signal frame, thus maximizing the protection of the user experience.

[0009] In a possible implementation, the above method further includes: sending a first response message indicating that the reception of the first signal frame fails; detecting the signal quality of the second antenna, including: receiving a third signal frame through the second antenna, where the third signal frame is a retransmission signal frame of the first signal frame; determining the signal quality of the second antenna according to the third signal frame.

[0010] Based on the above possible implementation, the wireless headset can determine the signal quality of the second antenna according to the retransmission signal frame of the first signal frame, so as not to affect the reception of the next initial transmission signal frame of the first signal frame.

[0011] In a possible implementation, the above method further includes: when the reception of the third signal frame fails, sending a second response message indicating that the reception of the third signal frame is successful.

[0012] Based on the above possible implementation, since the third signal frame is a retransmission signal frame of the first signal frame and is used to determine the signal quality of the second antenna, and the first signal frame has been successfully received, a second response message can also be sent indicating that the reception of the third signal frame is successful even if the reception of the third signal frame fails. Then the sending end (such as, the terminal) of the first signal frame does not need to retransmit the first signal frame. In this way, even if the reception of the third signal frame fails, it will not affect the reception of the next initial transmission signal frame of the first signal frame.

[0013] In a possible implementation, detecting the signal quality of the second antenna includes: sending a first detection frame through the second antenna; receiving a first response frame through the second antenna, where the first response frame is used to indicate that the first detection frame has been received; determining the signal quality of the second antenna according to the first response frame.

[0014] Based on the above possible implementation, the wireless headset sends a first detection frame, so that the receiving end (such as, the terminal) of the first detection frame sends a first response frame to the wireless headset. Thus, the wireless headset can determine the signal quality of the second antenna according to the first response frame, without affecting the reception of the next initial transmission signal frame of the first signal frame.

[0015] In a possible implementation, the above method further includes: playing the audio data carried by the first signal frame.

[0016] Based on the above possible implementation, after the wireless headset successfully receives the first signal frame, it can play the audio data carried by the first signal frame. In this way, while playing the audio data carried by the first signal frame, the signal quality of the second antenna is detected, maximizing the user experience.

[0017] In a second aspect, a communication device is provided for implementing the above method. The communication device may be the wireless earphone in the first aspect above. The communication device includes corresponding modules, units, or means for implementing the above method, and the modules, units, or means may be implemented by hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.

[0018] In combination with the second aspect above, in a possible implementation, the communication device may include a processing module and an interface module. The processing module may be used to implement the processing functions in any of the above aspects and any of their possible implementations. The processing module may be, for example, a processor. The interface module, which may also be referred to as an interface unit, is used to implement the sending and / or receiving functions in any of the above aspects and any of their possible implementations. The interface module may be composed of an interface circuit, a transceiver, a transceiver, or a communication interface.

[0019] In combination with the second aspect above, in a possible implementation, the interface module includes a sending module and a receiving module, which are respectively used to implement the sending and receiving functions in any of the above aspects and any of their possible implementations.

[0020] In a third aspect, a communication device is provided, including: a processor; the processor is used to be coupled with a memory and, after reading instructions in the memory, execute the method described in any of the above aspects according to the instructions. The communication device may be the wireless earphone in the first aspect above.

[0021] In combination with the third aspect above, in a possible implementation, the communication device further includes a memory, which is used to store program instructions and data. Optionally, the memory is integrated with the above processor; or, the memory is independent of the processor.

[0022] In combination with the third aspect above, in a possible implementation, the communication device is a chip or a chip system. Optionally, when the communication device is a chip system, it may be composed of chips or may include chips and other discrete devices.

[0023] In a fourth aspect, a communication device is provided, including: a processor and an interface circuit; the interface circuit is used to receive a computer program or instructions and transmit them to the processor; the processor is used to execute the computer program or instructions so that the communication device executes the method described in any of the above aspects. The communication device may be the wireless earphone in the first aspect above.

[0024] Combined with the above fourth aspect, in a possible implementation, the communication device is a chip or a chip system. Optionally, when the communication device is a chip system, it may be composed of chips, or may include chips and other discrete devices.

[0025] In a fifth aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium, and when it runs on a computer, the computer can execute the method described in any of the above aspects.

[0026] In a sixth aspect, a computer program product containing instructions is provided. When it runs on a computer, the computer can execute the method described in any of the above aspects.

[0027] In a seventh aspect, a communication system is provided. The communication system includes a terminal and a wireless headset for executing the method described in the first aspect above. The terminal is used to send a first signal frame.

[0028] Among them, for the technical effects brought by any possible implementation in the second aspect to the seventh aspect, reference can be made to the technical effects brought by different possible implementations in the first aspect above, which will not be elaborated here.

[0029] It can be understood that on the premise that the solutions do not conflict, the solutions in the above aspects can be combined. Description of the Drawings

[0030] Figure 1A Schematic diagram of the headset provided by this application;

[0031] Figure 1B Schematic diagram one of the antenna polarity relationship provided by this application;

[0032] Figure 1C Schematic diagram two of the antenna polarity relationship provided by this application;

[0033] Figure 1D Flowchart of the wireless headset for receiving and transmitting audio frames provided by this application;

[0034] Figure 2A Schematic diagram one of the communication system provided by this application;

[0035] Figure 2B Schematic diagram two of the communication system provided by this application;

[0036] Figure 3 Schematic diagram of the hardware structure of the communication device provided by this application;

[0037] Figure 4 Flowchart of the signal detection method of the wireless headset provided by this application;

[0038] Figure 5Schematic diagram of a signal frame sent by a terminal provided in this application;

[0039] Figure 6 Schematic structural diagram of a communication device provided in this application. Specific implementation manners

[0040] Currently, wireless earphones can be equipped with multiple antennas. Different antenna polarization directions are different and are used to receive signals of different polarities to ensure the communication quality between the wireless earphones and the terminal. For example, taking wireless earphones with dual antennas as an example, reference can be made to Figure 1A the shown wireless earphones. There are two antennas with orthogonal polarities inside the wireless earphones. These two antennas can be a horizontally polarized antenna and a vertically polarized antenna. In addition, the two antennas of the wireless earphones can also be other different polarities, which is not limited.

[0041] Among them, for the polarization of the antenna, it can be combined with Figure 1B and Figure 1C to understand.

[0042] In Figure 1B , the transmitting-end antenna sends a signal to the receiving-end antenna. The sine wave form represents the electric field of the signal sent by the transmitting end, and the unit is volts. Since both the transmitting-end antenna and the receiving-end antenna are vertically polarized antennas, that is, their polarities match, the energy loss of the signal received by the receiving end is less, and the received signal quality is higher.

[0043] Refer to Figure 1C as shown. Figure 1C The difference from Figure 1B is that the polarities of the transmitting-end antenna and the receiving-end antenna do not match. The polarity of the transmitting-end antenna is vertical, and the polarity of the receiving-end antenna is closer to horizontal. The energy loss of the signal reaching the receiving end is more, and the signal quality of the signal received by the receiving end may be very low. When the signal quality received by the receiving end is low, the received signal is more susceptible to noise, and the decoded data may have a large error from the original data and cannot correctly restore the original data. Therefore, the audio frame reception fails.

[0044] Alternatively, multiple antennas can also be designed according to the radiation direction of the wireless earphone antenna. Taking a wireless earphone including two antennas (e.g., antenna 1 and antenna 2) as an example, the radiation direction of antenna 1 points to the front side of the body, which is used for the scenario where the mobile phone is placed in the front pocket of the user, and the radiation direction of antenna 2 points to the back side of the body, which is used for the scenario where the mobile phone is placed in the back pocket of the user. The wireless earphone will select the antenna with better signal reception quality according to the radiation directions of antenna 1 and antenna 2. When the wireless earphone radiates a signal to the terminal, if the direction of the terminal does not match the radiation direction of the wireless earphone, the wireless earphone fails to send the signal. For example, when the terminal sends an audio frame to the wireless earphone, but the wireless earphone keeps sending failures, and the terminal does not receive a reply from the wireless earphone after a certain period of time, the terminal can retransmit the audio frame, or the terminal can also confirm the disconnection of the connection and prompt the user to reconnect, etc.

[0045] Specifically, the process of the wireless earphone receiving and transmitting audio frames can refer to the following steps, as Figure 1D shown. Among them, the terminal and the wireless earphone are connected.

[0046] S101: The terminal sends audio frame 1 to the wireless earphone. Correspondingly, the wireless earphone receives audio frame 1 from the terminal.

[0047] S102: The wireless earphone successfully receives audio frame 1.

[0048] It can be understood that when the signal reception quality of the wireless earphone is relatively good, the received audio frame 1 is completed for verification, that is, audio frame 1 is successfully received. Among them, the verification can be a verification method such as cyclic redundancy check (CRC). After the wireless earphone successfully receives audio frame 1, the audio content of audio frame 1 can be played to the user through the speaker.

[0049] S103: The wireless earphone sends an acknowledgement (ACK) to the terminal. Correspondingly, the terminal receives the ACK from the wireless earphone.

[0050] It can be understood that the ACK is used to indicate that the terminal has successfully received audio frame 1. Since the terminal sends different audio frames periodically, after receiving the ACK, the terminal will send the next audio frame, that is, audio frame 2, after a period of time in a cycle.

[0051] S104: The terminal sends audio frame 2 to the wireless earphone. Correspondingly, the wireless earphone receives audio frame 2 from the terminal.

[0052] S105: The wireless earphone fails to receive audio frame 2.

[0053] It can be understood that when the signal quality received by the wireless earphone is relatively poor, the data of the received audio frame 2 is very likely to be incorrect. The incorrect data will cause the received check to fail, such as CRC failure. At this time, it is considered that the reception of audio frame 2 fails, and the wireless earphone needs to retransmit audio frame 2.

[0054] S106: The wireless earphone sends a negative acknowledge (NACK) to the terminal. Correspondingly, the terminal receives the NACK from the wireless earphone.

[0055] S107: The terminal retransmits audio frame 2 to the wireless earphone. Correspondingly, the wireless earphone receives the retransmitted audio frame 2 from the terminal.

[0056] To ensure the integrity of the audio, after receiving the NACK, the terminal will attempt to retransmit audio frame 2 to the wireless earphone so that the wireless earphone can obtain the audio content included in audio frame 2.

[0057] S108: The wireless earphone successfully receives audio frame 2.

[0058] It can be understood that if the wireless earphone fails to receive audio frame 2, it can still send a NACK to the terminal to request the terminal to retransmit audio frame 2 again.

[0059] S109: The wireless earphone sends an ACK to the terminal. Correspondingly, the terminal receives the ACK from the wireless earphone.

[0060] It can be understood that when the retransmission of audio frame 2 also fails to be received, and before the arrival of the next initially transmitted audio frame (such as audio frame 3), the terminal can still be instructed to continue retransmitting through the NACK. If the maximum number of retransmissions is reached or the sending time of audio frame 3 arrives, then audio frame 2 needs to be discarded.

[0061] It can be understood that when the polarity of the wireless earphone antenna does not match the polarity of the received signal (for example, the two polarities are orthogonal), the received signal strength indicator (RSSI) of the signal received by the wireless earphone antenna will be very small, which will cause a very high packet error rate (PER) of the data received by the wireless earphone. The above Figure 1DDuring the process, when multiple retransmissions still result in reception failure, in order not to affect the reception of the next audio frame, the terminal stops retransmitting to the wireless headset when the maximum number of retransmissions for the audio frame is reached, which causes the loss of the audio frame and thus affects the sound quality heard by the user when using the wireless headset. On the contrary, when the antenna polarity matches the polarity of the received signal, the signal transmission quality is high and a higher transmission rate is supported. At this time, the wireless headset can provide better sound quality for the user. Therefore, compared with a single-antenna wireless headset, a multi-antenna wireless headset can select an antenna that more closely matches the polarity of the received signal from multiple antennas for signal reception, thereby improving the user experience. In addition, when the radiation direction of the wireless headset does not cover the position of the terminal, the signal quality received by the terminal from the wireless headset is very poor, which will affect the terminal's sending of audio frames to the wireless headset and the user experience. On the contrary, when the radiation direction of the wireless headset points to the terminal, the signal transmission quality is higher and better sound quality can be provided for the user. A multi-antenna wireless headset can select a radiation antenna that can better point to the terminal position from multiple antennas, thereby improving the user experience. Therefore, combining the above process of the wireless headset receiving and transmitting audio frames, when the wireless headset fails to receive audio using a certain antenna, it can switch to another antenna.

[0062] In an actual scenario, after the wireless headset is successfully connected to a terminal (such as a mobile phone, which will be used as an example for illustration below), the user may move the mobile phone, which will cause the wireless channel between the wireless headset and the mobile phone to change. The polarity relationship between the signal received by the wireless headset and the wireless headset antenna will change. For example, the polarity relationship changes from being consistent to inconsistent, and the signal energy loss received by the wireless headset becomes larger, resulting in a deterioration of the signal reception quality of the current receiving antenna of the wireless headset. The user moving the mobile phone will also cause the radiation direction of the wireless headset to possibly no longer point to the terminal, and the signal transmission quality between the wireless headset and the terminal deteriorates. Therefore, the wireless headset needs to continuously detect the signal reception quality of multiple antennas and select the antenna with the optimal (or relatively optimal) signal reception quality under the current wireless channel conditions from multiple antennas for reception to ensure the communication quality with the mobile phone.

[0063] Currently, a multi-antenna wireless headset can use one antenna to communicate with the terminal at the same time. If it is necessary to measure the signal quality of other antennas except the current antenna, the wireless headset needs to switch the antenna used for communication with the terminal from the current antenna to other antennas. If the signal quality of other antennas is poor, it will affect the wireless headset's reception of audio frames from the terminal, resulting in a deterioration of the user experience. If one does not want to take the risk of a deterioration in the received signal quality after switching antennas and does not attempt to switch antennas, one may also miss the opportunity to select a better antenna, and the advantage of the multi-antenna of the wireless headset is not utilized.

[0064] To solve the above technical problems, the present application provides a signal detection method for wireless earphones. This method can be executed by an earphone equipped with multiple antennas. In this method, the earphone can receive a first signal frame through a first antenna. In the case of successfully receiving the first signal frame, the earphone switches from the first antenna to a second antenna and detects the signal quality of the second antenna. Subsequently, the earphone can receive a second signal frame through a target antenna. Wherein, the second signal frame is the next initial transmission signal frame of the first signal frame, and the target antenna is the antenna with the best signal quality among the first antenna and the second antenna.

[0065] As can be seen from the above method, since the wireless earphone detects the signal quality of the second antenna after successfully receiving the first signal frame and before receiving the next initial transmission signal frame of the first signal frame, this method neither affects the playback of the first signal frame nor affects the reception of the next initial transmission signal frame of the first signal frame, thus maximizing the user experience.

[0066] The following describes the embodiments of the present application in detail with reference to the accompanying drawings.

[0067] The method provided by the present application can be used in various communication systems. For example, the communication system can be a wireless fidelity (WiFi) system, a Bluetooth system, a communication system related to the 3rd generation partnership project (3GPP), a future evolved communication system, or a system integrating multiple systems, etc., without limitation. The following takes Figure 2A the communication system 20 shown and Figure 2B the communication system 21 shown as examples to describe the method provided by the present application. Figure 2A Or Figure 2B It is only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solutions provided by the present application.

[0068] As Figure 2A shown, it is a schematic diagram of the architecture of the communication system 20 provided by the present application. Figure 2A In it, the communication system 20 can include a wireless earphone 201 and a terminal 202 that can communicate with the wireless earphone 201. The wireless earphone 201 can be equipped with multiple antennas. The wireless earphone 201 and the terminal 202 can be communicatively connected through a wireless connection technology, such as Bluetooth or WiFi, etc. Optionally, the communication system 20 further includes a wireless earphone 203. The wireless earphone 203 can be communicatively connected to the wireless earphone 201 through a wireless connection technology, such as Bluetooth or WiFi, etc., or can also be communicatively connected to the terminal 202. The wireless earphone 203 can be equipped with multiple antennas.

[0069] In some embodiments, the wireless earphones 201 can be used alone. For example, the wireless earphones 201 can communicate with the terminal 202 by using the method provided in this application. Optionally, the wireless earphones 201 can also be paired and connected with the wireless earphones 203, that is, the two can be used in combination. The wireless earphones 203 can also communicate with the terminal 202 by using the method provided in this application.

[0070] As Figure 2B shown, it is a schematic diagram of the architecture of the communication system 21 provided in this application. Figure 2B In the communication system 21, it can include wireless earphones 211 and a terminal 212 that can communicate with the wireless earphones 211. The wireless earphones 211 can be equipped with multiple antennas. The wireless earphones 211 and the terminal 212 can be communicatively connected through a wireless connection technology, such as Bluetooth or WiFi, etc.

[0071] Optionally, the wireless earphones 211 can include a left earplug 211-1 and a right earplug 211-2. The left earplug 211-1 and the right earplug 211-2 can be equipped with multiple antennas and can execute the method provided in this application. The left earplug 211-1 and the right earplug 211-2 can be communicatively connected through a wireless connection technology, such as Bluetooth or WiFi, etc.

[0072] The wireless earphones in this application, such as the wireless earphones 201, the wireless earphones 203 or the wireless earphones 211, etc., can be any earphones that are connected to the terminal by wireless communication. For example, they can be over-ear headphones, true wireless stereo Bluetooth earphones, etc. From the perspective of product form, wireless earphones can be divided into over-ear or earplug types. Earplugs can be divided into in-ear earphones and semi-in-ear earphones, etc.

[0073] The terminals in this application, such as terminal 202 or terminal 212, are devices with wireless transceiver functions. A terminal can also be referred to as a terminal device. The terminal device can be a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc., or a device used to provide voice or data connectivity to users. Among them, the UE includes handheld devices with wireless communication functions, vehicle-mounted devices (such as cars, bicycles, electric vehicles, airplanes, ships, trains, high-speed trains, etc.), wearable devices (such as smart watches, smart bracelets, pedometers, etc.), or computing devices. Exemplarily, the UE can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a mobile internet device (MID), a satellite terminal, or a computer with wireless transceiver functions. The UE can also be a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a customer-premises equipment (CPE), a smart robot, a wireless terminal in autonomous driving, a vehicle-mounted terminal, a flying device (such as a smart robot, a hot air balloon, a drone, an airplane), and so on.

[0074] Figure 2A and Figure 2B The communication system shown is only for illustration and is not used to limit the technical solutions of this application. Those skilled in the art should understand that in the specific implementation process, the above communication system may also include other devices, and at the same time, the number of wireless earphones and terminals can also be determined according to specific needs, without limitation.

[0075] Optionally, in this application Figure 2A and Figure 2B each device (such as a wireless earphone or a terminal, etc.) can also be referred to as a communication device, which can be a general device or a special device. This application does not make specific limitations on this.

[0076] Optionally, in this application Figure 2A and Figure 2B the related functions of each device (such as a wireless earphone or a terminal, etc.) can be implemented by one device, can also be jointly implemented by multiple devices, or can also be implemented by one or more functional modules in one device. This application does not make specific limitations on this. It can be understood that the above functions can be either network elements in hardware devices, software functions running on dedicated hardware, or a combination of hardware and software, or virtualized functions instantiated on a platform (such as a cloud platform).

[0077] In specific implementation, the present application Figure 2A and Figure 2B each device (such as a wireless headset or a terminal, etc.) in Figure 3 can adopt the composition structure shown in Figure 3 or include the components shown in Figure 3 Shown is a schematic diagram of the hardware structure of a communication device applicable to the present application. The communication device 30 includes at least one processor 301, at least one communication interface 304, and a speaker 305, and is used to implement the method provided by the present application. The communication device 30 may further include at least one of the following: a communication line 302, a memory 303, a microphone 306, or a sensor module 307.

[0078] The processor 301 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application solution.

[0079] The communication line 302 may include a path for transmitting information between the above components, such as a bus.

[0080] The communication interface 304 is used to communicate with other devices or communication networks. The communication interface 304 may be any device of a transceiver type, such as a wireless local area networks (WLAN) interface, a Bluetooth interface, a transceiver, a pin, a bus, an interface circuit, or a transceiver circuit, etc.

[0081] The memory 303 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or may also be an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium, or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be coupled to the processor 301 through the communication line 302. The memory 303 may also be integrated with the processor 301. The memory provided by the present application generally has non-volatility.

[0082] Among them, the memory 303 is used to store the computer execution instructions involved in implementing the solution provided in this application, and is controlled by the processor 301 to execute. The processor 301 is used to execute the computer execution instructions stored in the memory 303, so as to implement the method provided in this application. Alternatively, optionally, in this application, it may also be that the processor 301 executes the functions related to processing in the method provided below in this application, and the communication interface 304 is responsible for communicating with other devices or communication networks. This application does not make specific limitations on this.

[0083] The speaker 305, also known as the "loudspeaker", is used to convert the audio electrical signal into a sound signal. The user can listen to music or hands-free calls through the speaker 305.

[0084] The microphone 306, also known as the "microphone" or "transmitter", is used to convert the sound signal into an electrical signal. When making a call or sending a voice message, the user can speak close to the microphone 306 with their mouth to input the sound signal into the microphone 306. In some examples, the communication device 30 may be provided with at least one microphone 306.

[0085] The sensor module 307 may include at least one sensor, such as a proximity light sensor, and / or a motion sensor (such as a 3-axis acceleration sensor, a gyroscope, a geomagnetic sensor, etc.). Among them, the proximity light sensor can detect whether the user is wearing headphones, and the motion sensor can detect the user's motion state.

[0086] Optionally, the computer execution instructions in this application may also be referred to as application code. This application does not make specific limitations on this.

[0087] The coupling in this application is an indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information interaction between devices, units or modules.

[0088] It can be understood that Figure 3 the component structure shown in Figure 3 does not constitute a limitation on the communication device. Except for

[0089] the components shown, the communication device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements. Figure 3 the components shown, which will not be elaborated.

[0090] It can be understood that the "connection" in this application can be a direct connection or an indirect connection; in addition, it can refer to an electrical connection or a communication connection. For example, when two electrical components A and B are connected, it can mean that A and B are directly connected, or it can mean that A and B are indirectly connected through other electrical components or connection media, so that electrical signals can be transmitted between A and B; another example is that when two devices A and B are connected, it can mean that A and B are directly connected, or it can mean that A and B are indirectly connected through other communication devices or communication media, so that communication can be carried out between A and B.

[0091] It can be understood that the message names between each network element or the names of each parameter in the message in the following embodiments of this application are only examples, and in specific implementations, other names can also be used. This application does not make specific limitations on this.

[0092] It can be understood that in this application, " / " can indicate that the objects associated before and after are in an "or" relationship. For example, A / B can mean A or B; "and / or" can be used to describe three relationships of associated objects. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. Among them, A and B can be singular or plural. In addition, expressions similar to "at least one of A, B, and C" or "at least one of A, B, or C" are usually used to represent any one of the following: A exists alone; B exists alone; C exists alone; A and B exist simultaneously; A and C exist simultaneously; B and C exist simultaneously; A, B, and C exist simultaneously. The above uses A, B, and C as a total of three elements to illustrate the selectable items of this item. When there are more elements in the expression, the meaning of this expression can be obtained according to the foregoing rules.

[0093] To facilitate the description of the technical solutions of this application, in this application, words such as "first" and "second" can be used to distinguish technical features with the same or similar functions. These words such as "first" and "second" do not limit the quantity and execution order, and these words such as "first" and "second" do not necessarily limit that they are different. In this application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" should not be interpreted as being more preferred or having more advantages than other embodiments or design solutions. Using words such as "exemplary" or "for example" aims to present relevant concepts in a specific way for easy understanding.

[0094] It can be understood that the "embodiments" mentioned throughout the specification mean that specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, the embodiments throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It can be understood that in various embodiments of the present application, the magnitudes of the serial numbers of the various processes do not mean the order of execution, and the order of execution of the various processes should be determined by their functions and internal logics, and should not constitute any limitation to the implementation process of the present application.

[0095] It can be understood that in the present application, "when...", "in the case of...", "if" and "when" all mean that corresponding processing will be performed under a certain objective situation, which is not a time limit, and it is not required that there must be a judgment action during implementation, nor does it mean the existence of other limitations.

[0096] The "simultaneously" in the present application can be understood as at the same time point, can also be understood as within a period of time, and can also be understood as within the same cycle.

[0097] In the present application, "a plurality of" can be understood as two or more. For example, "the wireless earphone has a plurality of antennas" can be understood as the wireless earphone has two or more antennas.

[0098] It can be understood that some optional features in the present application can, in some scenarios, be implemented independently without relying on other features, such as the current solution they are based on, to solve the corresponding technical problems and achieve the corresponding effects. In some scenarios, they can also be combined with other features according to requirements. Correspondingly, the devices given in the present application can also implement these features or functions accordingly, which will not be elaborated here.

[0099] It can be understood that the same step or steps or technical features with the same function in the present application can be referred to and learned from each other between different embodiments.

[0100] It can be understood that in the present application, the wireless earphone can execute some or all of the steps in the present application. These steps are only examples, and the present application can also execute other steps or various deformations of the steps. In addition, the various steps can be executed in different orders presented in the present application, and it is possible not to execute all the steps in the present application.

[0101] It can be understood that in the method provided below in this application, a wireless earphone is taken as an example of the execution subject of this interaction schematic to illustrate the method, but this application does not limit the execution subject of this interaction schematic. For example, the wireless earphone in the method provided in the following embodiments of this application can also be a chip, a chip system, or a processor that supports the wireless earphone to implement this method, and can also be a logical node, a logical module, or software that can implement all or part of the functions of the wireless earphone.

[0102] As Figure 4 shown, a signal detection method for a wireless earphone provided by this application, the signal detection method for the wireless earphone may include the following steps:

[0103] S401: The terminal sends a first signal frame to the wireless earphone. Correspondingly, the wireless earphone receives the first signal frame from the terminal through the first antenna.

[0104] In this application, the wireless earphone may be Figure 2A the wireless earphone 201 in the communication system 20 shown, and the terminal may be Figure 2A the terminal 202 in the communication system 20 shown. Or, the wireless earphone may be Figure 2B the wireless earphone 211 in the communication system 21 shown, and the terminal may be Figure 2B the terminal 212 in the communication system 21 shown.

[0105] It can be understood that the content carried in the signal frame includes audio data, and after the audio data is decoded by audio decoding, it can be played by the speaker of the wireless earphone.

[0106] Optionally, the wireless earphone may determine the signal quality of the first antenna according to the first signal frame, such as determining the signal quality of the first antenna according to the RSSI of the first signal frame. Or multiple signal frames received by the first antenna, such as comprehensively determining the signal quality of the first antenna according to the first signal frame and at least one signal frame before the first signal frame, which is not limited.

[0107] S402: When the wireless earphone successfully receives the first signal frame, it switches from the first antenna to the second antenna and detects the signal quality of the second antenna.

[0108] In this application, the polarization direction of the first antenna is different from that of the second antenna, and signals with different polarization directions can be received. Taking a dual-antenna wireless headset as an example, the first antenna and the second antenna can be built into the dual-antenna wireless headset. The first antenna is a horizontally polarized antenna, and the second antenna is a vertically polarized antenna, or the first antenna is a vertically polarized antenna, and the second antenna is a horizontally polarized antenna. Alternatively, the radiation direction of the first antenna is different from that of the second antenna, and the two antennas can radiate signals in different directions. Still taking the dual-antenna wireless headset as an example, the first antenna can point to the front side of the body, and the second antenna can point to the back side of the body, or the first antenna points to the back side of the body, and the second antenna points to the front side of the body.

[0109] It can be understood that since the wireless headset successfully receives the first signal frame, the wireless headset can play the audio data carried by the first signal frame. In addition, the wireless headset can also switch from the first antenna to the second antenna to detect the signal quality of the second antenna. In this way, it does not affect the wireless headset from playing the audio data carried by the first signal frame and can also detect the signal quality of the second antenna.

[0110] It can be understood that the wireless headset can detect the signal quality of the second antenna through various methods. The following takes Method 1 and Method 2 as examples for introduction.

[0111] Method 1: The wireless headset uses the retransmission signal frame of the first signal frame to determine the signal quality of the second antenna.

[0112] A possible implementation is that when the wireless headset successfully receives the first signal frame, it sends a first response message indicating that the reception of the first signal frame fails. It can be understood that the first response message can trigger the terminal to retransmit the first signal frame to the wireless headset. The terminal sends a third signal frame to the wireless headset. Correspondingly, the wireless headset receives the third signal frame through the second antenna and determines the signal quality of the second antenna according to the third signal frame. Among them, the third signal frame is the retransmission signal frame of the first signal frame.

[0113] Optionally, the wireless earphone can use the first antenna to send the first response message, or switch from the first antenna to the second antenna to send the first response message, without limitation. It can be understood that the wireless earphone can indicate the reception situation of the first signal frame through the automatic repeat request number (ARQN) bits carried in the null type frame. For example, when the first reception of the first signal frame fails, the ARQN bits can be 0001; when the first reception of the first signal frame is successful, the ARQN bits can be 0000; when the second reception of the first signal frame (i.e., the first retransmission signal frame of the first signal frame) fails, the ARQN bits can be 0002, and so on, which will not be elaborated here. Thus, it can be known that the wireless earphone can determine the ARQN bits included in the first response message as 0001.

[0114] Exemplarily, the wireless earphone can determine the signal quality of the second antenna according to the RSSI corresponding to the received third signal frame. Wherein, the unit of RSSI can be decibel milliwatt (dBm). Specifically, when -70dBm < RSSI, the signal quality of the second antenna can be determined to be excellent; when -80dBm < RSSI < -70dBm, the signal quality of the second antenna can be determined to be good; when -90dBm < RSSI < -80dBm, the signal quality of the second antenna can be determined to be medium; when -100dBm < RSSI < -90dBm, the signal quality of the second antenna can be determined to be poor; when RSSI < -100dBm, the signal quality of the second antenna can be determined to be extremely poor.

[0115] It can be understood that the above is only an example of the wireless earphone determining the signal quality of the second antenna. In specific applications, the wireless earphone can also determine the signal quality of the second antenna according to other parameters characterizing the signal quality. For example, the wireless earphone can determine the signal quality of the second antenna according to the PER, or determine the signal quality of the second antenna according to the RSSI and the PER.

[0116] Optionally, in the case where the third signal frame reception fails, the wireless earphone sends a second response message to the terminal. Wherein, the second response message indicates that the third signal frame reception is successful. It can be understood that the third signal frame is a retransmission signal frame of the first signal frame, which is used to determine the signal quality of the second antenna of the wireless earphone and is the same as the audio data carried in the first signal frame. When the first signal frame is successfully received and the audio data carried in the first signal frame can already be played by the speaker of the wireless earphone, the reception result of the third signal frame will not affect the audio playback of the wireless earphone. Therefore, when the third signal frame reception fails, it can no longer be retransmitted. Thus, the signal quality of the second antenna is obtained without affecting the user experience.

[0117] It can be understood that, in order to improve the accuracy of the signal quality of the second antenna for detection, the wireless headset can trigger the terminal to retransmit the first signal frame multiple times. In this way, the wireless headset can determine the signal quality of the second antenna based on the retransmission signal frames received multiple times. Specifically, after receiving the third signal frame, the wireless headset can send a fourth response message to the terminal. Among them, the fourth response message indicates that the reception of the third signal frame fails. For example, the fourth response message can be a NACK. Therefore, after receiving the fourth response message, the terminal can send a retransmission signal frame of the first signal frame, such as the fourth signal frame, to the wireless headset. After receiving the fourth signal frame, the wireless headset can send a NACK or an ACK to the terminal. If the wireless headset sends an ACK, the terminal will stop retransmitting, and the wireless headset can determine the signal quality of the second antenna based on the third signal frame and the fourth signal frame. If the wireless headset sends a NACK, the terminal will continue to send a retransmission signal frame of the first signal frame to the wireless headset, and the wireless headset can determine the signal quality of the second antenna by combining more retransmission signal frames.

[0118] It can be understood that the terminal usually sends signal frames to the wireless headset periodically. Therefore, in order to ensure the user experience, the process of the wireless headset receiving the retransmission signal frame of the first signal frame can be executed before the next initial transmission signal frame of the first signal frame arrives. Taking the terminal sending signal frames according to a period T as an example, the terminal can send signal frame 1 at time t0, send signal frame 2 at time (t0 + T), send signal frame 3 at time (t0 + 2T).... If the first signal frame is signal frame 1, then after successfully receiving signal frame 1, the wireless headset can detect the signal quality of the second antenna in the above manner before receiving signal frame 2.

[0119] Taking T equal to 500 ms as an example, see Figure 5 As shown, the terminal can send the first signal frame at time 501, send the first retransmission signal frame (such as the third signal frame) corresponding to the first signal frame at time 502, send the second retransmission signal frame (such as the fourth signal frame) corresponding to the first signal frame at time 503, send the third retransmission signal frame (such as the fifth signal frame) corresponding to the first signal frame at time 504, and send the signal frame (such as the second signal frame) transmitted initially after the first signal frame at time 505. Among them, the initial transmission signal frame refers to the audio data carried by this signal frame is transmitted for the first time. The transmission period of the initial transmission signal frame can be 500 ms, that is, the time interval between time 505 and time 501 is 500 ms. Of course, it can also be other durations, without limitation.

[0120] Combined with Figure 5, the wireless earphone can determine the signal quality of the second antenna according to the reception quality of multiple retransmission signal frames of the first signal frame, that is, the third signal frame, the fourth signal frame, and the fifth signal frame, and determine the signal quality of the second antenna according to more retransmission signal frames of the first signal frame before the moment 505 arrives. In this way, the influence of accidental factors can be excluded. Compared with the result of obtaining the signal quality of the second antenna according to one retransmission signal frame, the result of obtaining the signal quality of the second antenna according to multiple retransmission signal frames can be more accurate.

[0121] Method 2: The wireless earphone determines the signal quality of the second antenna according to the response frame corresponding to the detection frame. Among them, the detection frame can be used to detect the connection status between the wireless earphone and the terminal.

[0122] In Method 2, the wireless earphone can send the first detection frame through the second antenna, receive the first response frame through the second antenna, and determine the signal quality of the second antenna according to the first response frame. Among them, the first response frame is used to indicate that the first detection frame has been received. Among them, the first detection frame can be a connection status detection frame (such as a poll frame). The wireless earphone can initiate the detection of the wireless connection status to the terminal through the first detection frame. If the terminal successfully receives the first detection frame, it means that the reception of the terminal is normal, and the terminal can reply to the wireless earphone with the first response frame (such as a NULL frame). The wireless earphone receiving the first response frame indicates that the connection between the wireless earphone and the terminal is normal.

[0123] A possible implementation manner is that the wireless earphone can determine the signal quality of the second antenna according to the RSSI corresponding to the first response frame, and / or, the PER. Specifically, reference can be made to the method in which the wireless earphone determines the signal quality of the second antenna according to the third signal frame in Method 1, which will not be elaborated here.

[0124] It can be understood that the purpose of the wireless earphone to initiate the connection status detection is to obtain the signal quality of the second antenna during the idle time before the next initial transmission signal frame (such as the second signal frame) of the first signal frame, and it will not affect the reception of the second signal frame.

[0125] It can be understood that in order to improve the accuracy of detecting the signal quality of the second antenna, the wireless earphone can trigger the terminal to send response frames multiple times. In this way, the wireless earphone can determine the signal quality of the second antenna according to multiple response frames. Specifically, after receiving the first response frame, the wireless earphone can send a second detection frame to the terminal so that the terminal can send a second response frame to the wireless earphone. Therefore, after receiving the second response frame, the wireless earphone can determine the signal quality of the second antenna according to the first response frame and the second response frame.

[0126] S403: The terminal sends a second signal frame to the wireless earphone. Correspondingly, the wireless earphone receives the second signal frame from the terminal through the target antenna.

[0127] In a possible implementation, the wireless earphone determines the antenna with the best signal quality as the target antenna according to the signal quality of the first antenna and the signal quality of the second antenna. Exemplarily, the RSSI of the received signal corresponding to the first antenna is -80 dBm, and the RSSI of the received signal corresponding to the second antenna is -60 dBm. The wireless earphone can determine the second antenna as the target antenna. It should be understood that if the wireless earphone has more than two antennas, the antenna with the best signal quality can be used as the target antenna according to the signal quality of each antenna.

[0128] It should be understood that since the position of the terminal changes, the wireless channel may be time-varying, and the polarization relationship between the wireless earphone and the terminal may also change. Therefore, after the wireless earphone successfully establishes a connection with the terminal, the methods of S401-S403 described above can be repeated to update the target antenna at any time, ensuring that the wireless earphone uses the antenna with the best signal quality, thereby guaranteeing the user experience. Alternatively, since the position of the terminal changes, the wireless earphone needs to switch antennas to communicate with the terminal using an antenna whose radiation direction conforms to the position of the terminal to improve the communication quality. Therefore, after the wireless earphone successfully establishes a connection with the terminal, the methods of S401-S403 described above can be repeated to update the target antenna at any time, ensuring that the wireless earphone uses the antenna that radiates towards the terminal, thereby guaranteeing the user experience.

[0129] According to the above method, after the wireless earphone successfully receives a signal frame (such as the first signal frame), during the period before the next initial transmission signal frame (such as the second signal frame) of this signal frame arrives, the wireless earphone can request at least one data transmission (the data can be a retransmission signal frame of the first signal frame in Method 1, or the first response frame in Method 2, etc.) from the terminal to detect the signal quality of the second antenna, so as to determine the target antenna for receiving the second signal frame. Since the process of the wireless earphone determining the signal quality of the second antenna is carried out before the second signal frame arrives, and during this period, the audio data of the first signal frame can be played through the speaker of the wireless earphone, the reception situation (success or failure) of using the second antenna to receive the retransmission signal frame will not affect the sound quality heard by the user through the speaker, thus realizing the measurement of the signal quality of other antennas without affecting the user experience.

[0130] The above mainly introduces the solution provided by this application from the perspective of the interaction between the wireless earphone and the terminal. Correspondingly, this application also provides a communication device, which can be the wireless earphone in the above method embodiment, or a device including the above wireless earphone, or a component applicable to the wireless earphone. It can be understood that, in order to implement the above functions, the above wireless earphone includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, in combination with the units and algorithm operations of the examples described in the embodiments disclosed in this article, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0131] This application can divide the functional modules of the wireless earphone according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It can be understood that the division of modules in this application is illustrative, only a logical function division, and there can be other division methods in actual implementation.

[0132] For example, in the case of dividing each functional module in an integrated manner, Figure 6 FIG. shows a schematic structural diagram of a communication device 60. The communication device 60 includes an interface module 601 and a processing module 602. The interface module 601, which can also be referred to as an interface unit, is used to perform transceiver operations. For example, it can be an interface circuit, a transceiver, a transceiver or a communication interface, etc. The processing module 602, which can also be referred to as a processing unit, is used to perform operations other than transceiver operations. For example, it can be a processing circuit or a processor, etc.

[0133] In some embodiments, the communication device 60 may further include a storage module ( Figure 6 not shown in the figure), which is used to store program instructions and data.

[0134] Exemplarily, the communication device 60 is used to implement the functions of the wireless earphone. The communication device 60 is, for example, Figure 4 the wireless earphone in the shown embodiment.

[0135] Among them, the interface module 601 is used to receive a first signal frame through a first antenna. For example, the interface module 601 can be used to execute S401.

[0136] The processing module 602 is configured to switch from the first antenna to the second antenna and detect the signal quality of the second antenna when the first signal frame is successfully received. For example, the processing module 602 may be configured to execute S402.

[0137] The interface module 601 is further configured to receive a second signal frame through the target antenna, where the second signal frame is the next initial transmission signal frame of the first signal frame, and the target antenna is the antenna with the best signal quality among the first antenna and the second antenna. For example, the interface module 601 may be configured to execute S403.

[0138] In a possible implementation, the interface module 601 is further configured to send a first response message indicating that the reception of the first signal frame fails. Specifically, the processing module 602 is configured to receive a third signal frame through the second antenna, where the third signal frame is a retransmission signal frame of the first signal frame; the processing module 602 is further specifically configured to determine the signal quality of the second antenna according to the third signal frame.

[0139] In a possible implementation, the interface module 601 is further configured to send a second response message indicating that the reception of the third signal frame is successful when the reception of the third signal frame fails.

[0140] In a possible implementation, the processing module 602 is specifically configured to send a first detection frame through the second antenna; the processing module 602 is further specifically configured to receive a first response frame through the second antenna, where the first response frame is used to indicate that the first detection frame is received; the processing module 602 is further specifically configured to determine the signal quality of the second antenna according to the first response frame.

[0141] In a possible implementation, the processing module 602 is further configured to play the audio data carried by the first signal frame. In a simple embodiment, those skilled in the art can conceive that the communication device 60 may adopt Figure 3 the form shown. For example, Figure 3 the processor 301 in

[0142] Exemplarily, Figure 6 the functions / implementation processes of the interface module 601 and the processing module 602 in Figure 3 can be implemented by the processor 301 in Figure 6 calling the computer-executable instructions stored in the memory 303. Or, Figure 3 the function / implementation process of the processing module 602 in Figure 6 can be implemented by the processor 301 inFigure 3 It is implemented through the communication interface 304 in

[0143] It can be understood that one or more of the above modules or units can be implemented by software, hardware, or a combination of both. When any of the above modules or units is implemented by software, the software exists in the form of computer program instructions and is stored in the memory. The processor can be used to execute the program instructions and implement the above method flow. The processor can be built into a SoC (system on a chip) or an ASIC, or it can be an independent semiconductor chip. In addition to the core for executing software instructions for arithmetic or processing within the processor, it may further include necessary hardware accelerators, such as a field programmable gate array (FPGA), a programmable logic device (PLD), or a logic circuit for implementing dedicated logic operations.

[0144] When any of the above modules or units is implemented by hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a digital signal processing (DSP) chip, a microcontroller unit (MCU), an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator, or a non-integrated discrete device, which can run the necessary software or execute the above method flow without relying on software.

[0145] Optionally, the present application further provides a chip system, including: at least one processor and an interface, the at least one processor is coupled to the memory through the interface, and when the at least one processor executes the computer program or instructions in the memory, the method in any of the above method embodiments is executed. In a possible implementation manner, the chip system further includes a memory. Optionally, the chip system can be composed of chips, or it can include chips and other discrete devices. The present application does not make specific limitations on this.

[0146] Optionally, the present application further provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by a computer program instructing relevant hardware. The program can be stored in the above computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be an internal storage unit of any of the foregoing communication devices, such as the hard disk or memory of the communication device. The above computer-readable storage medium can also be an external storage device of the above communication device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the above communication device. Further, the above computer-readable storage medium can also include both the internal storage unit and the external storage device of the above communication device. The computer-readable storage medium is used to store the above computer program and other programs and data required by the above communication device. The computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.

[0147] Optionally, the present application further provides a computer program product. All or part of the processes in the above method embodiments can be completed by a computer program instructing relevant hardware. The program can be stored in the above computer program product. When the program is executed, it can include the processes of the above method embodiments.

[0148] Optionally, the present application further provides a computer instruction. All or part of the processes in the above method embodiments can be completed by a computer instruction instructing relevant hardware (such as a wireless earphone). The program can be stored in the above computer-readable storage medium or the above computer program product.

[0149] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0150] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical or other forms.

[0151] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0152] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0153] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A signal detection method for a wireless earphone, characterized in that, The method includes: Receiving a first signal frame through a first antenna; In the case of successfully receiving the first signal frame, switching from the first antenna to a second antenna and detecting the signal quality of the second antenna; Receiving a second signal frame through a target antenna, where the second signal frame is the next initial transmission signal frame of the first signal frame, and the target antenna is the antenna with the best signal quality among the first antenna and the second antenna.

2. The method according to claim 1, characterized in that The method further includes: Sending a first response message indicating that the reception of the first signal frame fails; The detecting the signal quality of the second antenna includes: Receiving a third signal frame through the second antenna, where the third signal frame is a retransmission signal frame of the first signal frame; Determining the signal quality of the second antenna according to the third signal frame.

3. The method according to claim 2, wherein The method further includes: In the case of failing to receive the third signal frame, sending a second response message indicating that the reception of the third signal frame succeeds.

4. The method according to claim 1, wherein The detecting the signal quality of the second antenna includes: Sending a first detection frame through the second antenna; Receiving a first response frame through the second antenna, where the first response frame is used to indicate that the first detection frame is received; Determining the signal quality of the second antenna according to the first response frame.

5. The method according to any one of claims 1 to 4, characterized in that The method further includes: Playing the audio data carried by the first signal frame.

6. A communication device, characterized in that, The communication device includes: A receiving module, configured to receive a first signal frame through a first antenna; A processing module, configured to, in the case of successfully receiving the first signal frame, switch from the first antenna to a second antenna and detect the signal quality of the second antenna; The receiving module is further configured to receive a second signal frame through a target antenna, where the second signal frame is the next initial transmission signal frame of the first signal frame, and the target antenna is the antenna with the best signal quality among the first antenna and the second antenna.

7. The communication device according to claim 6, wherein The receiving module is further configured to send a first response message indicating that the reception of the first signal frame fails; The processing module is specifically configured to control the receiving module to receive a third signal frame through the second antenna, where the third signal frame is a retransmission signal frame of the first signal frame; The processing module is further specifically configured to determine the signal quality of the second antenna according to the third signal frame.

8. The communication device according to claim 7, wherein The receiving module is further configured to, in the case of failing to receive the third signal frame, send a second response message indicating that the reception of the third signal frame succeeds.

9. The communication device according to claim 6, wherein The processing module is specifically configured to send a first detection frame through the second antenna; The processing module is further specifically configured to receive a first response frame through the second antenna, where the first response frame is used to indicate that the first detection frame is received; The processing module is further specifically configured to determine the signal quality of the second antenna according to the first response frame.

10. The communication device according to any one of claims 6-9, wherein The processing module is further configured to play the audio data carried by the first signal frame.

11. A communication device, characterized in that, including: a processor, the processor is coupled to a memory, and the memory is configured to store programs or instructions. When the programs or instructions are executed by the processor, the device is caused to execute the method according to any one of claims 1 to 5.

12. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed, the computer is caused to execute the method according to any one of claims 1 to 5.

13. A computer program product, which includes computer program code, characterized in that, When the computer program code runs on a computer, the computer is caused to implement the method according to any one of claims 1 to 5.