CN115278714A - Connection control method, device, electronic equipment and storage medium - Google Patents

Connection control method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115278714A
CN115278714A CN202110476689.5A CN202110476689A CN115278714A CN 115278714 A CN115278714 A CN 115278714A CN 202110476689 A CN202110476689 A CN 202110476689A CN 115278714 A CN115278714 A CN 115278714A
Authority
CN
China
Prior art keywords
earphone
terminal
signal strength
master
determining
Prior art date
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.)
Pending
Application number
CN202110476689.5A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110476689.5A priority Critical patent/CN115278714A/en
Publication of CN115278714A publication Critical patent/CN115278714A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a connection control method, a connection control device, electronic equipment and a storage medium. The method comprises the following steps: determining a first signal strength between the first earphone and the terminal under the condition that the first earphone is a master earphone and the second earphone is a slave earphone; and determining a second signal strength between the second earpiece and the terminal; and controlling 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 a slave earphone and the second earphone is a master earphone.

Description

Connection control method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of wireless communications technologies, and in particular, to a connection control method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of wireless communication technology, data transmission can be performed between a terminal and a wireless headset. Generally, a wireless headset includes a master headset and a slave headset, the master headset establishes a connection with a terminal, the slave headset does not establish a connection with the terminal, when the terminal sends data to the wireless headset, the master headset acquires data sent by the terminal through the established connection, and the slave headset monitors the data sent by the terminal through a connection key sent by the master headset. However, in practical applications, a data jamming phenomenon may occur, so that the stability of the connection between the terminal and the wireless headset cannot be ensured.
Disclosure of Invention
In view of this, embodiments of the present invention are intended to provide a connection control method, device, electronic device, and storage medium.
The technical scheme of the invention is realized as follows:
the embodiment of the invention provides a connection control method, which is applied to a wireless earphone, wherein the wireless earphone comprises a first earphone and a second earphone; the method comprises the following steps:
determining a first signal strength between the first earphone and a terminal under the condition that the first earphone is a master earphone and the second earphone is a slave earphone; and determining a second signal strength between the second earpiece and the terminal;
and controlling 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 a slave earphone and the second earphone is a master earphone.
In the foregoing solution, the controlling the first earphone and the second earphone to perform master-slave switching based on the first signal strength and the second signal strength includes:
and when the first signal intensity is smaller than or equal to the minimum value of a preset threshold range and the second signal intensity is larger than or equal to the maximum value of the preset threshold range, controlling the first earphone and the second earphone to carry out master-slave switching.
In the above scheme, the method further comprises:
when the first signal intensity and the second signal intensity are both smaller than or equal to the minimum value of a preset threshold range, controlling the first earphone and the second earphone not to perform master-slave switching;
alternatively, the first and second liquid crystal display panels may be,
and when the first signal intensity and the second signal intensity are both greater than or equal to the maximum value of the preset threshold range, controlling the first earphone and the second earphone not to perform master-slave switching.
In the above scheme, the method further comprises:
determining the lowest sensitivity of the wireless earphone for receiving the terminal signal;
determining the preset threshold range based on the lowest sensitivity and a first preset value.
In the foregoing solution, the determining the preset threshold range based on the lowest sensitivity and a first preset value includes:
determining a first value range based on the minimum sensitivity and a first preset value;
determining a second preset value; the second preset value represents the lowest signal strength of the connection between the first earphone and the terminal;
adjusting the first numerical range based on the second preset numerical value;
and taking the adjusted first numerical range as the preset threshold range.
In the foregoing solution, the method further includes:
determining a scene where the terminal is located currently;
determining a second numerical range corresponding to the current scene of the terminal according to the corresponding relation between the preset scene and the numerical range;
and taking the second numerical value range as the preset threshold range.
In the above scheme, the minimum value within the preset threshold range is-90 dBm, and the maximum value within the preset threshold range is-85 dBm.
In the above scheme, the difference between the maximum value and the minimum value in the preset threshold range is greater than or equal to 5dBm.
In the above scheme, the determining the first signal strength between the first earphone and the terminal includes:
determining a first signal strength between the first headset and the terminal if the terminal is in a pocket scene.
In the foregoing solution, the determining the first signal strength between the first earphone and the terminal includes:
after the first earphone is wirelessly connected with a terminal, receiving a wireless signal sent by the terminal; and determining the signal strength of the wireless signal, and taking the determined signal strength as the first signal strength.
In the above solution, the determining the second signal strength between the second earphone and the terminal includes:
after the first earphone establishes close-range wireless connection with a terminal, the first earphone sends a connection key to the second earphone;
the second earphone monitors a wireless signal sent by the terminal by using the connection key; and determining the signal strength of the wireless signal, and taking the determined signal strength as the second signal strength.
In the foregoing solution, the controlling the first earphone and the second earphone to perform master-slave switching includes:
and when the time interval from the last master-slave switching is greater than or equal to the time interval threshold, controlling the first earphone and the second earphone to carry out master-slave switching.
The embodiment of the invention provides a connection control device, which is applied to a wireless earphone, wherein the wireless earphone comprises a first earphone and a second earphone; the method comprises the following steps:
the first processing unit is used for determining first signal strength between the first earphone and the terminal under the condition that the first earphone is a master earphone and the second earphone is a slave earphone; and determining a second signal strength between the second earpiece and the terminal;
and the second processing unit is used for controlling the first earphone and the second earphone to carry out master-slave switching based on the first signal strength and the second signal strength so as to enable the first earphone to be a slave earphone and the second earphone to be a master earphone.
An embodiment of the present invention provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is configured to implement the steps of any of the above methods when executing the computer program.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the above-mentioned methods.
The connection control method, the connection control device, the electronic equipment and the storage medium provided by the embodiment of the invention are applied to wireless earphones, wherein the wireless earphones comprise a first earphone and a second earphone; the method comprises the following steps: determining a first signal strength between the first earphone and a terminal under the condition that the first earphone is a master earphone and the second earphone is a slave earphone; and determining a second signal strength between the second earpiece and the terminal; and controlling 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 a slave earphone and the second earphone is a master earphone. By adopting the technical scheme of the embodiment of the invention, the master earphone and the slave earphone are controlled to switch roles based on the first signal strength and the second signal strength, so that the problem of data blockage caused by poor signal strength between the master earphone and the terminal can be avoided, and the stability of connection between the wireless earphone and the terminal is ensured.
Drawings
Fig. 1 is a schematic configuration diagram of a True Wireless Stereo (TWS) headset in the related art;
FIG. 2 is a diagram illustrating a TWS headset and a smart terminal in a related art;
FIG. 3 is a schematic flow chart illustrating an implementation of a connection control method according to an embodiment of the present invention;
FIG. 4 is a first flowchart illustrating an implementation of determining a preset threshold range according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a second implementation flow of determining a preset threshold range according to an embodiment of the present invention;
fig. 6 is a third schematic flow chart illustrating an implementation process of determining a preset threshold range according to the embodiment of the present invention;
fig. 7 is a schematic flow chart illustrating an implementation of controlling the switching between the first earphone and the second earphone according to the embodiment of the present invention;
fig. 8 is a schematic diagram of a wireless headset connected to a terminal according to an embodiment of the present invention;
fig. 9 is a schematic diagram of measured data of signal strength between a master and a slave headset and a terminal according to an embodiment of the present invention;
FIG. 10 is a diagram illustrating the number of test cocking times when a mobile terminal is placed in different pockets according to an embodiment of the present invention;
fig. 11 is a schematic diagram illustrating a variation trend of signal strength between a master-slave headset and a terminal according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a connection control device according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
Before describing the technical solution of the embodiment of the present invention in detail, a description will be given of a related art.
In the related art, with the rapid development of wireless communication technology, data transmission between a terminal and a wireless headset can be performed through bluetooth technology. The wireless headset may particularly be a TWS headset. The Audio data in the Bluetooth protocol is transmitted point-to-point, and before Bluetooth Audio (LE Audio) comes out, the intelligent terminal is connected with only one earplug.
Fig. 1 is a schematic structural diagram of a related art TWS headset, and as shown in fig. 1, two left and right earplugs of the TWS headset can work independently by realizing wireless separation of left and right channels without cable connection. Advantages of TWS headphones include: 1. wired troubles are completely eliminated, and the movement is more free; 2. the use modes are various, and the multifunctional electric heating cooker can be used independently and separately and can also be used as two machines; 3. the portable box is internally integrated with a mobile power supply, and charging can be realized only by placing the earphone in the portable box.
In the related art, an antenna in a wireless headset is a device for transmitting or receiving electromagnetic waves, and includes a transmitting antenna and a receiving antenna. The transmitting antenna is used for effectively converting the energy of high-frequency current of a transmitter or guided wave in a waveguide system into spatial electromagnetic wave energy; and the effect of the receive antenna is the opposite. The antenna is actually a transducer and a true wireless bluetooth headset can be cabled out because the data is propagated in the air by means of radio waves. The antenna needs a certain length to radiate electromagnetic waves to the space, and if a monopole antenna is adopted, the length of the antenna is about one quarter of the working wavelength. Taking a TWS headset as an example, the TWS headset uses bluetooth for communication, the working frequency band of the bluetooth is an ISM frequency band, the antenna length is about 30mm, and the length can be reduced properly by some optimized designs. In TWS headsets, the antenna substantially covers most of the outside of the earpiece stem.
Fig. 2 is a schematic diagram of a connection between a TWS headset and an intelligent terminal in the related art, and as shown in fig. 2, a development iteration scheme of a bluetooth chip in the TWS headset includes the following steps:
the first generation scheme is the earliest main ear forwarding scheme, that is, a bluetooth link is established between a mobile terminal and a main ear, the mobile terminal sends data of left and right sound channels to the main ear together, the main ear receives a packet of data and forwards the data to a slave ear completely, and then the left and right ears play audio data of the left and right sound channels respectively.
The second generation scheme is a TWS + scheme, that is, after TWS pairing is completed, the mobile terminal and the master earphone directly establish pairing connection, and after the master ear receives audio stream data of the mobile terminal, the data of one of the channels is forwarded to the slave ear through a private protocol. In practical application, the single connection can be further converted into double connections through a private protocol, that is, a link is respectively established between the mobile terminal and the left and right earphones, and the left and right channel data are respectively and independently transmitted.
The third generation scheme belongs to a transition scheme, namely, on the basis of the first generation and the second generation, the master ear only needs to forward half of data to the slave ear.
The fourth generation scheme is TWS Mirroring, that is, after a master ear and a slave ear are paired, a mobile terminal is connected, the mobile terminal and the master ear establish a connection link, and share a connection key with the slave ear, and the slave ear can monitor data transmission between the mobile terminal and the master ear by using the key. The main ear can forward the mobile terminal data packet received by the main ear to the slave ear, in the process, the main ear serves as a bridge or a springboard, packet loss of the slave ear and retransmission of the mobile terminal are reduced through the data relay scheme, retransmission times of the mobile terminal are reduced, code rate is reduced, and possibility of interference is reduced.
The fifth generation scheme belongs to BLE Audio in planning, that is, due to the development of the bluetooth protocol, the mobile terminal can establish two paths between the earphones, transmit Audio stream data through the bluetooth with low power consumption, and separately transmit left and right channel data.
It should be noted that most of the current mainstream bluetooth headset chip manufacturers provide solutions based on the listening-from-the-ear scheme, except that the respective proprietary protocols differ in the specific synchronization and retransmission mechanisms. The problem of jamming of the earphone due to data loss is reduced by the scheme of monitoring from the main ear and retransmitting through the main ear, and the overall Bluetooth stability can be improved to a certain extent. In addition, if two links are established through the TWS + mechanism, and when the signal quality is degraded due to interference in one of the links, the two earphones cannot synchronously play data, and the stuck condition still occurs.
In addition, a feasible related technology is that the master earphone establishes a bluetooth connection with the terminal, the slave earphone monitors the communication between the master earphone and the terminal to obtain the data sent by the terminal, the master earphone does not forward the terminal data, and if the slave earphone does not monitor the terminal data, the master earphone informs the terminal of retransmission through the master earphone, so that the master earphone in the present application does not necessarily have a function of forwarding the terminal data to the slave earphone, and the master earphone mainly refers to an earphone that has a wireless connection (such as a bluetooth connection) with the terminal, so that the data can be directly obtained from the terminal.
In summary, in the related art, when the signal strength of the connection between the main earphone and the terminal is poor, the main earphone is notified by the slave earphone to retransmit the lost data, and the data jam still occurs, so that the stability of the connection between the terminal and the wireless earphone cannot be ensured.
Based on this, in various embodiments of the present invention, in a case where the first earphone is a master earphone and the second earphone is a slave earphone, a first signal strength between the first earphone and the terminal is determined; and determining a second signal strength between the second earpiece and the terminal; and controlling 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 a slave earphone and the second earphone is a master earphone.
It should be noted that, in the embodiment of the present invention, in consideration of the fact that the signal strength of the wireless headset connected between the master earphone and the terminal and the signal strength of the wireless headset connected between the slave earphone and the terminal are different in a specific scenario, in order to avoid a data pause phenomenon occurring when the signal strength between the master earphone and the terminal is poor and the signal strength between the slave earphone and the terminal is good, the master earphone and the slave earphone may be controlled to perform role switching, so as to ensure that data transmission does not occur pause, and thus ensure the stability of the connection between the wireless headset and the terminal.
The following describes a process of communicating with a terminal by a wireless headset according to an embodiment of the present invention.
It can be understood that when the wireless headset communicates with the terminal by using bluetooth technology, the following is involved:
the bluetooth technology provides that when each pair of devices performs bluetooth communication, one device is a master device and the other device is a slave device, and then the communication can be performed; during communication, the main-end equipment needs to search and initiate pairing, and after the link is established successfully, the two parties can receive and transmit data. Theoretically, one bluetooth master device can communicate with 7 bluetooth slave devices simultaneously. A device with Bluetooth communication function can be switched between two roles, normally works in a slave mode, waits for other master devices to connect, and is switched into the master mode to initiate a call to other devices when needed. When one bluetooth device initiates a call in a master mode, the bluetooth device needs to know the information of the other party such as the bluetooth address, the pairing password and the like, and can directly initiate the call after the pairing is completed.
The calling process, namely the bluetooth master end device initiates a call, firstly searches for and finds out the bluetooth devices which are located around and can be searched. After finding the slave end Bluetooth device, the master end device is paired with the slave end Bluetooth device, and at the moment, the PIN code of the slave end device needs to be input, and the PIN code does not need to be input by other devices. After the pairing is completed, the slave end Bluetooth device records the trust information of the master end device, at the moment, the master end can initiate a call to the slave end device, and the paired devices do not need to be paired again when calling next time. The paired device, the bluetooth headset as a slave, may also initiate a link establishment request, but the bluetooth module as a data communication does not generally initiate a call. After the link is successfully established, bidirectional data or voice communication can be carried out between the master terminal equipment and the slave terminal equipment. In the communication state, both the master end equipment and the slave end equipment can initiate disconnection, namely disconnection of a Bluetooth link.
Data transmission, namely, in the application of Bluetooth data transmission, a serial port is used for data communication, the Bluetooth equipment sets pairing information between two Bluetooth equipment in advance before leaving a factory, the master end equipment prestores PIN codes, addresses and the like of the slave end equipment, the two end equipment is powered on, namely, a chain is automatically established, and transparent serial port transmission is realized without intervention of a peripheral circuit. In one-to-one application, the slave end equipment can be set into two types, namely, a silent state, namely, the slave end equipment can only communicate with a specified master end and is not searched by other Bluetooth equipment; and the second is a development state, which can be searched by a designated master end and can also be searched by other Bluetooth equipment to build a link.
It should be noted that the application layer of the software defines two roles: master earphone, slave earphone. The roles of two earphones in a pair of earphones can be freely switched between a master earphone and a slave earphone, and the role protocols have different rules according to the running state of the equipment. The setting of the primary role is determined according to the parity of the Bluetooth address, and the default odd address is the host; the master earphone and the slave earphone are also determined according to the state of certain hardware IO, and the right ear or the left ear in a fixed initial state is a master ear. Wherein, the function of main earphone is: the method comprises the following steps of communicating with a mobile terminal, managing state information such as states of connection, pairing, playing and the like, having a Bluetooth application protocol and a system decision right, namely determining that a user protocol such as hfp, avrcp and the like is used by a host; mic signal input in call. The functions of the slave earphone are: and forwarding or monitoring a link between the main ear and the mobile terminal from the main ear to acquire necessary information.
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The embodiment of the invention provides a connection control method, which is applied to a wireless earphone, wherein the wireless earphone comprises a first earphone and a second earphone; FIG. 3 is a schematic diagram of a flow chart of a connection control method according to an embodiment of the present invention; as shown in fig. 3, the method includes:
step 301: determining a first signal strength between the first earphone and a terminal under the condition that the first earphone is a master earphone and the second earphone is a slave earphone; and determining a second signal strength between the second earpiece and the terminal;
step 302: and controlling 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 a slave earphone and the second earphone is a master earphone.
It is understood that, in step 301, the wireless headset may establish a connection with the terminal using bluetooth technology in practical applications. Specifically, the master earphone of the wireless earphone is used for establishing connection with the terminal through bluetooth to receive data sent by the terminal, and further, the data can be forwarded to the slave earphone or not, and under the condition of no forwarding, the correct data can be monitored from ears by triggering the terminal to retransmit the data; and the terminal is also used for sending a connection key used for establishing a Bluetooth connection with the terminal to the slave earphone through a private protocol so that the slave earphone can listen to data sent by the terminal. Wherein, the terminal may refer to a mobile terminal or the like.
It should be noted that, in the scheme of acquiring the terminal data by listening from the slave earphone, since the slave earphone is not wirelessly connected (e.g. bluetooth connected) with the terminal, the second signal strength between the slave earphone and the terminal can be obtained according to the communication between the slave earphone and the terminal by listening to the master earphone.
It can be understood that, in step 302, in an actual application, controlling the first earphone and the second earphone to perform master-slave switching may refer to controlling roles of the first earphone and the second earphone to switch. For example, after controlling the first earphone and the second earphone to switch, the first earphone is used as a slave earphone to execute a monitoring function; the second earphone is used as a main earphone, and executes data sent by the receiving terminal and can be forwarded to the first earphone or not.
In practical application, considering that the signal intensity between the master earphone and the terminal of the wireless earphone and the signal intensity between the slave earphone and the terminal are different in a specific scene, if the difference exceeds a preset threshold range, the master earphone and the slave earphone can be controlled to perform role switching.
Based on this, in an embodiment, the controlling the first headset and the second headset to perform master-slave switching based on the first signal strength and the second signal strength includes:
and when the first signal intensity is smaller than or equal to the minimum value of a preset threshold range and the second signal intensity is larger than or equal to the maximum value of the preset threshold range, controlling the first earphone and the second earphone to carry out master-slave switching.
It can be understood that, when a first signal strength between the first earphone and the terminal is poor and a 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 a minimum value of a preset threshold range and the second signal strength is greater than or equal to a maximum value of the preset threshold range, the first earphone and the second earphone are controlled to perform master-slave switching.
It can be understood that when a first signal strength between the first earphone and the terminal is poor, and a 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 a minimum value of a preset threshold range, the first earphone and the second earphone are controlled not to perform master-slave switching.
Or 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, controlling the first earphone and the second earphone not to perform master-slave switching.
It can be understood that controlling the first earphone and the second earphone to switch may refer to switching roles of the first earphone and the second earphone as a master earphone and a slave earphone. For example, after the first earphone and the second earphone are switched, the first earphone serves as a slave earphone, and the second earphone serves as a master earphone, that is, the first earphone performs a monitoring function of the slave earphone, that is, monitors data transmitted between the terminal and the second earphone; the second earphone executes the receiving function of the main earphone, namely, the second earphone establishes connection with the terminal and receives data sent by the terminal, further, in some schemes, the main earphone can also forward the terminal data to the first earphone when the first earphone monitors errors, and in some schemes, the main earphone can trigger the terminal to retransmit the data when the first earphone monitors errors.
It is understood that, when controlling the first earphone and the second earphone to switch, negotiation may be performed by the first earphone and the second earphone. For example, if the negotiation is controlled by a first earphone to switch, the first earphone controls the first earphone and the second earphone to switch based on the first signal strength and the second signal strength; and if the negotiation is controlled by a second earphone to switch, the second earphone controls the first earphone and the second earphone to switch based on the first signal strength and the second signal strength.
It is understood that, it may also be determined whether a difference between the second signal strength and the first signal strength is greater than a difference threshold; and when the difference value between the second signal strength and the first signal strength is greater than a difference threshold value, controlling the first earphone and the second earphone to be switched.
How to determine the preset threshold range is described in detail below.
In the first case, the preset threshold range is determined according to the resolving capability of the wireless earphone demodulation chip.
Specifically, the preset threshold range is determined by combining the lowest sensitivity of the wireless earphone demodulation chip for receiving the terminal signal and a first preset value.
Based on this, in an embodiment, the method further comprises:
determining the lowest sensitivity of the wireless earphone for receiving the terminal signal;
determining the preset threshold range based on the lowest sensitivity and a first preset value.
It can be understood that the minimum sensitivity may refer to a minimum strength of a signal transmitted by a terminal that can be received by a demodulation chip in the wireless headset. In practical applications, if the resolving power of the wireless earphone demodulation chip is different, the lowest sensitivity is also different.
In one example, as shown in fig. 4, a process for determining a preset threshold range is described, including:
step 401: and determining the lowest sensitivity of the wireless earphone for receiving the terminal signal.
It can be understood that the minimum strength, i.e. the minimum sensitivity, of the signal transmitted by the terminal that can be received by the demodulation chip in the wireless headset is assumed to be-96 dB.
Step 402: determining the preset threshold range based on the lowest sensitivity and a first preset value.
It will be appreciated that, assuming a first predetermined value of 10, the predetermined threshold range is [ -96dB, -86dB ]. The first preset value can be adjusted according to actual conditions.
As can be understood, determining the preset threshold range has the following advantages:
(1) The preset threshold range can be determined according to the resolving capability of the wireless earphone.
(2) By utilizing the preset threshold range, whether the signal strength between the two earphones and the terminal is different or not can be judged, so that the master earphone and the slave earphone are controlled to be switched under the condition that the quality of a wireless channel between the master earphone and the terminal is poor, and the connection stability is improved.
In the second case, after the threshold range is determined according to the resolving capability of the wireless earphone demodulation chip, the threshold range is further adjusted by combining with the actual scene.
Specifically, firstly, determining an initial numerical range according to the resolving capability of a wireless earphone demodulation chip; and then, adjusting the initial numerical range according to the actual scene to obtain a preset threshold range.
Based on this, in an embodiment, the determining the preset threshold range based on the lowest sensitivity and a first preset value includes:
determining a first value range based on the lowest sensitivity and a first preset value;
determining a second preset value; the second preset value represents the lowest signal strength of the connection between the first earphone and the terminal;
adjusting the first numerical range based on the second preset numerical value;
and taking the adjusted first numerical range as the preset threshold range.
It is understood that the second preset value can be adjusted according to actual conditions.
In one example, as shown in fig. 5, a process for determining a preset threshold range is described, comprising:
step 501: a first range of values is determined based on the minimum sensitivity and a first preset value.
It can be understood that, assuming that the minimum strength, i.e., the minimum sensitivity, of the signal transmitted by the terminal that can be received by the demodulation chip in the wireless headset is-96 dB, and the first preset value is 10, the first value range is [ -96dB, -86dB ].
Step 502: a second predetermined value is determined.
It will be appreciated that the second predetermined value is indicative of the lowest signal strength between the first earpiece and the terminal.
It is to be understood that an error rate between the first earphone and the terminal may be detected, and when the detected error rate is greater than an error rate threshold, the signal strength between the corresponding first earphone and the terminal is taken as the lowest signal strength.
Step 503: adjusting the first numerical range based on the second preset numerical value; and taking the adjusted first numerical range as the preset threshold range.
It will be appreciated that, assuming a second predetermined value of-90 dB, the minimum value of the first range of values is adjusted from-96 dB to-90 dB, resulting in the predetermined threshold range, i.e., -90dB, -86 dB.
As can be understood, determining the preset threshold range has the following advantages:
(1) The initial value range can be determined according to the resolving capability of the wireless earphone, and the initial value range is further adjusted by combining with the actual situation to obtain the preset threshold range.
(2) By utilizing the preset threshold range, whether the signal strength of the connection between the two earphones and the terminal is different or not can be judged, so that the master earphone and the slave earphone are controlled to be switched under the condition that the quality of a wireless channel between the master earphone and the terminal is poor, and the connection stability is improved.
And in the third situation, the preset threshold range is determined by combining the current scene of the terminal.
Specifically, the corresponding relationship between the scene and the numerical range is searched in combination with the current scene of the terminal, so as to obtain the preset threshold range.
Based on this, in an embodiment, the method further comprises:
determining a scene where the terminal is located currently;
determining a second numerical range corresponding to the current scene of the terminal according to the corresponding relation between the preset scene and the numerical range;
and taking the second numerical value range as the preset threshold range.
It can be understood that the current scene of the terminal may refer to a current state of the terminal. For example, a user places the terminal in a pocket; or the distance between the wireless earphone and the terminal is longer; alternatively, the user places the terminal in an airport.
As can be understood, the process of determining the current scene of the terminal may include: the terminal judges the current scene and sends corresponding scene information to the wireless earphone. For example, when the terminal detects that the terminal is in a pocket scene, the wireless headset sends scene information "0", and the wireless headset determines that the terminal is currently in the pocket scene according to the scene information "0".
It can be understood that table 1 is a preset corresponding relationship between a scene and a numerical range, and as shown in table 1, it is assumed that a current scene of a terminal is: in the pocket scene, the preset threshold range is a numerical range 1; suppose that the current scene of the terminal is: in an airport environment with a large noise interference value, the range of the preset threshold value is a numerical value range 2; suppose that the current scene of the terminal is: if the distance between the wireless earphone and the preset threshold value range is far, the preset threshold value range is a numerical value range 3; assuming that the interference value in the current environment where the terminal is located is the interference value 1, the preset threshold range is the numerical range 4.
Scene where terminal is currently located Numerical range
Pocket scene Numerical value range 1
In an airport environment Numerical range 2
Distance from wireless earphoneFar away Numerical range 3
Interference value 1 Numerical range 4
TABLE 1
In one example, as shown in fig. 6, a process for determining a preset threshold range is described, including:
step 601: and determining the current scene of the terminal.
It can be understood that the current scene of the terminal may refer to a current state of the terminal. For example, a user places the terminal in a pocket; or the distance between the wireless earphone and the terminal is longer; alternatively, the user places the terminal in an airport.
Step 602: determining a second numerical range corresponding to the current scene of the terminal according to the corresponding relation between the preset scene and the numerical range; and taking the second numerical value range as the preset threshold range.
As can be appreciated, determining the preset threshold range has the following advantages:
(1) The preset threshold range can be obtained according to the current state of the terminal, the interference value in the environment where the terminal is located, the distance between the terminal and the wireless earphone and other scenes.
(2) By utilizing the preset threshold range, whether the signal strength of the connection between the two earphones and the terminal is different or not can be judged, so that the master earphone and the slave earphone are controlled to be switched under the condition that the quality of a wireless channel between the master earphone and the terminal is poor, and the connection stability is improved.
And in the fourth case, combining the actually measured data to determine the range of the preset threshold value.
In practical application, the actual measurement data shows that when the first signal strength, namely the strength of the signals received by the master earphone, is lower than a first threshold value of-90 dBm, and the second signal strength, namely the strength of the signals received by the slave earphone, is higher than a second threshold value of-85 dBm, the master earphone and the slave earphone are controlled to perform role switching, and data blockage can be effectively reduced.
Based on this, in one embodiment, the minimum value within the preset threshold range is-90 dBm, and the maximum value within the preset threshold range is-85 dBm.
In practical application, the actual measurement data shows that when the first signal strength, namely the strength of the signals received by the master earphone, is lower than a first threshold value of-90 dBm, the second signal strength, namely the strength of the signals received by the slave earphone, is higher than a second threshold value of-85 dBm, and the difference value between the second threshold value and the first threshold value is greater than or equal to 5dBm, the master earphone and the slave earphone are controlled to perform role switching, and data blockage can be effectively reduced.
Based on this, in one embodiment, the difference between the maximum value and the minimum value in the preset threshold range is greater than or equal to 5dBm.
In practical application, under the condition that the terminal is in a pocket scene, a control mechanism for role switching of the master earphone and the slave earphone can be started, so that the phenomenon of data transmission blockage under the condition that the signal strength of connection between the master earphone and the terminal is poor is avoided.
Based on this, in an embodiment, the determining a first signal strength of the connection between the first earphone and the terminal includes:
and under the condition that the terminal is in a pocket scene, determining first signal strength of connection between the first earphone and the terminal.
It can be understood that when the terminal is in a pocket scene, there may be a difference in signal strength between the master earphone and the slave earphone of the wireless earphone, which are respectively connected to the terminal. In order to avoid the phenomenon of data transmission jamming under the condition that the signal strength of the connection between the main earphone and the terminal is poor, when the terminal is in a pocket scene, a mechanism for controlling the main earphone and the slave earphone to perform role switching based on the first signal strength and the second signal strength is started.
In practical application, after the wireless headset is started, the first headset of the wireless headset can establish close-range wireless connection with the terminal, so that the first headset can directly receive a wireless signal sent by the terminal, determine the strength of the wireless signal and obtain the first signal strength.
Based on this, in an embodiment, the determining a first signal strength between the first headset and the terminal includes:
after the first earphone establishes wireless connection with a terminal, receiving a wireless signal sent by the terminal; and determining the signal strength of the wireless signal, and taking the determined signal strength as the first signal strength.
It is understood that the wireless connection established between the first earphone and the terminal may specifically be a bluetooth connection or the like.
In practical application, after the wireless headset is enabled, the second headset of the wireless headset may receive the connection key sent by the first headset by using a private protocol, and thus, the second headset may monitor a wireless signal sent by the terminal by using the connection key, and determine the strength of the wireless signal to obtain the second signal strength.
Based on this, in an embodiment, the determining a second signal strength between the second headset and the terminal includes:
after the first earphone establishes wireless connection with a terminal, the first earphone sends a connection key to the second earphone;
the second earphone monitors a wireless signal sent by the terminal by using the connection key; and determining the signal strength of the wireless signal, and taking the determined signal strength as the second signal strength.
As an embodiment, taking a wireless signal as a bluetooth broadcast signal sent by a terminal as an example, the second headset monitors the bluetooth broadcast signal sent by the terminal by using the connection key; and determining the signal strength of the Bluetooth broadcast signal, and taking the determined signal strength as the second signal strength.
As another implementation, taking a wireless signal as an audio signal sent by the terminal as an example, the mobile terminal sends audio to the master earphone, and the master earphone forwards the audio to the slave earphone; and the second earphone monitors the audio signal sent by the terminal by using the connection key sent by the main earphone, does not acquire audio data, only determines the signal intensity of the audio signal, and takes the determined signal intensity as the second signal intensity.
In practical application, the first earphone and the second earphone may be switched between the master earphone and the slave earphone for multiple times, but in order to prevent the master earphone and the slave earphone from being switched between multiple times in a short time due to frequent signal jumps, a minimum time interval between two times of switching may be set.
Based on this, in an embodiment, the controlling the first headset and the second headset to perform master-slave switching includes:
and when the time interval from the last master-slave switching is greater than or equal to the time interval threshold, controlling the first earphone and the second earphone to carry out master-slave switching.
For example, assuming that the time interval threshold is 5S, if the time interval from the last master-slave switching is greater than or equal to 5S, the first earphone and the second earphone are controlled to perform master-slave switching.
In one example, as shown in fig. 7, a process of controlling a first headset and a second headset to switch is described, including:
step 701: determining a first signal strength between a first earphone and a terminal under the condition that the terminal is in a pocket scene; and determining a second signal strength between the second earpiece and the terminal.
It can be understood that, as shown in fig. 8, after the wireless headset is uncapped and activated, the master and slave headsets are paired through the private protocol, and then the master headset sends the broadcast data to wait for being connected by the terminal. When the terminal is connected with the master earphone, the master earphone shares the link key with the slave earphone through a private protocol, the slave earphone can monitor communication data between the master earphone and the terminal through the key, the slave earphone determines data of a single sound channel from the monitored data, and the slave earphone starts to play the data after synchronizing with the master earphone.
It can be understood that, when the user puts the terminal in a pocket and the terminal is not located on the same side as the first earphone, that is, the master earphone, if the signal received by the first earphone, that is, the master earphone, is poor and the signal monitored by the second earphone, that is, the slave earphone, is good, the master earphone and the slave earphone can be controlled to switch based on the signal strength between the master earphone and the terminal and the signal strength between the slave earphone and the terminal.
Step 702: judging whether the first signal strength is smaller than or equal to the minimum value of a preset threshold range or not, and judging whether the second signal strength is larger than or equal to the maximum value of the preset threshold range or not; 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, step 703 is executed.
It will be appreciated that if the first signal strength, i.e. the strength of the signal received by the master earpiece, is below-90 dB from the threshold value, e.g. -92dB, and the second signal strength, i.e. -86dB, from the earpiece, it can be seen that said first signal strength is less than the minimum value of the preset threshold range-90 dB, -86dB, and said second signal strength is equal to the maximum value of the preset threshold range-90 dB, -86dB, then the master and slave earpieces are controlled to exchange master and slave earpiece roles under the private protocol.
It can be understood that, it may also be determined whether the difference between the second signal strength and the first signal strength is greater than a difference threshold, for example, if the second signal strength of the slave earphone monitoring the terminal signal is greater than the first signal strength of the master earphone receiving the terminal signal by more than 5dB, it indicates that the receiving quality of the master earphone is poor, and a data packet is easily lost after disturbance, so that the master earphone and the slave earphone are controlled to exchange roles under a private protocol.
Step 703: and controlling the first earphone and the second earphone to carry out master-slave switching.
It can be understood that, controlling the first earphone and the second earphone to switch has the following advantages:
(1) Through the numerical value of the signal intensity of being connected between two earphones and the terminal of contrast, can be under the relatively poor condition of quality of the wireless channel who is connected between main ear and the terminal, through the switching of principal and subordinate earphone, guarantee the data synchronization of two passageways, avoid taking place the data card linear to promote the stability of connecting.
(2) The slave earphone can obtain the signal intensity between the slave earphone and the terminal through monitoring, so that the master earphone and the slave earphone are dynamically switched according to the signal intensity between the two earphones and the terminal, the earphone with good signal quality can be ensured to serve as a relay role, the total blocking times are reduced, and the connection stability of the system can be ensured to be at the best level.
(3) The method can support the two earphones to seamlessly switch the master role and the slave role under the condition that the signal strength of the connection between the master ear and the terminal is poor, and data jamming is avoided.
The following describes the implementation principle of the connection control method according to the embodiment of the present invention with reference to actual experimental data.
Taking the TWS headset as an example, it is considered that there is a relatively high probability that the mobile terminal will be placed in a pair of pants when the user listens to music using the TWS headset. The human body is a large electromagnetic wave absorber, the loss of the signal transmitted by the mobile terminal is very serious in the transmission process, the loss of the electromagnetic wave is different because the paths from the mobile terminal signal to the left earphone and the right earphone, and the signal intensity difference from the mobile terminal to the left ear and the right ear is even 10-20dB under the normal condition. On the other hand, due to the structural design of the intelligent mobile terminal, the mobile terminal is placed in different pockets, the antenna performance is different, during actual use, the loss of a communication link from the mobile terminal to the earphone is jumping, when the earphone with poor signal receiving performance is the main earphone, the possibility of data loss is increased, and the phenomenon is that the earphone is stuck or is stuck more frequently.
Fig. 9 is a schematic diagram of measured data of signal strength between the master and slave earphones and the terminal, and as shown in fig. 9, it can be seen that there is a difference in the signals sent by the mobile terminal received by the master and slave earphones according to the measured data of RSSI measured in the aerospace science and technology square. Wherein, the RSSI represents the signal receiving strength.
Fig. 10 is a schematic diagram illustrating how many times the mobile terminal is placed in different pockets, and as shown in fig. 10, the number of times the mobile terminal is placed in the right two pockets is less than that in the left two pockets, as can be seen from the data of the stuck-at test performed in the airport when the earphone corresponding to the right pocket is the main earphone.
Fig. 11 is a variation trend of signal strength between the master and slave earphones and the terminal, as shown in fig. 11, in outdoor open environments such as airports and crossroads, the contact degree between the mobile terminal placed in the pocket and the skin of the human body is constantly changed due to the movement of the human body, the jump of the signal radiated by the mobile terminal is larger when the signal reaches the earphones through a complex air environment, and the influence of air transmission multipath effect is added, the transmission path of the earphones for different measurements is farther, and the electromagnetic signal is shielded by the human body more, so that in a normal case, the PHONE RSSI of the earphones on the same side is higher than the PHONE RSSI by 5-15db, and the main distribution interval of the PHONE RSSI is (-80 dB, -60 dB). If the main earphone is fixed, i.e. not switched, when the mobile terminal and the main earphone are not on the same side, the signal strength of the connection between the main earphone and the terminal is poor, which may cause data jamming. Therefore, in the embodiment of the invention, under the condition that the signal strength of the connection between the main earphone and the terminal is poor and the signal strength of the connection between the auxiliary earphone and the terminal is good, the main earphone and the auxiliary earphone are controlled to be switched, the problem of data loss caused when the mobile terminal is placed in different pockets can be solved, and the connection stability can be ensured by reducing the blocking times. For example, when the signal strength (RSSI) between the main ear and the terminal is less than-90 dBm and the signal strength (RSSI) between the slave ear and the terminal is > -85dBm, the master ear and the slave ear are controlled to switch, so that the probability of the occurrence of the stuck state can be reduced.
By adopting the technical scheme of the embodiment of the invention, the main earphone and the slave earphone are controlled to switch roles based on the first signal strength and the second signal strength, so that the problem of data blockage caused by poor signal strength of connection between the main earphone and the terminal can be avoided, and the stability of connection between the wireless earphone and the terminal is ensured.
In order to implement the connection control method according to the embodiment of the present invention, an embodiment of the present invention further provides a connection control device, which is applied to a wireless headset, where the wireless headset includes a first headset and a second headset. FIG. 12 is a schematic diagram of a connection control device according to an embodiment of the present invention; as shown in fig. 12, the apparatus includes:
a first processing unit 121, configured to determine a first signal strength between the first earphone and the terminal if the first earphone is a master earphone and the second earphone is a slave earphone; and determining a second signal strength between the second earpiece and the terminal;
a second processing unit 122, 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 a slave earphone and the second earphone is a master earphone.
In an embodiment, the second processing unit 122 is specifically configured to:
and when the first signal intensity is smaller than or equal to the minimum value of a preset threshold range and the second signal intensity is larger than or equal to the maximum value of the preset threshold range, controlling the first earphone and the second earphone to be switched.
In an embodiment, the second processing unit 122 is further configured to:
when the first signal intensity and the second signal intensity are both smaller than or equal to the minimum value of a preset threshold range, controlling the first earphone and the second earphone not to perform master-slave switching;
alternatively, the first and second liquid crystal display panels may be,
and when the first signal intensity and the second signal intensity are both greater than or equal to the maximum value of the preset threshold range, controlling the first earphone and the second earphone not to perform master-slave switching.
In an embodiment, the second processing unit 122 is further configured to:
determining the lowest sensitivity of the wireless earphone for receiving the terminal signal;
determining the preset threshold range based on the lowest sensitivity and a first preset value.
In an embodiment, the second processing unit 122 is specifically configured to:
determining a first value range based on the lowest sensitivity and a first preset value;
determining a second preset value; the second preset value represents the lowest signal strength of the connection between the first earphone and the terminal;
adjusting the first numerical range based on the second preset numerical value;
and taking the adjusted first numerical range as the preset threshold range.
In an embodiment, the second processing unit 122 is further configured to:
determining a scene where the terminal is located currently;
determining a second numerical range corresponding to the current scene of the terminal according to the corresponding relation between the preset scene and the numerical range;
and taking the second numerical value range as the preset threshold range.
In one embodiment, the minimum value in the predetermined threshold range is-90 dBm, and the maximum value in the predetermined threshold range is-85 dBm.
In one embodiment, the difference between the maximum value and the minimum value in the preset threshold range is greater than or equal to 5dBm.
In an embodiment, the first processing unit 121 is specifically configured to:
determining a first signal strength between the first earphone and the terminal if the terminal is in a pocket scene.
In an embodiment, the first processing unit 121 is specifically configured to:
after the first earphone establishes wireless connection with a terminal, receiving a wireless signal sent by the terminal; and determining the signal strength of the wireless signal, and taking the determined signal strength as the first signal strength.
In an embodiment, the first processing unit 121 is specifically configured to:
after the first earphone establishes wireless connection with a terminal, the first earphone sends a connection key to the second earphone;
the second earphone monitors a wireless signal sent by the terminal by using the connection key; and determining the signal strength of the wireless signal, and taking the determined signal strength as the second signal strength.
In an embodiment, the controlling the first headset and the second headset to perform master-slave switching includes:
and when the time interval from the last master-slave switching is greater than or equal to a time interval threshold value, controlling the first earphone and the second earphone to carry out master-slave switching.
In practical applications, the first processing unit 121 and the second processing unit 122 may be implemented by a processor in the apparatus; the Processor may be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Micro Control Unit (MCU), or a Programmable Gate Array (FPGA).
It should be noted that: the apparatus provided in the foregoing embodiment is only illustrated by dividing the program modules in connection control, and in practical applications, the processing allocation may be completed by different program modules according to needs, that is, the internal structure of the terminal is divided into different program modules to complete all or part of the processing described above. In addition, the device provided by the above embodiment and the connection control method embodiment belong to the same concept, and the specific implementation process thereof is described in the method embodiment, which is not described herein again.
Based on the hardware implementation of the above devices, an embodiment of the present invention further provides an electronic device, fig. 13 is a schematic diagram of a hardware structure of a terminal according to an embodiment of the present invention, and as shown in fig. 13, the electronic device 130 includes a memory 133, a processor 132, and a computer program stored in the memory 123 and capable of running on the processor 132; when the processor 132 executes the program, the method provided by one or more of the above technical solutions is implemented.
It should be noted that, the specific steps implemented when the processor 132 executes the program have been described in detail above, and are not described herein again.
It is understood that the electronic device 130 further includes a communication interface 131, and the communication interface 131 is used for information interaction with other devices; meanwhile, various components in the electronic device 130 are coupled together by a bus system 134. It will be appreciated that the bus system 134 is configured to enable connected communication between these components. The bus system 134 includes a power bus, a control bus, a status signal bus, and the like, in addition to the data bus.
It will be appreciated that the memory 133 in this embodiment may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a magnetic random access Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and 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), enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), synchronous Dynamic Random Access Memory (SLDRAM), direct Memory (DRmb Access), and Random Access Memory (DRAM). The described memory for embodiments of the present invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the above embodiments of the present invention may be applied to the processor 132, or may be implemented by the processor 132. The processor 132 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by instructions in the form of hardware integrated logic circuits or software in the processor 132. The processor 132 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 132 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located on a storage medium in memory where information is read by processor 132 to perform the steps of the methods described above in conjunction with its hardware.
The embodiment of the invention also provides a storage medium, in particular a computer storage medium, and more particularly a computer readable storage medium. Stored thereon are computer instructions, i.e. computer programs, which when executed by a processor perform the methods provided by one or more of the above-mentioned aspects.
In the embodiments provided in the present invention, it should be understood that the disclosed method and intelligent device may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps of implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer-readable storage medium, and when executed, executes the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media capable of storing program code.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
It should be noted that: "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In addition, the technical solutions described in the embodiments of the present invention may be arbitrarily combined without conflict.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present invention, and shall cover the scope of the present invention.

Claims (15)

1. A connection control method is applied to wireless earphones, wherein the wireless earphones comprise a first earphone and a second earphone; the method comprises the following steps:
determining a first signal strength between the first earphone and a terminal under the condition that the first earphone is a master earphone and the second earphone is a slave earphone; and determining a second signal strength between the second earpiece and the terminal;
and controlling 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 a slave earphone and the second earphone is a master earphone.
2. The method of claim 1, wherein controlling the first headset and the second headset for master-slave switching based on the first signal strength and the second signal strength comprises:
and when the first signal intensity is smaller than or equal to the minimum value of a preset threshold range and the second signal intensity is larger than or equal to the maximum value of the preset threshold range, controlling the first earphone and the second earphone to carry out master-slave switching.
3. The method of claim 2, further comprising:
when the first signal intensity and the second signal intensity are both smaller than or equal to the minimum value of the preset threshold range, controlling the first earphone and the second earphone not to perform master-slave switching;
alternatively, the first and second liquid crystal display panels may be,
and when the first signal strength and the second signal strength are both greater than or equal to the maximum value of the preset threshold range, controlling the first earphone and the second earphone not to perform master-slave switching.
4. The method of claim 2, further comprising:
determining the lowest sensitivity of the wireless earphone for receiving the terminal signal;
determining the preset threshold range based on the lowest sensitivity and a first preset value.
5. The method of claim 4, wherein determining the preset threshold range based on the minimum sensitivity and a first preset value comprises:
determining a first value range based on the minimum sensitivity and a first preset value;
determining a second preset value; the second preset value represents the lowest signal strength of the connection between the first earphone and the terminal;
adjusting the first numerical range based on the second preset numerical value;
and taking the adjusted first numerical range as the preset threshold range.
6. The method of claim 2, further comprising:
determining a scene where the terminal is located currently;
determining a second numerical range corresponding to the current scene of the terminal according to the corresponding relation between the preset scene and the numerical range;
and taking the second numerical value range as the preset threshold range.
7. The method according to any one of claims 2 to 6,
the minimum value in the preset threshold range is-90 dBm, and the maximum value in the preset threshold range is-85 dBm.
8. The method according to any one of claims 2 to 6,
and the difference value between the maximum value and the minimum value in the preset threshold range is greater than or equal to 5dBm.
9. The method of claim 1, wherein determining the first signal strength between the first headset and the terminal comprises:
determining a first signal strength between the first headset and the terminal if the terminal is in a pocket scene.
10. The method of claim 9, wherein determining the first signal strength between the first headset and the terminal comprises:
after the first earphone is wirelessly connected with a terminal, receiving a wireless signal sent by the terminal; and determining the signal strength of the wireless signal, and taking the determined signal strength as the first signal strength.
11. The method of claim 1, wherein determining the second signal strength between the second headset and the terminal comprises:
after the first earphone establishes wireless connection with a terminal, the first earphone sends a connection key to the second earphone;
the second earphone monitors a wireless signal sent by the terminal by using the connection key; and determining the signal strength of the wireless signal, and taking the determined signal strength as the second signal strength.
12. The method of claim 1, wherein the controlling the first headset and the second headset for master-slave switching comprises:
and when the time interval from the last master-slave switching is greater than or equal to a time interval threshold value, controlling the first earphone and the second earphone to carry out master-slave switching.
13. A connection control device is applied to a wireless earphone, wherein the wireless earphone comprises a first earphone and a second earphone; the method comprises the following steps:
the first processing unit is used for determining first signal strength between the first earphone and the terminal under the condition that the first earphone is a master earphone and the second earphone is a slave earphone; and determining a second signal strength between the second earpiece and the terminal;
and the second processing unit is used for controlling the first earphone and the second earphone to carry out master-slave switching based on the first signal strength and the second signal strength so as to enable the first earphone to be a slave earphone and the second earphone to be a master earphone.
14. An electronic device, comprising: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is adapted to perform the steps of the method of any one of claims 1 to 12 when running the computer program.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 12.
CN202110476689.5A 2021-04-29 2021-04-29 Connection control method, device, electronic equipment and storage medium Pending CN115278714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110476689.5A CN115278714A (en) 2021-04-29 2021-04-29 Connection control method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110476689.5A CN115278714A (en) 2021-04-29 2021-04-29 Connection control method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115278714A true CN115278714A (en) 2022-11-01

Family

ID=83745906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110476689.5A Pending CN115278714A (en) 2021-04-29 2021-04-29 Connection control method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115278714A (en)

Similar Documents

Publication Publication Date Title
US10412494B2 (en) Operation mode switch of wireless headphones
US10244307B1 (en) Communication of wireless headphones
US10412481B1 (en) Operation mode switch of wireless headphones
US10263668B2 (en) Dual-band wireless headphones
US10432773B1 (en) Wireless audio transceivers
US11064280B2 (en) Wireless audio system and method for wirelessly communicating audio information using the same
US11800312B2 (en) Wireless audio system for recording an audio information and method for using the same
WO2020134358A1 (en) Beam failure processing method and related device
US11171410B1 (en) Wireless audio system and method for wirelessly communicating audio information using the same
CN111436043B (en) Communication method, device, equipment and system of dual-wireless Bluetooth communication network
WO2012010060A1 (en) Method and terminal for controlling terminal signal transmission
WO2020019820A1 (en) Microphone hole blockage detection method and related product
CN112703746B (en) Method and device for processing signal, bluetooth headset and storage medium
WO2020063499A1 (en) Wireless earphones
CN110830973B (en) Method for transmitting audio information by using wireless earphone
CN110166988B (en) Wireless communication system and method thereof
KR102217564B1 (en) Electronic device and control method of thereof
KR20180093374A (en) temperature measurement way using completely wireless stereo earphones
CN115278714A (en) Connection control method, device, electronic equipment and storage medium
KR20180093373A (en) Antenna shape for completely wireless stereo earphones and inner structure of PCB
WO2010133991A1 (en) Method for operating an acoustic system and wearable acoustic device
US20210216274A1 (en) Bluetooth audio device, bluetooth audio system and operating method thereof
CN110381418B (en) Loudspeaking device, relay device and mobile terminal
KR20220104898A (en) Electronic device and method for swithching communication link with wireless audio device
CN114866998B (en) Bluetooth connection method and Bluetooth device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination