CN113038317A - Earphone control method and device, Bluetooth earphone and storage medium - Google Patents

Earphone control method and device, Bluetooth earphone and storage medium Download PDF

Info

Publication number
CN113038317A
CN113038317A CN201911359923.5A CN201911359923A CN113038317A CN 113038317 A CN113038317 A CN 113038317A CN 201911359923 A CN201911359923 A CN 201911359923A CN 113038317 A CN113038317 A CN 113038317A
Authority
CN
China
Prior art keywords
bluetooth
earphone
headset
bluetooth headset
signal strength
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.)
Granted
Application number
CN201911359923.5A
Other languages
Chinese (zh)
Other versions
CN113038317B (en
Inventor
刘佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202311788471.9A priority Critical patent/CN117528330A/en
Priority to CN201911359923.5A priority patent/CN113038317B/en
Publication of CN113038317A publication Critical patent/CN113038317A/en
Application granted granted Critical
Publication of CN113038317B publication Critical patent/CN113038317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1025Accumulators or arrangements for charging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The application discloses an earphone control method, an earphone control device, a Bluetooth earphone and a storage medium, wherein the earphone control method is applied to a first Bluetooth earphone, when the first Bluetooth earphone is used as a master earphone to be connected with an electronic device, a second Bluetooth earphone is used as a slave earphone to be connected with the first Bluetooth earphone, and the earphone control method comprises the following steps: acquiring a first signal intensity of the first Bluetooth headset and a second signal intensity of the second Bluetooth headset; determining that the first signal strength and the second signal strength meet a preset strength condition; and sending switching indication information to the second Bluetooth headset, wherein the switching indication information is used for indicating the second Bluetooth headset to be used as a main headset to establish connection with the electronic equipment. The method can realize the switching of the master earphone and the slave earphone according to the signal intensity of the Bluetooth earphone, and reduce the packet loss rate of data transmission between the electronic equipment and the master earphone and the slave earphone.

Description

Earphone control method and device, Bluetooth earphone and storage medium
Technical Field
The present disclosure relates to the field of bluetooth headsets, and more particularly, to a method and an apparatus for controlling a bluetooth headset, and a storage medium.
Background
Electronic devices, such as computers and mobile phones, have become one of the most common consumer electronic products in daily life. With the development of Wireless communication technology, users often use bluetooth headsets to listen to sound when playing sound with electronic devices, especially True Wireless Stereo (TWS) headsets with wirelessly separated left and right channels. The TWS headset is generally divided into a master headset and a slave headset, but the switching mode of the master headset and the slave headset at present is difficult to ensure the data transmission quality with the electronics.
Disclosure of Invention
In view of the above problems, the present application provides a method and an apparatus for controlling a headset, a bluetooth headset, and a storage medium.
In a first aspect, an embodiment of the present application provides a method for controlling a headset, where the method is applied to a first bluetooth headset, and when the first bluetooth headset is connected to an electronic device as a master headset, a second bluetooth headset is connected to the first bluetooth headset as a slave headset, and the method includes: acquiring a first signal intensity of the first Bluetooth headset and a second signal intensity of the second Bluetooth headset, wherein the first signal intensity is a signal intensity between the first Bluetooth headset and the electronic device, and the second signal intensity is a signal intensity between the second Bluetooth headset and the electronic device; determining that the first signal strength and the second signal strength meet a preset strength condition; and sending switching indication information to the second Bluetooth headset, wherein the switching indication information is used for indicating the second Bluetooth headset to be used as a main headset to establish connection with the electronic equipment.
In a second aspect, an embodiment of the present application provides a headset control device, which is applied to a first bluetooth headset, and when the first bluetooth headset is connected to an electronic device as a master headset, a second bluetooth headset is connected to the first bluetooth headset as a slave headset, where the device includes: the device comprises a signal acquisition module, a condition determination module and an earphone switching module, wherein the signal acquisition module is used for acquiring a first signal intensity of the first Bluetooth earphone and a second signal intensity of the second Bluetooth earphone, the first signal intensity is a signal intensity between the first Bluetooth earphone and the electronic equipment, and the second signal intensity is a signal intensity between the second Bluetooth earphone and the electronic equipment; the condition determining module is used for determining that the first signal strength and the second signal strength meet a preset strength condition; the earphone switching module is used for sending switching indication information to the second Bluetooth earphone, and the switching indication information is used for indicating the second Bluetooth earphone to be used as a main earphone to be connected with the electronic equipment.
In a third aspect, an embodiment of the present application provides a bluetooth headset, including: the first Bluetooth headset is used as a master headset and connected with an electronic device, and the second Bluetooth headset is used as a slave headset and connected with the first Bluetooth headset, wherein the first Bluetooth headset is used for acquiring a first signal intensity of the first Bluetooth headset and a second signal intensity of the second Bluetooth headset, the first signal intensity is a signal intensity between the first Bluetooth headset and the electronic device, and the second signal intensity is a signal intensity between the second Bluetooth headset and the electronic device; the first Bluetooth headset is further configured to determine that the first signal strength and the second signal strength meet a preset strength condition, and send switching indication information to the second Bluetooth headset, where the switching indication information is used to indicate that the second Bluetooth headset is used as a master headset to establish connection with the electronic device; the second Bluetooth earphone is used for responding the switching indication information and is connected with the electronic equipment as a main earphone.
In a fourth aspect, an embodiment of the present application provides a bluetooth headset, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method provided by the first aspect above.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the method provided in the first aspect.
According to the scheme, when a first Bluetooth headset is connected with an electronic device as a master headset, a second Bluetooth headset is connected with the first Bluetooth headset as a slave headset, the first Bluetooth headset is connected with the first Bluetooth headset through a first signal intensity and a second signal intensity, the first signal intensity is the signal intensity between the first Bluetooth headset and the electronic device, the second signal intensity is the signal intensity between the second Bluetooth headset and the electronic device, if the first signal intensity and the second signal intensity meet preset intensity conditions, switching indication information is sent to the second Bluetooth headset, and the switching indication information is used for indicating the second Bluetooth headset to be connected with the electronic device as the master headset. Therefore, when the signal intensity of the first Bluetooth earphone and the signal intensity of the second Bluetooth earphone meet the preset intensity condition, the second Bluetooth earphone is switched to be connected with the electronic equipment as the main earphone, the packet loss rate of data transmission between the electronic equipment and the second Bluetooth earphone is reduced, and the data transmission quality between the electronic equipment and the second Bluetooth earphone is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a flow chart of a headset control method according to an embodiment of the application.
Fig. 2 shows a scene schematic diagram provided in an embodiment of the present application.
Fig. 3 shows a flow chart of a headset control method according to another embodiment of the present application.
Fig. 4 shows a flow chart of a headset control method according to yet another embodiment of the present application.
Fig. 5 shows a flow chart of a headset control method according to yet another embodiment of the present application.
Fig. 6 shows a flow chart of a headset control method according to yet another embodiment of the present application.
Fig. 7 shows a block diagram of a headset control device according to an embodiment of the present application.
Fig. 8 is a block diagram of a mobile terminal for performing an earphone control method according to an embodiment of the present application.
Fig. 9 is a storage unit for storing or carrying program codes for implementing an earphone control method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Currently, most electronic devices, such as computers, mobile phones, music playing devices, etc., can play audio data. With the further development of the technology level and the increase of the demands of users, the electronic equipment can be connected with an external audio playing device, so that the electronic equipment can play audio data through the external audio playing device. The audio playing device may include an earphone, a sound box, a vehicle-mounted device, and the like. The audio playing device can receive the audio data transmitted by the electronic device and play the audio data. The electronic device can be connected with the audio playing device in a wired mode or a wireless mode.
When a user actually plays audio data transmitted by an electronic device using an audio playing device, the user often uses a Wireless communication headset to implement the audio playing device playing the audio data, for example, a Wireless Fidelity (WiFi) headset or a Bluetooth (BT) headset is used to play the audio data. Especially for users with high demand, audio data is played through a True Wireless Stereo (TWS) headphone in which a left channel is wirelessly separated from a right channel. The real wireless stereo earphone can realize the real wireless separation and use of the left sound channel and the right sound channel of the Bluetooth, namely, the two earphones of the real wireless stereo earphone do not need to be connected by wires. When the real wireless stereo headset is used for playing audio data, the electronic device may connect a master headset of the wireless stereo headset, and the slave headset is connected to the master headset, the master headset sends link information (including but not limited to information such as a bluetooth address) between the master headset and the electronic device to the slave headset, so that the slave headset may obtain audio data of the electronic device (e.g., a sound source device) in a bluetooth listening (Snoop) manner, so that the master headset and the master headset both directly obtain the audio data from the electronic device, and of course, after receiving the audio data sent by the electronic device through the master headset, the master headset sends the audio data to the slave headset. Therefore, stereo playing with separated left and right sound channels is realized, and song listening, conversation and wearing are improved.
In a conventional wireless stereo headset, a master-slave switching manner between a master headset and a slave headset is usually performed by using a change of a state of the headset itself as a switching basis, for example, a connection between the master headset and an electronic device is abnormal, the master headset is put into a charging box, and an electric quantity of the master headset is too low.
The inventor finds that, through long-term research, in a master-slave switching mode between a traditional master earphone and a slave earphone, changes of surrounding environments of the master earphone and the slave earphone are not considered, so that in some scenes, the signal strength of the slave earphone and the master earphone is obviously more suitable to be used as the master earphone connected with an electronic device to perform data transmission with the electronic device.
For example, the requirement of the bluetooth call scenario on the real-time performance of the transmission link is relatively high, the transmission link is allowed to transmit the same packet of call audio data at most three times, and if the electronic device still does not receive the corresponding audio data packet after the three transmissions, it means that the electronic device loses the data packet, and then the loss of the voice content in the call is caused, which brings a bad experience to the user. When the TWS headset is used for calling in some special scenes (for example, when the TWS headset and the host device are in an environment with strong interference, or the communication between the host device and the main ear needs to penetrate through the body, and the signal strength between the main ear and the host device is obviously better than that between the main ear and the electronic device), packet loss may often occur during transmission of the main headset call data, and although the auxiliary headset signal is relatively better, the auxiliary headset cannot transmit data at this time, so that a poor check may be brought to a user (for example, a phenomenon that a sound heard by a call partner is stuck).
In view of the above problems, the inventor proposes an earphone control method, an apparatus, a bluetooth earphone and a storage medium provided in this embodiment of the present application, which can switch to connect the second bluetooth earphone as a master earphone with an electronic device (e.g., a sound source device) when the first bluetooth earphone is used as the master earphone and the second bluetooth earphone is used as a slave earphone according to that the signal strength between the first bluetooth earphone and the electronic device and the signal strength between the second bluetooth earphone and the electronic device satisfy a preset strength condition, so as to ensure the data transmission quality between the first bluetooth earphone and the electronic device. When the second Bluetooth headset is a slave headset, the second signal strength is obtained based on the second Bluetooth headset monitoring the communication between the electronic equipment and the first Bluetooth headset; the earphone control mode disclosed by the invention can be suitable for the condition that the master earphone and the slave earphone both acquire audio data from the sound source equipment in one condition, wherein, the master earphone is connected with the sound source device through Bluetooth, thereby also determining the first signal intensity between the master earphone and the sound source device, the slave earphone acquires audio data by monitoring the link between the master earphone and the sound source device, so that a second signal strength can be determined from between the headphones and the audio source device, in the other case, can be suitable for the condition that the master earphone obtains the audio data from the sound source equipment and then forwards the audio data to the slave earphone, the slave headset may acquire the second signal strength by listening to the master headset's link with the audio source device, that is, in this case, listening from the headphones is for obtaining the second signal strength, not necessarily for obtaining audio data for playback. The specific headphone control method is explained in detail in the following embodiments.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a headphone control method according to an embodiment of the present application. The earphone control method is used for realizing master-slave switching between the master earphone and the slave earphone according to the signal intensity of the master earphone and the slave earphone, and ensuring the data transmission quality between the master earphone and the slave earphone. In a specific embodiment, the headset control method is applied to a first bluetooth headset. The following will describe a specific process of the present embodiment by taking the first bluetooth headset as an example. As will be described in detail with respect to the flow shown in fig. 1, the earphone control method may specifically include the following steps:
step S110: and acquiring the first signal intensity of the first Bluetooth headset and the second signal intensity of the second Bluetooth headset.
At present, many users connect with a bluetooth headset by using an electronic device to realize transmission of audio data collected by the headset and playing of audio data to be played, and particularly, for users with high demands, the TWS headset is used for data transmission with the electronic device. When a TWS headset is actually used, a master headset is usually connected to an electronic device via a bluetooth link, and a slave headset is connected to the master headset via a bluetooth link. Furthermore, in order to obtain the signal strength between the slave earphone and the electronic device, the slave earphone needs to obtain link information between the electronic device and the master earphone, so that the communication between the electronic device and the master earphone can be monitored, and further a second signal strength between the slave earphone and the electronic device is obtained.
In the embodiment of the present application, referring to fig. 2, when the first bluetooth headset 702 is connected to the electronic device 701 as a master headset, the second bluetooth headset 703 may be connected to the first bluetooth headset 702 as a slave headset. The first bluetooth headset may be a headset for playing left channel audio data, the second bluetooth headset may be a headset for playing right channel audio data, and of course, the first bluetooth headset may also be a headset for playing right channel audio data, and the second bluetooth headset is a headset for playing left channel audio data.
Since the TWS headset may cause the signal strength between the master headset and the electronic device and the signal strength between the slave headset and the electronic device to change due to the influence of the actual environment in the actual use, the signal strength between the master headset and the electronic device and the signal strength between the slave headset and the electronic device may be monitored, so that when the signal strength between the slave headset and the electronic device is more suitable for being connected as the master headset and the electronic device, the master-slave switching between the master headset and the slave headset is performed. As can be appreciated, the bluetooth signal strength between the master earphone and the electronic device can be determined because the master earphone and the electronic device establish a bluetooth link; while the slave earphone does not establish a bluetooth connection link with the electronic device, the slave earphone in the TWS earphone can establish a listening link with the electronic device, the listening link is used for listening to the transmission condition of the audio data between the master earphone and the electronic device, and therefore, the signal strength between the slave earphone and the electronic device can also be determined.
In some embodiments, the first bluetooth headset, which is the master headset, may begin monitoring and recording the bluetooth signal strength between the first bluetooth headset and the electronic device after establishing the bluetooth link with the electronic device. For example, in a call scenario, the bluetooth signal strength between the first bluetooth headset and the electronic device is monitored and recorded.
In this embodiment of the application, the first bluetooth headset may use the acquired bluetooth signal strength between the first bluetooth headset and the electronic device as the first signal strength. The obtained first signal strength of the first bluetooth headset may be a bluetooth signal strength between the first bluetooth headset and the electronic device at a certain time, may also be a bluetooth signal strength between the first bluetooth headset and the electronic device at multiple times, and may also be an average bluetooth signal strength between the first bluetooth headset and the electronic device within a period of time, which is not limited herein.
In this embodiment of the present application, a first bluetooth headset serving as a master headset obtains a second signal strength of a second bluetooth headset (slave headset) through a bluetooth connection link between the first bluetooth headset and the second bluetooth headset, that is, obtains a bluetooth signal strength between the second bluetooth headset and an electronic device, further, the master headset may compare the first signal strength with the second signal strength, and determine whether a master-slave switching condition is satisfied according to a comparison result, if so, send a switching instruction to the slave headset through a bluetooth link between the master headset and the slave headset, so that the slave headset performs master-slave switching, and the master headset itself also performs switching. Similarly, the second signal strength of the second bluetooth headset may be obtained by obtaining the bluetooth signal strength between the second bluetooth headset and the electronic device at a certain time, by obtaining the bluetooth signal strength between the second bluetooth headset and the electronic device at a plurality of times, or by obtaining the average bluetooth signal strength between the second bluetooth headset and the electronic device within a period of time.
Step S120: determining that the first signal strength and the second signal strength meet a preset strength condition.
In this embodiment of the application, after obtaining a first signal strength between the first bluetooth headset and the electronic device and a second signal strength between the second bluetooth headset and the electronic device, the first bluetooth headset serving as the master headset may determine whether the first signal strength and the second signal strength satisfy a preset strength condition according to the first signal strength and the second signal strength. If the first signal strength and the second signal strength meet the preset strength condition, the main earphone is required to be switched to a second Bluetooth earphone; if the first signal strength and the second signal strength indicate that the main earphone does not need to be switched to the second Bluetooth earphone, at this time, the first Bluetooth earphone can be kept to be connected with the electronic equipment as the main earphone without switching the main earphone.
In some embodiments, the preset strength condition may be a condition that characterizes the signal strength that the second bluetooth headset is more suitable as the primary headset. For example, the preset strength condition may be that the second signal strength of the second bluetooth headset is greater than the first signal strength of the first bluetooth headset, and for example, the preset strength condition may be that the second signal strength of the second bluetooth headset is greater than the first signal strength of the first bluetooth headset by a certain value, and for example, the preset strength condition may be that the first signal strength of the first bluetooth headset is less than a certain value, which is not limited herein.
It should be noted that, after acquiring the signal strengths of the two earphones, the main earphone may determine whether the preset strength condition is met, or after acquiring the signal strengths of the two earphones, the slave earphone may determine whether the preset strength condition is met.
Step S130: and if the signal intensity of the first Bluetooth earphone and the signal intensity of the second Bluetooth earphone meet a preset intensity condition, sending switching indication information to the second Bluetooth earphone, wherein the switching indication information is used for indicating the second Bluetooth earphone to serve as a main earphone to be connected with the electronic equipment.
In this embodiment of the application, when it is determined that the first signal strength of the first bluetooth headset and the second signal strength of the second bluetooth headset satisfy the preset strength condition, the master headset and the slave headset are switched, so that the first bluetooth headset is switched to the slave headset, and the second bluetooth headset is switched to the master headset. Specifically, the first bluetooth headset sends switching indication information to the first bluetooth headset, where the switching indication information is used to indicate the second bluetooth headset to establish bluetooth connection with the electronic device as a master headset. In some embodiments, after sending the switching indication information to the second bluetooth headset, the first bluetooth headset may switch itself to the slave headset after receiving indication information sent by the second bluetooth headset and used for indicating that the second bluetooth headset is ready to establish bluetooth connection with the electronic device, disconnect the bluetooth link with the electronic device, and send the connection indication information to the second bluetooth headset while starting switching to the slave headset, where the second bluetooth headset establishes connection with the electronic device immediately after receiving the connection indication information. Because the first Bluetooth headset is not immediately switched to the slave headset after the switching indication information is sent, but is switched after the second Bluetooth headset is ready, the problem that data transmission is interrupted because the Bluetooth link between the second Bluetooth headset and the electronic equipment is not established can be solved under the condition that the Bluetooth link between the second Bluetooth headset and the electronic equipment is not completed, but the Bluetooth link between the first Bluetooth headset and the electronic equipment is disconnected.
It should be noted that the first bluetooth headset may refer to a bluetooth headset currently serving as a master headset in the TWS headset, and all the bluetooth headsets serving as the master headset may automatically implement master-slave switching between the master headset and the slave headset in the use process according to the headset control method provided in the embodiment of the present application.
In the earphone control method provided by the embodiment of the application, when a first bluetooth earphone is connected with an electronic device as a master earphone, a second bluetooth earphone is connected with the first bluetooth earphone as a slave earphone, the first bluetooth earphone acquires a first signal intensity and a second signal intensity of the second bluetooth earphone, and if the first bluetooth earphone and the second bluetooth earphone meet a preset intensity condition according to the first signal intensity and the second signal intensity, switching indication information is sent to the second bluetooth earphone, and the switching indication information is used for indicating the second bluetooth earphone to be connected with the electronic device as the master earphone, so that when the signal intensity representation slave earphone of the master earphone and the slave earphone is more suitable for being used as the master earphone, the master earphone and the slave earphone are switched, so that the first bluetooth earphone is switched to the slave earphone, the second bluetooth earphone is switched to the master earphone, and the packet loss rate of data transmission between the electronic device is reduced, and the data transmission quality between the electronic equipment and the terminal is ensured.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a headphone control method according to another embodiment of the present application. The earphone control method is applied to the first bluetooth earphone, and will be described in detail with reference to the flow shown in fig. 3, where the earphone control method may specifically include the following steps:
step S210: and acquiring the first signal intensity of the first Bluetooth headset and the second signal intensity of the second Bluetooth headset.
In the embodiment of the present application, step S210 may refer to the contents of the foregoing embodiments, which are not described herein again.
Step S220: determining that the second signal strength is not less than a first threshold.
In this embodiment of the application, after acquiring a first signal strength between the first bluetooth headset and the electronic device and a second signal strength between the second bluetooth headset and the electronic device, the first bluetooth headset serving as the master headset may compare the signal strength of the second bluetooth headset with a first threshold. The first threshold may be a signal strength condition that a bluetooth headset in the TWS headset may perform data transmission with the electronic device as a primary headset, and if the signal strength of the bluetooth headset is less than or equal to the first threshold, it indicates that the bluetooth headset cannot satisfy the requirement of performing data transmission with the electronic device as the primary headset, and if the signal strength of the bluetooth headset is greater than the first threshold, it indicates that the bluetooth headset may satisfy the requirement of performing data transmission with the electronic device as the primary headset.
Step S230: determining that the first signal strength and the second signal strength meet a preset strength condition.
In this embodiment, when the signal strength of the second bluetooth headset is greater than the first threshold, it indicates that the bluetooth headset may be satisfied as a master headset for data transmission with an electronic device. Therefore, whether the first signal intensity of the first Bluetooth headset and the second signal intensity of the second Bluetooth headset meet the preset intensity condition can be continuously determined, if the preset intensity condition is met, the switching indication information can be sent to the second Bluetooth headset, and therefore the main headset can be switched to the second Bluetooth headset which is more suitable for data transmission with the electronic equipment.
In some embodiments, when the signal strength of the second bluetooth headset is less than or equal to the first threshold, the steps S230 and S240 may not be performed, that is, when the second bluetooth headset cannot serve as the master headset, the subsequent determination of whether the first signal strength and the second signal strength satisfy the preset strength condition and the switching operation of the master headset when the preset strength condition is satisfied may not be performed. Therefore, the workload of the main earphone can be effectively saved, the power consumption of the TWS earphone is further reduced, and it can be understood that when the second signal intensity is smaller than or equal to the first threshold value, the first signal intensity is possibly larger than the first threshold value, the first Bluetooth earphone can be used as the main earphone to perform data transmission with the electronic equipment, the second Bluetooth earphone can not be used as the main earphone to perform data transmission with the electronic equipment, and the first Bluetooth earphone is more suitable as the main earphone, so that the switching of the main earphone can be avoided; of course, it may also be that the first signal strength and the second signal strength are both less than or equal to the first threshold, and at this time, both the first bluetooth headset and the second bluetooth headset do not satisfy the requirement of performing data transmission with the electronic device as the main headset, so that the switching of the main headset may not be performed, and the invalid switching caused by the switching operation of the main headset is performed while the signal strength of the first bluetooth headset and the signal strength of the second bluetooth headset both satisfy the preset strength condition when both the signal strength of the first bluetooth headset and the signal strength of the second bluetooth headset are less than or equal to the first threshold, thereby effectively reducing the power consumption of the TWS headset.
In some embodiments, when both the first signal strength and the second signal strength are less than or equal to the first threshold, because neither the first bluetooth headset nor the second bluetooth headset can perform data transmission with the electronic device, the first bluetooth headset may send a prompt message (e.g., output a prompt voice, etc.) to prompt a user to change a position of the bluetooth headset, so that the signal strength of the first bluetooth headset is increased, and data transmission with the electronic device can be performed.
Step S240: and sending switching indication information to the second Bluetooth headset, wherein the switching indication information is used for indicating the second Bluetooth headset to be used as a main headset to establish connection with the electronic equipment.
According to the earphone control method provided by the embodiment of the application, when a first Bluetooth earphone is connected with an electronic device as a master earphone, a second Bluetooth earphone is connected with the first Bluetooth earphone as a slave earphone, the first Bluetooth earphone acquires first signal intensity and second signal intensity of the second Bluetooth earphone, then the signal intensity of the second Bluetooth earphone is compared with a first threshold value, when the signal intensity of the second Bluetooth earphone is larger than the first threshold value, when the first signal intensity and the second signal intensity meet preset intensity conditions, switching indication information is sent to the second Bluetooth earphone, and the switching indication information is used for indicating the second Bluetooth earphone to be connected with the electronic device as the master earphone. Therefore, the switching between the main earphone and the slave earphone is carried out when the signal intensity of the main earphone and the signal intensity of the slave earphone determine that the slave earphone is more suitable as the main earphone, so that the first Bluetooth earphone is switched to the slave earphone, the second Bluetooth earphone is switched to the main earphone, the packet loss rate of data transmission between the main earphone and the electronic equipment is reduced, and the data transmission quality between the main earphone and the electronic equipment is ensured. And the power consumption caused by the fact that the first Bluetooth headset performs subsequent processing steps can be avoided when the signal intensity of the second Bluetooth headset is smaller than or equal to the first threshold and the second Bluetooth headset does not meet the condition of performing data transmission with the electronic equipment as the main headset.
Referring to fig. 4, fig. 4 is a flowchart illustrating an earphone control method according to another embodiment of the present application. The earphone control method is applied to the first bluetooth earphone, and will be described in detail with reference to the flow shown in fig. 4, where the earphone control method may specifically include the following steps:
step S310: and determining that the first Bluetooth headset is in a transmission state of audio data between the first Bluetooth headset serving as a main headset and the electronic equipment.
In this embodiment of the application, when it is determined that the first bluetooth headset serving as the master headset is in the audio data transmission state between the first bluetooth headset and the electronic device, for example, the TWS headset is used in a scene such as an audio call scene and a music playing scene, the first bluetooth headset serving as the master headset may acquire the first signal strength of the first bluetooth headset and the signal strength of the second bluetooth headset.
In some embodiments, the first bluetooth headset may determine whether the first bluetooth headset is in a transmission state of audio data with the electronic device according to a data type of data transmitted with the electronic device. If the data type of the data transmitted between the first Bluetooth headset and the electronic equipment is an audio data type, determining that the first Bluetooth headset and the electronic equipment are in an audio data transmission state; if the data type of the data transmitted between the first bluetooth headset and the electronic device is not the audio data type, it may be determined that the first bluetooth headset and the electronic device are not in the audio data transmission state.
It should be noted that step S310 in the embodiment of the present application can also be applied to other embodiments.
Step S320: and periodically and respectively acquiring the average signal intensity among the first Bluetooth earphone, the second Bluetooth earphone and the electronic equipment as a first signal intensity and a second signal intensity.
In this embodiment of the application, the first bluetooth headset acquires the signal strengths of the first bluetooth headset and the second bluetooth headset, which may be periodically and respectively acquiring the average signal strengths between the first bluetooth headset, the second bluetooth headset and the electronic device. Specific values of the period may not be limited, and the period may be, for example, 1 minute, 2 minutes, or the like.
In some embodiments, the first bluetooth headset may monitor the bluetooth signal strength between the first bluetooth headset and the electronic device, so that the relationship of the bluetooth signal strength with time can be obtained, or the bluetooth signal strength at a plurality of moments can be obtained. The first bluetooth headset can periodically acquire the average signal intensity according to the relation of the acquired bluetooth signal intensity along with the time change or the bluetooth signal intensity at a plurality of moments.
In some embodiments, the second bluetooth headset may also monitor the bluetooth signal strength between the second bluetooth headset and the electronic device, so that the relationship between the bluetooth signal strength and the time variation can be obtained, or the bluetooth signal strength at a plurality of moments can be obtained. The second bluetooth headset can periodically acquire the average signal strength according to the relation of the acquired bluetooth signal strength changing along with time or the bluetooth signal strength at a plurality of moments. After obtaining the average signal strength, the second bluetooth headset may send the counted average signal strength to the first bluetooth headset, so that the first bluetooth headset may obtain the average signal strength between the second bluetooth headset and the electronic device.
Of course, the second bluetooth headset may also send the monitored signal strength between the second bluetooth headset and the electronic device to the first bluetooth headset, and then the first bluetooth headset periodically calculates the average signal strength between the second bluetooth headset and the electronic device.
In some embodiments, the first bluetooth headset periodically obtains an average signal strength between the first bluetooth headset and the electronic device, and the second bluetooth headset and the electronic device, each of which may be an average signal strength obtained in at least one period adjacent to the current time. Therefore, the obtained first signal intensity and the second signal intensity can reflect the signal intensity between the first Bluetooth earphone and the electronic equipment as well as between the second Bluetooth earphone and the electronic equipment, and provide accurate basis for master-slave switching of the master earphone and the slave earphone.
Step S330: and acquiring the difference value of the second signal strength and the first signal strength.
In this embodiment of the application, when the first bluetooth headset determines whether the first signal strength and the second signal strength satisfy the preset strength condition according to the obtained first signal strength and the obtained second signal strength, a difference between the second signal strength and the first signal strength may be calculated, so as to determine whether the preset strength condition is satisfied according to the calculated difference.
Step S340: determining that the difference is not less than a second threshold.
In this embodiment, after the first bluetooth headset calculates the difference between the second signal strength and the first signal strength, the calculated difference may be compared with a second threshold. If the difference is smaller than the second threshold, that is, the difference between the first signal strength and the second signal strength is not large, it indicates that the first signal strength and the second signal strength do not satisfy the preset strength condition, and the switching of the main earphone is not needed. If the difference is not less than (i.e., less than or equal to) the second threshold, that is, the second signal strength is greater than the first signal strength and greater than a certain value, it may indicate that the first signal strength and the second signal strength satisfy the predetermined strength condition, and the switching of the main earphone needs to be performed. The specific value of the second threshold may not be limited, and may be set according to actual requirements.
It should be noted that, in the embodiment of the present application, the manner in which the first signal strength and the second signal strength determined in step S330 and step S340 satisfy the predetermined strength condition may also be applied to the foregoing embodiments.
Step S350: and sending switching indication information to the second Bluetooth headset, wherein the switching indication information is used for indicating the second Bluetooth headset to be used as a main headset to establish connection with the electronic equipment.
In the embodiment of the present application, the step S350 may refer to the contents of the foregoing embodiments, and is not described herein again.
In the earphone control method provided by the embodiment of the application, when a first bluetooth earphone currently serving as a master earphone determines that the first bluetooth earphone and an electronic device are in a transmission state of audio data, average signal strengths between the first bluetooth earphone and a second bluetooth earphone and the electronic device are obtained, then a difference between the average signal strength of the second bluetooth earphone and the average signal strength of the first bluetooth earphone is calculated, if the difference is not smaller than a second threshold value, switching indication information is sent to the second bluetooth earphone, the switching indication information is used for indicating the second bluetooth earphone to be connected with the electronic device as the master earphone, so that when the signal strength characterization slave earphone of the master earphone and the slave earphone is more suitable for serving as the master earphone, the master earphone and the slave earphone are switched, so that the first bluetooth earphone is switched to the slave earphone, the second bluetooth earphone is switched to the master earphone, and the packet loss rate of data transmission between the master earphone and the electronic device is reduced, and the data transmission quality between the electronic equipment and the terminal is ensured.
Referring to fig. 5, fig. 5 is a flowchart illustrating an earphone control method according to another embodiment of the present application. The earphone control method is applied to the first bluetooth earphone, and will be described in detail with reference to the flow shown in fig. 5, where the earphone control method may specifically include the following steps:
step S410: and acquiring the first signal intensity of the first Bluetooth headset and the second signal intensity of the second Bluetooth headset.
In the embodiment of the present application, step S410 may refer to the contents of the foregoing embodiments, and is not described herein again.
Step S420: and respectively acquiring a first change rate and a second change rate corresponding to the first signal strength and the second signal strength.
In this embodiment of the application, when determining whether the first signal strength and the second signal strength satisfy the preset strength condition according to the first signal strength and the second signal strength, the first bluetooth headset serving as the master headset may respectively obtain a first change rate corresponding to the first signal strength and a second change rate corresponding to the second signal strength according to the first signal strength and the second signal strength.
In some embodiments, the first signal strength acquired by the first bluetooth headset may be a signal strength between the first bluetooth headset and the electronic device at a plurality of times within a preset time period before the current time, and the second signal strength may be a signal strength between the second bluetooth headset and the electronic device at a plurality of times within a preset time period before the current time. The first bluetooth headset may calculate an average change rate of the signal strength within the preset time period according to the signal strengths of the first bluetooth headset at a plurality of times, and use the calculated average change rate of the signal strength corresponding to the first bluetooth headset as the first change rate. Similarly, the first bluetooth headset may calculate an average change rate of the signal strength within the preset time period according to the signal strengths of the second bluetooth headset at a plurality of times, and use the calculated average change rate of the signal strength corresponding to the second bluetooth headset as the second change rate.
In other embodiments, the first signal strength acquired by the first bluetooth headset may also be a first variation curve of the signal strength corresponding to the first bluetooth headset over time, and the second signal strength may also be a second variation curve of the signal strength corresponding to the first bluetooth headset over time. According to a first change curve of the signal strength corresponding to the first bluetooth headset along with the change of time, the change rate of the current signal strength (i.e. the slope of the first change curve at the current moment) can be obtained, and the obtained change rate is used as the first change rate. Similarly, the change rate of the current signal strength (i.e. the slope of the second change curve at the current time) may also be obtained as the second change rate according to the second change curve of the signal strength corresponding to the second bluetooth headset, which changes with time.
Step S430: determining that the second rate of change is greater than the first rate of change.
In an embodiment of the present application, the first bluetooth headset may compare the second rate of change with the first rate of change after obtaining the first rate of change of the first signal strength and the second rate of change of the second signal strength. If the second rate of change is greater than the first rate of change, it may be determined that the first signal strength and the second signal strength satisfy a predetermined strength condition, that is, the second bluetooth headset is more suitable for data transmission between the main headset and the electronic device. If the second rate of change is not greater than the first rate of change, it may be determined that the first signal strength and the second signal strength do not satisfy the preset strength condition, i.e., the switching of the primary earphone is not required.
It can be understood that, when the second change rate is greater than the first change rate, it may be that the first change rate and the second change rate are both positive, and at this time, it indicates that the speed of increasing the signal strength between the second bluetooth headset and the electronic device is greater than the speed of increasing the signal strength between the first bluetooth headset and the electronic device, that is, it may be that the signal strength of the subsequent second bluetooth headset may be greater than the signal strength of the first bluetooth headset, and therefore it may be determined that the first signal strength and the second signal strength satisfy the preset strength condition, that is, the second bluetooth headset is more suitable for being used as a main headset to perform data transmission with the electronic device. If the second rate of change is greater than the first rate of change, it is also possible that the first rate of change and the second rate of change are both negative, which indicates that the speed of the decrease of the signal strength between the second bluetooth headset and the electronic device is less than the speed of the decrease of the signal strength between the first bluetooth headset and the electronic device, that is, the signal strength of the subsequent second bluetooth headset may be greater than the signal strength of the first bluetooth headset, and therefore it may be determined that the first signal strength and the second signal strength satisfy the predetermined strength condition, that is, the second bluetooth headset is more suitable for being used as a main headset to perform data transmission with the electronic device. If the second rate of change is greater than the first rate of change, it is also possible that the first rate of change is negative and the second rate of change is positive, that is, the signal strength of the first bluetooth headset is decreasing and the signal strength of the second bluetooth headset is increasing, so that the signal strength of the subsequent second bluetooth headset is greater than the signal strength of the first bluetooth headset, and therefore it can be determined that the first signal strength and the second signal strength satisfy the predetermined strength condition, that is, the second bluetooth headset is more suitable for being used as a main headset to perform data transmission with the electronic device. On the contrary, when the second change rate is greater than the first change rate, the signal strength of the subsequent first bluetooth headset is greater than that of the second bluetooth headset, so that the switching of the main headset is not required. It is understood that the rate of change of the signal intensity is indicative of the trend of the signal intensity over a preset time period, i.e. the average slope of the signal intensity curve over the preset time period.
Step S440: and sending switching indication information to the second Bluetooth headset, wherein the switching indication information is used for indicating the second Bluetooth headset to be used as a main headset to establish connection with the electronic equipment.
In the embodiment of the present application, step S440 may refer to the contents of the foregoing embodiments, and is not described herein again.
In this embodiment of the application, before the first bluetooth headset sends the switching indication information to the second bluetooth headset, the first bluetooth headset may further obtain a headset state of the second bluetooth headset, where the headset state includes a wearing state and a non-wearing state. The wearing state refers to a state that the bluetooth headset is worn in the ear of the user, and the non-wearing state refers to a state that the bluetooth headset is not worn in the ear of the user, namely, a state that the bluetooth headset is taken out of the ear of the user.
In some embodiments, the second bluetooth headset may detect a headset state of the second bluetooth headset, and specifically, the second bluetooth headset may obtain data, which is detected by the second bluetooth headset and used for determining the headset state, for example, received pressure data, detected temperature, ambient light intensity, capacitance measurement value, and the like, and determine that the second bluetooth headset is in a wearing state or a non-wearing state according to the data used for determining the headset state. The second bluetooth headset can send the headset state to the first bluetooth headset after determining the headset state, so that the first bluetooth headset can obtain the headset state of the second bluetooth headset.
Further, after acquiring the earphone status of the second bluetooth earphone, it may be determined whether the earphone status is a wearing status, and if the earphone status is the wearing status, it indicates that the second bluetooth earphone is being used by the user, so the master earphone may be switched to the second bluetooth earphone. If the second Bluetooth earphone is not in the wearing state, the second Bluetooth earphone is not used by the user currently, and the main earphone does not need to be switched to the second Bluetooth earphone.
In the earphone control method provided in this embodiment of the present application, a first bluetooth earphone serving as a master earphone obtains a first signal strength of the first bluetooth earphone and a second signal strength of a second bluetooth earphone, then obtains a first rate of change of the first signal strength and a second rate of change of the second signal strength, and when the second rate of change is greater than the first rate of change, determines that the second signal strength and the first signal strength satisfy a preset strength condition, and sends a switching indication message to the second bluetooth earphone, where the switching indication message is used to indicate the second bluetooth earphone to be connected with an electronic device as the master earphone, so that when the signal strength of the master earphone and the slave earphone indicates that the slave earphone is more suitable as the master earphone, the master earphone and the slave earphone are switched, so that the first bluetooth earphone is switched to the slave earphone, and the second bluetooth earphone is switched to the master earphone, thereby reducing a packet loss rate of data transmission between the master earphone and the electronic device, and the data transmission quality between the electronic equipment and the terminal is ensured.
Referring to fig. 6, fig. 6 is a schematic flowchart illustrating an earphone control method according to yet another embodiment of the present application. When the first Bluetooth headset is used as a master headset to be connected with the electronic equipment, the second Bluetooth headset is used as a slave headset to be connected with the first Bluetooth headset, and the number of the second Bluetooth headsets is more than one. As will be described in detail with respect to the flow shown in fig. 6, the earphone control method may specifically include the following steps:
step S510: and acquiring the first signal intensity of the first Bluetooth headset and the second signal intensity of the second Bluetooth headset.
In the embodiment of the present application, the number of the second bluetooth headsets as the slave headsets may be multiple, for example, in a teleconference scenario, one master headset is connected with the electronic device, and the other slave headsets are connected with the master headset, so as to realize the transmission of audio data in the teleconference. In this case, the first bluetooth headset may acquire the second signal strength of each second bluetooth headset.
Step S520: and respectively acquiring the difference values of a plurality of second signal strengths corresponding to the second Bluetooth headset and the first signal strength.
In this embodiment of the application, the first bluetooth headset may obtain a difference between the second signal strength and the first signal strength of each second bluetooth headset, respectively, to obtain a plurality of differences.
Step S530: determining that there are a number of differences in the plurality of differences that are not less than a third threshold.
In this embodiment of the application, after obtaining the difference values between the plurality of second signal strengths and the first signal strength, it may be determined whether there is a difference value not smaller than a third threshold in the plurality of difference values, and if there is a difference value not smaller than the third threshold, it indicates that the second bluetooth headset corresponding to the difference value not smaller than the third threshold is more suitable as a master headset to be connected with the electronic device than the first bluetooth headset, so it may be determined that a preset strength condition is satisfied.
Step S540: and acquiring a plurality of second Bluetooth earphones corresponding to the difference values not less than the third threshold value as target Bluetooth earphones.
In this embodiment of the application, the first bluetooth headset may determine a second bluetooth headset corresponding to each difference that is not less than the third threshold, and use the determined second bluetooth headset as the target bluetooth headset. It can be understood that if there are a plurality of differences determined above that are not less than the third threshold, a plurality of target bluetooth headsets may be determined; if the determined difference value not less than the third threshold is 1, 1 target bluetooth headset may be determined.
Step S550: and sending the switching indication information to a target Bluetooth earphone with the maximum signal intensity, the maximum electric quantity or the maximum data quantity of the acquired audio data, wherein the switching indication information is used for indicating the target Bluetooth earphone to be used as a main earphone to be connected with the electronic equipment.
In this embodiment of the application, when switching the master earphone, if the number of the determined target bluetooth earphones is multiple, one target bluetooth earphone may be determined according to the signal strength, the electric quantity, or the data amount of the collected audio data of the target bluetooth earphone, and then switching indication information is sent to the determined target bluetooth earphone, so as to switch the target bluetooth earphone into the master earphone to connect with the electronic device. And if the determined number of the target Bluetooth earphones is 1, switching indication information can be directly sent to the target Bluetooth earphones.
In some embodiments, when the number of the target bluetooth headsets is multiple, according to the signal strength between each target bluetooth headset and the electronic device, one target bluetooth headset with the maximum signal strength may be determined from the multiple target bluetooth headsets, and the switching indication information may be sent to the target bluetooth headset with the maximum signal strength, so as to switch the target bluetooth headset with the maximum signal strength to the master bluetooth headset, thereby ensuring the quality of data transmission.
In other embodiments, when the number of the target bluetooth headsets is multiple, the target bluetooth headset with the largest residual power can be determined from the multiple target bluetooth headsets according to the residual power of each target bluetooth headset, and the switching indication information is sent to the target bluetooth headset with the largest residual power, so that the target bluetooth headset with the largest residual power is switched to the main headset, the persistence of data transmission is ensured, and the quality of data transmission is further ensured.
In still other embodiments, audio data may be collected from the slave headset and transmitted to the electronic device through the master headset, such as in a teleconference where users of both the master and slave headsets may speak and collect audio data through their headsets. Under this condition, can acquire the data bulk of the audio data that every target bluetooth headset gathered respectively (for example can be for setting for the data bulk of long internal collection), then acquire the biggest target bluetooth headset of data bulk, and send switching instruction information to the biggest target bluetooth headset of this data bulk, switch into the main earphone with the biggest target bluetooth headset of this data bulk, thereby can reduce the audio data that the great bluetooth headset of data bulk gathered, need pass through the main earphone as the transit after, just can transmit electronic equipment, the data transmission volume of bluetooth headset has effectively been saved.
According to the earphone control method provided by the embodiment of the application, when the first Bluetooth earphone is used as the master earphone to be connected with the electronic equipment, the second Bluetooth earphone is used as the slave earphone to be connected with the first Bluetooth earphone, and the number of the second Bluetooth earphones is multiple. The first Bluetooth headset obtains the first signal intensity of the first Bluetooth headset, obtains the second signal intensity of each second Bluetooth headset, then calculates the difference value between each second signal intensity and the first signal intensity to obtain a plurality of difference values, determines a target Bluetooth headset from target Bluetooth headsets corresponding to the difference values not less than the third threshold value when determining that the difference values not less than the third threshold value exist in the plurality of difference values, and sends switching indication information to the determined target Bluetooth headset. Therefore, in an application scene of a plurality of slave earphones, master-slave switching between the master earphone and the slave earphones can be performed according to the signal intensity of each earphone, the packet loss rate of data transmission between the master earphone and the slave earphones and the electronic equipment is reduced, and the data transmission quality between the master earphone and the slave earphones and the electronic equipment is ensured.
The earphone control method provided by the embodiment of the application is described in a conversation scene.
In an actual call scenario, before a call is made, the electronic device is connected to a first bluetooth headset (master headset), and the first bluetooth headset may synchronize connection parameters of the electronic device and the master headset to a second bluetooth headset (slave headset), so that the second bluetooth headset may establish a monitoring link according to the connection parameters, or subsequently connect with the electronic device as the master headset according to the connection parameters. When the call is carried out, the electronic equipment establishes the pass and informs the first Bluetooth headset to start the call, and after the first Bluetooth headset receives the notification, the first Bluetooth headset can start to periodically count the signal intensity and inform the second Bluetooth headset to start to periodically count the signal intensity. After a period is reached, the signal intensity synchronously counted by the second Bluetooth earphone is sent to the first Bluetooth earphone, the first Bluetooth earphone judges whether the signal intensity counted by the first Bluetooth earphone and the signal intensity sent by the second Bluetooth earphone meet preset intensity conditions or not (for example, whether the signal intensity of the first Bluetooth earphone is smaller than the signal intensity of the second Bluetooth earphone is a certain value or not), if the preset intensity conditions are met, the first Bluetooth earphone can synchronously switch master-slave information to the second Bluetooth earphone, namely, switching indication information is sent to the second Bluetooth earphone, then the first Bluetooth earphone and the second Bluetooth earphone simultaneously switch master-slave between the master earphone and the slave earphone, the master earphone is switched to the slave earphone with better signal intensity in conversation, the packet loss rate of data in conversation is reduced, and therefore the user experience in conversation is improved.
Referring to fig. 7, a block diagram of an earphone control device 400 according to an embodiment of the present disclosure is shown. The earphone control device 400 employs the first bluetooth earphone, and when the first bluetooth earphone is connected to the electronic device as a master earphone, the second bluetooth earphone is connected to the first bluetooth earphone as a slave earphone. The headphone control apparatus 400 includes: a signal acquisition module 410, a condition determination module 420, and a headset switching module 430. The signal obtaining module 410 is configured to obtain a first signal strength of the first bluetooth headset and a second signal strength of the second bluetooth headset, where the first signal strength is a signal strength between the first bluetooth headset and the electronic device, and the second signal strength is a signal strength between the second bluetooth headset and the electronic device; the condition determining module 420 is configured to determine that the first signal strength and the second signal strength satisfy a preset strength condition; the earphone switching module 430 is configured to send switching indication information to the second bluetooth earphone, where the switching indication information is used to indicate that the second bluetooth earphone is used as a master earphone to establish connection with the electronic device.
In this embodiment, the headphone control apparatus 400 may further include: and an intensity determination module. The strength determination module is configured to determine that the second signal strength is not less than a first threshold before the first signal strength and the second signal strength are determined to satisfy a preset strength condition.
In this embodiment, the signal obtaining module may be specifically configured to: and periodically and respectively acquiring the average signal intensity among the first Bluetooth earphone, the second Bluetooth earphone and the electronic equipment as a first signal intensity and a second signal intensity.
In some implementations, the condition determining module 420 can include: a first difference acquisition unit and a first difference determination unit. The first difference acquisition unit is used for acquiring the difference between the second signal strength and the first signal strength; the first difference determination unit is configured to determine that the difference is not less than a second threshold.
In some embodiments, the headphone control apparatus may further include a change rate acquisition module. The change rate obtaining module is configured to obtain a first change rate and a second change rate corresponding to the first signal strength and the second signal strength, respectively, after obtaining the first signal strength of the first bluetooth headset and the second signal strength of the second bluetooth headset. The condition determining module 420 may be specifically configured to: determining that the second rate of change is greater than the first rate of change.
In some embodiments, the number of second bluetooth headsets is more than one. The condition determining module 420 may include: a second difference acquisition unit and a second difference determination unit. The second difference acquisition unit is used for respectively acquiring differences between a plurality of second signal strengths corresponding to the second Bluetooth headset and the first signal strength; the second difference determination unit is configured to determine that there are a number of differences among the plurality of differences that are not less than a third threshold.
Further, the earphone switching module 430 may include: the earphone comprises an earphone acquisition unit and an instruction sending unit. The earphone acquisition unit is used for acquiring a plurality of second Bluetooth earphones corresponding to the difference value not less than the third threshold value as target Bluetooth earphones; the indication sending unit is used for sending the switching indication information to a target Bluetooth headset with the maximum signal intensity, the highest electric quantity or the maximum data quantity of the collected audio data.
In some embodiments, the headphone control apparatus 400 may further include a state acquisition module and a first state determination module. The state acquisition module is used for acquiring the earphone state of the second Bluetooth earphone before the switching indication information is sent to the second Bluetooth earphone, wherein the earphone state comprises a wearing state and a non-wearing state; the first state determining module is used for determining that the second Bluetooth headset is in a wearing state.
In some embodiments, the headphone control apparatus 400 may further include a second state determination module. The second state determining module is configured to determine that the first bluetooth headset is in a transmission state of audio data between the electronic device and the main bluetooth headset before the first signal strength of the first bluetooth headset and the second signal strength of the second bluetooth headset are obtained.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
One embodiment of the present application provides a bluetooth headset that includes a first bluetooth headset and a second bluetooth headset. The first Bluetooth headset is used as a master headset and connected with electronic equipment, and the second Bluetooth headset is used as a slave headset and connected with the first Bluetooth headset. The first Bluetooth headset is used for acquiring a first signal strength of the first Bluetooth headset and a second signal strength of the second Bluetooth headset; the first Bluetooth headset is further configured to determine that the first signal strength and the second signal strength meet a preset strength condition, and send switching indication information to the second Bluetooth headset, where the switching indication information is used to indicate that the second Bluetooth headset is used as a master headset to establish connection with the electronic device; the second Bluetooth earphone is used for responding the switching indication information and is connected with the electronic equipment as a main earphone.
To sum up, the scheme that this application provided, when first bluetooth headset is connected with electronic equipment as the main earphone, the second bluetooth headset is connected with first bluetooth headset as the slave earphone, first bluetooth headset is through the second signal strength who acquires the first signal strength of first bluetooth headset and second bluetooth headset, if first signal strength and second signal strength satisfy and predetermine the intensity condition, send switching instruction information to second bluetooth headset, this switching instruction information is used for instructing second bluetooth headset and establishes being connected with electronic equipment as the main earphone. Therefore, when the signal intensity of the first Bluetooth earphone and the signal intensity of the second Bluetooth earphone meet the preset intensity condition, the second Bluetooth earphone is switched to be connected with the electronic equipment as the main earphone, the packet loss rate of data transmission between the electronic equipment and the second Bluetooth earphone is reduced, and the data transmission quality between the electronic equipment and the second Bluetooth earphone is ensured.
Please refer to fig. 8, which shows a block diagram of a bluetooth headset according to an embodiment of the present application. The bluetooth headset 100 may be any one of TWS headsets. The bluetooth headset 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall bluetooth headset 100 using various interfaces and lines, and performs various functions of the bluetooth headset 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The data storage area may also store data created by the bluetooth headset 100 during use (e.g., phone book, audio-video data, chat log data), etc.
Referring to fig. 9, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (13)

1. A headset control method applied to a first bluetooth headset, wherein when the first bluetooth headset is connected to an electronic device as a master headset, a second bluetooth headset is connected to the first bluetooth headset as a slave headset, the method comprising:
acquiring a first signal intensity of the first Bluetooth headset and a second signal intensity of the second Bluetooth headset, wherein the first signal intensity is a signal intensity between the first Bluetooth headset and the electronic device, and the second signal intensity is a signal intensity between the second Bluetooth headset and the electronic device;
determining that the first signal strength and the second signal strength meet a preset strength condition;
and sending switching indication information to the second Bluetooth headset, wherein the switching indication information is used for indicating the second Bluetooth headset to be used as a main headset to establish connection with the electronic equipment.
2. The method of claim 1, wherein the second signal strength is obtained based on the second Bluetooth headset listening to the electronic device for communication with a first Bluetooth headset;
before the determining that the first signal strength and the second signal strength satisfy a preset strength condition, the method further comprises:
determining that the second signal strength is not less than a first threshold.
3. The method of claim 1, wherein obtaining the first signal strength of the first bluetooth headset and the second signal strength of the second bluetooth headset comprises:
and periodically and respectively acquiring the average signal intensity among the first Bluetooth earphone, the second Bluetooth earphone and the electronic equipment as a first signal intensity and a second signal intensity.
4. The method of claim 1, wherein the determining that the first signal strength and the second signal strength satisfy a preset strength condition comprises:
obtaining a difference between the second signal strength and the first signal strength;
determining that the difference is not less than a second threshold.
5. The method of claim 1, wherein after the obtaining the first signal strength of the first bluetooth headset and the second signal strength of the second bluetooth headset, the method further comprises:
respectively acquiring a first change rate and a second change rate corresponding to the first signal strength and the second signal strength;
the determining that the first signal strength and the second signal strength satisfy a preset strength condition includes:
determining that the second rate of change is greater than the first rate of change.
6. The method of claim 1, wherein the number of the second bluetooth headsets is more than one, and wherein the determining that the first signal strength and the second signal strength satisfy a preset strength condition comprises:
respectively obtaining the difference value between a plurality of second signal strengths corresponding to the second Bluetooth headset and the first signal strength;
determining that there are a number of differences in the plurality of differences that are not less than a third threshold.
7. The method of claim 6, wherein sending the handover indication information to the second Bluetooth headset comprises:
acquiring a plurality of second Bluetooth earphones corresponding to the difference values not less than a third threshold value as target Bluetooth earphones;
and sending the switching indication information to a target Bluetooth headset with the maximum signal intensity, the highest electric quantity or the maximum data quantity of the collected audio data.
8. The method of any of claims 1-7, wherein prior to said sending a handoff indication message to the second Bluetooth headset, the method further comprises:
acquiring the earphone state of the second Bluetooth earphone, wherein the earphone state comprises a wearing state and a non-wearing state;
determining that the second Bluetooth headset is in a wearing state.
9. The method of any of claims 1-7, wherein prior to said obtaining the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset, the method further comprises:
and determining that the first Bluetooth headset is in a transmission state of audio data between the first Bluetooth headset serving as a main headset and the electronic equipment.
10. An earphone control apparatus applied to a first bluetooth earphone, wherein when the first bluetooth earphone is connected to an electronic device as a master earphone, a second bluetooth earphone is connected to the first bluetooth earphone as a slave earphone, the apparatus comprising: a signal acquisition module, a condition determination module and an earphone switching module, wherein,
the signal acquisition module is configured to acquire a first signal strength of the first bluetooth headset and a second signal strength of the second bluetooth headset, where the first signal strength is a signal strength between the first bluetooth headset and the electronic device, and the second signal strength is a signal strength between the second bluetooth headset and the electronic device;
the condition determining module is used for determining that the first signal strength and the second signal strength meet a preset strength condition;
the earphone switching module is used for sending switching indication information to the second Bluetooth earphone, and the switching indication information is used for indicating the second Bluetooth earphone to be used as a main earphone to be connected with the electronic equipment.
11. A bluetooth headset, comprising: a first Bluetooth headset connected with an electronic device as a master headset, and a second Bluetooth headset connected with the first Bluetooth headset as a slave headset, wherein,
the first Bluetooth headset is used for acquiring a first signal intensity of the first Bluetooth headset and a second signal intensity of the second Bluetooth headset, wherein the first signal intensity is a signal intensity between the first Bluetooth headset and the electronic device, and the second signal intensity is a signal intensity between the second Bluetooth headset and the electronic device;
the first Bluetooth headset is further configured to determine that the first signal strength and the second signal strength meet a preset strength condition, and send switching indication information to the second Bluetooth headset, where the switching indication information is used to indicate that the second Bluetooth headset is used as a master headset to establish connection with the electronic device;
the second Bluetooth earphone is used for responding the switching indication information and is connected with the electronic equipment as a main earphone.
12. A bluetooth headset, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-9.
13. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 9.
CN201911359923.5A 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium Active CN113038317B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311788471.9A CN117528330A (en) 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium
CN201911359923.5A CN113038317B (en) 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911359923.5A CN113038317B (en) 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311788471.9A Division CN117528330A (en) 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium

Publications (2)

Publication Number Publication Date
CN113038317A true CN113038317A (en) 2021-06-25
CN113038317B CN113038317B (en) 2024-01-16

Family

ID=76458326

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311788471.9A Pending CN117528330A (en) 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium
CN201911359923.5A Active CN113038317B (en) 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202311788471.9A Pending CN117528330A (en) 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium

Country Status (1)

Country Link
CN (2) CN117528330A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501239A (en) * 2022-02-25 2022-05-13 Oppo广东移动通信有限公司 Master-slave switching method and device of earphone, Bluetooth earphone and storage medium
CN118018907A (en) * 2024-02-06 2024-05-10 广州维启通讯科技有限公司 Method for controlling earphone by using charging box touch screen

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150289124A1 (en) * 2014-04-08 2015-10-08 Nokia Corporation Method, apparatus, and computer program product for seamless switching of communication connection
US20160219358A1 (en) * 2015-01-28 2016-07-28 Alpha Audiotronics, Inc. Wireless earbuds with reciprocating leader and follower configuration
CN107145330A (en) * 2017-04-26 2017-09-08 歌尔科技有限公司 A kind of method and apparatus for connecting ears bluetooth earphone
CN107885478A (en) * 2017-09-21 2018-04-06 广东思派康电子科技有限公司 Computer-readable recording medium, communication system
CN108337074A (en) * 2018-06-22 2018-07-27 恒玄科技(上海)有限公司 The bluetooth headset wireless communications method of high reliability
CN109413526A (en) * 2018-09-30 2019-03-01 Oppo广东移动通信有限公司 Headset control method, device, electronic equipment and storage medium
CN109451473A (en) * 2018-10-15 2019-03-08 倬韵科技(深圳)有限公司 The method and system of true wireless stereo Bluetooth earphone and the pairing of bluetooth playback equipment
CN109660971A (en) * 2018-12-05 2019-04-19 恒玄科技(上海)有限公司 Wireless headset and communication means for wireless headset
CN109660906A (en) * 2019-03-12 2019-04-19 恒玄科技(上海)有限公司 Wireless Bluetooth headsets, wireless Bluetooth headsets master-slave swap optimization method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150289124A1 (en) * 2014-04-08 2015-10-08 Nokia Corporation Method, apparatus, and computer program product for seamless switching of communication connection
US20160219358A1 (en) * 2015-01-28 2016-07-28 Alpha Audiotronics, Inc. Wireless earbuds with reciprocating leader and follower configuration
CN107145330A (en) * 2017-04-26 2017-09-08 歌尔科技有限公司 A kind of method and apparatus for connecting ears bluetooth earphone
CN107885478A (en) * 2017-09-21 2018-04-06 广东思派康电子科技有限公司 Computer-readable recording medium, communication system
CN108337074A (en) * 2018-06-22 2018-07-27 恒玄科技(上海)有限公司 The bluetooth headset wireless communications method of high reliability
CN109413526A (en) * 2018-09-30 2019-03-01 Oppo广东移动通信有限公司 Headset control method, device, electronic equipment and storage medium
CN109451473A (en) * 2018-10-15 2019-03-08 倬韵科技(深圳)有限公司 The method and system of true wireless stereo Bluetooth earphone and the pairing of bluetooth playback equipment
CN109660971A (en) * 2018-12-05 2019-04-19 恒玄科技(上海)有限公司 Wireless headset and communication means for wireless headset
CN109660906A (en) * 2019-03-12 2019-04-19 恒玄科技(上海)有限公司 Wireless Bluetooth headsets, wireless Bluetooth headsets master-slave swap optimization method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501239A (en) * 2022-02-25 2022-05-13 Oppo广东移动通信有限公司 Master-slave switching method and device of earphone, Bluetooth earphone and storage medium
CN114501239B (en) * 2022-02-25 2024-05-10 Oppo广东移动通信有限公司 Master-slave switching method and device of earphone, bluetooth earphone and storage medium
CN118018907A (en) * 2024-02-06 2024-05-10 广州维启通讯科技有限公司 Method for controlling earphone by using charging box touch screen

Also Published As

Publication number Publication date
CN117528330A (en) 2024-02-06
CN113038317B (en) 2024-01-16

Similar Documents

Publication Publication Date Title
CN109445740B (en) Audio playing method and device, electronic equipment and storage medium
EP3629594A1 (en) Bluetooth earphone connecting method, electronic device and storage medium
US11632621B2 (en) Method for controlling volume of wireless headset, and computer-readable storage medium
CN112789866B (en) Audio data transmission method and equipment applied to TWS earphone single-ear and double-ear switching
CN113038316A (en) Earphone control method and device, Bluetooth earphone and storage medium
US20210219041A1 (en) Voice data transmission method, wireless earphone and tws earphone
CN109413555B (en) Audio output method and device, earphone and electronic equipment
CN109151212B (en) Equipment control method and device and electronic equipment
CN109413526B (en) Earphone control method, earphone control device, electronic equipment and storage medium
CN109271131B (en) Earphone control method and device, electronic equipment and storage medium
CN112203206B (en) Microphone hole blockage detection method and related product
US11425520B2 (en) Method for detecting blocking of microphone and related products
CN110189753B (en) Bluetooth sound box and control method, system and storage medium thereof
CN109358832A (en) Audio frequency transmission method, device, electronic equipment and storage medium
CN110602683B (en) Bluetooth control method, device, mobile terminal and storage medium
CN109298846B (en) Audio transmission method and device, electronic equipment and storage medium
CN111343541A (en) Control method and device of wireless earphone, mobile terminal and storage medium
CN113553025B (en) Control method and system of Bluetooth headset based on game mode
CN109151669B (en) Earphone control method, earphone control device, electronic equipment and storage medium
CN113573202A (en) Data transmission control method and system of Bluetooth headset
CN113038317B (en) Earphone control method and device, bluetooth earphone and storage medium
CN115022766B (en) Audio data playing method and equipment
CN114866998B (en) Bluetooth connection method and Bluetooth device
CN114501239B (en) Master-slave switching method and device of earphone, bluetooth earphone and storage medium
WO2020082387A1 (en) Method for changing audio channel, and related 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
GR01 Patent grant
GR01 Patent grant