patents.google.com

CN112703746B - Method and device for processing signal, bluetooth headset and storage medium - Google Patents

  • ️Tue Mar 07 2023

CN112703746B - Method and device for processing signal, bluetooth headset and storage medium - Google Patents

Method and device for processing signal, bluetooth headset and storage medium Download PDF

Info

Publication number
CN112703746B
CN112703746B CN202080002459.9A CN202080002459A CN112703746B CN 112703746 B CN112703746 B CN 112703746B CN 202080002459 A CN202080002459 A CN 202080002459A CN 112703746 B CN112703746 B CN 112703746B Authority
CN
China
Prior art keywords
antenna
polarized antenna
earphone
ear
slave
Prior art date
2020-10-23
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202080002459.9A
Other languages
Chinese (zh)
Other versions
CN112703746A (en
Inventor
彭远
黄健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
1more Shen Zhen Acoustic Technology Co ltd
Wanmo Acoustics Co ltd
Original Assignee
Wanmo Acoustics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
2020-10-23
Filing date
2020-10-23
Publication date
2023-03-07
2020-10-23 Application filed by Wanmo Acoustics Co ltd filed Critical Wanmo Acoustics Co ltd
2021-04-23 Publication of CN112703746A publication Critical patent/CN112703746A/en
2023-03-07 Application granted granted Critical
2023-03-07 Publication of CN112703746B publication Critical patent/CN112703746B/en
Status Active legal-status Critical Current
2040-10-23 Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Headphones And Earphones (AREA)
  • Telephone Function (AREA)

Abstract

The application is applicable to the field of communication and provides a method and a device for processing signals, a Bluetooth headset and a storage medium. The method for processing the signals is applied to the Bluetooth headset, the Bluetooth headset comprises a master headset and a slave headset, and two antennas in different directions are respectively arranged in the master headset and the slave headset. When the master earphone and/or the slave earphone detects a first radio frequency signal, selecting a proper antenna to receive the first radio frequency signal according to a first received signal strength indication corresponding to a first test signal of a first radio frequency signal packet header; when the master earphone or the slave earphone detects the second radio frequency signal, the proper antenna is selected to receive according to the second received signal strength indication corresponding to the second test signal of the second radio frequency signal packet header. In the above manner, the bluetooth headset selects a proper antenna to receive the radio frequency signal, so that signal transmission between the master headset and the terminal device and between the master headset and the slave headset reach an optimal state, and the phenomena of sound blockage, delay and the like of the bluetooth headset are avoided.

Description

一种处理信号的方法、装置、蓝牙耳机及存储介质A signal processing method, device, bluetooth headset and storage medium

技术领域technical field

本申请属于通信领域,尤其涉及一种处理信号的方法、处理信号的装置、蓝牙耳机以及存储介质。The present application belongs to the communication field, and in particular relates to a signal processing method, a signal processing device, a bluetooth earphone and a storage medium.

背景技术Background technique

现有的蓝牙耳机在使用过程中,主耳机与终端设备之间通过建立蓝牙连接传输信号,主耳机与从耳机之间也需通过建立蓝牙连接传输信号。由于现有的蓝牙耳机采用单一的天线结构,而天线的传输是具有指向性的。因此只能用折中的方式使天线兼顾两个方向的传输,导致蓝牙耳机不能在主耳机与终端设备以及主耳机与从耳机之间的信号传输中达到最优状态,进而导致蓝牙耳机出现声音卡顿、延迟等现象。During the use of the existing Bluetooth earphones, a Bluetooth connection is established between the master earphone and the terminal device to transmit signals, and the master earphone and the slave earphones also need to establish a Bluetooth connection to transmit signals. Since the existing bluetooth headset adopts a single antenna structure, the transmission of the antenna is directional. Therefore, only a compromise method can be used to make the antenna take into account the transmission in both directions, resulting in the Bluetooth headset not being able to reach the optimal state in the signal transmission between the master headset and the terminal device, as well as between the master headset and the slave headset, which in turn causes the Bluetooth headset to appear sound. Caton, delay and other phenomena.

发明内容Contents of the invention

有鉴于此,本申请实施例提供了一种处理信号的方法、处理信号的装置、蓝牙耳机以及存储介质,以解决传统的蓝牙耳机不能在主耳机与终端设备以及主耳机与从耳机之间的信号传输中达到最优状态,导致蓝牙耳机出现声音卡顿、延迟等问题。In view of this, the embodiment of the present application provides a signal processing method, a signal processing device, a bluetooth earphone and a storage medium to solve the problem that the traditional bluetooth earphone cannot The signal transmission reaches the optimal state, resulting in problems such as sound freeze and delay in the Bluetooth headset.

为解决上述技术问题,本申请实施例采用的技术方案是:In order to solve the above-mentioned technical problems, the technical solution adopted in the embodiment of the present application is:

第一方面,提供了一种处理信号的方法,应用于蓝牙耳机,所述蓝牙耳机包括主耳机以及从耳机,所述主耳机中设置有第一水平极化天线和第一垂直极化天线,所述从耳机中设置有第二水平极化天线和第二垂直极化天线,所述方法包括:In the first aspect, a method for processing signals is provided, which is applied to a Bluetooth headset. The Bluetooth headset includes a master headset and a slave headset, and the master headset is provided with a first horizontally polarized antenna and a first vertically polarized antenna. The slave earphone is provided with a second horizontally polarized antenna and a second vertically polarized antenna, and the method includes:

当所述主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示;When the main earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna The first received signal strength indication corresponding to the first test signal of the first radio frequency signal header by the UL antenna;

主耳机在检测到所述第一水平极化天线对应的第一接收信号强度指示大于或等于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一水平极化天线为主耳第一目标天线,在检测到所述第一水平极化天线对应的第一接收信号强度指示小于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一垂直极化天线为主耳第一目标天线;When the main earphone detects that the first received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the first vertically polarized antenna, determine that the first horizontally polarized The antenna is the first target antenna of the main ear, and when it is detected that the first received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the The first vertically polarized antenna is the first target antenna for the main ear;

从耳机在检测到所述第二水平极化天线对应的第一接收信号强度指示大于或等于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二水平极化天线为从耳第一目标天线,在检测到所述第二水平极化天线对应的第一接收信号强度指示小于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二垂直极化天线为从耳第一目标天线;When the earphone detects that the first received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the second vertically polarized antenna, determine the second horizontally polarized The antenna is the first target antenna from the ear. When it is detected that the first received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that The second vertically polarized antenna is the first target antenna from the ear;

当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示;When the master earphone detects the second radio frequency signal sent by the master earphone or the slave earphone detects the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second The vertically polarized antenna corresponds to the second received signal strength indication of the second test signal of the header of the second radio frequency signal;

主耳机在检测到所述第一水平极化天线对应的第二接收信号强度指示大于或等于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一水平极化天线为主耳第二目标天线,在检测到所述第一水平极化天线对应的第二接收信号强度指示小于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一垂直极化天线为主耳第二目标天线;When the main earphone detects that the second received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the first vertically polarized antenna, determine that the first horizontally polarized The antenna is the main ear and the second target antenna, and when it is detected that the second received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the a first vertically polarized antenna for the main ear and a second target antenna;

从耳机在检测到所述第二水平极化天线对应的第二接收信号强度指示大于或等于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二水平极化天线为从耳第二目标天线,在检测到所述第二水平极化天线对应的第二接收信号强度指示小于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二垂直极化天线为从耳第二目标天线;When the earphone detects that the second received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the second vertically polarized antenna, determine the second horizontally polarized The antenna is the second target antenna from the ear, and when it is detected that the second received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that the The second vertically polarized antenna is the second target antenna from the ear;

所述主耳机基于所述主耳第一目标天线接收第一射频信号,基于所述主耳第二目标天线接收第二射频信号;The main earphone receives a first radio frequency signal based on the first target antenna of the main ear, and receives a second radio frequency signal based on the second target antenna of the main ear;

所述从耳机基于所述从耳第一目标天线接收第一射频信号,所述从耳机基于所述从耳第二目标天线接收第二射频信号。The slave earphone receives a first radio frequency signal based on the slave ear first target antenna, and the slave earphone receives a second radio frequency signal based on the slave ear second target antenna.

第二方面,提供了一种处理信号的装置,应用于蓝牙耳机,所述蓝牙耳机包括主耳机以及从耳机,所述主耳机中设置有第一水平极化天线和第一垂直极化天线,所述从耳机中设置有第二水平极化天线和第二垂直极化天线,所述装置包括的各单元用于执行如上述第一方面所述的处理信号的方法的步骤。In a second aspect, a signal processing device is provided, which is applied to a Bluetooth headset, the Bluetooth headset includes a master headset and a slave headset, the master headset is provided with a first horizontally polarized antenna and a first vertically polarized antenna, The slave earphone is provided with a second horizontally polarized antenna and a second vertically polarized antenna, and the units included in the device are configured to perform the steps of the method for processing signals as described in the first aspect above.

第三方面,提供了一种蓝牙耳机,所述蓝牙耳机包括主耳机以及从耳机,所述主耳机中设置有第一水平极化天线和第一垂直极化天线,所述从耳机中设置有第二水平极化天线和第二垂直极化天线,所述蓝牙耳机包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如上述第一方面所述的处理信号的方法的步骤。In a third aspect, a bluetooth earphone is provided, the bluetooth earphone includes a master earphone and a slave earphone, the master earphone is provided with a first horizontally polarized antenna and a first vertically polarized antenna, and the slave earphone is provided with a A second horizontally polarized antenna and a second vertically polarized antenna, the bluetooth headset includes a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processing When the computer executes the computer program, the steps of the method for processing signals as described in the first aspect above are implemented.

第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述的处理信号的方法的步骤。In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for processing signals as described in the above-mentioned first aspect are implemented. .

第五方面,提供了一种计算机程序产品,当计算机程序产品在蓝牙耳机上运行时,使得蓝牙耳机执行上述第一方面所述的处理信号的方法的步骤。In a fifth aspect, a computer program product is provided. When the computer program product runs on the Bluetooth headset, the Bluetooth headset is made to execute the steps of the signal processing method described in the first aspect above.

本申请实施例提供的一种处理信号的方法、处理信号的装置、蓝牙耳机以及存储介质具有以下有益效果:A signal processing method, a signal processing device, a Bluetooth headset and a storage medium provided in the embodiments of the present application have the following beneficial effects:

本申请提供的处理信号的方法适用于蓝牙耳机,蓝牙耳机包括主耳机以及从耳机,主耳机中设置有第一水平极化天线和第一垂直极化天线,从耳机中设置有第二水平极化天线和第二垂直极化天线。当主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示,根据第一水平极化天线及第一垂直极化天线各自对应的第一接收信号强度指示,判断采用第一水平极化天线还是第一垂直极化天线接收该第一射频信号的信号质量最优;根据第二水平极化天线及第二垂直极化天线各自对应的第一接收信号强度指示,判断采用第二水平极化天线还是第二垂直极化天线接收该第一射频信号的信号质量最优,进而根据判断结果选择合适的天线接收该第一射频信号;当主耳机检测到从耳机或从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示,根据第一水平极化天线及第一垂直极化天线各自对应的第二接收信号强度指示,判断采用第一水平极化天线还是第一垂直极化天线接收该第二射频信号的信号质量最优;根据第二水平极化天线及第二垂直极化天线各自对应的第二接收信号强度指示,判断采用第二水平极化天线还是第二垂直极化天线接收该第二射频信号的信号质量最优,进而根据判断结果选择合适的天线接收该第二射频信号。上述方式中,蓝牙耳机的主耳机以及从耳机中各设置了两种不同方向的天线,可根据不同射频信号对应的不同接收信号强度指示,选择合适的天线接收射频信号,可保证实时接收各个射频信号,且接收到的各个射频信号都是信号质量最优的,使主耳机与终端设备以及主耳机与从耳机之间的信号传输均达到最优状态,避免了蓝牙耳机出现声音卡顿、延迟等现象。The signal processing method provided by this application is suitable for Bluetooth earphones. The Bluetooth earphones include a master earphone and a slave earphone. The master earphone is provided with a first horizontally polarized antenna and a first vertically polarized antenna, and the slave earphone is provided with a second horizontally polarized antenna. polarized antenna and a second vertically polarized antenna. When the main earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna pair According to the first received signal strength indication corresponding to the first test signal of the first radio frequency signal packet header, according to the first received signal strength indication corresponding to the first horizontally polarized antenna and the first vertically polarized antenna, it is judged that the first horizontal polarization is used The antenna or the first vertically polarized antenna has the best signal quality for receiving the first radio frequency signal; according to the first received signal strength indicators corresponding to the second horizontally polarized antenna and the second vertically polarized antenna, it is judged that the second horizontally polarized Polarized antenna or the second vertically polarized antenna has the best signal quality for receiving the first radio frequency signal, and then selects an appropriate antenna to receive the first radio frequency signal according to the judgment result; when the main earphone detects that the slave earphone or the slave earphone detects that the When the second radio frequency signal is obtained, the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second vertically polarized antenna correspond to the second test signal of the second radio frequency signal header. The received signal strength indicator, according to the second received signal strength indicator corresponding to the first horizontally polarized antenna and the first vertically polarized antenna, determines whether to use the first horizontally polarized antenna or the first vertically polarized antenna to receive the second radio frequency signal The signal quality is the best; according to the second received signal strength indication corresponding to the second horizontally polarized antenna and the second vertically polarized antenna, it is judged whether to use the second horizontally polarized antenna or the second vertically polarized antenna to receive the second radio frequency The signal quality of the signal is optimal, and then an appropriate antenna is selected to receive the second radio frequency signal according to the judgment result. In the above method, the main earphone and the slave earphone of the Bluetooth earphone are equipped with antennas in two different directions. According to different received signal strength indicators corresponding to different radio frequency signals, an appropriate antenna can be selected to receive radio frequency signals, which can ensure real-time reception of each radio frequency. signal, and the received radio frequency signals are of the best signal quality, so that the signal transmission between the master earphone and the terminal device as well as the master earphone and the slave earphone can reach the optimal state, avoiding the sound stuttering and delay of the Bluetooth earphone And so on.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或示范性技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the embodiments or exemplary technical descriptions. Obviously, the accompanying drawings in the following descriptions are only for this application. For some embodiments, those skilled in the art can also obtain other drawings based on these drawings without creative efforts.

图1是本申请实施例提供的一种处理信号的方法的示意流程图;FIG. 1 is a schematic flowchart of a method for processing signals provided in an embodiment of the present application;

图2是本申请另一实施例提供的处理信号的方法的示意性流程图;FIG. 2 is a schematic flowchart of a method for processing signals provided by another embodiment of the present application;

图3是本申请一实施例提供的一种处理信号的装置的示意图;FIG. 3 is a schematic diagram of a signal processing device provided by an embodiment of the present application;

图4是本申请另一实施例提供的一种处理信号的装置的示意图。Fig. 4 is a schematic diagram of an apparatus for processing signals provided by another embodiment of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present application.

为了说明本申请所述的技术方案,以下结合具体附图及实施例进行详细说明。In order to illustrate the technical solutions described in this application, the following will be described in detail in conjunction with specific drawings and embodiments.

现有的蓝牙耳机在使用过程中,主耳机与终端设备之间通过建立蓝牙连接传输信号,主耳机与从耳机之间也需通过建立蓝牙连接传输信号。主耳机与从耳机在进行信号传输时,主耳机与从耳机的信号通常需要围绕用户头部进行衍射传播,使该信号受到衰减,此时非常考验耳机天线在水平方向的性能;主耳机与终端设备在进行信号传输时,信号需要绕过用户身体进行传播,也会使该信号受到衰减,此时非常考验耳机天线在垂直方向的性能。由于现有的蓝牙耳机采用单一的天线结构,而天线的传输是具有指向性的。因此只能用折中的方式使天线兼顾两个方向的传输,导致蓝牙耳机不能在主耳机与终端设备以及主耳机与从耳机之间的信号传输中达到最优状态,进而导致蓝牙耳机出现声音卡顿、延迟等现象。During the use of the existing Bluetooth earphones, a Bluetooth connection is established between the master earphone and the terminal device to transmit signals, and the master earphone and the slave earphones also need to establish a Bluetooth connection to transmit signals. When the master earphone and the slave earphones are transmitting signals, the signals of the master earphone and the slave earphones usually need to propagate around the user's head through diffraction, so that the signal is attenuated. At this time, the performance of the earphone antenna in the horizontal direction is a test; When the device is transmitting signals, the signal needs to bypass the user's body for propagation, which will also attenuate the signal. At this time, the performance of the earphone antenna in the vertical direction is very critical. Since the existing bluetooth headset adopts a single antenna structure, the transmission of the antenna is directional. Therefore, only a compromise method can be used to make the antenna take into account the transmission in both directions, resulting in the Bluetooth headset not being able to reach the optimal state in the signal transmission between the master headset and the terminal device, as well as between the master headset and the slave headset, which in turn causes the Bluetooth headset to appear sound. Caton, delay and other phenomena.

有鉴于此,本申请提供了一种处理信号的方法,适用于蓝牙耳机。本申请中的蓝牙耳机可以包括主耳机与从耳机,主耳机与从耳机中分别设置有水平极化天线和垂直极化天线。其中,水平极化天线是指在佩戴状态下,耳机中以接近水平方向设置的天线,其对水平方向传输的信号具有较优的传输和接收性能;垂直极化天线是指在佩戴状态下,耳机中以接近垂直方向设置的天线,其对垂直方向传输的信号具有较优的传输和接收性能。In view of this, the present application provides a method for processing signals, which is suitable for Bluetooth headsets. The Bluetooth headset in this application may include a master headset and a slave headset, and the master headset and the slave headset are respectively provided with a horizontally polarized antenna and a vertically polarized antenna. Among them, the horizontally polarized antenna refers to the antenna installed in the earphone close to the horizontal direction in the wearing state, which has better transmission and receiving performance for signals transmitted in the horizontal direction; the vertically polarized antenna refers to the antenna in the wearing state, The antenna installed in the earphone in a nearly vertical direction has better transmission and reception performance for signals transmitted in the vertical direction.

请参见图1,图1是本申请实施例提供的一种处理信号的方法的示意流程图。本实施例中处理信号的方法的执行主体为蓝牙耳机,包括但不限于无线蓝牙耳机,如真正无线立体声(True Wireless Stereo,TWS)耳机。如图1所示的处理信号的方法可应用于蓝牙耳机,蓝牙耳机包括主耳机以及从耳机,主耳机中设置有第一水平极化天线和第一垂直极化天线,从耳机中设置有第二水平极化天线和第二垂直极化天线,该方法包括S101~S108,具体如下:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of a method for processing a signal provided by an embodiment of the present application. The method for processing signals in this embodiment is executed by a Bluetooth headset, including but not limited to a wireless Bluetooth headset, such as a true wireless stereo (True Wireless Stereo, TWS) headset. The signal processing method shown in Figure 1 can be applied to a bluetooth earphone. The bluetooth earphone includes a master earphone and a slave earphone. The master earphone is provided with a first horizontally polarized antenna and a first vertically polarized antenna, and the slave earphone is provided with a second Two horizontally polarized antennas and a second vertically polarized antenna, the method includes S101 to S108, specifically as follows:

S101:当所述主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示。S101: When the master earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second The first received signal strength indicator corresponding to the first test signal of the header of the first radio frequency signal by the vertically polarized antenna.

本实施例中,以TWS耳机为例进行说明,TWS耳机可以包括主耳机与从耳机,主耳机中设置有第一水平极化天线和第一垂直极化天线,从耳机中设置有第二水平极化天线和第二垂直极化天线。其中,主耳机与从耳机是相对来说的,先与终端设备建立蓝牙连接的为主耳机,通过主耳机间接与终端设备连接的为从耳机,从耳机可以通过监听的方式获取终端设备发送的第一射频信号,也可以是主耳机将第二射频信号转发给从耳机。本申请中涉及到的终端设备可以为手机、平板电脑、笔记本等支持蓝牙连接的设备,对此不做限定。In this embodiment, the TWS earphone is taken as an example for illustration. The TWS earphone may include a master earphone and a slave earphone. The master earphone is provided with a first horizontally polarized antenna and a first vertically polarized antenna. The slave earphone is provided with a second horizontally polarized antenna. polarized antenna and a second vertically polarized antenna. Among them, the master headset and the slave headset are relative. The master headset that first establishes a Bluetooth connection with the terminal device is the master headset, and the slave headset is indirectly connected to the terminal device through the master headset. The slave headset can obtain the information sent by the terminal device by monitoring The first radio frequency signal may also be that the master earphone forwards the second radio frequency signal to the slave earphone. The terminal devices involved in this application may be mobile phones, tablet computers, notebooks and other devices supporting Bluetooth connection, which is not limited.

主耳机检测到终端设备发送的第一射频信号时,主耳机获取第一水平极化天线及第一垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示(Receive signal strength index,RSSI)。其中,终端每次在发送第一射频信号之前,在该第一射频信号中添加包头,该第一射频信号包头的第一测试信号用于辅助主耳机以及从耳机判断选取哪个天线接收第一射频信号。可选地,在一种可实现的方式中,主耳机检测到终端设备发送的第一射频信号时,主耳机还可获取第一水平极化天线及第一垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比(SIGNAL-NOISE RATIO,SNR),以及获取第一水平极化天线及第一垂直极化天线对第一射频信号包头的第一测试信号对应的第一误码率(Symbol error rate,SER)。When the main earphone detects the first radio frequency signal sent by the terminal device, the main earphone obtains the first received signal strength indication ( Receive signal strength index, RSSI). Wherein, the terminal adds a header to the first radio frequency signal each time before sending the first radio frequency signal, and the first test signal of the header of the first radio frequency signal is used to assist the main earphone and determine which antenna to select for the slave earphone to receive the first radio frequency. Signal. Optionally, in a practicable manner, when the main earphone detects the first radio frequency signal sent by the terminal device, the main earphone can also obtain the first radio frequency signal paired by the first horizontally polarized antenna and the first vertically polarized antenna. The first signal-to-noise ratio (SIGNAL-NOISE RATIO, SNR) corresponding to the first test signal of the packet header, and the first horizontally polarized antenna and the first vertically polarized antenna corresponding to the first test signal of the first radio frequency signal packet header The first bit error rate (Symbol error rate, SER).

和/或从耳机检测到终端设备发送的第一射频信号时,从耳机获取第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示。可选地,在一种可实现的方式中,从耳机检测到终端设备发送的第一射频信号时,从耳机还可获取第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比,以及获取第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一误码率。And/or when the earphone detects the first radio frequency signal sent by the terminal device, acquire from the earphone the first received signal corresponding to the first test signal of the first radio frequency signal packet header by the second horizontally polarized antenna and the second vertically polarized antenna Intensity indication. Optionally, in a practicable manner, when the earphone detects the first radio frequency signal sent by the terminal device, the earphone can also obtain the pair of the first radio frequency signal from the second horizontally polarized antenna and the second vertically polarized antenna. The first signal-to-noise ratio corresponding to the first test signal of the packet header, and the first bit error rate corresponding to the first test signal of the packet header of the first radio frequency signal obtained by the second horizontally polarized antenna and the second vertically polarized antenna.

示例性地,当用户只使用TWS耳机中的一个耳机时,此时该耳机为主耳机。终端设备将待发送的音频信号转换为第一射频信号后进行广播,该主耳机在检测到第一射频信号时,基于该主耳机中的第一水平极化天线获取第一射频信号包头的第一测试信号对应的接收信号强度指示,以及基于该主耳机中的第一垂直极化天线获取第一射频信号包头的第一测试信号对应的接收信号强度指示。Exemplarily, when the user only uses one of the TWS earphones, the earphone is the main earphone at this time. The terminal device converts the audio signal to be sent into a first radio frequency signal and then broadcasts it. When the main earphone detects the first radio frequency signal, it obtains the first radio frequency signal packet header based on the first horizontally polarized antenna in the main earphone. A received signal strength indicator corresponding to a test signal, and a received signal strength indicator corresponding to the first test signal obtained from the first radio frequency signal header based on the first vertically polarized antenna in the main earphone.

示例性地,当主耳机检测到终端设备发送的第一射频信号时,主耳机基于该主耳机中的第一水平极化天线对第一射频信号包头的第一测试信号进行变频处理,将高频的第一测试信号变为低频信号;该低频信号为模拟信号,将该模拟信号转换为数字信号;通过主耳机中的数字信号处理单元对该数字信号进行解调,得到第一水平极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示。可采取同样的处理方式获取第一垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示。从耳机获取第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示与此类似,此处不再赘述。Exemplarily, when the main earphone detects the first radio frequency signal sent by the terminal device, the main earphone performs frequency conversion processing on the first test signal of the header of the first radio frequency signal based on the first horizontally polarized antenna in the main earphone, and converts the high frequency The first test signal of the first test signal becomes a low-frequency signal; the low-frequency signal is an analog signal, and the analog signal is converted into a digital signal; the digital signal is demodulated by the digital signal processing unit in the main earphone to obtain the first horizontally polarized antenna A first received signal strength indication corresponding to the first test signal of the packet header of the first radio frequency signal. The same processing manner may be used to obtain the first received signal strength indication corresponding to the first test signal of the first radio frequency signal packet header by the first vertically polarized antenna. Obtaining the first received signal strength indication corresponding to the first test signal of the first radio frequency signal header from the second horizontally polarized antenna and the second vertically polarized antenna from the earphone is similar to this, and will not be repeated here.

当用户同时使用TWS耳机中的两个耳机时,直接与终端进行蓝牙连接的为主耳机,与主耳机之间建立虚拟蓝牙连接,间接与终端设备进行连接的为从耳机。具体地,终端设备将待发送的音频信号转换为第一射频信号后进行广播,该主耳机在检测到该第一射频信号的同时向从耳机传达终端设备广播第一射频信号的信息,使从耳机可监听到终端设备广播的该第一射频信号。主耳机在检测到终端设备广播的第一射频信号后,获取第一水平极化天线及第一垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示。从耳机在监听到终端设备发送的第一射频信号后,获取第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示。When the user uses two earphones in the TWS earphone at the same time, the master earphone that directly connects to the terminal with Bluetooth establishes a virtual Bluetooth connection with the master earphone, and the slave earphone that indirectly connects with the terminal device. Specifically, the terminal device converts the audio signal to be sent into a first radio frequency signal and then broadcasts it. When the master earphone detects the first radio frequency signal, it conveys the information that the terminal device broadcasts the first radio frequency signal to the slave earphone, so that the slave earphone The earphone can monitor the first radio frequency signal broadcast by the terminal device. After detecting the first radio frequency signal broadcast by the terminal device, the main earphone acquires a first received signal strength indication corresponding to the first test signal of the first radio frequency signal header by the first horizontally polarized antenna and the first vertically polarized antenna. After the earphone monitors the first radio frequency signal sent by the terminal device, the second horizontally polarized antenna and the second vertically polarized antenna correspond to the first received signal strength indication corresponding to the first test signal of the packet header of the first radio frequency signal.

S102:主耳机在检测到所述第一水平极化天线对应的第一接收信号强度指示大于或等于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一水平极化天线为主耳第一目标天线,在检测到所述第一水平极化天线对应的第一接收信号强度指示小于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一垂直极化天线为主耳第一目标天线。S102: When the main earphone detects that the first received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the first vertically polarized antenna, determine the first level The polarized antenna is the first target antenna of the main ear, and when it is detected that the first received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that The first vertically polarized antenna is the first target antenna for the main ear.

主耳机根据获取到的第一水平极化天线及第一垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示确定主耳第一目标天线。该主耳第一目标天线为用于接收该第一射频信号时保证信号质量较优的天线,该主耳第一目标天线可能为第一水平极化天线,也可能为第一垂直极化天线。The main earphone determines the first target antenna of the main ear according to the obtained first received signal strength indication corresponding to the first test signal of the first radio frequency signal header by the first horizontally polarized antenna and the first vertically polarized antenna. The first target antenna of the main ear is an antenna that ensures better signal quality when receiving the first radio frequency signal, and the first target antenna of the main ear may be the first horizontally polarized antenna or the first vertically polarized antenna .

示例性地,当用户只使用TWS耳机中的一个耳机时,经过S101中的处理,基于该主耳机中的第一水平极化天线获取到了第一射频信号包头的第一测试信号对应的接收信号强度指示,以及基于该主耳机中的第一垂直极化天线获取到了第一射频信号包头的第一测试信号对应的接收信号强度指示。主耳机比较两个接收信号强度指示,选择接收信号强度指示较优的一方所对应的天线作为主耳第一目标天线。具体地,主耳机在检测到第一水平极化天线对应的第一接收信号强度指示大于或等于第一垂直极化天线对应的第一接收信号强度指示时,判定第一水平极化天线为主耳第一目标天线,在检测到第一水平极化天线对应的第一接收信号强度指示小于第一垂直极化天线对应的第一接收信号强度指示时,判定第一垂直极化天线为主耳第一目标天线。Exemplarily, when the user only uses one of the TWS earphones, after the processing in S101, based on the first horizontally polarized antenna in the main earphone, the received signal corresponding to the first test signal of the first radio frequency signal header is obtained The strength indication, and the received signal strength indication corresponding to the first test signal that has obtained the header of the first radio frequency signal based on the first vertically polarized antenna in the main earphone. The main earphone compares the two received signal strength indicators, and selects the antenna corresponding to the one with the better received signal strength indicator as the first target antenna of the main ear. Specifically, when the master earphone detects that the first received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the first vertically polarized antenna, it determines that the first horizontally polarized antenna is the master. The first target antenna of the ear, when it is detected that the first received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the first vertically polarized antenna is the main ear First target antenna.

例如,基于主耳机中的第一水平极化天线获取到的第一射频信号包头的第一测试信号对应的RSSI为-80dbm,基于主耳机中的第一垂直极化天线获取到的第一射频信号包头的第一测试信号对应的RSSI为-60dbm;主耳机比较两个RSSI的大小,显然此时RSSI为-60dbm对应的第一垂直极化天线接收该第一射频信号更好。此时,将主耳机中的第一垂直极化天线作为主耳第一目标天线。For example, based on the RSSI corresponding to the first test signal of the first radio frequency signal packet header obtained by the first horizontally polarized antenna in the main earphone is -80dbm, based on the first radio frequency obtained by the first vertically polarized antenna in the main earphone The RSSI corresponding to the first test signal of the signal header is -60dbm; the main earphone compares the size of the two RSSIs, and it is obvious that the first vertically polarized antenna corresponding to the RSSI of -60dbm receives the first RF signal better. At this time, the first vertically polarized antenna in the main earphone is used as the first target antenna of the main ear.

S103:从耳机在检测到所述第二水平极化天线对应的第一接收信号强度指示大于或等于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二水平极化天线为从耳第一目标天线,在检测到所述第二水平极化天线对应的第一接收信号强度指示小于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二垂直极化天线为从耳第一目标天线。S103: When the earphone detects that the first received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the second vertically polarized antenna, determine the second level The polarized antenna is the first target antenna from the ear, and when it is detected that the first received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that The second vertically polarized antenna is the first target antenna from the ear.

示例性地,从耳机根据获取到的第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示确定从耳第一目标天线。该从耳第一目标天线为用于接收该第一射频信号时保证信号质量较优的天线,该从耳第一目标天线可能为第二水平极化天线,也可能为第二垂直极化天线。Exemplarily, the slave earphone determines the first target antenna of the slave ear according to the acquired first received signal strength indication corresponding to the first test signal of the first radio frequency signal header by the second horizontally polarized antenna and the second vertically polarized antenna. The first target antenna from the ear is an antenna that ensures better signal quality when receiving the first radio frequency signal, and the first target antenna from the ear may be the second horizontally polarized antenna or the second vertically polarized antenna .

示例性地,基于该从耳机中的第二水平极化天线获取到了第一射频信号包头的第一测试信号对应的接收信号强度指示,以及基于该从耳机中的第二垂直极化天线获取到了第一射频信号包头的第一测试信号对应的接收信号强度指示。从耳机比较两个接收信号强度指示,选择接收信号强度指示较优的一方所对应的天线作为从耳第一目标天线。具体地,从耳机在检测到第二水平极化天线对应的第一接收信号强度指示大于或等于第二垂直极化天线对应的第一接收信号强度指示时,判定第二水平极化天线为从耳第一目标天线,在检测到第二水平极化天线对应的第一接收信号强度指示小于第二垂直极化天线对应的第一接收信号强度指示时,判定第二垂直极化天线为从耳第一目标天线。Exemplarily, based on the received signal strength indication corresponding to the first test signal of the first radio frequency signal packet header obtained from the second horizontally polarized antenna in the earphone, and based on the obtained from the second vertically polarized antenna in the earphone The received signal strength indication corresponding to the first test signal in the packet header of the first radio frequency signal. The slave earphone compares the two received signal strength indicators, and selects the antenna corresponding to the one with the better received signal strength indicator as the first target antenna of the slave ear. Specifically, when the slave earphone detects that the first received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the second vertically polarized antenna, it determines that the second horizontally polarized antenna is a slave When the first target antenna of the ear detects that the first received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that the second vertically polarized antenna is the slave ear First target antenna.

可选地,在一种可实现的方式中,从耳机可根据获取到的第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比确定从耳第一目标天线。具体地,从耳机在检测到第二水平极化天线对应的第一信噪比大于或等于第二垂直极化天线对应的第一信噪比时,判定第二水平极化天线为从耳第一目标天线,在检测到第二水平极化天线对应的第一信噪比小于第二垂直极化天线对应的第一信噪比时,判定第二垂直极化天线为从耳第一目标天线。Optionally, in a practicable manner, the first signal-to-noise signal corresponding to the first test signal of the header of the first radio frequency signal can be obtained from the earphone according to the obtained second horizontally polarized antenna and the second vertically polarized antenna. Than determine the target antenna from the ear first. Specifically, when the slave earphone detects that the first signal-to-noise ratio corresponding to the second horizontally polarized antenna is greater than or equal to the first signal-to-noise ratio corresponding to the second vertically polarized antenna, it determines that the second horizontally polarized antenna is the first signal-to-noise ratio of the slave earphone. A target antenna, when it is detected that the first signal-to-noise ratio corresponding to the second horizontally polarized antenna is smaller than the first signal-to-noise ratio corresponding to the second vertically polarized antenna, it is determined that the second vertically polarized antenna is the first target antenna from the ear .

可选地,在一种可实现的方式中,从耳机可根据获取到的第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一误码率确定从耳第一目标天线。具体地,从耳机在检测到第二水平极化天线对应的第一误码率小于或等于第二垂直极化天线对应的第一误码率时,判定第二水平极化天线为从耳第一目标天线,在检测到第二水平极化天线对应的第一误码率大于第二垂直极化天线对应的第一误码率时,判定第二垂直极化天线为从耳第一目标天线。Optionally, in a practicable manner, the first bit error corresponding to the first test signal of the packet header of the first radio frequency signal can be obtained from the earphone according to the obtained second horizontally polarized antenna and the second vertically polarized antenna. The rate is determined from the ear to the first target antenna. Specifically, when the slave earphone detects that the first bit error rate corresponding to the second horizontally polarized antenna is less than or equal to the first bit error rate corresponding to the second vertically polarized antenna, it determines that the second horizontally polarized antenna is the first bit error rate of the slave earphone. A target antenna, when detecting that the first bit error rate corresponding to the second horizontally polarized antenna is greater than the first bit error rate corresponding to the second vertically polarized antenna, it is determined that the second vertically polarized antenna is the first target antenna from the ear .

S104:当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示。S104: When the master earphone detects the second radio frequency signal sent by the slave earphone or the slave earphone detects the master earphone, acquire the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and A second received signal strength indicator corresponding to the second test signal of the second radio frequency signal header by the second vertically polarized antenna.

第二射频信号可以包括同步信号和/或转发信号。其中,同步信号用于主耳机与从耳机将接收到的第一射频信号转换为音频信号后在耳机中同步播放,使用户佩戴的主耳机与从耳机同步发出声音;当从耳机需要通过主耳机转发信号才可接收到终端设备发送的第一射频信号时,主耳机在接收到第一射频信号后需要将该第一射频信号转发给从耳机,可以理解为此时的转发信号就是主耳机接收到的第一射频信号。示例性地,当第二射频信号为转发信号,从耳机检测到主耳机发送的第二射频信号时,获取第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示。当第二射频信号为同步信号,主耳机检测到从耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示。The second radio frequency signal may include a synchronization signal and/or a repeat signal. Among them, the synchronization signal is used for the master earphone and the slave earphone to convert the received first radio frequency signal into an audio signal and then play it synchronously in the earphone, so that the master earphone worn by the user and the slave earphone emit sound synchronously; when the slave earphone needs to pass through the master earphone Only when the signal is forwarded can the first radio frequency signal sent by the terminal device be received, the master earphone needs to forward the first radio frequency signal to the slave earphone after receiving the first radio frequency signal. It can be understood that the forwarding signal at this time is the master earphone receiving The first radio frequency signal received. Exemplarily, when the second radio frequency signal is a transponder signal, and the second radio frequency signal sent by the main earphone is detected from the earphone, the second radio frequency signal packet header of the second radio frequency signal by the second horizontally polarized antenna and the second vertically polarized antenna is obtained. A second received signal strength indicator corresponding to the test signal. When the second radio frequency signal is a synchronous signal and the main earphone detects the second radio frequency signal sent from the earphone, obtain the first horizontally polarized antenna and the first vertically polarized antenna corresponding to the second test signal of the second radio frequency signal header. A second received signal strength indicator.

当第二射频信号为同步信号时,以TWS耳机为例进行说明,当用户同时使用TWS耳机中的两个耳机时,主耳机与从耳机在都接收到终端设备发送的第一射频信号后,主耳机会向从耳机发送同步信号。主耳机在发送同步信号之前,在该同步信号中添加包头,此时同步信号包头的第二测试信号用于辅助从耳机判断选取哪个天线接收第二射频信号。同步信号用于主耳机与从耳机将接收到的第一射频信号转换为音频信号后在耳机中同步播放,使用户佩戴的主耳机与从耳机同步发出声音。When the second radio frequency signal is a synchronization signal, take the TWS earphone as an example for illustration. When the user uses two earphones in the TWS earphone at the same time, after the master earphone and the slave earphone both receive the first radio frequency signal sent by the terminal device, The master headphone will send a sync signal to the slave headphone. Before sending the synchronization signal, the master earphone adds a header to the synchronization signal. At this time, the second test signal of the header of the synchronization signal is used to assist the slave earphone in judging which antenna to select to receive the second radio frequency signal. The synchronization signal is used for the master earphone and the slave earphone to convert the received first radio frequency signal into an audio signal and then play it synchronously in the earphone, so that the master earphone worn by the user and the slave earphone emit sound synchronously.

示例性地,主耳机可基于与终端设备进行信号传输时使用的天线向从耳机发送同步信号,也可以随机选取第一水平极化天线或者第一垂直极化天线向从耳机发送同步信号,还可以是通过第一水平极化天线和第一垂直极化天线同时向从耳机发送同步信号。从耳机在检测到主耳机发送的同步信号时,获取该同步信号包头的第二测试信号对应的接收信号强度指示。可选地,在一种可实现的方式中,从耳机还可获取第二水平极化天线及第二垂直极化天线对同步信号包头的第二测试信号对应的信噪比,以及获取第二水平极化天线及第二垂直极化天线对同步信号包头的第二测试信号对应的误码率。Exemplarily, the master earphone may send a synchronization signal to the slave earphone based on the antenna used for signal transmission with the terminal device, or randomly select the first horizontally polarized antenna or the first vertically polarized antenna to send the synchronization signal to the slave earphone, or It may be that the first horizontally polarized antenna and the first vertically polarized antenna simultaneously send the synchronization signal to the slave earphone. When the slave earphone detects the synchronization signal sent by the master earphone, it acquires the received signal strength indication corresponding to the second test signal at the packet header of the synchronization signal. Optionally, in a practicable manner, the signal-to-noise ratio corresponding to the second test signal of the synchronization signal packet header by the second horizontally polarized antenna and the second vertically polarized antenna can also be obtained from the earphone, and the second The horizontally polarized antenna and the second vertically polarized antenna correspond to the bit error rate of the second test signal at the header of the synchronization signal.

当第二射频信号为转发信号时,以TWS耳机为例进行说明,当用户同时使用TWS耳机中的两个耳机时,终端设备将待发送的音频信号转换为第一射频信号后进行广播,主耳机在检测到第一射频信号后,基于主耳第一目标天线接收该第一射频信号。主耳机将接收到的第一射频信号转发给从耳机。具体地,主耳机可将第一射频信号划分为多段第二射频信号,分批转发给从耳机。从耳机检测到主耳机发送的第二射频信号时,获取第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示,基于各自对应的第二接收信号强度指示确定接收该第二射频信号的天线,并基于确定的天线接收该第二射频信号。同时,主耳机也将天线调整为与从耳机同类型的天线转发剩余的第二射频信号。例如,从耳机基于第二水平极化天线接收第二射频信号,则主耳机基于第一水平极化天线与从耳机进行信号传输;从耳机基于第二垂直极化天线接收第二射频信号,则主耳机基于第一垂直极化天线与从耳机进行信号传输。示例性地,从耳机在初次接收到第二射频信号时,可向主耳机发送一个反馈信号,主耳机获取该反馈信号对应的接收信号强度指示,基于该接收信号强度指示确定用哪个天线继续向从耳机转发第二射频信号。主耳机与从耳机的位置是相对的,因此,主耳机与从耳机之间进行信号传输时,所采用的天线都是同个方向的天线。可选地,在一种可实现的方式中,从耳机还可获取第二水平极化天线及第二垂直极化天线对转发信号包头的第二测试信号对应的信噪比,以及获取第二水平极化天线及第二垂直极化天线对转发信号包头的第二测试信号对应的误码率。When the second radio frequency signal is a forwarding signal, the TWS earphone is used as an example for illustration. When the user uses two earphones in the TWS earphone at the same time, the terminal device converts the audio signal to be sent into the first radio frequency signal and broadcasts it. After detecting the first radio frequency signal, the earphone receives the first radio frequency signal based on the first target antenna of the main ear. The master earphone forwards the received first radio frequency signal to the slave earphone. Specifically, the master earphone may divide the first radio frequency signal into multiple second radio frequency signals, and forward them to the slave earphones in batches. When the second radio frequency signal sent by the main earphone is detected from the earphone, the second received signal strength indication corresponding to the second test signal of the second radio frequency signal header by the second horizontally polarized antenna and the second vertically polarized antenna is obtained, based on the respective The corresponding second received signal strength indicator determines an antenna for receiving the second radio frequency signal, and receives the second radio frequency signal based on the determined antenna. At the same time, the master earphone also adjusts the antenna to forward the remaining second radio frequency signal to the antenna of the same type as the slave earphone. For example, if the slave earphone receives the second radio frequency signal based on the second horizontally polarized antenna, then the master earphone performs signal transmission with the slave earphone based on the first horizontally polarized antenna; if the slave earphone receives the second radio frequency signal based on the second vertically polarized antenna, then The master earphone performs signal transmission with the slave earphone based on the first vertically polarized antenna. Exemplarily, when the slave earphone receives the second radio frequency signal for the first time, it can send a feedback signal to the master earphone, and the master earphone obtains the received signal strength indication corresponding to the feedback signal, and determines which antenna to use to continue to transmit the signal based on the received signal strength indication. The second radio frequency signal is forwarded from the headset. The positions of the master earphone and the slave earphone are opposite, therefore, the antennas used for signal transmission between the master earphone and the slave earphone are antennas in the same direction. Optionally, in a practicable manner, the signal-to-noise ratio corresponding to the second test signal of the forwarded signal packet header by the second horizontally polarized antenna and the second vertically polarized antenna can also be obtained from the earphone, and the second The horizontally polarized antenna and the second vertically polarized antenna correspond to the bit error rate of the second test signal of the header of the forwarded signal.

S105:主耳机在检测到所述第一水平极化天线对应的第二接收信号强度指示大于或等于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一水平极化天线为主耳第二目标天线,在检测到所述第一水平极化天线对应的第二接收信号强度指示小于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一垂直极化天线为主耳第二目标天线。S105: When the main earphone detects that the second received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the first vertically polarized antenna, determine the first level The polarized antenna is the main ear and the second target antenna, and when it is detected that the second received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that The first vertically polarized antenna is the second target antenna for the main ear.

主耳机根据获取到的第一水平极化天线及第一垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示确定主耳第二目标天线。该主耳第二目标天线为用于接收该第二射频信号时保证信号质量较优的天线,该主耳第二目标天线可能为第一水平极化天线,也可能为第一垂直极化天线。The main earphone determines the second target antenna of the main ear according to the obtained first horizontally polarized antenna and the second received signal strength indicator corresponding to the second test signal of the second radio frequency signal header obtained by the first vertically polarized antenna. The second target antenna of the main ear is an antenna that ensures better signal quality when receiving the second radio frequency signal, and the second target antenna of the main ear may be the first horizontally polarized antenna or the first vertically polarized antenna .

示例性地,基于该主耳机中的第一水平极化天线获取到了第二射频信号包头的第二测试信号对应的接收信号强度指示,以及基于该主耳机中的第一垂直极化天线获取到了第二射频信号包头的第二测试信号对应的接收信号强度指示。主耳机比较两个接收信号强度指示,选择接收信号强度指示较优的一方所对应的天线作为主耳第二目标天线。具体地,主耳机在检测到所第一水平极化天线对应的第二接收信号强度指示大于或等于第一垂直极化天线对应的第二接收信号强度指示时,判定第一水平极化天线为主耳第二目标天线,在检测到第一水平极化天线对应的第二接收信号强度指示小于第一垂直极化天线对应的第二接收信号强度指示时,判定第一垂直极化天线为主耳第二目标天线。Exemplarily, based on the first horizontally polarized antenna in the main earphone, the received signal strength indicator corresponding to the second test signal of the packet header of the second radio frequency signal is obtained, and based on the first vertically polarized antenna in the main earphone, the received signal strength indicator is obtained The received signal strength indicator corresponding to the second test signal in the packet header of the second radio frequency signal. The main earphone compares the two received signal strength indicators, and selects the antenna corresponding to the one with the better received signal strength indicator as the second target antenna of the main ear. Specifically, the main earphone determines that the first horizontally polarized antenna is The second target antenna of the main ear, when it is detected that the second received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the first vertically polarized antenna is the main Ear second target antenna.

S106:从耳机在检测到所述第二水平极化天线对应的第二接收信号强度指示大于或等于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二水平极化天线为从耳第二目标天线,在检测到所述第二水平极化天线对应的第二接收信号强度指示小于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二垂直极化天线为从耳第二目标天线。S106: When the earphone detects that the second received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the second vertically polarized antenna, determine the second level The polarized antenna is the second target antenna from the ear, and when it is detected that the second received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that The second vertically polarized antenna is the second target antenna from the ear.

从耳机根据获取到的第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示确定从耳第二目标天线。该从耳第二目标天线为用于接收该第二射频信号时保证信号质量较优的天线,该从耳第二目标天线可能为第二水平极化天线,也可能为第二垂直极化天线。The slave earphone determines the second target antenna of the slave ear according to the acquired second received signal strength indication corresponding to the second test signal of the second radio frequency signal packet header obtained from the second horizontally polarized antenna and the second vertically polarized antenna. The second target antenna from the ear is an antenna that ensures better signal quality when receiving the second radio frequency signal, and the second target antenna from the ear may be a second horizontally polarized antenna or a second vertically polarized antenna .

示例性地,基于该从耳机中的第二水平极化天线获取到了第二射频信号包头的第二测试信号对应的接收信号强度指示,以及基于该从耳机中的第二垂直极化天线获取到了第二射频信号包头的第二测试信号对应的接收信号强度指示。从耳机比较两个接收信号强度指示,选择接收信号强度指示较优的一方所对应的天线作为从耳第二目标天线。具体地,从耳机在检测到第二水平极化天线对应的第二接收信号强度指示大于或等于第二垂直极化天线对应的第二接收信号强度指示时,判定第二水平极化天线为从耳第二目标天线,在检测到第二水平极化天线对应的第二接收信号强度指示小于第二垂直极化天线对应的第二接收信号强度指示时,判定第二垂直极化天线为从耳第二目标天线。Exemplarily, based on the received signal strength indication corresponding to the second test signal of the second radio frequency signal packet header obtained from the second horizontally polarized antenna in the earphone, and based on the obtained from the second vertically polarized antenna in the earphone The received signal strength indicator corresponding to the second test signal in the packet header of the second radio frequency signal. The slave earphone compares the two received signal strength indicators, and selects the antenna corresponding to the one with the better received signal strength indicator as the second target antenna of the slave ear. Specifically, when the slave earphone detects that the second received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the second vertically polarized antenna, it determines that the second horizontally polarized antenna is a slave For the second target antenna of the ear, when it is detected that the second received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that the second vertically polarized antenna is from the ear Second target antenna.

S107:所述主耳机基于所述主耳第一目标天线接收第一射频信号,基于所述主耳第二目标天线接收第二射频信号。S107: The main earphone receives a first radio frequency signal based on the first target antenna of the main ear, and receives a second radio frequency signal based on the second target antenna of the main ear.

主耳机基于主耳第一目标天线接收第一射频信号,基于主耳第二目标天线接收第二射频信号。示例性地,若主耳机在S102中确定的主耳第一目标天线为第一水平极化天线,则基于该主耳机中的第一水平极化天线接收终端设备发送的第一射频信号;若主耳机在S102中确定的主耳第一目标天线为第一垂直极化天线,则基于该主耳机中的第一垂直极化天线接收终端设备发送的第一射频信号。The main earphone receives the first radio frequency signal based on the first target antenna of the main ear, and receives the second radio frequency signal based on the second target antenna of the main ear. Exemplarily, if the first target antenna of the main ear determined by the main earphone in S102 is the first horizontally polarized antenna, the first radio frequency signal sent by the terminal device is received based on the first horizontally polarized antenna in the main earphone; if The main earphone determines in S102 that the first target antenna of the main ear is the first vertically polarized antenna, and receives the first radio frequency signal sent by the terminal device based on the first vertically polarized antenna in the main earphone.

若主耳机在S105中确定的主耳第二目标天线为第一水平极化天线,则基于该主耳机中的第一水平极化天线接收第二射频信号;若主耳机在S105中确定的主耳第二目标天线为第一垂直极化天线,则基于该主耳机中的第一垂直极化天线接收第二射频信号。示例性地,当第二射频信号为同步信号时,若主耳机在S105中确定的主耳第二目标天线为第一水平极化天线,则基于该主耳机中的第一水平极化天线接收从耳机发送的同步信号;若主耳机在S105中确定的主耳第二目标天线为第一垂直极化天线,则基于该主耳机中的第一垂直极化天线接收从耳机发送的同步信号。If the second target antenna of the main ear determined by the main earphone in S105 is the first horizontally polarized antenna, then the second radio frequency signal is received based on the first horizontally polarized antenna in the main earphone; If the second target antenna of the ear is the first vertically polarized antenna, the second radio frequency signal is received based on the first vertically polarized antenna in the main earphone. Exemplarily, when the second radio frequency signal is a synchronization signal, if the second target antenna of the main ear determined by the main earphone in S105 is the first horizontally polarized antenna, then based on the first horizontally polarized antenna in the main earphone receiving The synchronization signal sent from the earphone; if the second target antenna of the main ear determined by the main earphone in S105 is the first vertically polarized antenna, then the synchronization signal sent from the earphone is received based on the first vertically polarized antenna in the main earphone.

S108:所述从耳机基于所述从耳第一目标天线接收第一射频信号,所述从耳机基于所述从耳第二目标天线接收第二射频信号。S108: The slave earphone receives a first radio frequency signal based on the slave ear first target antenna, and the slave earphone receives a second radio frequency signal based on the slave ear second target antenna.

从耳机基于从耳第一目标天线接收第一射频信号,基于从耳第二目标天线接收第二射频信号。示例性地,若从耳机在S103中确定的从耳第一目标天线为第二水平极化天线,则基于该从耳机中的第二水平极化天线接收第一射频信号;若从耳机在S103中确定的从耳第一目标天线为第二垂直极化天线,则基于该从耳机中的第二垂直极化天线接收第一射频信号。The slave headset is based on receiving the first radio frequency signal from the first target antenna of the ear and based on receiving the second radio frequency signal from the second target antenna of the ear. Exemplarily, if the first target antenna of the slave ear determined in S103 by the slave earphone is the second horizontally polarized antenna, then the first radio frequency signal is received based on the second horizontally polarized antenna in the slave earphone; if the slave earphone determines in S103 If the first target antenna of the slave ear is determined to be the second vertically polarized antenna, the first radio frequency signal is received based on the second vertically polarized antenna in the slave earphone.

若从耳机在S106中确定的从耳第二目标天线为第二水平极化天线,则基于该从耳机中的第二水平极化天线接收第二射频信号;若从耳机在S106中确定的从耳第二目标天线为第二垂直极化天线,则基于该从耳机中的第二垂直极化天线接收第二射频信号。同理,当第二射频信号为转发信号时,从耳机基于第二水平极化天线或第二垂直极化天线接收主耳机发送的转发信号。If the second target antenna from the ear determined in S106 from the earphone is the second horizontally polarized antenna, then based on the second horizontally polarized antenna in the earphone, the second radio frequency signal is received; The second target antenna of the ear is the second vertically polarized antenna, based on receiving the second radio frequency signal from the second vertically polarized antenna in the earphone. Similarly, when the second radio frequency signal is a forwarding signal, the slave earphone receives the forwarding signal sent by the master earphone based on the second horizontally polarized antenna or the second vertically polarized antenna.

本申请提供的处理信号的方法适用于蓝牙耳机,蓝牙耳机包括主耳机以及从耳机,主耳机中设置有第一水平极化天线和第一垂直极化天线,从耳机中设置有第二水平极化天线和第二垂直极化天线。当主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示,根据第一水平极化天线及第一垂直极化天线各自对应的第一接收信号强度指示,判断采用第一水平极化天线还是第一垂直极化天线接收该第一射频信号的信号质量最优;根据第二水平极化天线及第二垂直极化天线各自对应的第一接收信号强度指示,判断采用第二水平极化天线还是第二垂直极化天线接收该第一射频信号的信号质量最优,进而根据判断结果选择合适的天线接收该第一射频信号;当主耳机检测到从耳机或从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示,根据第一水平极化天线及第一垂直极化天线各自对应的第二接收信号强度指示,判断采用第一水平极化天线还是第一垂直极化天线接收该第二射频信号的信号质量最优;根据第二水平极化天线及第二垂直极化天线各自对应的第二接收信号强度指示,判断采用第二水平极化天线还是第二垂直极化天线接收该第二射频信号的信号质量最优,进而根据判断结果选择合适的天线接收该第二射频信号。上述方式中,蓝牙耳机的主耳机以及从耳机中各设置了两种不同方向的天线,可根据不同射频信号对应的不同接收信号强度指示,选择合适的天线接收射频信号,可保证实时接收各个射频信号,且接收到的各个射频信号都是信号质量最优的,使主耳机与终端设备以及主耳机与从耳机之间的信号传输均达到最优状态,避免了蓝牙耳机出现声音卡顿、延迟等现象。The signal processing method provided by this application is suitable for Bluetooth earphones. The Bluetooth earphones include a master earphone and a slave earphone. The master earphone is provided with a first horizontally polarized antenna and a first vertically polarized antenna, and the slave earphone is provided with a second horizontally polarized antenna. polarized antenna and a second vertically polarized antenna. When the main earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna pair According to the first received signal strength indication corresponding to the first test signal of the first radio frequency signal packet header, according to the first received signal strength indication corresponding to the first horizontally polarized antenna and the first vertically polarized antenna, it is judged that the first horizontal polarization is used The antenna or the first vertically polarized antenna has the best signal quality for receiving the first radio frequency signal; according to the first received signal strength indicators corresponding to the second horizontally polarized antenna and the second vertically polarized antenna, it is judged that the second horizontally polarized Polarized antenna or the second vertically polarized antenna has the best signal quality for receiving the first radio frequency signal, and then selects an appropriate antenna to receive the first radio frequency signal according to the judgment result; when the main earphone detects that the slave earphone or the slave earphone detects that the When the second radio frequency signal is obtained, the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second vertically polarized antenna correspond to the second test signal of the second radio frequency signal header. The received signal strength indicator, according to the second received signal strength indicator corresponding to the first horizontally polarized antenna and the first vertically polarized antenna, determines whether to use the first horizontally polarized antenna or the first vertically polarized antenna to receive the second radio frequency signal The signal quality is the best; according to the second received signal strength indication corresponding to the second horizontally polarized antenna and the second vertically polarized antenna, it is judged whether to use the second horizontally polarized antenna or the second vertically polarized antenna to receive the second radio frequency The signal quality of the signal is optimal, and then an appropriate antenna is selected to receive the second radio frequency signal according to the judgment result. In the above method, the main earphone and the slave earphone of the Bluetooth earphone are equipped with antennas in two different directions. According to different received signal strength indicators corresponding to different radio frequency signals, an appropriate antenna can be selected to receive radio frequency signals, which can ensure real-time reception of each radio frequency. signal, and the received radio frequency signals are of the best signal quality, so that the signal transmission between the master earphone and the terminal device as well as the master earphone and the slave earphone can reach the optimal state, avoiding the sound stuttering and delay of the Bluetooth earphone And so on.

可选地,在一种可实现的方式中,当主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比和第一误码率;第一信噪比和第一误码率用于确定主耳第一目标天线以及确定从耳第一目标天线。Optionally, in a practicable manner, when the master earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, the first horizontally polarized antenna and the first vertically polarized antenna and/or the first radio frequency signal are acquired. Two horizontally polarized antennas and the second vertically polarized antenna correspond to the first signal-to-noise ratio and the first bit error rate of the first test signal of the header of the first radio frequency signal; the first signal-to-noise ratio and the first bit error rate are used for Determine the first target antenna for the master ear and determine the first target antenna for the slave ear.

示例性地,当主耳机检测到终端设备发送的第一射频信号时,主耳机基于该主耳机中的第一水平极化天线获取第一射频信号包头的第一测试信号对应的第一信噪比以及第一误码率,以及基于该主耳机中的第一垂直极化天线获取第一射频信号包头的第一测试信号对应的第一信噪比以及第一误码率。各个第一信噪比以及各个第一误码率的获取方式可参考接收信号强度指示的获取方式。For example, when the main earphone detects the first radio frequency signal sent by the terminal device, the main earphone obtains the first signal-to-noise ratio corresponding to the first test signal of the header of the first radio frequency signal based on the first horizontally polarized antenna in the main earphone. and the first bit error rate, and the first signal-to-noise ratio and the first bit error rate corresponding to the first test signal of the first radio frequency signal header obtained based on the first vertically polarized antenna in the main earphone. The manner of obtaining each first SNR and each first BER may refer to the manner of obtaining a received signal strength indication.

主耳机可根据获取到的第一水平极化天线及第一垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比确定主耳第一目标天线。具体地,主耳机在检测到第一水平极化天线对应的第一信噪比大于或等于第一垂直极化天线对应的第一信噪比时,判定第一水平极化天线为主耳第一目标天线,在检测到第一水平极化天线对应的第一信噪比小于第一垂直极化天线对应的第一信噪比时,判定第一垂直极化天线为主耳第一目标天线。The main earphone can determine the first target antenna of the main ear according to the acquired first signal-to-noise ratio corresponding to the first test signal of the first radio frequency signal packet header of the first horizontally polarized antenna and the first vertically polarized antenna. Specifically, when the main earphone detects that the first signal-to-noise ratio corresponding to the first horizontally polarized antenna is greater than or equal to the first signal-to-noise ratio corresponding to the first vertically polarized antenna, it determines that the first horizontally polarized antenna is the first signal-to-noise ratio of the main earphone. A target antenna, when it is detected that the first signal-to-noise ratio corresponding to the first horizontally polarized antenna is lower than the first signal-to-noise ratio corresponding to the first vertically polarized antenna, it is determined that the first vertically polarized antenna is the first target antenna of the main ear .

可选地,在一种可实现的方式中,主耳机可根据获取到的第一水平极化天线及第一垂直极化天线对第一射频信号包头的第一测试信号对应的第一误码率确定主耳第一目标天线。具体地,主耳机在检测到第一水平极化天线对应的第一误码率小于或等于第一垂直极化天线对应的第一误码率时,判定第一水平极化天线为主耳第一目标天线,在检测到第一水平极化天线对应的第一误码率大于第一垂直极化天线对应的第一误码率时,判定第一垂直极化天线为主耳第一目标天线。Optionally, in a practicable manner, the main earphone can pair the first error bit corresponding to the first test signal of the packet header of the first radio frequency signal according to the obtained first horizontally polarized antenna and the first vertically polarized antenna. The rate determines the primary ear first target antenna. Specifically, when the main earphone detects that the first bit error rate corresponding to the first horizontally polarized antenna is less than or equal to the first bit error rate corresponding to the first vertically polarized antenna, it determines that the first horizontally polarized antenna is the first bit error rate of the main earphone. A target antenna, when it is detected that the first bit error rate corresponding to the first horizontally polarized antenna is greater than the first bit error rate corresponding to the first vertically polarized antenna, it is determined that the first vertically polarized antenna is the main ear first target antenna .

示例性地,当从耳机检测到终端设备发送的第一射频信号时,从耳机基于该从耳机中的第二水平极化天线获取第一射频信号包头的第一测试信号对应的第一信噪比以及第一误码率,以及基于该从耳机中的第二垂直极化天线获取第一射频信号包头的第一测试信号对应的第一信噪比以及第一误码率。Exemplarily, when the slave earphone detects the first radio frequency signal sent by the terminal device, the slave earphone obtains the first signal-to-noise signal corresponding to the first test signal of the header of the first radio frequency signal based on the second horizontally polarized antenna in the slave earphone. ratio and the first bit error rate, and the first signal-to-noise ratio and the first bit error rate corresponding to the first test signal obtained from the second vertically polarized antenna in the earphone based on the first test signal of the header of the first radio frequency signal.

从耳机可根据获取到的第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比确定从耳第一目标天线。具体地,从耳机在检测到第二水平极化天线对应的第一信噪比大于或等于第二垂直极化天线对应的第一信噪比时,判定第二水平极化天线为从耳第一目标天线,在检测到第二水平极化天线对应的第一信噪比小于第二垂直极化天线对应的第一信噪比时,判定第二垂直极化天线为从耳第一目标天线。The slave earphone can determine the first target antenna of the slave ear according to the acquired first signal-to-noise ratio corresponding to the first test signal of the first radio frequency signal header from the second horizontally polarized antenna and the second vertically polarized antenna. Specifically, when the slave earphone detects that the first signal-to-noise ratio corresponding to the second horizontally polarized antenna is greater than or equal to the first signal-to-noise ratio corresponding to the second vertically polarized antenna, it determines that the second horizontally polarized antenna is the first signal-to-noise ratio of the slave earphone. A target antenna, when it is detected that the first signal-to-noise ratio corresponding to the second horizontally polarized antenna is smaller than the first signal-to-noise ratio corresponding to the second vertically polarized antenna, it is determined that the second vertically polarized antenna is the first target antenna from the ear .

可选地,在一种可实现的方式中,从耳机可根据获取到的第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一误码率确定从耳第一目标天线。具体地,从耳机在检测到第二水平极化天线对应的第一误码率小于或等于第二垂直极化天线对应的第一误码率时,判定第二水平极化天线为从耳第一目标天线,在检测到第二水平极化天线对应的第一误码率大于第二垂直极化天线对应的第一误码率时,判定第二垂直极化天线为从耳第一目标天线。Optionally, in a practicable manner, the first bit error corresponding to the first test signal of the packet header of the first radio frequency signal can be obtained from the earphone according to the obtained second horizontally polarized antenna and the second vertically polarized antenna. The rate is determined from the ear to the first target antenna. Specifically, when the slave earphone detects that the first bit error rate corresponding to the second horizontally polarized antenna is less than or equal to the first bit error rate corresponding to the second vertically polarized antenna, it determines that the second horizontally polarized antenna is the first bit error rate of the slave earphone. A target antenna, when detecting that the first bit error rate corresponding to the second horizontally polarized antenna is greater than the first bit error rate corresponding to the second vertically polarized antenna, it is determined that the second vertically polarized antenna is the first target antenna from the ear .

可选地,在一种可实现的方式中,当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二信噪比和第二误码率;第二信噪比和第二误码率用于确定主耳第二目标天线以及确定从耳第二目标天线。Optionally, in a practicable manner, when the master earphone detects the slave earphone or the slave earphone detects the second radio frequency signal sent by the master earphone, the first horizontally polarized antenna and the first vertically polarized antenna are acquired. The polarized antenna or the second horizontally polarized antenna and the second vertically polarized antenna are to the second signal-to-noise ratio and the second bit error rate corresponding to the second test signal of the second radio frequency signal header; the second signal-to-noise ratio and the second The BER is used to determine the primary ear secondary target antenna and to determine the secondary ear secondary target antenna.

示例性地,当主耳机检测到从耳机发送的第二射频信号时,主耳机基于该主耳机中的第一水平极化天线获取第二射频信号包头的第二测试信号对应的第二信噪比以及第二误码率,以及基于该主耳机中的第一垂直极化天线获取第二射频信号包头的第二测试信号对应的第二信噪比以及第二误码率。Exemplarily, when the main earphone detects the second radio frequency signal sent from the earphone, the main earphone obtains the second signal-to-noise ratio corresponding to the second test signal of the header of the second radio frequency signal based on the first horizontally polarized antenna in the main earphone. And the second bit error rate, and the second signal-to-noise ratio and the second bit error rate corresponding to the second test signal of the second radio frequency signal header obtained based on the first vertically polarized antenna in the main earphone.

主耳机可根据获取到的第一水平极化天线及第一垂直极化天线对第二射频信号包头的第二测试信号对应的第二信噪比确定主耳第二目标天线。具体地,主耳机在检测到第一水平极化天线对应的第二信噪比大于或等于第一垂直极化天线对应的第二信噪比时,判定第一水平极化天线为主耳第二目标天线,在检测到第一水平极化天线对应的第二信噪比小于第一垂直极化天线对应的第二信噪比时,判定第一垂直极化天线为主耳第二目标天线。The main earphone can determine the second target antenna of the main ear according to the obtained second signal-to-noise ratio corresponding to the first horizontally polarized antenna and the first vertically polarized antenna to the second test signal of the second radio frequency signal header. Specifically, when the main earphone detects that the second signal-to-noise ratio corresponding to the first horizontally polarized antenna is greater than or equal to the second signal-to-noise ratio corresponding to the first vertically polarized antenna, it determines that the first horizontally polarized antenna is the second signal-to-noise ratio of the main earphone. Two target antennas, when it is detected that the second signal-to-noise ratio corresponding to the first horizontally polarized antenna is lower than the second signal-to-noise ratio corresponding to the first vertically polarized antenna, it is determined that the first vertically polarized antenna is the main ear and the second target antenna .

可选地,在一种可实现的方式中,主耳机可根据获取到的第一水平极化天线及第一垂直极化天线对第二射频信号包头的第二测试信号对应的第二误码率确定主耳第二目标天线。具体地,主耳机在检测到第一水平极化天线对应的第二误码率小于或等于第一垂直极化天线对应的第二误码率时,判定第一水平极化天线为主耳第二目标天线,在检测到第一水平极化天线对应的第二误码率大于第一垂直极化天线对应的第二误码率时,判定第一垂直极化天线为主耳第二目标天线。Optionally, in a practicable manner, the main earphone can pair the second error bit corresponding to the second test signal of the packet header of the second radio frequency signal according to the obtained first horizontally polarized antenna and the first vertically polarized antenna. The rate determines the primary ear and the secondary target antenna. Specifically, when the main earphone detects that the second bit error rate corresponding to the first horizontally polarized antenna is less than or equal to the second bit error rate corresponding to the first vertically polarized antenna, it determines that the first horizontally polarized antenna is the second bit error rate of the main earphone. Two target antennas, when it is detected that the second bit error rate corresponding to the first horizontally polarized antenna is greater than the second bit error rate corresponding to the first vertically polarized antenna, it is determined that the first vertically polarized antenna is the main ear and the second target antenna .

示例性地,当从耳机检测到主耳机发送的第二射频信号时,从耳机基于该从耳机中的第二水平极化天线获取第二射频信号包头的第二测试信号对应的第二信噪比以及第二误码率,以及基于该从耳机中的第二垂直极化天线获取第二射频信号包头的第二测试信号对应的第二信噪比以及第二误码率。Exemplarily, when the slave earphone detects the second radio frequency signal sent by the master earphone, the slave earphone obtains the second signal-to-noise signal corresponding to the second test signal of the second radio frequency signal header based on the second horizontally polarized antenna in the slave earphone. ratio and a second bit error rate, and the second signal-to-noise ratio and the second bit error rate corresponding to the second test signal obtained from the second vertically polarized antenna in the headset based on the second test signal of the packet header of the second radio frequency signal.

从耳机可根据获取到的第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二信噪比确定从耳第二目标天线。具体地,从耳机在检测到第二水平极化天线对应的第二信噪比大于或等于第二垂直极化天线对应的第二信噪比时,判定第二水平极化天线为从耳第二目标天线,在检测到第二水平极化天线对应的第二信噪比小于第二垂直极化天线对应的第二信噪比时,判定第二垂直极化天线为从耳第二目标天线。The slave earphone can determine the second target antenna of the slave ear according to the acquired second signal-to-noise ratio corresponding to the second test signal of the second radio frequency signal packet header of the second horizontally polarized antenna and the second vertically polarized antenna. Specifically, when the slave earphone detects that the second signal-to-noise ratio corresponding to the second horizontally polarized antenna is greater than or equal to the second signal-to-noise ratio corresponding to the second vertically polarized antenna, it determines that the second horizontally polarized antenna is the second signal-to-noise ratio corresponding to the second vertically polarized antenna. Two target antennas, when it is detected that the second signal-to-noise ratio corresponding to the second horizontally polarized antenna is smaller than the second signal-to-noise ratio corresponding to the second vertically polarized antenna, it is determined that the second vertically polarized antenna is the second target antenna from the ear .

可选地,在一种可实现的方式中,从耳机可根据获取到的第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二误码率确定从耳第二目标天线。具体地,从耳机在检测到第二水平极化天线对应的第二误码率小于或等于第二垂直极化天线对应的第二误码率时,判定第二水平极化天线为从耳第二目标天线,在检测到第二水平极化天线对应的第二误码率大于第二垂直极化天线对应的第二误码率时,判定第二垂直极化天线为从耳第二目标天线。Optionally, in a practicable manner, the second bit error corresponding to the second test signal of the packet header of the second radio frequency signal can be obtained from the earphone according to the obtained second horizontally polarized antenna and the second vertically polarized antenna. The rate is determined from the ear to the second target antenna. Specifically, when the slave earphone detects that the second bit error rate corresponding to the second horizontally polarized antenna is less than or equal to the second bit error rate corresponding to the second vertically polarized antenna, it determines that the second horizontally polarized antenna is the second bit error rate of the slave earphone. Two target antennas, when detecting that the second bit error rate corresponding to the second horizontally polarized antenna is greater than the second bit error rate corresponding to the second vertically polarized antenna, determine that the second vertically polarized antenna is the second target antenna from the ear .

可选地,在本申请一些可能的实现方式中,如图2所示,图2是本申请又一实施例提供的处理信号的方法的示意性流程图,该方法可以包括:S201~S209。其中,图2所示的步骤S201~S208可以参考上述对S101~S108的相关描述,为了简洁,这里不再赘述。下面将具体对步骤S209进行说明。Optionally, in some possible implementation manners of the present application, as shown in FIG. 2 , FIG. 2 is a schematic flowchart of a method for processing a signal provided in another embodiment of the present application, and the method may include: S201-S209. Wherein, for steps S201-S208 shown in FIG. 2, reference may be made to the relevant descriptions of S101-S108 above, and for the sake of brevity, details are not repeated here. Step S209 will be specifically described below.

S209:所述主耳机通过所述主耳第一目标天线向所述终端设备发送响应信号。S209: The main earphone sends a response signal to the terminal device through the first target antenna of the main ear.

当主耳机与从耳机之间的第二射频信号传输完成后,主耳机需要向终端设备发送响应信号,该响应信号用于提示终端设备可以发送新一轮的射频信号。主耳机通过主耳第一目标天线向终端设备发送响应信号。After the transmission of the second radio frequency signal between the master earphone and the slave earphone is completed, the master earphone needs to send a response signal to the terminal device, and the response signal is used to prompt the terminal device to send a new round of radio frequency signals. The main earphone sends a response signal to the terminal device through the first target antenna of the main ear.

主耳机检测其与从耳机进行信号传输所采用的天线,与主耳机和终端设备之间进行信号传输所采用的天线是否相同,即主耳机检测其与从耳机进行第二射频信号传输时采用的天线,与主耳机和终端设备进行第一射频信号传输时采用的天线是否为同一个天线,若为同一个天线,则主耳机基于主耳第一目标天线发送响应信号。The master earphone detects whether the antenna used for signal transmission with the slave earphone is the same as the antenna used for signal transmission between the master earphone and the terminal device, that is, the master earphone detects whether the antenna used for the second RF signal transmission with the slave earphone Antenna, whether the antenna used by the main earphone and the terminal device to transmit the first radio frequency signal is the same antenna, if it is the same antenna, the main earphone sends a response signal based on the first target antenna of the main ear.

例如,主耳机与终端设备进行第一射频信号传输时采用的第一垂直极化天线,主耳机与从耳机进行第二射频信号传输时采用的是第一垂直极化天线,此时,主耳机基于第一垂直极化天线发送响应信号至终端设备。关于第一水平极化天线与第一垂直极化天线类似,此处不再赘述。For example, the first vertically polarized antenna is used when the master earphone and the terminal device transmit the first radio frequency signal, and the first vertically polarized antenna is used when the master earphone and the slave earphone transmit the second radio frequency signal. At this time, the master earphone The response signal is sent to the terminal device based on the first vertically polarized antenna. The first horizontally polarized antenna is similar to the first vertically polarized antenna, and will not be repeated here.

若检测到主耳机与终端设备进行信号传输时采用的天线,和主耳机与从耳机进行信号传输时采用的天线不同,则主耳机通过与终端设备进行信号传输时采用的天线向终端设备发送响应信号。即若检测到主耳机与从耳机进行信号传输所采用的天线,与主耳机和终端设备之间进行信号传输所采用的天线不相同,则将主耳机当前的天线切换为其与终端设备进行信号传输时所采用的天线,并基于切换后的天线向终端设备发送响应信号。If it is detected that the antenna used for signal transmission between the master earphone and the terminal device is different from the antenna used for signal transmission between the master earphone and the slave earphone, the master earphone will send a response to the terminal device through the antenna used for signal transmission with the terminal device Signal. That is, if it is detected that the antenna used for signal transmission between the master earphone and the slave earphone is different from the antenna used for signal transmission between the master earphone and the terminal device, then the current antenna of the master earphone is switched to be used for signal transmission with the terminal device. The antenna used for transmission, and based on the switched antenna, a response signal is sent to the terminal device.

例如,主耳机与终端设备进行第一射频信号传输时采用的第一垂直极化天线,主耳机与从耳机进行第二射频信号传输时采用的是第一水平极化天线,此时,主耳机将第一水平极化天线切换至第一垂直极化天线,基于第一垂直极化天线发送响应信号至终端设备。也可理解为,当主耳机与终端设备进行第一射频信号传输时采用的天线,与主耳机与从耳机进行第二射频信号传输时采用的天线不同时,选择主耳机与终端设备进行第一射频信号传输时采用的天线发送响应信号至终端设备。For example, the first vertically polarized antenna is used when the master earphone and the terminal device transmit the first radio frequency signal, and the first horizontally polarized antenna is used when the master earphone and the slave earphone transmit the second radio frequency signal. At this time, the master earphone The first horizontally polarized antenna is switched to the first vertically polarized antenna, and a response signal is sent to the terminal device based on the first vertically polarized antenna. It can also be understood that when the antenna used for the first radio frequency signal transmission between the master earphone and the terminal device is different from the antenna used for the second radio frequency signal transmission between the master earphone and the slave earphone, select the master earphone and the terminal device for the first radio frequency signal transmission. The antenna used for signal transmission sends a response signal to the terminal device.

可选地,在本申请一些可能的实现方式中,在一个蓝牙数据包的传输过程中,在第一通讯时隙所述主耳机基于所述主耳第一目标天线与所述终端设备通讯,和/或所述从耳机基于所述从耳第一目标天线与所述终端设备通讯;在第二通讯时隙所述主耳机基于所述主耳第二目标天线与所述从耳机通讯或所述从耳机基于所述从耳第二目标天线与所述主耳机通讯;在第三通信时隙所述主耳机基于所述主耳第一目标天线向所述终端设备发送所述响应信号。Optionally, in some possible implementation manners of the present application, during the transmission of a Bluetooth data packet, the main earphone communicates with the terminal device based on the first target antenna of the main ear in the first communication time slot, And/or the slave earphone communicates with the terminal device based on the first target antenna of the slave ear; in the second communication time slot, the master earphone communicates with the slave earphone based on the second target antenna of the master ear or the The slave earphone communicates with the master earphone based on the second target antenna of the slave ear; in a third communication time slot, the master earphone sends the response signal to the terminal device based on the first target antenna of the master ear.

第一通讯时隙、第二通讯时隙、第三通讯时隙分别对应着在一份完整的蓝牙数据包传输过程中,第一射频信号、第二射频信号、响应信号的发送顺序以及发送时间。其中,第一通讯时隙早于第二通讯时隙,第二通讯时隙早于第三通讯时隙。第二通讯时隙的第二射频信号可包括同步信号和/或转发信号。The first communication time slot, the second communication time slot, and the third communication time slot respectively correspond to the sending sequence and sending time of the first radio frequency signal, the second radio frequency signal, and the response signal during the transmission of a complete Bluetooth data packet . Wherein, the first communication time slot is earlier than the second communication time slot, and the second communication time slot is earlier than the third communication time slot. The second radio frequency signal of the second communication slot may include a synchronization signal and/or a repeat signal.

示例性地,以用户只佩戴两只TWS耳机为例进行说明。当用户同时佩戴TWS耳机中的两个耳机时,直接与手机进行蓝牙连接的为主耳机,与主耳机之间建立虚拟蓝牙连接,间接与手机进行连接的为从耳机。手机将待发送的音频信号转换为第一射频信号后进行广播,在第一通讯时隙该主耳机检测到该第一射频信号,同时向从耳机传达终端设备广播第一射频信号的信息,使从耳机可监听到手机广播的该第一射频信号。主耳机在第一通讯时隙检测到手机广播的第一射频信号后,基于该主耳机中的第一水平极化天线获取第一射频信号包头的第一测试信号对应的接收信号强度指示,以及基于该主耳机中的第一垂直极化天线获取第一射频信号包头的第一测试信号对应的接收信号强度指示。从耳机在第二通讯时隙监听到终端设备发送的该第一射频信号后,基于该从耳机中的第二水平极化天线获取第一射频信号包头的第一测试信号对应的接收信号强度指示,以及基于该从耳机中的第二垂直极化天线获取第一射频信号包头的第一测试信号对应的接收信号强度指示。主耳机与从耳机分别根据获取到的接收信号强度指示确定其各自对应的目标天线。比如,用户将手机装在口袋里,这时主耳机以及从耳机都与手机呈垂直状态,此时主耳机与从耳机的垂直极化天线对射频信号传输具有较优的性能,主耳机通过比较两个天线对应的接收信号强度指示,可得到接收信号强度指示较优的一方为第一垂直极化天线,将第一垂直极化天线作为主耳第一目标天线,并基于该第一垂直极化天线接收手机发送的第一射频信号;从耳机也是相同的处理过程。Exemplarily, a user only wears two TWS earphones as an example for description. When the user wears two earphones in the TWS earphone at the same time, the master earphone that directly connects with the mobile phone through Bluetooth, establishes a virtual Bluetooth connection with the master earphone, and the slave earphone that indirectly connects with the mobile phone. The mobile phone converts the audio signal to be sent into the first radio frequency signal and then broadcasts it. In the first communication time slot, the master earphone detects the first radio frequency signal, and at the same time conveys the information of the terminal device broadcasting the first radio frequency signal to the slave earphone, so that The first radio frequency signal broadcast by the mobile phone can be monitored from the earphone. After the main earphone detects the first radio frequency signal broadcast by the mobile phone in the first communication time slot, based on the first horizontally polarized antenna in the main earphone, the received signal strength indication corresponding to the first test signal of the first radio frequency signal header is obtained, and The received signal strength indication corresponding to the first test signal of the first radio frequency signal packet header is obtained based on the first vertically polarized antenna in the main earphone. After the earphone monitors the first radio frequency signal sent by the terminal device in the second communication time slot, based on the second horizontally polarized antenna in the earphone, the received signal strength indication corresponding to the first test signal of the header of the first radio frequency signal is acquired , and the received signal strength indication corresponding to the first test signal of the packet header of the first radio frequency signal obtained based on the second vertically polarized antenna in the earphone. The master earphone and the slave earphone respectively determine their corresponding target antennas according to the acquired received signal strength indication. For example, when the user puts the mobile phone in his pocket, the main earphone and the slave earphone are vertical to the mobile phone. At this time, the vertically polarized antennas of the master earphone and the slave earphone have better performance for RF signal transmission. According to the received signal strength indicators corresponding to the two antennas, it can be obtained that the one with the better received signal strength indicator is the first vertically polarized antenna, and the first vertically polarized antenna is used as the first target antenna of the main ear, and based on the first vertically polarized The antenna receives the first radio frequency signal sent by the mobile phone; the earphone is also the same process.

若出现用户佩戴一只耳机(如主耳机),另一只从耳机与手机均放在桌子上,此时主耳机通过比较两个天线对应的接收信号强度指示,可得到接收信号强度指示较优的一方为第一垂直极化天线,并基于该第一垂直极化天线接收手机发送的第一射频信号。而从耳机与手机处于水平的状态,此时从耳机通过比较两个天线对应的接收信号强度指示,可得到接收信号强度指示较优的一方为第二水平极化天线,并基于该第二水平极化天线接收手机发送的信号。If the user wears an earphone (such as the main earphone), and the other earphone and the mobile phone are placed on the table, the main earphone can obtain the better received signal strength indicator by comparing the received signal strength indicators corresponding to the two antennas. One side is the first vertically polarized antenna, and receives the first radio frequency signal sent by the mobile phone based on the first vertically polarized antenna. While the slave earphone and the mobile phone are in a horizontal state, at this time, the slave earphone compares the received signal strength indicators corresponding to the two antennas, and it can be obtained that the one with the better received signal strength indicator is the second horizontally polarized antenna, and based on the second level The polarized antenna receives the signal sent by the mobile phone.

主耳机与从耳机都接收到射频信号后,主耳机会向从耳机发送第二射频信号(以同步信号为例)。在第二通讯时隙从耳机检测到主耳机发送的同步信号,获取该同步信号对应的接收信号强度指示,并基于该接收信号强度指示确定用于传输同步信号的天线。比如,用户将主耳机与从耳机都佩戴在耳朵上,此时主耳机与从耳机处于平行状态,从耳机与主耳机通过比较各自对应的接收信号强度指示,可得到接收信号强度指示较优的一方为水平极化天线。主耳机与从耳机基于水平极化天线传输同步信号。或者,用户佩戴一只耳机(如主耳机),另一只从耳机放在桌子上,此时主耳机与从耳机呈垂直状态,从耳机与主耳机通过比较各自对应的接收信号强度指示,可得到接收信号强度指示较优的一方为垂直极化天线。主耳机与从耳机基于垂直极化天线传输同步信号。After both the master earphone and the slave earphone receive the radio frequency signal, the master earphone will send a second radio frequency signal (taking a synchronization signal as an example) to the slave earphone. In the second communication time slot, the earphone detects the synchronization signal sent by the main earphone, obtains the received signal strength indicator corresponding to the synchronization signal, and determines the antenna for transmitting the synchronization signal based on the received signal strength indicator. For example, the user wears both the master earphone and the slave earphone on the ear. At this time, the master earphone and the slave earphone are in a parallel state. By comparing the received signal strength indicators corresponding to the slave earphone and the master earphone, the receiver with a better received signal strength indicator can be obtained. One side is a horizontally polarized antenna. The master earphone and the slave earphone transmit synchronization signals based on horizontally polarized antennas. Alternatively, the user wears one earphone (such as the master earphone), and the other slave earphone is placed on the table. At this time, the master earphone and the slave earphone are in a vertical state. The one with the better received signal strength indication is the vertically polarized antenna. The master earphone and the slave earphone transmit synchronization signals based on vertically polarized antennas.

当主耳机与从耳机之间的同步信号传输完毕后,在第三通讯时隙主耳机向手机发送响应信号。若在这一轮的射频信号传输中,开始主耳机基于第一垂直极化天线接收手机广播的射频信号,中途还是通过第一垂直极化天线与从耳机进行同步信号的传输,则此时直接基于当前使用的天线即第一垂直极化天线向手机发送响应信号。若在这一轮的射频信号传输中,开始主耳机基于第一垂直极化天线接收手机广播的射频信号,中途通过第一水平极化天线与从耳机进行同步信号的传输,则此时将天线切换为第一垂直极化天线,通过第一垂直极化天线向手机发送响应信号。手机接收到主耳机发送的响应信号,进行新一轮的射频信号传输。After the synchronization signal transmission between the master earphone and the slave earphone is completed, the master earphone sends a response signal to the mobile phone in the third communication time slot. If in this round of radio frequency signal transmission, the master earphone starts to receive the radio frequency signal broadcast by the mobile phone based on the first vertically polarized antenna, and transmits the synchronization signal with the slave earphone through the first vertically polarized antenna in the middle, then directly A response signal is sent to the mobile phone based on the currently used antenna, ie, the first vertically polarized antenna. If in this round of radio frequency signal transmission, the main earphone starts to receive the radio frequency signal broadcast by the mobile phone based on the first vertically polarized antenna, and transmits the synchronization signal with the slave earphone through the first horizontally polarized antenna in the middle, then at this time the antenna Switch to the first vertically polarized antenna, and send a response signal to the mobile phone through the first vertically polarized antenna. The mobile phone receives the response signal sent by the main earphone, and performs a new round of radio frequency signal transmission.

本申请实施例中,主耳机与终端设备以及主耳机与从耳机之间均进行了信号传输,从另一方面来理解,在一种可能实现的方式中,主耳机在检测到与其进行信号传输的对象发生变化时,其选择传输信号的天线也相对应地发生变化。进而确保选择合适的天线传输信号,使主耳机与终端设备以及主耳机与从耳机之间的信号传输均达到最优状态,避免了蓝牙耳机出现声音卡顿、延迟等现象。In the embodiment of the present application, signal transmission is performed between the master earphone and the terminal device, as well as between the master earphone and the slave earphone. From another perspective, in a possible implementation mode, the master earphone detects that it performs signal transmission with it. When the object changes, the antenna it chooses to transmit the signal also changes accordingly. Then ensure that the appropriate antenna is selected for signal transmission, so that the signal transmission between the master earphone and the terminal device as well as the master earphone and the slave earphone can reach the optimal state, avoiding the phenomenon of sound stuttering and delay in the Bluetooth earphone.

可选地,在本申请一些可能的实现方式中,当用户只佩戴一只TWS耳机时,此时只有第一通讯时隙和第三通讯时隙。示例性地,当用户只使用一只耳机时,该耳机与终端设备建立蓝牙连接,该耳机也为主耳机。终端设备将待发送的音频信号转换为第一射频信号后进行广播,该主耳机在第一通讯时隙检测第一射频信号,基于该主耳机中的第一水平极化天线获取第一射频信号包头的第一测试信号对应的接收信号强度指示,以及基于该主耳机中的第一垂直极化天线获取第一射频信号包头的第一测试信号对应的接收信号强度指示。主耳机比较两个接收信号强度指示,选择接收信号强度指示较优的一方所对应的天线作为主耳第一目标天线。比如,用户将主耳机佩戴后,将终端设备(例如手机)装在口袋里,这时主耳机与手机呈垂直状态,此时第一垂直极化天线对第一射频信号传输具有较优的性能,主耳机通过比较两个天线对应的接收信号强度指示,可得到接收信号强度指示数较优的一方为第一垂直极化天线,将第一垂直极化天线作为主耳第一目标天线,并基于该第一垂直极化天线接收手机发送的第一射频信号。然后,主耳机基于第一垂直极化天线在第三通讯时隙向手机发送响应信号,手机接收到主耳机发送的响应信号,进行新一轮的射频信号传输。Optionally, in some possible implementation manners of the present application, when the user wears only one TWS earphone, there are only the first communication time slot and the third communication time slot. Exemplarily, when the user only uses one earphone, the earphone establishes a bluetooth connection with the terminal device, and the earphone is also the master earphone. The terminal device converts the audio signal to be sent into a first radio frequency signal and then broadcasts, the main earphone detects the first radio frequency signal in the first communication time slot, and acquires the first radio frequency signal based on the first horizontally polarized antenna in the main earphone The received signal strength indicator corresponding to the first test signal of the packet header, and the received signal strength indicator corresponding to the first test signal of the packet header of the first radio frequency signal obtained based on the first vertically polarized antenna in the main earphone. The main earphone compares the two received signal strength indicators, and selects the antenna corresponding to the one with the better received signal strength indicator as the first target antenna of the main ear. For example, after wearing the main earphone, the user puts the terminal device (such as a mobile phone) in his pocket. At this time, the main earphone and the mobile phone are in a vertical state. At this time, the first vertically polarized antenna has better performance for the transmission of the first radio frequency signal. , by comparing the received signal strength indicators corresponding to the two antennas, the main earphone can obtain that the one with the better received signal strength indicator number is the first vertically polarized antenna, and the first vertically polarized antenna is used as the first target antenna of the main ear, and The first radio frequency signal sent by the mobile phone is received based on the first vertically polarized antenna. Then, the main earphone sends a response signal to the mobile phone in the third communication time slot based on the first vertically polarized antenna, and the mobile phone receives the response signal sent by the main earphone to perform a new round of radio frequency signal transmission.

可选地,在本申请一些可能的实现方式中,在预设时间段内,所述主耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第二目标天线与所述从耳机通讯;Optionally, in some possible implementations of the present application, within a preset time period, the main earphone is based on the first target antenna of the main ear and the The terminal device communicates with the slave earphone based on the second target antenna of the master ear used during the transmission of the first Bluetooth data packet within the preset time period;

所述从耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第二目标天线与所述主耳机通讯。The slave earphone communicates with the terminal device based on the first target antenna of the slave ear used when the first Bluetooth data packet is transmitted within the preset time period, and based on the transmission of the first Bluetooth data packet within the preset time period The second target antenna used from the ear communicates with the master earphone.

预设时间段可根据实际情况进行设置以及调整,例如,预设时间段可以为一个蓝牙数据包传输所需的时间,此处仅为示例性说明,对此不做限定。主耳机的通讯对象指终端设备或从耳机,从耳机的通讯对象指终端设备或主耳机。The preset time period can be set and adjusted according to the actual situation. For example, the preset time period can be the time required for the transmission of a Bluetooth data packet, which is only an exemplary description here and is not limited thereto. The communication object of the master earphone refers to the terminal device or the slave earphone, and the communication object of the slave earphone refers to the terminal device or the master earphone.

示例性地,在预设时间段内,主耳机在该预设时间段内第一个蓝牙数据包传输时采用的主耳第一目标天线为第一水平极化天线,则在该预设时间段内一直通过第一水平极化天线与终端设备通讯。在预设时间段内,主耳机在该预设时间段内第一个蓝牙数据包传输时采用的主耳第一目标天线为第一垂直极化天线,则在该预设时间段内一直通过第一垂直极化天线与终端设备通讯。在预设时间段内,主耳机在该预设时间段内第一个蓝牙数据包传输时采用的主耳第二目标天线为第一水平极化天线,则在该预设时间段内一直通过第一水平极化天线与从耳机通讯。在预设时间段内,主耳机在该预设时间段内第一个蓝牙数据包传输时采用的主耳第二目标天线为第一垂直极化天线,则在该预设时间段内一直通过第一垂直极化天线与从耳机通讯。Exemplarily, within the preset time period, the first target antenna of the main ear used by the main earphone when transmitting the first Bluetooth data packet within the preset time period is the first horizontally polarized antenna, then within the preset time period In the segment, the first horizontally polarized antenna communicates with the terminal equipment all the time. During the preset time period, the first target antenna of the main ear used by the main earphone when the first Bluetooth data packet is transmitted within the preset time period is the first vertically polarized antenna, and it has been passing through during the preset time period. The first vertically polarized antenna communicates with the terminal device. During the preset time period, the second target antenna of the main ear used by the main earphone when transmitting the first Bluetooth data packet within the preset time period is the first horizontally polarized antenna, and it has been passing through the The first horizontally polarized antenna communicates with the slave headset. During the preset time period, the second target antenna of the main ear used by the main earphone when the first Bluetooth data packet is transmitted within the preset time period is the first vertically polarized antenna, and it has been passing through the The first vertically polarized antenna communicates with the slave headset.

示例性地,在预设时间段内,从耳机在该预设时间段内第一个蓝牙数据包传输时采用的从耳第一目标天线为第二水平极化天线,则在该预设时间段内一直通过第二水平极化天线与终端设备通讯。在预设时间段内,从耳机在该预设时间段内第一个蓝牙数据包传输时采用的从耳第一目标天线为第二垂直极化天线,则在该预设时间段内一直通过第二垂直极化天线与终端设备通讯。在预设时间段内,从耳机在该预设时间段内第一个蓝牙数据包传输时采用的从耳第二目标天线为第二水平极化天线,则在该预设时间段内一直通过第二水平极化天线与主耳机通讯。在预设时间段内,从耳机在该预设时间段内第一个蓝牙数据包传输时采用的从耳第二目标天线为第二垂直极化天线,则在该预设时间段内一直通过第二垂直极化天线与主耳机通讯。Exemplarily, within the preset time period, the first target antenna of the slave ear used by the slave earphone when transmitting the first Bluetooth data packet within the preset time period is the second horizontally polarized antenna, then in the preset time period In the segment, it communicates with the terminal equipment through the second horizontally polarized antenna all the time. During the preset time period, the first target antenna of the slave ear used by the slave earphone when transmitting the first Bluetooth data packet within the preset time period is the second vertically polarized antenna. The second vertically polarized antenna communicates with the terminal device. During the preset time period, the second target antenna of the slave ear used by the slave earphone when transmitting the first Bluetooth data packet within the preset time period is the second horizontally polarized antenna, and it has been passing through the A second horizontally polarized antenna communicates with the main earphone. During the preset time period, the second target antenna of the slave ear used by the slave earphone when transmitting the first Bluetooth data packet within the preset time period is the second vertically polarized antenna. A second vertically polarized antenna communicates with the main earphone.

可选地,在本申请一些可能的实现方式中,在预设时间段内,主耳机检测该主耳机的通讯对象是否发生改变,即主耳机检测与其通讯的终端设备是否切换为从耳机,或者与其通讯的从耳机是否切换为终端设备。当主耳机的通讯对象未发生变化时,即在该预设时间段内,与主耳机进行通讯的一直都是终端设备,或者一直都是从耳机,则主耳机基于预设时间段内第一次通讯时采用的天线进行信号传输,即主耳机基于预设时间段内第一次与该通讯对象进行信号传输时采用的天线进行信号传输。Optionally, in some possible implementations of the present application, within a preset period of time, the master earphone detects whether the communication object of the master earphone changes, that is, the master earphone detects whether the terminal device communicating with it is switched to the slave earphone, or Whether the slave headset communicating with it is switched to a terminal device. When the communication object of the master earphone does not change, that is, within the preset time period, the terminal device that communicates with the master earphone is always the terminal device, or the slave earphone is always the slave earphone. The antenna used for communication is used for signal transmission, that is, the main earphone performs signal transmission based on the antenna used for the first signal transmission with the communication object within a preset time period.

示例性地,在预设时间段内,从耳机检测该从耳机的通讯对象是否发生改变,即从耳机检测与其通讯的终端设备是否切换为主耳机,或者与其通讯的主耳机是否切换为终端设备。当从耳机的通讯对象未发生变化时,即在该预设时间段内,与从耳机进行通讯的一直都是终端设备,或者一直都是主耳机,则从耳机基于预设时间段内第一次通讯时采用的天线进行信号传输,即从耳机基于预设时间段内第一次与该通讯对象进行信号传输时采用的天线进行信号传输。Exemplarily, within a preset period of time, the slave earphone detects whether the communication object of the slave earphone changes, that is, the slave earphone detects whether the terminal device communicating with it is switched to the master earphone, or whether the master earphone communicating with it is switched to the terminal device . When the communication object of the slave earphone does not change, that is, within the preset time period, the terminal device that communicates with the slave earphone is always the terminal device, or the master earphone is always the master earphone, then the slave earphone is based on the first The antenna used for the second communication is used for signal transmission, that is, the signal is transmitted from the antenna used for the first time the earphone communicates with the communication partner based on the preset time period.

本申请提供的处理信号的方法还可使蓝牙耳机时刻都保持一个很好的传输信号的状态,进一步增强了蓝牙耳机在复杂干扰环境的抗干扰能力。The signal processing method provided by the present application can also keep the bluetooth headset in a good signal transmission state at all times, further enhancing the anti-interference ability of the bluetooth headset in complex interference environments.

请参见图3,图3是本申请一实施例提供的一种处理信号的装置的示意图。该一种处理信号的装置包括的各单元用于执行图1、图2对应的实施例中的各步骤。具体请参阅图1、图2各自对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参见图3,包括:Please refer to FIG. 3 . FIG. 3 is a schematic diagram of a signal processing device provided by an embodiment of the present application. The units included in the signal processing device are used to execute the steps in the embodiments corresponding to FIG. 1 and FIG. 2 . For details, please refer to the relevant descriptions in the embodiments corresponding to FIG. 1 and FIG. 2 . For ease of description, only the parts related to this embodiment are shown. See Figure 3, including:

第一获取单元310,用于当所述主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示;The first acquisition unit 310 is configured to acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna when the main earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device The polarized antenna and the second vertically polarized antenna correspond to the first received signal strength indication of the first test signal of the header of the first radio frequency signal;

第一判定单元320,用于主耳机在检测到所述第一水平极化天线对应的第一接收信号强度指示大于或等于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一水平极化天线为主耳第一目标天线,在检测到所述第一水平极化天线对应的第一接收信号强度指示小于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一垂直极化天线为主耳第一目标天线;The first determination unit 320 is configured to, when the main earphone detects that the first received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the first vertically polarized antenna, It is determined that the first horizontally polarized antenna is the first target antenna of the main ear, and when it is detected that the first received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the first vertically polarized antenna When the signal strength is indicated, it is determined that the first vertically polarized antenna is the first target antenna of the main ear;

第二判定单元330,用于从耳机在检测到所述第二水平极化天线对应的第一接收信号强度指示大于或等于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二水平极化天线为从耳第一目标天线,在检测到所述第二水平极化天线对应的第一接收信号强度指示小于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二垂直极化天线为从耳第一目标天线;The second determination unit 330 is configured to detect from the earphone that the first received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the second vertically polarized antenna, Determining that the second horizontally polarized antenna is the first target antenna from the ear, and detecting that the first received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the second vertically polarized antenna When the signal strength is indicated, it is determined that the second vertically polarized antenna is the first target antenna from the ear;

第二获取单元340,用于当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示;The second acquiring unit 340 is configured to acquire the first horizontally polarized antenna and the first vertically polarized antenna or the second The second received signal strength indication corresponding to the second test signal of the second radio frequency signal header by the second horizontally polarized antenna and the second vertically polarized antenna;

第三判定单元350,用于主耳机在检测到所述第一水平极化天线对应的第二接收信号强度指示大于或等于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一水平极化天线为主耳第二目标天线,在检测到所述第一水平极化天线对应的第二接收信号强度指示小于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一垂直极化天线为主耳第二目标天线;The third determining unit 350 is configured to, when the main earphone detects that the second received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the first vertically polarized antenna, It is determined that the first horizontally polarized antenna is the main ear second target antenna, and when it is detected that the second received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the first vertically polarized antenna When the signal strength is indicated, it is determined that the first vertically polarized antenna is the main ear and the second target antenna;

第四判定单元360,用于从耳机在检测到所述第二水平极化天线对应的第二接收信号强度指示大于或等于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二水平极化天线为从耳第二目标天线,在检测到所述第二水平极化天线对应的第二接收信号强度指示小于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二垂直极化天线为从耳第二目标天线;The fourth determination unit 360 is configured to detect from the earphone that the second received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the second vertically polarized antenna, Determining that the second horizontally polarized antenna is the second target antenna from the ear, and detecting that the second received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the second vertically polarized antenna When the signal strength is indicated, it is determined that the second vertically polarized antenna is the second target antenna from the ear;

第一接收单元370,用于所述主耳机基于所述主耳第一目标天线接收第一射频信号,基于所述主耳第二目标天线接收第二射频信号;The first receiving unit 370 is used for the main earphone to receive a first radio frequency signal based on the first target antenna of the main ear, and to receive a second radio frequency signal based on the second target antenna of the main ear;

第二接收单元380,用于所述从耳机基于所述从耳第一目标天线接收第一射频信号,所述从耳机基于所述从耳第二目标天线接收第二射频信号。The second receiving unit 380 is configured for the slave earphone to receive a first radio frequency signal based on the slave ear first target antenna, and the slave earphone to receive a second radio frequency signal based on the slave ear second target antenna.

可选地,所述处理信号的装置还包括:Optionally, the device for processing signals further includes:

发送单元,用于所述主耳机通过所述主耳第一目标天线向所述终端设备发送响应信号。A sending unit, configured for the main earphone to send a response signal to the terminal device through the first target antenna of the main ear.

可选地,在一个蓝牙数据包的传输过程中,在第一通讯时隙所述主耳机基于所述主耳第一目标天线与所述终端设备通讯,和/或所述从耳机基于所述从耳第一目标天线与所述终端设备通讯;Optionally, during the transmission of a Bluetooth data packet, the master earphone communicates with the terminal device based on the first target antenna of the master ear in the first communication time slot, and/or the slave earphone communicates with the terminal device based on the communicating with said terminal device from an ear first target antenna;

在第二通讯时隙所述主耳机基于所述主耳第二目标天线与所述从耳机通讯和/或所述从耳机基于所述从耳第二目标天线与所述主耳机通讯;In the second communication time slot, the master earphone communicates with the slave earphone based on the second target antenna of the master ear and/or the slave earphone communicates with the master earphone based on the second target antenna of the slave ear;

在第三通信时隙所述主耳机基于所述主耳第一目标天线向所述终端设备发送所述响应信号;In the third communication time slot, the main earphone sends the response signal to the terminal device based on the first target antenna of the main ear;

其中,所述第一通讯时隙早于所述第二通讯时隙,所述第二通讯时隙早于所述第三通讯时隙。Wherein, the first communication time slot is earlier than the second communication time slot, and the second communication time slot is earlier than the third communication time slot.

可选地,所述装置还包括:Optionally, the device also includes:

第一通讯单元,用于在预设时间段内,所述主耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第二目标天线与所述从耳机通讯;The first communication unit is configured to communicate with the terminal device based on the first target antenna of the main ear used during the first bluetooth data packet transmission within the preset time period by the main earphone, based on The second target antenna of the main ear used during the first Bluetooth data packet transmission within the preset time period communicates with the slave earphone;

第二通讯单元,用于所述从耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第二目标天线与所述主耳机通讯。The second communication unit is used for the slave earphone to communicate with the terminal device based on the first target antenna of the slave ear used when the first Bluetooth data packet is transmitted within the preset time period, based on the preset time period The second target antenna of the slave ear used in the transmission of the first Bluetooth data packet communicates with the master earphone.

可选地,所述第二射频信号包括同步信号和/或转发信号。Optionally, the second radio frequency signal includes a synchronization signal and/or a forwarding signal.

可选地,所述装置还包括:Optionally, the device also includes:

第三获取单元,用于获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比和第一误码率;所述第一信噪比和所述第一误码率用于确定所述主耳第一目标天线以及确定所述从耳第一目标天线。The third acquisition unit is configured to acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna corresponding to the first test signal of the first radio frequency signal packet header A first signal-to-noise ratio and a first bit error rate; the first signal-to-noise ratio and the first bit error rate are used to determine the first target antenna of the master ear and determine the first target antenna of the slave ear.

可选地,所述装置还包括:Optionally, the device also includes:

第四获取单元,用于获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二信噪比和第二误码率;所述第二信噪比和所述第二误码率用于确定所述主耳第二目标天线以及确定所述从耳第二目标天线。The fourth obtaining unit is used to obtain the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second vertically polarized antenna corresponding to the second test signal of the second radio frequency signal header. A signal-to-noise ratio and a second bit error rate; the second signal-to-noise ratio and the second bit error rate are used to determine the second target antenna of the master ear and determine the second target antenna of the slave ear.

请参见图4,图4是本申请另一实施例提供的一种处理信号的装置的示意图。如图4所示,该实施例的处理信号的装置4包括:处理器40、存储器41以及存储在所述存储器41中并可在所述处理器40上运行的计算机可读指令42。所述处理器40执行所述计算机可读指令42时实现上述各个处理信号的方法实施例中的步骤,例如图1所示的S101至S108。或者,所述处理器40执行所述计算机可读指令42时实现上述各实施例中各单元的功能,例如图3所示单元310至380功能。Please refer to FIG. 4 . FIG. 4 is a schematic diagram of an apparatus for processing signals according to another embodiment of the present application. As shown in FIG. 4 , the signal processing device 4 of this embodiment includes: a processor 40 , a memory 41 , and computer-readable instructions 42 stored in the memory 41 and operable on the processor 40 . When the processor 40 executes the computer-readable instructions 42, the steps in the above embodiments of the signal processing method are implemented, such as S101 to S108 shown in FIG. 1 . Alternatively, when the processor 40 executes the computer-readable instructions 42, the functions of the units in the above-mentioned embodiments are implemented, for example, the functions of the units 310 to 380 shown in FIG. 3 .

示例性地,所述计算机可读指令42可以被分割成一个或多个单元,所述一个或者多个单元被存储在所述存储器41中,并由所述处理器40执行,以完成本申请。所述一个或多个单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令42在所述处理信号的装置中的执行过程。例如,所述计算机可读指令42可以被分割为第一获取单元、第一判定单元、第二判定单元、第二获取单元、第三判定单元、第四判定单元、第一接收单元以及第二接收单元,各单元具体功能如上所述。Exemplarily, the computer-readable instructions 42 may be divided into one or more units, and the one or more units are stored in the memory 41 and executed by the processor 40 to complete the application . The one or more units may be a series of computer-readable instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 42 in the signal processing device. For example, the computer readable instructions 42 may be divided into a first obtaining unit, a first determining unit, a second determining unit, a second obtaining unit, a third determining unit, a fourth determining unit, a first receiving unit and a second As for the receiving unit, the specific functions of each unit are as described above.

所述处理信号的装置可包括,但不仅限于,处理器40、存储器41。本领域技术人员可以理解,图4仅仅是处理信号的装置的示例,并不构成对处理信号的装置的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件等。The device for processing signals may include, but not limited to, a processor 40 and a memory 41 . Those skilled in the art can understand that FIG. 4 is only an example of a device for processing signals, and does not constitute a limitation to the device for processing signals. It may include more or less components than those shown in the figure, or combine certain components, or be different. parts etc.

所称处理器40可以是中央处理单元,还可以是其他通用处理器、数字信号处理器、专用集成电路、现成可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 40 may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components wait. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.

所述存储器41可以是所述处理信号的装置的内部存储单元,例如处理信号的装置的内存。所述存储器41用于存储所述计算机可读指令以及其他程序和数据。The memory 41 may be an internal storage unit of the device for processing signals, for example, a memory of the device for processing signals. The memory 41 is used to store the computer readable instructions and other programs and data.

本申请实施例还提供了一种计算机可读介质,用于存储计算机程序代码,该计算机程序包括用于执行上述处理信号的方法的指令。该可读介质可以是只读存储器或随机存取存储器(random access,本申请实施例对此不做限制。An embodiment of the present application also provides a computer-readable medium for storing computer program codes, where the computer program includes instructions for executing the above-mentioned method for processing signals. The readable medium may be a read-only memory or a random access memory (random access, which is not limited in this embodiment of the present application.

本申请还提供了一种计算机程序产品,当计算机程序产品在蓝牙耳机上运行时,使得蓝牙耳机执行上述处理信号的方法的步骤。The present application also provides a computer program product, which causes the Bluetooth headset to execute the steps of the above signal processing method when the computer program product runs on the Bluetooth headset.

本申请实施例还提供了一种芯片或者集成电路,该芯片或者集成电路包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片或者集成电路的蓝牙耳机执行上述处理信号的方法。The embodiment of the present application also provides a chip or an integrated circuit, the chip or integrated circuit includes: a processor, used to call and run a computer program from the memory, so that the Bluetooth headset equipped with the chip or integrated circuit executes the above-mentioned processing signal Methods.

本申请实施例还提供了一种蓝牙耳机,其特征在于,所述蓝牙耳机中设置有水平极化天线和垂直极化天线,所述蓝牙耳机包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现执行上述处理信号的方法。The embodiment of the present application also provides a bluetooth earphone, which is characterized in that the bluetooth earphone is provided with a horizontally polarized antenna and a vertically polarized antenna, and the bluetooth earphone includes a memory, a processor, and an The computer program that can run on the processor is characterized in that, when the processor executes the computer program, the above-mentioned method for processing signals is implemented.

以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神范围,均应包含在本申请的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still implement the foregoing embodiments Modifications to the technical solutions recorded in the examples, or equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit of the technical solutions of the various embodiments of the application, and should be included in this application. within the scope of the application.

Claims (20)

1.一种处理信号的方法,其特征在于,应用于蓝牙耳机,所述蓝牙耳机包括主耳机以及从耳机,所述主耳机中设置有第一水平极化天线和第一垂直极化天线,所述从耳机中设置有第二水平极化天线和第二垂直极化天线,所述方法包括:1. A method for signal processing, characterized in that it is applied to a bluetooth earphone, the bluetooth earphone includes a master earphone and a slave earphone, the master earphone is provided with a first horizontally polarized antenna and a first vertically polarized antenna, The slave earphone is provided with a second horizontally polarized antenna and a second vertically polarized antenna, and the method includes: 当所述主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示;When the main earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna The first received signal strength indication corresponding to the first test signal of the first radio frequency signal header by the UL antenna; 主耳机在检测到所述第一水平极化天线对应的第一接收信号强度指示大于或等于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一水平极化天线为主耳第一目标天线,在检测到所述第一水平极化天线对应的第一接收信号强度指示小于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一垂直极化天线为主耳第一目标天线;When the main earphone detects that the first received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the first vertically polarized antenna, determine that the first horizontally polarized The antenna is the first target antenna of the main ear, and when it is detected that the first received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the The first vertically polarized antenna is the first target antenna for the main ear; 从耳机在检测到所述第二水平极化天线对应的第一接收信号强度指示大于或等于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二水平极化天线为从耳第一目标天线,在检测到所述第二水平极化天线对应的第一接收信号强度指示小于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二垂直极化天线为从耳第一目标天线;When the earphone detects that the first received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the second vertically polarized antenna, determine the second horizontally polarized The antenna is the first target antenna from the ear. When it is detected that the first received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that The second vertically polarized antenna is the first target antenna from the ear; 当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示;When the master earphone detects the second radio frequency signal sent by the master earphone or the slave earphone detects the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second The vertically polarized antenna corresponds to the second received signal strength indication of the second test signal of the header of the second radio frequency signal; 主耳机在检测到所述第一水平极化天线对应的第二接收信号强度指示大于或等于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一水平极化天线为主耳第二目标天线,在检测到所述第一水平极化天线对应的第二接收信号强度指示小于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一垂直极化天线为主耳第二目标天线;When the main earphone detects that the second received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the first vertically polarized antenna, determine that the first horizontally polarized The antenna is the main ear and the second target antenna, and when it is detected that the second received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the a first vertically polarized antenna for the main ear and a second target antenna; 从耳机在检测到所述第二水平极化天线对应的第二接收信号强度指示大于或等于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二水平极化天线为从耳第二目标天线,在检测到所述第二水平极化天线对应的第二接收信号强度指示小于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二垂直极化天线为从耳第二目标天线;When the earphone detects that the second received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the second vertically polarized antenna, determine the second horizontally polarized The antenna is the second target antenna from the ear, and when it is detected that the second received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that the The second vertically polarized antenna is the second target antenna from the ear; 所述主耳机基于所述主耳第一目标天线接收第一射频信号,基于所述主耳第二目标天线接收第二射频信号;The main earphone receives a first radio frequency signal based on the first target antenna of the main ear, and receives a second radio frequency signal based on the second target antenna of the main ear; 所述从耳机基于所述从耳第一目标天线接收第一射频信号,所述从耳机基于所述从耳第二目标天线接收第二射频信号。The slave earphone receives a first radio frequency signal based on the slave ear first target antenna, and the slave earphone receives a second radio frequency signal based on the slave ear second target antenna. 2.如权利要求1所述的方法,其特征在于,所述方法还包括:2. The method of claim 1, further comprising: 所述主耳机通过所述主耳第一目标天线向所述终端设备发送响应信号。The main earphone sends a response signal to the terminal device through the first target antenna of the main ear. 3.如权利要求2所述的方法,其特征在于,在一个蓝牙数据包的传输过程中,在第一通讯时隙所述主耳机基于所述主耳第一目标天线与所述终端设备通讯,和/或所述从耳机基于所述从耳第一目标天线与所述终端设备通讯;3. The method according to claim 2, wherein during the transmission of a Bluetooth data packet, the main earphone communicates with the terminal device based on the first target antenna of the main ear in the first communication time slot , and/or the slave earphone communicates with the terminal device based on the slave ear first target antenna; 在第二通讯时隙所述主耳机基于所述主耳第二目标天线与所述从耳机通讯和/或所述从耳机基于所述从耳第二目标天线与所述主耳机通讯;In the second communication time slot, the master earphone communicates with the slave earphone based on the second target antenna of the master ear and/or the slave earphone communicates with the master earphone based on the second target antenna of the slave ear; 在第三通信时隙所述主耳机基于所述主耳第一目标天线向所述终端设备发送所述响应信号;In the third communication time slot, the main earphone sends the response signal to the terminal device based on the first target antenna of the main ear; 其中,所述第一通讯时隙早于所述第二通讯时隙,所述第二通讯时隙早于所述第三通讯时隙。Wherein, the first communication time slot is earlier than the second communication time slot, and the second communication time slot is earlier than the third communication time slot. 4.如权利要求1至3任一项所述的方法,其特征在于,所述方法还包括:4. The method according to any one of claims 1 to 3, wherein the method further comprises: 在预设时间段内,所述主耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第二目标天线与所述从耳机通讯;During the preset time period, the main earphone communicates with the terminal device based on the first target antenna of the main ear used when the first Bluetooth data packet is transmitted within the preset time period, and based on the The second target antenna of the master ear used when the first bluetooth data packet is transmitted communicates with the slave earphone; 所述从耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第二目标天线与所述主耳机通讯。The slave earphone communicates with the terminal device based on the first target antenna of the slave ear used when the first Bluetooth data packet is transmitted within the preset time period, and based on the transmission of the first Bluetooth data packet within the preset time period The second target antenna used from the ear communicates with the master earphone. 5.如权利要求1所述的方法,其特征在于,所述第二射频信号包括同步信号和/或转发信号。5. The method according to claim 1, wherein the second radio frequency signal comprises a synchronization signal and/or a retransmission signal. 6.如权利要求1所述的方法,其特征在于,所述当所述主耳机和/或从耳机检测到终端设备发送的第一射频信号时,所述方法还包括:6. The method according to claim 1, wherein when the master earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, the method further comprises: 获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比和第一误码率;所述第一信噪比和所述第一误码率用于确定所述主耳第一目标天线以及确定所述从耳第一目标天线。Obtain the first signal-to-noise ratio and the first signal-to-noise ratio corresponding to the first test signal of the first radio frequency signal packet header by the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna. A bit error rate; the first signal-to-noise ratio and the first bit error rate are used to determine the first target antenna of the master ear and determine the first target antenna of the slave ear. 7.如权利要求1所述的方法,其特征在于,当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,所述方法还包括:7. The method according to claim 1, wherein when the master earphone detects the slave earphone or the slave earphone detects the second radio frequency signal sent by the master earphone, the method further comprises: 获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二信噪比和第二误码率;所述第二信噪比和所述第二误码率用于确定所述主耳第二目标天线以及确定所述从耳第二目标天线。Obtain a second signal-to-noise ratio and a second error rate corresponding to the second test signal of the second radio frequency signal packet header by the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second vertically polarized antenna. Code rate; the second signal-to-noise ratio and the second bit error rate are used to determine the second target antenna of the master ear and determine the second target antenna of the slave ear. 8.一种处理信号的装置,其特征在于,应用于蓝牙耳机,所述蓝牙耳机包括主耳机以及从耳机,所述主耳机中设置有第一水平极化天线和第一垂直极化天线,所述从耳机中设置有第二水平极化天线和第二垂直极化天线,所述装置包括:8. A signal processing device, characterized in that it is applied to a Bluetooth headset, the Bluetooth headset includes a master headset and a slave headset, the master headset is provided with a first horizontally polarized antenna and a first vertically polarized antenna, The second horizontally polarized antenna and the second vertically polarized antenna are arranged in the earphone, and the device includes: 第一获取单元,用于当所述主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示;The first acquiring unit is configured to acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna when the master earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device The polarized antenna and the second vertically polarized antenna correspond to the first received signal strength indication of the first test signal of the header of the first radio frequency signal; 第一判定单元,用于主耳机在检测到所述第一水平极化天线对应的第一接收信号强度指示大于或等于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一水平极化天线为主耳第一目标天线,在检测到所述第一水平极化天线对应的第一接收信号强度指示小于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一垂直极化天线为主耳第一目标天线;The first determination unit is used for the main earphone to determine when it detects that the first received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the first vertically polarized antenna The first horizontally polarized antenna is the first target antenna for the main ear, and when it is detected that the first received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the first received signal corresponding to the first vertically polarized antenna When the strength is indicated, it is determined that the first vertically polarized antenna is the first target antenna of the main ear; 第二判定单元,用于从耳机在检测到所述第二水平极化天线对应的第一接收信号强度指示大于或等于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二水平极化天线为从耳第一目标天线,在检测到所述第二水平极化天线对应的第一接收信号强度指示小于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二垂直极化天线为从耳第一目标天线;The second determination unit is configured to determine from the earphone when it detects that the first received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the second vertically polarized antenna The second horizontally polarized antenna is the first target antenna from the ear, and when it is detected that the first received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the first received signal corresponding to the second vertically polarized antenna When the strength is indicated, it is determined that the second vertically polarized antenna is the first target antenna from the ear; 第二获取单元,用于当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示;The second acquiring unit is configured to acquire the first horizontally polarized antenna and the first vertically polarized antenna or the second The horizontally polarized antenna and the second vertically polarized antenna correspond to a second received signal strength indicator corresponding to the second test signal of the second radio frequency signal header; 第三判定单元,用于主耳机在检测到所述第一水平极化天线对应的第二接收信号强度指示大于或等于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一水平极化天线为主耳第二目标天线,在检测到所述第一水平极化天线对应的第二接收信号强度指示小于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一垂直极化天线为主耳第二目标天线;The third judging unit is used for the main earphone to judge when it detects that the second received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the first vertically polarized antenna The first horizontally polarized antenna is the second target antenna for the main ear, and when it is detected that the second received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the second received signal corresponding to the first vertically polarized antenna When the strength is indicated, it is determined that the first vertically polarized antenna is the main ear and the second target antenna; 第四判定单元,用于从耳机在检测到所述第二水平极化天线对应的第二接收信号强度指示大于或等于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二水平极化天线为从耳第二目标天线,在检测到所述第二水平极化天线对应的第二接收信号强度指示小于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二垂直极化天线为从耳第二目标天线;The fourth determining unit is configured to determine from the earphone when it detects that the second received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the second vertically polarized antenna The second horizontally polarized antenna is the second target antenna from the ear, and when it is detected that the second received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the second received signal corresponding to the second vertically polarized antenna When the strength is indicated, it is determined that the second vertically polarized antenna is the second target antenna from the ear; 第一接收单元,用于所述主耳机基于所述主耳第一目标天线接收第一射频信号,基于所述主耳第二目标天线接收第二射频信号;The first receiving unit is used for the main earphone to receive a first radio frequency signal based on the first target antenna of the main ear, and to receive a second radio frequency signal based on the second target antenna of the main ear; 第二接收单元,用于所述从耳机基于所述从耳第一目标天线接收第一射频信号,所述从耳机基于所述从耳第二目标天线接收第二射频信号。The second receiving unit is used for the slave earphone to receive the first radio frequency signal based on the slave ear first target antenna, and the slave earphone to receive the second radio frequency signal based on the slave ear second target antenna. 9.如权利要求8所述的装置,其特征在于,所述装置还包括:9. The device of claim 8, further comprising: 发送单元,用于所述主耳机通过所述主耳第一目标天线向所述终端设备发送响应信号。A sending unit, configured for the main earphone to send a response signal to the terminal device through the first target antenna of the main ear. 10.如权利要求9所述的装置,其特征在于,在一个蓝牙数据包的传输过程中,在第一通讯时隙所述主耳机基于所述主耳第一目标天线与所述终端设备通讯,和/或所述从耳机基于所述从耳第一目标天线与所述终端设备通讯;10. The device according to claim 9, wherein during the transmission of a Bluetooth data packet, the main earphone communicates with the terminal device based on the first target antenna of the main ear in the first communication time slot , and/or the slave earphone communicates with the terminal device based on the slave ear first target antenna; 在第二通讯时隙所述主耳机基于所述主耳第二目标天线与所述从耳机通讯和/或所述从耳机基于所述从耳第二目标天线与所述主耳机通讯;In the second communication time slot, the master earphone communicates with the slave earphone based on the second target antenna of the master ear and/or the slave earphone communicates with the master earphone based on the second target antenna of the slave ear; 在第三通信时隙所述主耳机基于所述主耳第一目标天线向所述终端设备发送所述响应信号;In the third communication time slot, the main earphone sends the response signal to the terminal device based on the first target antenna of the main ear; 其中,所述第一通讯时隙早于所述第二通讯时隙,所述第二通讯时隙早于所述第三通讯时隙。Wherein, the first communication time slot is earlier than the second communication time slot, and the second communication time slot is earlier than the third communication time slot. 11.如权利要求8至10任一项所述的装置,其特征在于,所述装置还包括:11. The device according to any one of claims 8 to 10, further comprising: 第一通讯单元,用于在预设时间段内,所述主耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第二目标天线与所述从耳机通讯;The first communication unit is configured to communicate with the terminal device based on the first target antenna of the main ear used during the first bluetooth data packet transmission within the preset time period by the main earphone, based on The second target antenna of the main ear used during the first Bluetooth data packet transmission within the preset time period communicates with the slave earphone; 第二通讯单元,用于所述从耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第二目标天线与所述主耳机通讯。The second communication unit is used for the slave earphone to communicate with the terminal device based on the first target antenna of the slave ear used when the first Bluetooth data packet is transmitted within the preset time period, based on the preset time period The second target antenna of the slave ear used in the transmission of the first Bluetooth data packet communicates with the master earphone. 12.如权利要求8所述的装置,其特征在于,所述第二测试信号包括同步信号和/或转发信号。12. The device according to claim 8, wherein the second test signal comprises a synchronization signal and/or a repeat signal. 13.如权利要求8所述的装置,其特征在于,所述装置还包括:13. The device of claim 8, further comprising: 第三获取单元,用于获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一信噪比和第一误码率;所述第一信噪比和所述第一误码率用于确定所述主耳第一目标天线以及确定所述从耳第一目标天线。The third acquisition unit is configured to acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna corresponding to the first test signal of the first radio frequency signal packet header A first signal-to-noise ratio and a first bit error rate; the first signal-to-noise ratio and the first bit error rate are used to determine the first target antenna of the master ear and determine the first target antenna of the slave ear. 14.如权利要求8所述的装置,其特征在于,所述装置还包括:14. The device of claim 8, further comprising: 第四获取单元,用于获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二信噪比和第二误码率;所述第二信噪比和所述第二误码率用于确定所述主耳第二目标天线以及确定所述从耳第二目标天线。The fourth obtaining unit is used to obtain the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second vertically polarized antenna corresponding to the second test signal of the second radio frequency signal header. A signal-to-noise ratio and a second bit error rate; the second signal-to-noise ratio and the second bit error rate are used to determine the second target antenna of the master ear and determine the second target antenna of the slave ear. 15.一种蓝牙耳机,其特征在于,所述蓝牙耳机包括主耳机以及从耳机,所述主耳机中设置有第一水平极化天线和第一垂直极化天线,所述从耳机中设置有第二水平极化天线和第二垂直极化天线,所述蓝牙耳机包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:15. A bluetooth earphone, characterized in that the bluetooth earphone includes a master earphone and a slave earphone, the master earphone is provided with a first horizontally polarized antenna and a first vertically polarized antenna, and the slave earphone is provided with a A second horizontally polarized antenna and a second vertically polarized antenna, the Bluetooth headset includes a memory, a processor, and computer-readable instructions stored in the memory and operable on the processor, wherein the When the processor executes the computer-readable instructions, the following steps are implemented: 当所述主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示;When the main earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna The first received signal strength indication corresponding to the first test signal of the first radio frequency signal header by the UL antenna; 主耳机在检测到所述第一水平极化天线对应的第一接收信号强度指示大于或等于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一水平极化天线为主耳第一目标天线,在检测到所述第一水平极化天线对应的第一接收信号强度指示小于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一垂直极化天线为主耳第一目标天线;When the main earphone detects that the first received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the first vertically polarized antenna, determine that the first horizontally polarized The antenna is the first target antenna of the main ear, and when it is detected that the first received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the The first vertically polarized antenna is the first target antenna for the main ear; 从耳机在检测到所述第二水平极化天线对应的第一接收信号强度指示大于或等于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二水平极化天线为从耳第一目标天线,在检测到所述第二水平极化天线对应的第一接收信号强度指示小于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二垂直极化天线为从耳第一目标天线;When the earphone detects that the first received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the second vertically polarized antenna, determine the second horizontally polarized The antenna is the first target antenna from the ear. When it is detected that the first received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that The second vertically polarized antenna is the first target antenna from the ear; 当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示;When the master earphone detects the second radio frequency signal sent by the master earphone or the slave earphone detects the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second The vertically polarized antenna corresponds to the second received signal strength indication of the second test signal of the header of the second radio frequency signal; 主耳机在检测到所述第一水平极化天线对应的第二接收信号强度指示大于或等于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一水平极化天线为主耳第二目标天线,在检测到所述第一水平极化天线对应的第二接收信号强度指示小于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一垂直极化天线为主耳第二目标天线;When the main earphone detects that the second received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the first vertically polarized antenna, determine that the first horizontally polarized The antenna is the main ear and the second target antenna, and when it is detected that the second received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the a first vertically polarized antenna for the main ear and a second target antenna; 从耳机在检测到所述第二水平极化天线对应的第二接收信号强度指示大于或等于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二水平极化天线为从耳第二目标天线,在检测到所述第二水平极化天线对应的第二接收信号强度指示小于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二垂直极化天线为从耳第二目标天线;When the earphone detects that the second received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the second vertically polarized antenna, determine the second horizontally polarized The antenna is the second target antenna from the ear, and when it is detected that the second received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that the The second vertically polarized antenna is the second target antenna from the ear; 所述主耳机基于所述主耳第一目标天线接收第一射频信号,基于所述主耳第二目标天线接收第二射频信号;The main earphone receives a first radio frequency signal based on the first target antenna of the main ear, and receives a second radio frequency signal based on the second target antenna of the main ear; 所述从耳机基于所述从耳第一目标天线接收第一射频信号,所述从耳机基于所述从耳第二目标天线接收第二射频信号。The slave earphone receives a first radio frequency signal based on the slave ear first target antenna, and the slave earphone receives a second radio frequency signal based on the slave ear second target antenna. 16.如权利要求15所述的蓝牙耳机,其特征在于,所述蓝牙耳机包括主耳机以及从耳机,所述主耳机中设置有第一水平极化天线和第一垂直极化天线,所述从耳机中设置有第二水平极化天线和第二垂直极化天线,所述蓝牙耳机包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:16. The bluetooth earphone according to claim 15, wherein the bluetooth earphone comprises a master earphone and a slave earphone, the master earphone is provided with a first horizontally polarized antenna and a first vertically polarized antenna, the A second horizontally polarized antenna and a second vertically polarized antenna are provided in the headset, the Bluetooth headset includes a memory, a processor, and computer-readable instructions stored in the memory and operable on the processor, It is characterized in that, when the processor executes the computer-readable instructions, the following steps are implemented: 所述主耳机通过所述主耳第一目标天线向所述终端设备发送响应信号。The main earphone sends a response signal to the terminal device through the first target antenna of the main ear. 17.如权利要求16所述的蓝牙耳机,其特征在于,在一个蓝牙数据包的传输过程中,在第一通讯时隙所述主耳机基于所述主耳第一目标天线与所述终端设备通讯,和/或所述从耳机基于所述从耳第一目标天线与所述终端设备通讯;17. The bluetooth earphone according to claim 16, characterized in that, during the transmission of a bluetooth data packet, in the first communication time slot, the main earphone is based on the first target antenna of the main ear and the terminal device communicating, and/or the slave earphone communicates with the terminal device based on the slave ear first target antenna; 在第二通讯时隙所述主耳机基于所述主耳第二目标天线与所述从耳机通讯和/或所述从耳机基于所述从耳第二目标天线与所述主耳机通讯;In the second communication time slot, the master earphone communicates with the slave earphone based on the second target antenna of the master ear and/or the slave earphone communicates with the master earphone based on the second target antenna of the slave ear; 在第三通信时隙所述主耳机基于所述主耳第一目标天线向所述终端设备发送所述响应信号;In the third communication time slot, the main earphone sends the response signal to the terminal device based on the first target antenna of the main ear; 其中,所述第一通讯时隙早于所述第二通讯时隙,所述第二通讯时隙早于所述第三通讯时隙。Wherein, the first communication time slot is earlier than the second communication time slot, and the second communication time slot is earlier than the third communication time slot. 18.如权利要求15至17任一项所述的蓝牙耳机,其特征在于,在预设时间段内,所述主耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的主耳第二目标天线与所述从耳机通讯;18. The Bluetooth headset according to any one of claims 15 to 17, characterized in that, within the preset time period, the main headset is based on the first Bluetooth data packet transmission in the preset time period. The first target antenna of the main ear communicates with the terminal device, and communicates with the slave earphone based on the second target antenna of the main ear used during the transmission of the first Bluetooth data packet within the preset time period; 所述从耳机基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第一目标天线与所述终端设备通讯,基于所述预设时间段内第一个蓝牙数据包传输时采用的从耳第二目标天线与所述主耳机通讯。The slave earphone communicates with the terminal device based on the first target antenna of the slave ear used when the first Bluetooth data packet is transmitted within the preset time period, and based on the transmission of the first Bluetooth data packet within the preset time period The second target antenna used from the ear communicates with the master earphone. 19.如权利要求15所述的蓝牙耳机,其特征在于,所述第二射频信号包括同步信号和/或转发信号。19. The Bluetooth headset according to claim 15, wherein the second radio frequency signal comprises a synchronization signal and/or a forwarding signal. 20.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现以下步骤:20. A computer-readable storage medium, the computer-readable storage medium stores a computer program, characterized in that, when the computer program is executed by a processor, the following steps are implemented: 当所述主耳机和/或从耳机检测到终端设备发送的第一射频信号时,获取第一水平极化天线及第一垂直极化天线和/或第二水平极化天线及第二垂直极化天线对第一射频信号包头的第一测试信号对应的第一接收信号强度指示;When the main earphone and/or the slave earphone detect the first radio frequency signal sent by the terminal device, acquire the first horizontally polarized antenna and the first vertically polarized antenna and/or the second horizontally polarized antenna and the second vertically polarized antenna The first received signal strength indication corresponding to the first test signal of the first radio frequency signal header by the UL antenna; 主耳机在检测到所述第一水平极化天线对应的第一接收信号强度指示大于或等于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一水平极化天线为主耳第一目标天线,在检测到所述第一水平极化天线对应的第一接收信号强度指示小于所述第一垂直极化天线对应的第一接收信号强度指示时,判定所述第一垂直极化天线为主耳第一目标天线;When the main earphone detects that the first received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the first vertically polarized antenna, determine that the first horizontally polarized The antenna is the first target antenna of the main ear, and when it is detected that the first received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the The first vertically polarized antenna is the first target antenna for the main ear; 从耳机在检测到所述第二水平极化天线对应的第一接收信号强度指示大于或等于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二水平极化天线为从耳第一目标天线,在检测到所述第二水平极化天线对应的第一接收信号强度指示小于所述第二垂直极化天线对应的第一接收信号强度指示时,判定所述第二垂直极化天线为从耳第一目标天线;When the earphone detects that the first received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the first received signal strength indicator corresponding to the second vertically polarized antenna, determine the second horizontally polarized The antenna is the first target antenna from the ear. When it is detected that the first received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the first received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that The second vertically polarized antenna is the first target antenna from the ear; 当所述主耳机检测到从耳机或所述从耳机检测到主耳机发送的第二射频信号时,获取第一水平极化天线及第一垂直极化天线或第二水平极化天线及第二垂直极化天线对第二射频信号包头的第二测试信号对应的第二接收信号强度指示;When the master earphone detects the second radio frequency signal sent by the master earphone or the slave earphone detects the first horizontally polarized antenna and the first vertically polarized antenna or the second horizontally polarized antenna and the second The vertically polarized antenna corresponds to the second received signal strength indication of the second test signal of the header of the second radio frequency signal; 主耳机在检测到所述第一水平极化天线对应的第二接收信号强度指示大于或等于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一水平极化天线为主耳第二目标天线,在检测到所述第一水平极化天线对应的第二接收信号强度指示小于所述第一垂直极化天线对应的第二接收信号强度指示时,判定所述第一垂直极化天线为主耳第二目标天线;When the main earphone detects that the second received signal strength indicator corresponding to the first horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the first vertically polarized antenna, determine that the first horizontally polarized The antenna is the main ear and the second target antenna, and when it is detected that the second received signal strength indicator corresponding to the first horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the first vertically polarized antenna, it is determined that the a first vertically polarized antenna for the main ear and a second target antenna; 从耳机在检测到所述第二水平极化天线对应的第二接收信号强度指示大于或等于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二水平极化天线为从耳第二目标天线,在检测到所述第二水平极化天线对应的第二接收信号强度指示小于所述第二垂直极化天线对应的第二接收信号强度指示时,判定所述第二垂直极化天线为从耳第二目标天线;When the earphone detects that the second received signal strength indicator corresponding to the second horizontally polarized antenna is greater than or equal to the second received signal strength indicator corresponding to the second vertically polarized antenna, determine the second horizontally polarized The antenna is the second target antenna from the ear, and when it is detected that the second received signal strength indicator corresponding to the second horizontally polarized antenna is smaller than the second received signal strength indicator corresponding to the second vertically polarized antenna, it is determined that the The second vertically polarized antenna is the second target antenna from the ear; 所述主耳机基于所述主耳第一目标天线接收第一射频信号,基于所述主耳第二目标天线接收第二射频信号;The main earphone receives a first radio frequency signal based on the first target antenna of the main ear, and receives a second radio frequency signal based on the second target antenna of the main ear; 所述从耳机基于所述从耳第一目标天线接收第一射频信号,所述从耳机基于所述从耳第二目标天线接收第二射频信号。The slave earphone receives a first radio frequency signal based on the slave ear first target antenna, and the slave earphone receives a second radio frequency signal based on the slave ear second target antenna.

CN202080002459.9A 2020-10-23 2020-10-23 Method and device for processing signal, bluetooth headset and storage medium Active CN112703746B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/123423 WO2022082782A1 (en) 2020-10-23 2020-10-23 Method and apparatus for processing signal, and bluetooth earphone and storage medium

Publications (2)

Publication Number Publication Date
CN112703746A CN112703746A (en) 2021-04-23
CN112703746B true CN112703746B (en) 2023-03-07

Family

ID=75514840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080002459.9A Active CN112703746B (en) 2020-10-23 2020-10-23 Method and device for processing signal, bluetooth headset and storage medium

Country Status (2)

Country Link
CN (1) CN112703746B (en)
WO (1) WO2022082782A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022236828A1 (en) * 2021-05-14 2022-11-17 华为技术有限公司 Head-mounted wireless earphones and communication method therefor
CN113329387B (en) * 2021-06-18 2022-09-23 英华达(上海)科技有限公司 Bluetooth headset communication method and device
CN115550828B (en) * 2022-11-25 2023-04-04 杭州兆华电子股份有限公司 Construction method suitable for TWS Bluetooth headset adaptation test system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104660309A (en) * 2013-11-15 2015-05-27 智捷科技股份有限公司 Intelligent antenna device and radiation field type switching method thereof
CN107145330A (en) * 2017-04-26 2017-09-08 歌尔科技有限公司 A kind of method and apparatus for connecting ears bluetooth earphone
CN107660328A (en) * 2011-07-19 2018-02-02 搜诺思公司 Its line options
CN109660975A (en) * 2019-01-28 2019-04-19 上海与德通讯技术有限公司 The switching method of principal and subordinate's earphone, main earphone, from earphone and bluetooth headset network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8024003B2 (en) * 2008-03-06 2011-09-20 Qualcomm Incorporated Methods and apparatus for supporting communications using antennas associated with different polarization directions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107660328A (en) * 2011-07-19 2018-02-02 搜诺思公司 Its line options
CN104660309A (en) * 2013-11-15 2015-05-27 智捷科技股份有限公司 Intelligent antenna device and radiation field type switching method thereof
CN107145330A (en) * 2017-04-26 2017-09-08 歌尔科技有限公司 A kind of method and apparatus for connecting ears bluetooth earphone
CN109660975A (en) * 2019-01-28 2019-04-19 上海与德通讯技术有限公司 The switching method of principal and subordinate's earphone, main earphone, from earphone and bluetooth headset network

Also Published As

Publication number Publication date
WO2022082782A1 (en) 2022-04-28
CN112703746A (en) 2021-04-23

Similar Documents

Publication Publication Date Title
US11451906B2 (en) 2022-09-20 Operation mode switch of wireless headphones
US10244307B1 (en) 2019-03-26 Communication of wireless headphones
US11064280B2 (en) 2021-07-13 Wireless audio system and method for wirelessly communicating audio information using the same
US10348370B2 (en) 2019-07-09 Wireless device communication
US11800312B2 (en) 2023-10-24 Wireless audio system for recording an audio information and method for using the same
US10432773B1 (en) 2019-10-01 Wireless audio transceivers
US10932043B2 (en) 2021-02-23 Wireless audio system and method for wirelessly communicating audio information using the same
US10263668B2 (en) 2019-04-16 Dual-band wireless headphones
US10412481B1 (en) 2019-09-10 Operation mode switch of wireless headphones
CN112703746B (en) 2023-03-07 Method and device for processing signal, bluetooth headset and storage medium
TWI669923B (en) 2019-08-21 Method of choosing master wireless earphone in wireless earphone set, electronic apparatus and wireless earphone
US11171410B1 (en) 2021-11-09 Wireless audio system and method for wirelessly communicating audio information using the same
WO2022247399A1 (en) 2022-12-01 Distance measurement method and apparatus, electronic device, and storage medium
US20190082371A1 (en) 2019-03-14 Systems and methods for handover of a set of wireless devices
WO2011160393A1 (en) 2011-12-29 Method, device and system for detecting state of base station reverse diversity link and base station
CN113490102A (en) 2021-10-08 Wireless earphone and communication method thereof
US11546705B2 (en) 2023-01-03 Adaptive multi-band hearing device
CN112437418B (en) 2024-01-30 TWS equipment communication data configuration method, TWS equipment communication data configuration device, TWS equipment communication data configuration chip and TWS equipment communication data configuration medium
CN115278714A (en) 2022-11-01 Connection control method, device, electronic device and storage medium
JP2013031059A (en) 2013-02-07 Radio transmission method for audio signal
CN114079537B (en) 2023-09-12 Audio packet loss data receiving method, device, audio playing equipment and system
CN104601252A (en) 2015-05-06 Anti-interference method and device for fixed wireless terminal
CN113099357B (en) 2022-11-04 Master-slave switching method and device of wireless earphone and wireless earphone
CN111277930B (en) 2022-08-23 Single-ear far detection method of multi-ear Bluetooth headset and Bluetooth headset
CN118200782A (en) 2024-06-14 Communication method, wireless earphone and electronic equipment

Legal Events

Date Code Title Description
2021-04-23 PB01 Publication
2021-04-23 PB01 Publication
2021-05-11 SE01 Entry into force of request for substantive examination
2021-05-11 SE01 Entry into force of request for substantive examination
2023-03-07 GR01 Patent grant
2023-03-07 GR01 Patent grant
2025-03-28 TR01 Transfer of patent right
2025-03-28 TR01 Transfer of patent right

Effective date of registration: 20250312

Address after: 518000, Room 201, Building A, No.1 Qianwan 1st Road, Qianhai Shenzhen Hong Kong Cooperation Zone, Shenzhen, Guangdong Province (settled in Shenzhen Qianhai Business Secretary Co., Ltd.); There is a business premises located on the 35th floor of Building A, Tanglang City, No. 3333 Liuxian Avenue, Nanshan District, Shenzhen

Patentee after: Wanmo acoustics Co.,Ltd.

Country or region after: China

Patentee after: 1more Shen Zhen Acoustic Technology Co.,Ltd.

Address before: 35th floor, block a, Tanglang City, 3333 Liuxian Avenue, Nanshan District, Shenzhen, Guangdong 518000

Patentee before: Wanmo acoustics Co.,Ltd.

Country or region before: China