Connection control method and apparatus, electronic device, and storage medium
By detecting the difference in signal strength between the wireless earphone and the terminal, and controlling the switching of the master and slave earphone roles, the data lag problem of the wireless earphone when the master earphone signal is weak is solved, ensuring the stability of the connection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2021-04-29
- Publication Date
- 2026-04-14
AI Technical Summary
When the signal strength between the main earpiece and the terminal is poor, wireless earphones are prone to data lag, affecting connection stability.
By detecting the first signal strength between the first earphone and the terminal and the second signal strength between the second earphone and the terminal, the master and slave earphones are controlled to switch roles based on the signal strength difference, so as to ensure that the earphone with better signal strength acts as the master earphone and achieve stable data transmission.
This effectively avoids data lag caused by poor signal strength between the main earphone and the terminal, and improves the connection stability between the wireless earphone and the terminal.
Smart Images

Figure CN115278714B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication technology, and more specifically to a connection control method, device, electronic device, and storage medium. Background Technology
[0002] With the rapid development of wireless communication technology, data transmission between terminals and wireless earphones is now possible. Typically, a wireless earphone consists of a master earphone and a slave earphone. The master earphone establishes a connection with the terminal, while the slave earphone does not. When the terminal sends data to the wireless earphone, the master earphone receives the data through the established connection, while the slave earphone listens to the data sent by the terminal using the connection key sent by the master earphone. However, in practical applications, data interruptions may occur, compromising the stability of the connection between the terminal and the wireless earphone. Summary of the Invention
[0003] In view of this, embodiments of the present invention aim to provide a connection control method, apparatus, electronic device, and storage medium.
[0004] The technical solution of this invention is implemented as follows:
[0005] This invention provides a connection control method applied to wireless earphones, the wireless earphones including a first earphone and a second earphone; the method includes:
[0006] When the first earpiece is the master earpiece and the second earpiece is the slave earpiece, determine the first signal strength between the first earpiece and the terminal; and determine the second signal strength between the second earpiece and the terminal.
[0007] Based on the first signal strength and the second signal strength, the first earphone and the second earphone are controlled to switch between master and slave modes, so that the first earphone is the slave earphone and the second earphone is the master earphone.
[0008] In the above scheme, controlling the first and second earphones to perform master-slave switching based on the first signal strength and the second signal strength includes:
[0009] When the first signal strength is less than or equal to the minimum value of the preset threshold range, and the second signal strength is greater than or equal to the maximum value of the preset threshold range, the first and second earphones are controlled to switch between master and slave modes.
[0010] The method in the above scheme further includes:
[0011] When both the first signal strength and the second signal strength are less than or equal to the minimum value of a preset threshold range, the first and second earphones are controlled not to perform master-slave switching.
[0012] or,
[0013] When both the first signal strength and the second signal strength are greater than or equal to the maximum value of the preset threshold range, the first and second earphones are controlled not to perform master-slave switching.
[0014] The method in the above scheme further includes:
[0015] Determine the minimum sensitivity of the wireless earphone receiving terminal signal;
[0016] Based on the minimum sensitivity and the first preset value, the preset threshold range is determined.
[0017] In the above scheme, determining the preset threshold range based on the minimum sensitivity and the first preset value includes:
[0018] Based on the minimum sensitivity and the first preset value, a first value range is determined;
[0019] Determine a second preset value; the second preset value represents the minimum signal strength of the connection between the first earphone and the terminal;
[0020] Adjust the range of the first value based on the second preset value;
[0021] The adjusted first numerical range is used as the preset threshold range.
[0022] The method in the above scheme further includes:
[0023] Determine the current scene of the terminal;
[0024] Based on the preset correspondence between scenarios and numerical ranges, a second numerical range corresponding to the scenario currently in which the terminal is located is determined;
[0025] The second numerical range is used as the preset threshold range.
[0026] In the above scheme, the minimum value within the preset threshold range is -90dBm, and the maximum value within the preset threshold range is -85dBm.
[0027] In the above scheme, the difference between the maximum and minimum values within the preset threshold range is greater than or equal to 5 dBm.
[0028] In the above scheme, determining the first signal strength between the first earphone and the terminal includes:
[0029] When the terminal is in a pocket scenario, determine the first signal strength between the first earphone and the terminal.
[0030] In the above scheme, determining the first signal strength between the first earphone and the terminal includes:
[0031] After the first earphone establishes a wireless connection with the terminal, it receives the wireless signal sent by the terminal; determines the signal strength of the wireless signal, and uses the determined signal strength as the first signal strength.
[0032] In the above scheme, determining the second signal strength between the second earphone and the terminal includes:
[0033] After the first earpiece establishes a near-field wireless connection with the terminal, the first earpiece sends the connection key to the second earpiece;
[0034] The second earphone uses the connection key to listen to the wireless signal sent by the terminal; determines the signal strength of the wireless signal, and uses the determined signal strength as the second signal strength.
[0035] In the above scheme, controlling the first and second earphones to perform master-slave switching includes:
[0036] When the time interval since the last master-slave switch is greater than or equal to the time interval threshold, the first and second earphones are controlled to perform a master-slave switch.
[0037] This invention provides a connection control device for use in wireless earphones, the wireless earphones including a first earphone and a second earphone; comprising:
[0038] The first processing unit is configured to determine a first signal strength between the first earphone and the terminal when the first earphone is the main earphone and the second earphone is the slave earphone; and to determine a second signal strength between the second earphone and the terminal.
[0039] The second processing unit is configured to control the first earphone and the second earphone to perform master-slave switching based on the first signal strength and the second signal strength, so that the first earphone is the slave earphone and the second earphone is the master earphone.
[0040] This invention provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor.
[0041] When the processor runs the computer program, it implements the steps of any of the above methods when executing the program.
[0042] This invention provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above methods.
[0043] The connection control method, apparatus, electronic device, and storage medium provided in this invention are applied to a wireless headset, which includes a first headset and a second headset. The method includes: determining a first signal strength between the first headset and a terminal when the first headset is the master headset and the second headset is the slave headset; and determining a second signal strength between the second headset and the terminal; and controlling the first headset and the second headset to switch between master and slave based on the first signal strength and the second signal strength, so that the first headset becomes the slave headset and the second headset becomes the master headset. By using the technical solution of this invention, controlling the master headset and slave headset to switch roles based on the first signal strength and the second signal strength can avoid data lag caused by poor signal strength between the master headset and the terminal, thereby ensuring the stability of the connection between the wireless headset and the terminal. Attached Figure Description
[0044] Figure 1 This is a structural diagram of a true wireless stereo (TWS) earphone in related technologies.
[0045] Figure 2 This is a schematic diagram illustrating the connection between TWS earphones and smart terminals in related technologies;
[0046] Figure 3 This is a schematic diagram illustrating the implementation process of the connection control method according to an embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram of the implementation process for determining the preset threshold range in an embodiment of the present invention. Figure 1 ;
[0048] Figure 5 This is a schematic diagram of the implementation process for determining the preset threshold range in an embodiment of the present invention. Figure 2 ;
[0049] Figure 6 This is a schematic diagram of the implementation process for determining the preset threshold range in an embodiment of the present invention. Figure 3 ;
[0050] Figure 7 This is a schematic diagram illustrating the implementation process of controlling the switching between the first and second earphones according to an embodiment of the present invention;
[0051] Figure 8 This is a schematic diagram illustrating the connection between the wireless earphone and the terminal according to an embodiment of the present invention;
[0052] Figure 9 This is a schematic diagram of the measured signal strength between the master / slave earphone and the terminal in an embodiment of the present invention;
[0053] Figure 10This is a schematic diagram illustrating the testing of the number of lags when a mobile terminal is placed in different pockets, as per an embodiment of the present invention.
[0054] Figure 11 This is a schematic diagram illustrating the signal strength variation trend between the master / slave earphone and the terminal in an embodiment of the present invention;
[0055] Figure 12 This is a schematic diagram of the composition of the connection control device according to an embodiment of the present invention;
[0056] Figure 13 This is a schematic diagram of the composition structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0057] Before providing a detailed description of the technical solutions of the embodiments of the present invention, the relevant technologies will first be introduced and explained.
[0058] In related technologies, with the rapid development of wireless communication technology, data transmission between terminals and wireless earphones can be achieved via Bluetooth technology. Specifically, the wireless earphones may refer to TWS earphones. In the Bluetooth protocol, audio data is transmitted point-to-point; before the advent of Bluetooth Audio (LE Audio), smart terminals only connected to one earbud.
[0059] Figure 1 This is a structural diagram of TWS earphones in related technologies, such as... Figure 1 As shown, the left and right earbuds of TWS earbuds do not require a cable connection and can work independently by wirelessly separating the left and right channels. The advantages of TWS earbuds include: 1. Completely eliminating the hassle of wires, allowing for greater freedom of movement; 2. Versatile usage, allowing for solo use, sharing, or even using one earbud as two; 3. The carrying case integrates a power bank, allowing the earbuds to be charged simply by placing them inside.
[0060] In related technologies, the antenna in wireless earphones is a device used to transmit or receive electromagnetic waves, including a transmitting antenna and a receiving antenna. The transmitting antenna effectively converts the energy of the high-frequency current from the transmitter or the guided wave in the waveguide system into electromagnetic wave energy in space; the receiving antenna does the opposite. An antenna is essentially a transducer. True wireless Bluetooth earphones can eliminate cables because data is transmitted through the air using radio waves. For an antenna to radiate electromagnetic waves into space, it needs a certain length. If a monopole antenna is used, the length is approximately one-quarter of the operating wavelength. Taking TWS earphones as an example, TWS earphones use Bluetooth for communication, and Bluetooth operates in the ISM band. The antenna length is approximately 30mm, but this length can be appropriately reduced through some optimization designs. In TWS earphones, the antenna basically covers most of the outer area of the earphone stem.
[0061] Figure 2 This is a schematic diagram illustrating the connection between TWS earphones and smart terminals in related technologies, such as... Figure 2 As shown, the development and iteration schemes of Bluetooth chips in TWS earphones include the following:
[0062] The first-generation solution was the earliest master ear relay solution. That is, the mobile terminal and the master ear establish a Bluetooth link. The mobile terminal sends the data of the left and right channels to the master ear together. After the master ear receives a packet of data, it forwards the data completely to the slave ear. Then the left and right ears play the audio data of the left and right channels respectively.
[0063] The second-generation solution is the TWS+ solution. After TWS pairing is complete, the mobile terminal and the main earbud directly establish a pairing connection. Once the main earbud receives the audio stream data from the mobile terminal, it forwards the data from one of its channels to the secondary earbuds via a proprietary protocol. In practical applications, the single connection can be further converted into a dual connection via the proprietary protocol, meaning the mobile terminal establishes a separate link with each of the left and right earbuds, sending left and right channel data independently.
[0064] The third-generation scheme is a transitional scheme, meaning that, based on the first and second generations, the master ear only needs to forward half of the data to the slave ear.
[0065] The fourth-generation solution is TWS Mirroring. After pairing, the master and slave earbuds connect to a mobile terminal. The mobile terminal establishes a connection link with the master earbud and shares a connection key with the slave earbud. The slave earbud can use this key to monitor data transmission between the mobile terminal and the master earbud. Since the slave earbud does not communicate with the mobile terminal during monitoring, it cannot retransmit or correct errors, resulting in a certain possibility of data loss. If the slave earbud loses some data during monitoring, a private protocol allows the master earbud to forward the lost data. The master earbud forwards the data packets it receives from the mobile terminal to the slave earbud. In this process, the master earbud acts as a bridge or springboard. This data relay solution reduces packet loss by the slave earbud and retransmissions by the mobile terminal. Fewer retransmissions by the mobile terminal reduce the bitrate and the possibility of interference.
[0066] The fifth-generation solution, which is part of the planned BLE Audio, means that due to the development of the Bluetooth protocol, mobile terminals can establish two paths between headphones to transmit audio stream data via Bluetooth Low Energy, with the left and right channel data transmitted separately.
[0067] It's important to note that most mainstream Bluetooth headset chip manufacturers currently offer solutions based on a slave-ear monitoring approach, with differences only in their proprietary protocols regarding synchronization and retransmission mechanisms. This slave-ear monitoring and master-ear retransmission scheme reduces stuttering caused by data loss, improving overall Bluetooth stability to some extent. However, this relies on a sufficiently high-quality communication link between the master earbud and the mobile device. If the link between the master earbud and the mobile device is poor, even with a good signal quality in the slave earbud's monitoring channel, the overall experience will still be subpar. Furthermore, if two links are established using the TWS+ mechanism, interference in one link leading to signal quality degradation will prevent the two earbuds from transmitting data synchronously, resulting in stuttering.
[0068] In addition, a feasible related technology involves a main earphone establishing a Bluetooth connection with a terminal, and a secondary earphone monitoring the communication between the main earphone and the terminal to obtain data sent by the terminal. The main earphone does not forward terminal data. If the secondary earphone does not detect terminal data, it notifies the terminal to retransmit through the main earphone. Therefore, the main earphone in this application does not necessarily have the function of forwarding terminal data to the secondary earphone. The main earphone mainly refers to an earphone that has a wireless connection (such as a Bluetooth connection) with the terminal, so that it can directly obtain data from the terminal.
[0069] In summary, when the signal strength between the main earphone and the terminal is poor, the method of notifying the main earphone to retransmit lost data in the related technologies still results in data lag, thus failing to guarantee the stability of the connection between the terminal and the wireless earphone.
[0070] Based on this, in various embodiments of the present invention, when the first earphone is the master earphone and the second earphone is the slave earphone, a first signal strength between the first earphone and the terminal is determined; and a second signal strength between the second earphone and the terminal is determined; based on the first signal strength and the second signal strength, the first earphone and the second earphone are controlled to perform master-slave switching, so that the first earphone is the slave earphone and the second earphone is the master earphone.
[0071] It should be noted that, in this embodiment of the invention, considering that the signal strength between the main earpiece and the terminal and the signal strength between the secondary earpiece and the terminal may differ in specific scenarios, in order to avoid data lag when the signal strength between the main earpiece and the terminal is poor while the signal strength between the secondary earpiece and the terminal is good, the main earpiece and the secondary earpiece can be controlled to switch roles to ensure that data transmission is not interrupted, thereby ensuring the stability of the connection between the wireless earpiece and the terminal.
[0072] The following is a detailed description of the communication process between the wireless earphone and the terminal according to an embodiment of the present invention.
[0073] Understandably, when wireless headphones use Bluetooth technology to communicate with a terminal, the following aspects are involved:
[0074] In Bluetooth technology, communication between devices requires one device to be the master and the other the slave. The master device initiates the pairing process, and once a connection is established, both devices can send and receive data. Theoretically, a single Bluetooth master device can communicate with up to seven Bluetooth slave devices simultaneously. A device with Bluetooth communication capabilities can switch between these two roles: normally in slave mode, waiting for other master devices to connect, and switching to master mode when needed to initiate a call. When a Bluetooth device initiates a call in master mode, it needs to know the other device's Bluetooth address, pairing passcode, and other information. Once pairing is complete, the call can be initiated directly.
[0075] The call process, initiated by the Bluetooth master device, begins with a search to locate nearby discoverable Bluetooth devices. Once the master device finds the slave device, it pairs with it. This pairing requires entering the slave device's PIN code, although some devices may not require this. After pairing, the slave device records the master device's trust information, allowing the master to initiate calls to the slave. Paired devices do not need to be re-paired for subsequent calls. Even a paired Bluetooth headset can initiate a connection request, but Bluetooth modules used for data communication generally do not initiate calls. Once the link is established, bidirectional data or voice communication can occur between the master and slave devices. During communication, both the master and slave devices can initiate disconnection, breaking the Bluetooth link.
[0076] In Bluetooth data transmission applications, serial communication is used. Before leaving the factory, pairing information between two Bluetooth devices is pre-set. The master device pre-stores the slave device's PIN code, address, etc. The two devices automatically establish a connection upon power-up, enabling transparent serial port transmission without external circuitry. In one-to-one applications, the slave device can be configured in two types: a silent state, where it can only communicate with the designated master and cannot be found by other Bluetooth devices; and an open state, where it can be found by both the designated master and other Bluetooth devices to establish a connection.
[0077] It's important to note that the application layer of the software defines two roles: master earpiece and slave earpiece. The roles of the two earpieces in a pair can freely switch between master and slave, and the role agreement varies depending on the device's operating state. Initial role setting is determined by the parity of the Bluetooth address, with odd addresses defaulting to master; alternatively, it can be determined by the state of a hardware I / O pin, commonly with the right or left earpiece initially being the master. The master earpiece's functions include: communicating with the mobile terminal, managing status information such as connection, pairing, and playback, and having Bluetooth application protocol and system decision-making authority—that is, the master determines which user protocols, such as HFP and AVRCP, are used; and handling microphone signal input during calls. The slave earpiece's function is to relay or monitor the link between the master earpiece and the mobile terminal, obtaining necessary information.
[0078] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0079] This invention provides a connection control method for wireless earphones, the wireless earphones including a first earphone and a second earphone; Figure 3 This is a schematic diagram illustrating the implementation flow of the connection control method according to an embodiment of the present invention; as shown below. Figure 3 As shown, the method includes:
[0080] Step 301: When the first earphone is the master earphone and the second earphone is the slave earphone, determine the first signal strength between the first earphone and the terminal; and determine the second signal strength between the second earphone and the terminal;
[0081] Step 302: Based on the first signal strength and the second signal strength, control the first earphone and the second earphone to switch between master and slave, so that the first earphone is the slave earphone and the second earphone is the master earphone.
[0082] Understandably, in step 301, in practical applications, the wireless earphone can establish a connection with the terminal using Bluetooth technology. Specifically, the main earphone of the wireless earphone is used to establish a connection with the terminal via Bluetooth to receive data sent by the terminal. Furthermore, it can forward the data to the secondary earphone, or it can choose not to. If it doesn't forward the data, the secondary earphone can ensure that it receives the correct data by triggering the terminal to retransmit the data. It is also used to send the connection key used to establish the Bluetooth connection with the terminal to the secondary earphone via a private protocol, so that the secondary earphone can listen to the data sent by the terminal. Here, the terminal can refer to a mobile terminal, etc.
[0083] It should be noted that in the scheme of obtaining terminal data from the earphone through monitoring, since the earphone is not wirelessly connected to the terminal (such as through Bluetooth), the second signal strength between the earphone and the terminal can be obtained from the earphone by monitoring the communication between the earphone and the terminal.
[0084] Understandably, in step 302, in practical applications, controlling the master-slave switching between the first and second earpieces can refer to controlling the switching of the roles of the first and second earpieces. For example, after controlling the switching between the first and second earpieces, the first earpiece acts as the slave earpiece, performing the monitoring function; the second earpiece acts as the master earpiece, receiving data sent by the terminal and may forward it to the first earpiece or not.
[0085] In practical applications, considering that the signal strength between the main earpiece and the terminal, as well as the signal strength between the slave earpiece and the terminal, may differ in specific scenarios, if the difference exceeds a preset threshold range, the main earpiece and slave earpiece can be switched.
[0086] Based on this, in one embodiment, controlling the first and second earphones to perform master-slave switching based on the first signal strength and the second signal strength includes:
[0087] When the first signal strength is less than or equal to the minimum value of the preset threshold range, and the second signal strength is greater than or equal to the maximum value of the preset threshold range, the first and second earphones are controlled to switch between master and slave modes.
[0088] Understandably, when the first signal strength between the first earphone and the terminal is poor, and the second signal strength between the second earphone and the terminal is good, that is, when the first signal strength is less than or equal to the minimum value of the preset threshold range, and the second signal strength is greater than or equal to the maximum value of the preset threshold range, the first earphone and the second earphone are controlled to perform master-slave switching.
[0089] Understandably, when the first signal strength between the first earphone and the terminal is poor, and the second signal strength between the second earphone and the terminal is poor, that is, when both the first signal strength and the second signal strength are less than or equal to the minimum value of a preset threshold range, the first earphone and the second earphone are controlled not to perform master-slave switching.
[0090] Alternatively, when the first signal strength between the first earphone and the terminal is good, and the second signal strength between the second earphone and the terminal is good, that is, when both the first signal strength and the second signal strength are greater than or equal to the maximum value of the preset threshold range, the first earphone and the second earphone are controlled not to perform master-slave switching.
[0091] Understandably, controlling the switching between the first and second earpieces can refer to a change in their roles as master and slave earpieces. For example, after switching, the first earpiece acts as the slave earpiece, and the second earpiece acts as the master earpiece. That is, the first earpiece performs the monitoring function of the slave earpiece, i.e., monitoring the data transmitted between the terminal and the second earpiece; the second earpiece performs the receiving function of the master earpiece, i.e., establishing a connection with the terminal and receiving data sent by the terminal. Furthermore, in some solutions, the master earpiece can forward terminal data to the first earpiece when the first earpiece makes a listening error, and in other solutions, the master earpiece can trigger the terminal to retransmit data when the first earpiece makes a listening error.
[0092] Understandably, the switching between the first and second earpieces can be negotiated between them. For example, if the negotiation involves the first earpiece controlling the switching, then the first earpiece controls the switching based on the first signal strength and the second signal strength; if the negotiation involves the second earpiece controlling the switching, then the second earpiece controls the switching based on the first signal strength and the second signal strength.
[0093] Understandably, it is also possible to determine whether the difference between the second signal strength and the first signal strength is greater than a difference threshold; when the difference between the second signal strength and the first signal strength is greater than the difference threshold, the first earphone and the second earphone are switched.
[0094] The following section provides a detailed explanation of how to determine the preset threshold range in different scenarios.
[0095] In the first scenario, a preset threshold range is determined based on the decoding capability of the wireless earphone's demodulation chip.
[0096] Specifically, a preset threshold range is determined by combining the minimum sensitivity of the wireless earphone demodulation chip to the terminal signal and a first preset value.
[0097] Based on this, in one embodiment, the method further includes:
[0098] Determine the minimum sensitivity of the wireless earphone receiving terminal signal;
[0099] Based on the minimum sensitivity and the first preset value, the preset threshold range is determined.
[0100] Understandably, the minimum sensitivity can refer to the minimum signal strength that the demodulation chip in the wireless headset can receive from the terminal. In practical applications, the minimum sensitivity will vary depending on the resolution of the wireless headset's demodulation chip.
[0101] In one example, such as Figure 4 The process of determining a preset threshold range is described, as shown below:
[0102] Step 401: Determine the minimum sensitivity of the wireless earphone receiving terminal signal.
[0103] Understandably, it is assumed that the minimum strength of the signal sent by the terminal that the demodulation chip in the wireless headset can receive, i.e., the lowest sensitivity, is -96dB.
[0104] Step 402: Determine the preset threshold range based on the minimum sensitivity and the first preset value.
[0105] Understandably, assuming the first preset value is 10, the preset threshold range is [-96dB, -86dB]. The first preset value can be adjusted according to actual circumstances.
[0106] Understandably, defining a preset threshold range has the following advantages:
[0107] (1) It can determine the preset threshold range based on the resolution capability of the wireless headphones.
[0108] (2) By using a preset threshold range, it is possible to determine whether there is a difference in signal strength between the two earphones and the terminal, thereby controlling the switching of the master and slave earphones when the wireless channel quality between the master earphone and the terminal is relatively poor, so as to improve the stability of the connection.
[0109] In the second scenario, after determining the threshold range based on the resolution capability of the wireless earphone demodulation chip, the threshold range is further adjusted in conjunction with the actual scenario.
[0110] Specifically, first, the initial numerical range is determined based on the resolution capability of the wireless earphone demodulation chip; then, the initial numerical range is adjusted according to the actual scenario to obtain the preset threshold range.
[0111] Based on this, in one embodiment, determining the preset threshold range based on the minimum sensitivity and the first preset value includes:
[0112] Based on the minimum sensitivity and the first preset value, a first value range is determined;
[0113] Determine a second preset value; the second preset value represents the minimum signal strength of the connection between the first earphone and the terminal;
[0114] Adjust the range of the first value based on the second preset value;
[0115] The adjusted first numerical range is used as the preset threshold range.
[0116] Understandably, the second preset value can be adjusted according to the actual situation.
[0117] In one example, such as Figure 5 The process of determining a preset threshold range is described, as shown below:
[0118] Step 501: Determine the first numerical range based on the minimum sensitivity and the first preset value.
[0119] Understandably, assuming that the minimum strength of the signal sent by the terminal that the demodulation chip in the wireless headset can receive is -96dB, and the first preset value is 10, then the range of the first value is [-96dB, -86dB].
[0120] Step 502: Determine the second preset value.
[0121] Understandably, the second preset value represents the minimum signal strength between the first earphone and the terminal.
[0122] Understandably, the bit error rate between the first earphone and the terminal can be detected. When the detected bit error rate is greater than the bit error rate threshold, the corresponding signal strength between the first earphone and the terminal is taken as the minimum signal strength.
[0123] Step 503: Based on the second preset value, adjust the first value range; use the adjusted first value range as the preset threshold range.
[0124] Understandably, assuming the second preset value is -90dB, the minimum value of the first value range is adjusted from -96dB to -90dB to obtain the preset threshold range, i.e., [-90dB, -86dB].
[0125] Understandably, defining a preset threshold range has the following advantages:
[0126] (1) It can determine the initial value range based on the resolution capability of the wireless earphone, and further adjust the initial value range in combination with the actual situation to obtain the preset threshold range.
[0127] (2) By using a preset threshold range, it is possible to determine whether there is a difference in the signal strength between the two earphones and the terminal, thereby controlling the switching of the master and slave earphones when the wireless channel quality between the master earphone and the terminal is relatively poor, so as to improve the stability of the connection.
[0128] The third scenario involves determining a preset threshold range based on the current scenario of the terminal.
[0129] Specifically, by combining the current scenario of the terminal, the correspondence between the scenario and the numerical range is found to obtain the preset threshold range.
[0130] Based on this, in one embodiment, the method further includes:
[0131] Determine the current scene of the terminal;
[0132] Based on the preset correspondence between scenarios and numerical ranges, a second numerical range corresponding to the scenario currently in which the terminal is located is determined;
[0133] The second numerical range is used as the preset threshold range.
[0134] It is understood that the current scenario of the terminal can refer to the current state of the terminal. For example, the user has placed the terminal in their pocket; or the distance between the wireless headset and the terminal is far; or the user has left the terminal at an airport.
[0135] Understandably, the process of determining the current scene of the terminal may include: the terminal judging the current scene and sending corresponding scene information to the wireless earpiece. For example, when the terminal detects that it is in a pocket scene, it sends scene information "0" to the wireless earpiece, and the wireless earpiece determines that the terminal is currently in a pocket scene based on the scene information "0".
[0136] As is understandable, Table 1 shows the preset correspondence between scenarios and numerical ranges. As shown in Table 1, if the current scenario of the terminal is a pocket scenario, the preset threshold range is numerical range 1; if the current scenario of the terminal is an airport environment with relatively high noise interference, the preset threshold range is numerical range 2; if the current scenario of the terminal is far away from the wireless headset, the preset threshold range is numerical range 3; if the interference value in the current environment of the terminal is interference value 1, the preset threshold range is numerical range 4.
[0137] The current scenario of the terminal Numerical range Pocket Scene Numerical range 1 Airport environment Numerical range 2 Distance from wireless headphones Numerical range 3 Interference value 1 Numerical range 4
[0138] Table 1
[0139] In one example, such as Figure 6 The process of determining a preset threshold range is described, as shown below:
[0140] Step 601: Determine the current scene of the terminal.
[0141] It is understood that the current scenario of the terminal can refer to the current state of the terminal. For example, the user has placed the terminal in their pocket; or the distance between the wireless headset and the terminal is far; or the user has left the terminal at an airport.
[0142] Step 602: Based on the preset correspondence between scenarios and numerical ranges, determine a second numerical range corresponding to the scenario currently in which the terminal is located; use the second numerical range as the preset threshold range.
[0143] Understandably, defining a preset threshold range has the following advantages:
[0144] (1) It can obtain a preset threshold range based on the current state of the terminal, the interference value in the environment where the terminal is located, or the distance between the terminal and the wireless earphone.
[0145] (2) By using a preset threshold range, it is possible to determine whether there is a difference in the signal strength between the two earphones and the terminal, thereby controlling the switching of the master and slave earphones when the wireless channel quality between the master earphone and the terminal is relatively poor, so as to improve the stability of the connection.
[0146] In the fourth scenario, the preset threshold range is determined by combining actual measurement data.
[0147] In practical applications, actual test data shows that when the first signal strength (i.e., the strength of the signal received by the main earphone) is lower than the first threshold of -90dBm, and the second signal strength (i.e., the strength of the signal received by the secondary earphone) is higher than the second threshold of -85dBm, controlling the switching of roles between the main and secondary earphones can effectively reduce data lag.
[0148] Based on this, in one embodiment, the minimum value within the preset threshold range is -90dBm, and the maximum value within the preset threshold range is -85dBm.
[0149] In practical applications, actual test data shows that when the first signal strength (i.e., the strength of the signal received by the main earphone) is lower than the first threshold value of -90dBm, the second signal strength (i.e., the strength of the signal received by the secondary earphone) is higher than the second threshold value of -85dBm, and the difference between the second threshold value and the first threshold value is greater than or equal to 5dBm, controlling the main and secondary earphones to switch roles can effectively reduce data lag.
[0150] Based on this, in one embodiment, the difference between the maximum and minimum values within the preset threshold range is greater than or equal to 5 dBm.
[0151] In practical applications, when the terminal is in a pocket scenario, a control mechanism for switching between master and slave headsets can be activated to avoid data transmission stuttering when the signal strength between the master headset and the terminal is poor.
[0152] Based on this, in one embodiment, determining the first signal strength of the connection between the first earphone and the terminal includes:
[0153] When the terminal is in a pocket scenario, determine the first signal strength of the connection between the first earphone and the terminal.
[0154] Understandably, when the device is in a pocket, the signal strength of the master and slave earbuds in the wireless headset will differ from that of the device. To avoid data transmission stuttering when the signal strength of the master earbud is weak, a mechanism is activated to switch the master and slave earbuds based on the first and second signal strengths when the device is in a pocket.
[0155] In practical applications, after the wireless headset is activated, the first earpiece of the wireless headset can establish a short-range wireless connection with the terminal. In this way, the first earpiece can directly receive the wireless signal sent by the terminal and determine the strength of the wireless signal to obtain the first signal strength.
[0156] Based on this, in one embodiment, determining the first signal strength between the first earphone and the terminal includes:
[0157] After the first earphone establishes a wireless connection with the terminal, it receives the wireless signal sent by the terminal; determines the signal strength of the wireless signal, and uses the determined signal strength as the first signal strength.
[0158] Understandably, the wireless connection established between the first earphone and the terminal can be a Bluetooth connection or the like.
[0159] In practical applications, after the wireless headset is activated, the second earpiece of the wireless headset can receive the connection key sent by the first earpiece using a private protocol. In this way, the second earpiece can use the connection key to listen to the wireless signal sent by the terminal and determine the strength of the wireless signal to obtain the second signal strength.
[0160] Based on this, in one embodiment, determining the second signal strength between the second earphone and the terminal includes:
[0161] After the first earpiece establishes a wireless connection with the terminal, the first earpiece sends the connection key to the second earpiece;
[0162] The second earphone uses the connection key to listen to the wireless signal sent by the terminal; determines the signal strength of the wireless signal, and uses the determined signal strength as the second signal strength.
[0163] As one implementation method, taking a Bluetooth broadcast signal sent by a wireless signal terminal as an example, the second earphone uses the connection key to listen to the Bluetooth broadcast signal sent by the terminal; determines the signal strength of the Bluetooth broadcast signal, and uses the determined signal strength as the second signal strength.
[0164] As another implementation method, taking the wireless signal as the audio signal sent by the terminal as an example, the mobile terminal sends audio to the main earpiece, and the main earpiece forwards it to the slave earpiece; the second earpiece uses the connection key sent by the main earpiece to listen to the audio signal sent by the terminal, without acquiring the audio data, but only determining the signal strength of the audio signal, and using the determined signal strength as the second signal strength.
[0165] In practical applications, the first and second earphones can switch between master and slave earphones multiple times. However, in order to prevent the master and slave earphones from switching multiple times in a short period of time due to frequent signal changes, a minimum time interval between two switches can be set.
[0166] Based on this, in one embodiment, controlling the first and second earphones to perform master-slave switching includes:
[0167] When the time interval since the last master-slave switch is greater than or equal to the time interval threshold, the first and second earphones are controlled to perform a master-slave switch.
[0168] For example, assuming the time interval threshold is 5 seconds, if the time interval since the last master-slave switch is greater than or equal to 5 seconds, the first and second earphones are controlled to switch master and slave.
[0169] In one example, such as Figure 7 As shown, the process of switching between the first and second earphones is described, including:
[0170] Step 701: When the terminal is in a pocket scenario, determine the first signal strength between the first earpiece and the terminal; and determine the second signal strength between the second earpiece and the terminal.
[0171] Understandable, such as Figure 8 As shown, after the wireless earbuds are activated by opening the case, they first pair as master and slave earbuds via a private protocol. Then, the master earbud sends broadcast data, waiting to be connected by the terminal. Once the terminal and the master earbud establish a connection, the master earbud shares the connection key with the slave earbud via the private protocol. The slave earbud can use this key to listen to the communication data between the master earbud and the terminal. The slave earbud determines the data of a single channel from the listened data, synchronizes with the master earbud, and then begins playing the data.
[0172] Understandably, when a user places the device in their pocket and the device is not on the same side as the primary earpiece, if the primary earpiece receives a poor signal while the secondary earpiece receives a better signal, the user can control the switching between the primary and secondary earpieces based on the signal strength between the primary earpiece and the device, as well as the signal strength between the secondary earpiece and the device.
[0173] Step 702: Determine whether the first signal strength is less than or equal to the minimum value of the preset threshold range, and determine whether the second signal strength is greater than or equal to the maximum value of the preset threshold range; when the first signal strength is less than or equal to the minimum value of the preset threshold range, and the second signal strength is greater than or equal to the maximum value of the preset threshold range, execute step 703.
[0174] Understandably, if the first signal strength, i.e. the strength of the signal received by the master earphone, is lower than the threshold value of -90dB, such as -92dB, and the second signal strength, i.e. the strength of the signal received by the slave earphone, is -86dB, it can be seen that the first signal strength is less than the minimum value of the preset threshold range [-90dB, -86dB], and the second signal strength is equal to the maximum value of the preset threshold range [-90dB, -86dB]. In this case, the master and slave earphones will switch roles under the private protocol.
[0175] It is understandable that it is also possible to determine whether the difference between the second signal strength and the first signal strength is greater than the difference threshold. For example, if the second signal strength of the terminal signal being listened to from the earphone is more than 5dB better than the first signal strength of the terminal signal being received by the main earphone, it indicates that the reception quality of the main earphone is relatively poor and it is easy to lose data packets after being disturbed. Therefore, the main and slave earphones are controlled to switch the roles of main and slave earphones under the private protocol.
[0176] Step 703: Control the first and second earpieces to switch between master and slave modes.
[0177] Understandably, controlling the switching between the first and second earpieces has the following advantages:
[0178] (1) By comparing the signal strength values between the two earphones and the terminal, the data synchronization of the two channels can be ensured by switching between the master and slave earphones when the quality of the wireless channel between the master earphone and the terminal is relatively poor, thus avoiding data stuttering and improving the stability of the connection.
[0179] (2) The signal strength between the earphone and the terminal can be obtained by listening to the earphone. The master and slave earphones can be dynamically switched according to the signal strength between the two earphones and the terminal. This can ensure that the earphone with good signal quality can act as a relay, reduce the total number of stutters, and thus ensure that the connection stability of the system is at the best level.
[0180] (3) It can seamlessly switch between master and slave roles between the two earphones when the signal strength between the master earphone and the terminal is poor, thus avoiding data lag.
[0181] The implementation principle of the connection control method in this embodiment of the invention will be explained below with reference to actual experimental data.
[0182] Taking TWS earbuds as an example, consider that users are quite likely to keep their mobile devices in their pants when listening to music with TWS earbuds. The human body is a large absorber of electromagnetic waves, and the signal emitted by the mobile device suffers significant loss during propagation. Because the signal from the mobile device to the left and right earbuds takes different paths, the electromagnetic wave loss is also different. Typically, the signal strength difference between the mobile device and the left and right ears can be as high as 10-20dB. On the other hand, due to the structural design of smart mobile devices, the antenna performance is different when the mobile device is placed in different pockets. In actual use, the communication link loss from the mobile device to the earbuds fluctuates. When the earbud with the weaker signal is the main earbud, the possibility of data loss increases, which manifests as stuttering or more frequent stuttering.
[0183] Figure 9 A schematic diagram showing the measured signal strength between the master / slave headset and the terminal, as shown below. Figure 9 As shown in the data obtained from the RSSI test at the Aerospace Science and Technology Plaza, there is a difference between the master and slave ears receiving signals emitted by the mobile terminal. RSSI represents the signal reception strength.
[0184] Figure 10 This is an illustration of testing the number of times a mobile device would lag when placed in different pockets, as shown below. Figure 10 As shown, based on the anti-interference test conducted at the airport, with the earphone in the right pocket as the main earphone, it can be seen that the number of stutters is less when the mobile terminal is placed in the two right pockets than in the two left pockets.
[0185] Figure 11 It is the trend of signal strength change between the master / slave headset and the terminal, such as Figure 11As shown, in open outdoor environments such as airports and intersections, the contact level between a mobile terminal placed in a pocket and the skin is constantly changing due to human movement. The signal radiated by the mobile terminal experiences significant jumps when it reaches the earpiece after passing through the complex air environment. Furthermore, the multipath effect of air transmission means that the transmission path of the earpiece on the other side is longer, and the electromagnetic signal is more blocked by the human body. Therefore, under normal circumstances, the PHONE RSSI of the earpiece on the same side is 5-15dB higher than that of the earpiece on the other side, with the main PHONE RSSI distribution range being (-80dB, -60dB). If the main earpiece is fixed and does not switch, the signal strength between the main earpiece and the terminal will be poor when the mobile terminal and the main earpiece are not on the same side, which may lead to data interruption. Therefore, in this embodiment of the invention, when the signal strength between the main earpiece and the terminal is poor while the signal strength between the slave earpiece and the terminal is good, controlling the switching between the main and slave earpieces can solve the problem of data loss when the mobile terminal is placed in different pockets. By reducing the number of interruptions, the stability of the connection can be guaranteed. For example, when the signal strength (RSSI) between the master earphone and the terminal is less than -90dBm, and the signal strength (RSSI) between the slave earphone and the terminal is greater than -85dBm, controlling the switching between the master and slave earphones can reduce the probability of stuttering.
[0186] By adopting the technical solution of this invention, the main earphone and the slave earphone are controlled to switch roles based on the first signal strength and the second signal strength, which can avoid data lag caused by poor signal strength between the main earphone and the terminal, thereby ensuring the stability of the connection between the wireless earphone and the terminal.
[0187] To implement the connection control method of the present invention, the present invention also provides a connection control device for use in wireless earphones, wherein the wireless earphones include a first earphone and a second earphone. Figure 12 This is a schematic diagram of the structural composition of the connection control device according to an embodiment of the present invention; as shown. Figure 12 As shown, the device includes:
[0188] The first processing unit 121 is configured to determine a first signal strength between the first earphone and the terminal when the first earphone is the main earphone and the second earphone is the slave earphone; and to determine a second signal strength between the second earphone and the terminal.
[0189] The second processing unit 122 is used to control the first earphone and the second earphone to switch between master and slave based on the first signal strength and the second signal strength, so that the first earphone is the slave earphone and the second earphone is the master earphone.
[0190] In one embodiment, the second processing unit 122 is specifically used for:
[0191] When the first signal strength is less than or equal to the minimum value of the preset threshold range, and the second signal strength is greater than or equal to the maximum value of the preset threshold range, the first earphone and the second earphone are switched.
[0192] In one embodiment, the second processing unit 122 is further configured to:
[0193] When both the first signal strength and the second signal strength are less than or equal to the minimum value of a preset threshold range, the first and second earphones are controlled not to perform master-slave switching.
[0194] or,
[0195] When both the first signal strength and the second signal strength are greater than or equal to the maximum value of the preset threshold range, the first and second earphones are controlled not to perform master-slave switching.
[0196] In one embodiment, the second processing unit 122 is further configured to:
[0197] Determine the minimum sensitivity of the wireless earphone receiving terminal signal;
[0198] Based on the minimum sensitivity and the first preset value, the preset threshold range is determined.
[0199] In one embodiment, the second processing unit 122 is specifically used for:
[0200] Based on the minimum sensitivity and the first preset value, a first value range is determined;
[0201] Determine a second preset value; the second preset value represents the minimum signal strength of the connection between the first earphone and the terminal;
[0202] Adjust the range of the first value based on the second preset value;
[0203] The adjusted first numerical range is used as the preset threshold range.
[0204] In one embodiment, the second processing unit 122 is further configured to:
[0205] Determine the current scene of the terminal;
[0206] Based on the preset correspondence between scenarios and numerical ranges, a second numerical range corresponding to the scenario currently in which the terminal is located is determined;
[0207] The second numerical range is used as the preset threshold range.
[0208] In one embodiment, the minimum value within the preset threshold range is -90dBm, and the maximum value within the preset threshold range is -85dBm.
[0209] In one embodiment, the difference between the maximum and minimum values within the preset threshold range is greater than or equal to 5 dBm.
[0210] In one embodiment, the first processing unit 121 is specifically used for:
[0211] When the terminal is in a pocket scenario, determine the first signal strength between the first earphone and the terminal.
[0212] In one embodiment, the first processing unit 121 is specifically used for:
[0213] After the first earphone establishes a wireless connection with the terminal, it receives the wireless signal sent by the terminal; determines the signal strength of the wireless signal, and uses the determined signal strength as the first signal strength.
[0214] In one embodiment, the first processing unit 121 is specifically used for:
[0215] After the first earpiece establishes a wireless connection with the terminal, the first earpiece sends the connection key to the second earpiece;
[0216] The second earphone uses the connection key to listen to the wireless signal sent by the terminal; determines the signal strength of the wireless signal, and uses the determined signal strength as the second signal strength.
[0217] In one embodiment, controlling the first and second earphones to perform master-slave switching includes:
[0218] When the time interval since the last master-slave switch is greater than or equal to the time interval threshold, the first and second earphones are controlled to perform a master-slave switch.
[0219] In practical applications, the first processing unit 121 and the second processing unit 122 can be implemented by the processor in the device; the processor can be a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU), or a field-programmable gate array (FPGA).
[0220] It should be noted that the device provided in the above embodiments is only illustrated by the division of the above program modules when performing connection control. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the terminal can be divided into different program modules to complete all or part of the processing described above. In addition, the device provided in the above embodiments and the connection control method embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0221] Based on the hardware implementation of the above-described device, this embodiment of the invention also provides an electronic device. Figure 13 This is a schematic diagram of the hardware composition structure of the terminal according to an embodiment of the present invention, as shown below. Figure 13 As shown, the electronic device 130 includes a memory 133, a processor 132, and a computer program stored in the memory 133 and executable on the processor 132; when the processor 132 executes the program, it implements the methods provided by one or more of the above-mentioned technical solutions.
[0222] It should be noted that the specific steps implemented by the processor 132 when executing the program have been detailed above and will not be repeated here.
[0223] It is understood that the electronic device 130 also includes a communication interface 131, which is used for information exchange with other devices; meanwhile, the various components in the electronic device 130 are coupled together through a bus system 134. It is understood that the bus system 134 is configured to enable communication between these components. In addition to a data bus, the bus system 134 also includes a power bus, a control bus, and a status signal bus, etc.
[0224] It is understood that the memory 133 in this embodiment can be volatile memory or non-volatile memory, or both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable types of memories.
[0225] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 132. Processor 132 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 132 or by instructions in software form. Processor 132 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 132 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of the present invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory. Processor 132 reads information from the memory and, in conjunction with its hardware, completes the steps of the aforementioned methods.
[0226] This invention also provides a storage medium, specifically a computer storage medium, and more specifically a computer-readable storage medium. It stores computer instructions, i.e., a computer program, which, when executed by a processor, provide the methods described in one or more of the above-described technical solutions.
[0227] In the several embodiments provided by this invention, it should be understood that the disclosed methods and smart devices can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0228] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0229] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0230] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0231] Alternatively, if the integrated units of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, terminal, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0232] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0233] Furthermore, the technical solutions described in the embodiments of the present invention can be combined arbitrarily without conflict.
[0234] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A connection control method, characterized in that, Applied to wireless earphones, the wireless earphones including a first earphone and a second earphone; the method includes: When the first earpiece is the master earpiece and the second earpiece is the slave earpiece, determine the first signal strength between the first earpiece and the terminal; and determine the second signal strength between the second earpiece and the terminal. Determine the current scene in which the terminal is located; the current scene in which the terminal is located includes the terminal being in a pocket; Based on the preset correspondence between scenarios and numerical ranges, a second numerical range corresponding to the scenario currently in which the terminal is located is determined; Use the second numerical range as the preset threshold range; Based on the preset threshold range, the first signal strength, and the second signal strength, the first and second earphones are controlled to switch between master and slave modes, so that the first earphone is the slave earphone and the second earphone is the master earphone.
2. The method according to claim 1, characterized in that, The step of controlling the first and second earphones to perform master-slave switching based on the preset threshold range, the first signal strength, and the second signal strength includes: When the first signal strength is less than or equal to the minimum value of the preset threshold range, and the second signal strength is greater than or equal to the maximum value of the preset threshold range, the first and second earphones are controlled to switch between master and slave modes.
3. The method according to claim 2, characterized in that, The method further includes: When both the first signal strength and the second signal strength are less than or equal to the minimum value of the preset threshold range, the first and second earphones are controlled not to perform master-slave switching; or, When both the first signal strength and the second signal strength are greater than or equal to the maximum value of the preset threshold range, the first and second earphones are controlled not to perform master-slave switching.
4. The method according to any one of claims 1 to 3, characterized in that, The minimum value within the preset threshold range is -90dBm, and the maximum value within the preset threshold range is -85dBm.
5. The method according to any one of claims 1 to 3, characterized in that, The difference between the maximum and minimum values within the preset threshold range is greater than or equal to 5 dBm.
6. The method according to claim 1, characterized in that, Determining the first signal strength between the first earphone and the terminal includes: After the first earphone establishes a wireless connection with the terminal, it receives the wireless signal sent by the terminal; determines the signal strength of the wireless signal, and uses the determined signal strength as the first signal strength.
7. The method according to claim 1, characterized in that, Determining the second signal strength between the second earphone and the terminal includes: After the first earpiece establishes a wireless connection with the terminal, the first earpiece sends the connection key to the second earpiece; The second earphone uses the connection key to listen to the wireless signal sent by the terminal; determines the signal strength of the wireless signal, and uses the determined signal strength as the second signal strength.
8. The method according to claim 1, characterized in that, The control of the first and second earphones to perform master-slave switching includes: When the time interval since the last master-slave switch is greater than or equal to the time interval threshold, the first and second earphones are controlled to perform a master-slave switch.
9. A connection control device, characterized in that, Applied to wireless earphones, the wireless earphones include a first earphone and a second earphone; comprising: The first processing unit is configured to, when the first earphone is the main earphone and the second earphone is the slave earphone, determine a first signal strength between the first earphone and the terminal; and determine a second signal strength between the second earphone and the terminal. The second processing unit is configured to determine the current scene of the terminal; the current scene of the terminal includes the terminal being in a pocket; determine a second numerical range corresponding to the current scene of the terminal according to a preset correspondence between scenes and numerical ranges; use the second numerical range as a preset threshold range; and control the first earphone and the second earphone to perform master-slave switching based on the preset threshold range, the first signal strength and the second signal strength, so that the first earphone is the slave earphone and the second earphone is the master earphone.
10. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Wireless communication system and equipment
CN110913375A
Wireless earphone assembly and wireless communication system
CN111132025A
Communication method for Bluetooth headset equipment and Bluetooth headset equipment
CN111200769A
Earphone and volume adjusting method thereof
CN112104942A